Shop OBEX P1 Docs P2 Docs Learn Events
Encoding Wireless Data — Parallax Forums

Encoding Wireless Data

jhtoolman2000jhtoolman2000 Posts: 9
edited 2010-04-28 02:06 in Propeller 1
Hello to all,
Any suggestions on this?--I'm sending serial data wirelessly (right now it's just a byte) via full duplex comm object.· I'm good at 1200 baud at about 15 ft but start getting all kinds of erractic data past this range.· ·My old setup· I was able to get 200-300ft reliably but I was using an encoding and decoding IC's (The encoding IC took 4 bits of data, added an 8 bit address and was sent out serially to the transmitter.· The·receiver would receive this serial data, send it to the decoding IC that checked the address that was set on it's own pins and if it matched would send the 4 bits of data to it's output pins which would be monitored by a LED on each pin.)· Because I wanted to monitor more pins, I went to the Propeller.· Now I have a propeller on each end.· Able to monitor 8 sensors now (just monitoring on or off).· I'm sending all 8 bits of data (which are the 8 sensor on or off state) in a byte over to the transmitter.· However, I think the reason I'm getting erractic behavior now is because I'm no longer encoding or decoding like I was with the old setup.· I'm basically just sending raw data.· I'm limited to a byte with full duplex.· Any recommedations to encode my data?· I would like to add more sensors than 8 once I get the encoding/decoding figured out.· Thanks so much in advance!
Jon

Comments

  • LeonLeon Posts: 7,620
    edited 2010-04-27 15:10
    You need to use Manchester code if you are using a simple transmitter and receiver.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • jhtoolman2000jhtoolman2000 Posts: 9
    edited 2010-04-27 16:15
    My thinking was taking a byte of data, breaking it up into (2) 4 bits, add·a 4 bit address and then send over 2 bytes (4 data/4 address) then on the receiver end-check to make sure the 4 bits of address matches a set address in the receiving propeller and if it does pass the 4 data bits onto their respective pins.· That may make it more reliable.· Any suggestions?
  • LeonLeon Posts: 7,620
    edited 2010-04-27 17:49
    That won't help. If you are using a simple transmitter and receiver, you need NRZ, as you get with Manchester code. Ordinary async data isn't NRZ.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2010-04-28 02:06
    Re "My old setup I was able to get 200-300ft reliably but I was using an encoding and decoding IC's "

    Did anything else change, eg the brand of RF module? While most RF transmitters are limited to 10mw, there is a big difference in receiver sensitivity -90db for $2 modules vs -123db for $20 modules. That is over a 1000 to 1 difference in sensitivity which affects the range a lot.

    You can do a poor man's manchester coding by sending a byte and then sending its inverse (subtract it from 255). This balances the bits. Also by setting the reference volts midrange by sending a preamble of ascii 'U' which is 01010101 and send a few of those. And you can create simple packets with a checksum. A CRO helps a lot, especially when spotting nearby interference from garage door openers etc.

    I've got a shed full of modules that don't work as well as claimed, and I've narrowed it down to a couple of brands that work brilliantly, with ranges of 1-2 kilometers using only 10mw of Tx power, and 100% reliability transferring 100 kilobytes or more of information.

    There are some other tricks too, but it depends on the module. Which brand are you using?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.smarthome.viviti.com/propeller
Sign In or Register to comment.