We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: Ghanshyam Patel
Last Updated: 2016-02-18
Package Version: 1.1.0.0
Category: Communication
Downloaded: 1437 times
Followed by: 1 user
License: MIT license
The project transmits an encoded sensor reading wireless using the UART module. The data sent can be unencrypted for a higher chance of the data being accepted or it can be XTEA encrypted.
The project uses PIC12F1822 and PIC12F1840 (code can be used interchangeably for both) for testing but the examples are only for PIC12F1840.
Do you want to subscribe in order to receive notifications regarding "Wireless Light Status Indicator Using Low Cost RF Module" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Wireless Light Status Indicator Using Low Cost RF Module" changes.
Do you want to report abuse regarding "Wireless Light Status Indicator Using Low Cost RF Module".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1327249865_wireless_light_s_mikrobasic_pic.rar [230.99KB] | mikroBasic PRO for PIC |
|
Project:
When a device in a secluded location malfunctions it continually flashes a LED to indicate that it has failed. The wireless modules can be used indicate a failure in a more convenient location. The photoresistor is used to isolate the transmitter from the device. The LED is off by default so the transmitter sets a flags if the LED was on during a four second transmission interval. If the receiver sees that the flag was set then it turns on an indicator LED and a buzzer.
The RF modules work well if data is continuously transmitted; however, this project only requires an update every four seconds which make the modules prone to a lot of noise (especially when the transmitter is off). To eliminate unwanted noise all data is sent twice and encoded in this general form:
· Unencrypted: Higher chance of the data being accepted due to the lower amount of data; very unlikely to receive inaccurate data
o Sync Byte (85, 0x55, 0101010101)
o NOT Sync Byte (170, 0xAA, 1010101010)
o 16-bit Address
o Byte contain status flag
· XTEA Encryption: Data loss is slightly more but it will be secure and guaranteed to be accurate
o Sync Byte (85, 0x55, 0101010101)
o NOT Sync Byte (170, 0xAA, 1010101010)
o 64-bit Encrypted Data using a 128-bit key
§ This project uses a 32-bit address to set the key
§ The higher 32-bits contain the 32-bit address
§ The lower 32-bits contains the status flag
Edit v1.1.0.0:
The RF receiver does work well in the long run so a way around this is to reset the RF receiver and the microcontroller in a fixed interval. This project resets every 62.91456s (to keep transmission data interval and receiver reset out of sync). The microcontroller is reset using the internal Reset() command and the RF receiver is reset using a PNP transistor (P-Channel MOSFET will work just as well).
Modification Tips:
· The XTEA encryption relies on numbers overflowing so stack overflow reset must be disabled.
· A single wire can replace the RF module (TX->RX) so the program should be first tested without any wireless function
Examples of the RF Wireless Module:
315MHz:
Receiver: http://www.sparkfun.com/products/10533
Transmitter: http://www.sparkfun.com/products/10535
Pair: http://www.robotshop.com/ca/seeedstudio-315mhz-rf-low-cost-transmitter-receiver-pair-3.html
434MHz:
Receiver: http://www.sparkfun.com/products/10532
Transmitter: http://www.sparkfun.com/products/10534
Pair: http://www.robotshop.com/ca/433mhz-high-sensitivity-transmitter-receiver-pair-rxa33.html