Go Down

Topic: Manchester encoding library for RF links. (Read 21402 times) previous topic - next topic

carl47

RobertL

THE CODE HAS A BUG

This was discovered by mchr.

I wont update my code because mchr has done a great job on improving the library.

I would now direct anyone using this code to use his modifications:

http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-part-3.html




The latest version of this library is now available from the GitHub repo linked from my latest blog post: http://mchr3k-arduino.blogspot.com/2012/01/wireless-sensor-node-code-management.html

I have now added interrupt driven message reception to the Manchester library. Full details are available here: http://mchr3k-arduino.blogspot.com/2012/02/wireless-sensor-node-part-6.html

sbright33

Can you show us an example of the hardware?  Which RF module?
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

I'm using the following RF components:

http://www.alpha-crucis.com/en/wireless/1829-rf-link-transmitter-315mhz-3700386105357.html
http://www.alpha-crucis.com/en/wireless/1827-rf-link-receiver-4800bps-315mhz-3700386105333.html

You can find similar parts on many sites. There is a picture of my breadboard setup in the blog post which I linked.

tytower

#20
Feb 07, 2012, 10:49 pm Last Edit: Feb 07, 2012, 10:55 pm by tytower Reason: 1
http://secure.oatleyelectronics.com//product_info.php?products_id=747&osCsid=60e2f6876e4457d624342ead0ffa1a0a

These run at 12 V and I get 2 miles
A little higher in frequency but getting the antenna the right length is critical to reduce noise in all of these devices and not enough emphasis is placed on this.

The louder the signal the less the noise in radio . You can always add a signal adjustment pot to turn it down !
Governments should do what they were designed to do only.
Manage the larger issues best done by Government.
My Family and my Property are no

falafel

The original code works for RX and TX on ATTiny85.
The new library doesn't work for RX under ATtiny85.

The only issue I had with the previous library the that the timeout didn't work on the receiver and it would block.


Anders 2009



Great work!

This is gold to me. I have been considering rolling my own Manchester encoding library and was quite puzzled that there wasn't one available already.

A little bit unfortunate that it seems to have split/forked into two (carl47 original and mchr3k streams).

Am I right to assume that the preferred version if the new mchr3k version on Github? (as you seem to suggest in you comment above regarding the bug carl47).

Thanks for putting together and sharing!

Anders


carl47

yes, at this time I would recommend mchr3k version.

Anders 2009

Thanks,
I figured so.

Have the new mchr3k version running now. Had some trouble getting it to work as his example code does not compile... :-/

On the other hand, most of them were minor errors.

Have put together a rig with a laser and a photodiode and sending Manchester encoded data across. Too bad it doesn't decode at this point. Need to do a whole lot of debugging now.

Anders

Hi,

And thank you very much for your work on maintaining this library.

I needed to use the library on an atmega8 but it didn't compile. So I tried changing the MANCHESTER.cpp file to add support for the Atmega8.

I have tested it as a transmitter at 8 and 16Mhz, transmitting about half a meter.

Warning: I am not a programmer, and this is the first time I have messed with timers and such. I just thought it would be nice to at least try to fix it myself instead of just adding an issue and waiting for others to fix it... I know nothing about github, sorry, so I don't know how to do push requests (or is that pull requests) and such. So I post it here instead.

I guess what it needs is a changed timer/interrupt settings to suit the Atmega8, but timers/interrupts/clocks and all that is very new and confusing to me. However, after a couple of hours studying the source code and the datasheet for the Atmega8 I came up with this addition to the .cpp file:

Code: [Select]

#elif defined(__AVR_ATmega8__)
  TCCR1A = _BV(WGM12);
  #if F_CPU == 8000000UL
TCCR1B =  _BV(CS12);
  #elif F_CPU == 16000000UL
TCCR1B =  _BV(CS12) | _BV(CS11);
  #else
#error "Manchester library only supports 8mhz, 16mhz on ATMega8"
  #endif
  OCR1A = 4;
  TIFR = _BV(OCF1A);
  TIMSK = _BV(OCIE1A);
  TCNT1 = 0;

#else


I just added it above the definition for the Atmega328, and to my big surprise, it seems to work.
http://www.bredo.no

dwhacks

I know this is an old thread.

I was wondering, has anyone done any recent work on this? Is this still the prefered library to use when usinging multiple micro controllers and possible varying speeds?

Is there a way to send a string litteral with this library?

diasr001

i am currently trying to find a way to communicate with a attiny 45 wirelessly from a arduino uno and cant seem to find any code that works i have tried Manchester but it does not compile it just keeps spitting out erros can anyone help me

hi diasr, im having problems too........im using attiny85 as tx  and arduin uno as rx................ im confused as how to burn 8mhz bootloader?     do use the high-low tech blog method or must i use daemillis core according to mch3k's blog

Go Up