TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (91 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139271 times)
  2. FAT32 Library (71755 times)
  3. Network Ethernet Library (57128 times)
  4. USB Device Library (47432 times)
  5. Network WiFi Library (43093 times)
  6. FT800 Library (42409 times)
  7. GSM click (29835 times)
  8. mikroSDK (28104 times)
  9. PID Library (26886 times)
  10. microSD click (26198 times)
Libstock prefers package manager

Package Manager

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]

< Back
Project

Wireless Light Status Indicator Using Low Cost RF Module

Rating:

5

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.

No Abuse Reported

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".

  • Information
  • Comments (0)

Project Blog

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

ALSO FROM THIS AUTHOR

USB Logic Tool - PIC18F14K50 in mikroBasic, mikroC, MPLAB C18

5

The device is meant to be a prototyping aid and designed to work well by minimizing breadboard space used, interaction through a visual interface, easy setup and low cost. The low cost allows it to be built at home or a PCB can be purchased for a low price.

[Learn More]

Microchip HID Bootloader Template and ADC Over USB for PIC18F and PIC24F (PIC18F14K50, PIC18F27J53, PIC18F2553, PIC18F4553, PIC24FJ64GB002 Tested)

15

A template for mikroBasic, mikroC and MPLAB C18/C30 that is compatible with Microchip's HID Bootloader for PIC18F and PIC24F microcontrollers and PIC18F14K50, PIC18F27J53, PIC18F2553, PIC18F4553 and PIC24FJ64GB002 have been tested. ADC Over USB Example (firmware and Visual Basic 2010 project) and a custom HID bootloader project are also included.

[Learn More]

NEC IR Protocol Encoder/Decoder with PIC16F150X Timer1 Gate signal capture (MPLAB XC8, mikroC, mikroBasic)

0

A project to encode (remote) and decode (receiver) InfraRed signals using the NEC protocol. It uses the Timer1 Gate function to continually capture the signal to reduce software load and gives it a fast response. The idea is to reverse polarity on the Timer1 Gate capture as soon as it interrupts so it can capture both the high & low signals.

[Learn More]