1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

wireless communication

Discussion in 'Microcontrollers' started by MrDEB, Feb 13, 2012.

  1. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    I have the transmitting code working good at the 2400baud now to write the receiving code. But I was thinking your going to need to flash some leds


    Maybe get by with 60mA radio 40mA pic 1 or 2 mA your looking like 100 plus mA and you can't put the brake lights to sleep radio has to be on the receive instructions


    <<< or XXXX or >>> you could send the commands with a small 6 pin chip but the brake lights is going to need something a little bigger
     
    Last edited by a moderator: Sep 10, 2013
  2. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Nigel, from what I have seen from some of these new devices (like the NRF24L01) they are a lot more sophisticated than the old analogue ac-coupled tansmitter/receiver with FSK etc. They allow high datarates and preserve the mark:space of the original signal very well, many of the examples just connect the transceivers to USART or whatever prototcol and it appears that you don't need to use manchester or keep the 1 to 0 ratio even etc as with most old hardware.
     
  3. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    Mr Rb from what I have found the tx and rx set Mrdeb posted can use Uart at 2400baud It would be nice if they posted a data sheet of there rx tx set but they don't. Just point you to some arduino code that points you to sparkfun and a set that they did sell.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,229
    Likes:
    641
    Location:
    Derbyshire, UK

    You're not comparing like with like, that's a 2.4GHz complete transceiver which includes a processor on board and does all the Manchester coding itself. I'm talking about cheap (and dumb) licence free UHF modules - which you can also buy (but more expensively) with Manchester built-in, or as an extra interface chip.

    So that module doesn't 'preserve' the mark space ratio, it encodes the data to prevent the need.
     
  6. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,672
    Likes:
    215
    Location:
    Brisbane, Australia
    The original 555 circuit won't suffer from the perceived manchester encoding issue...
     
  7. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,229
    Likes:
    641
    Location:
    Derbyshire, UK
    No, but is completely crap :p
     
  8. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Sorry Nigel, my mistake. :) I saw his original link to the RF module and that same ITEAD company sells NRF24L01 modules for $5.50;
    http://iteadstudio.com/store/index....oducts_id=53&zenid=3t6loifk39rgh78evp84nn5tq5
    so I assumed he was using that modern module (or was going to when micros became the plan) when in fact he was using the old 315MHz 1980's style modules...
     
  9. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,229
    Likes:
    641
    Location:
    Derbyshire, UK
    VERY reasonable price :D

    It would be a good choice as long as the shorter range of 2.4GHz isn't a problem.

    At that price I quite fancy ordeing a couple, even though I don't need any :p
     
  10. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    I am only needing to transmit the state of two switches up to 8feet or less (the transmitter is on a helmet while the LEDs, PIC etc are mounted on the back of the bike.
    5 feet would do it as well.
    I even considered IR but in daylight IR is iffy.
    Being the short distance I figured the 555 but I agree with Nigel that it has issues of readability.
     
  11. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,229
    Likes:
    641
    Location:
    Derbyshire, UK
    Nothing 'iffy' about IR in daylight - presumably you weren't doing it properly :D

    More of a problem is the degree of 'line of sight' required.

    Again, my tutorials show how to do IR 'pic to pic' as well as wireless.

    Incidently, following on from my last post - I've ordered a couple of the nRF2401 modules to have a play with, not as cheap as those listed above, but not too expensive (£12.85 inc. postage for the pair from a UK Ebay shop).
     
  12. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
    IR if its not pulsed, as I understand it, is iffy in daylight.
    I looked over your site and I can't (going to look again) the schematic for the wireless.
    Presently trying to finish up my PIC controlled soldering iron. This bike project is next on my list as well as etching a board to contain the parts for your tutorials.
     
  13. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,229
    Likes:
    641
    Location:
    Derbyshire, UK
    You don't use IR remote control without pulsing it.

    They are all under Hardware:

    http://winpicprog.co.uk/pic_tutorial_wireless_board.htm
     
  14. MrDEB

    MrDEB Active Member

    Joined:
    Apr 16, 2007
    Messages:
    4,364
    Likes:
    22
  15. DirtyLude

    DirtyLude Well-Known Member

    Joined:
    Aug 5, 2003
    Messages:
    1,904
    Likes:
    56
    Location:
    Toronto, Canada
    I've recommended it before, and I'll recommend it again. RFM12B for a simpler digital transceiver, RFM22B if you want all the bells and whistles of inbuilt encoding and larger internal buffer. Comes in 434, 868, and 915Mhz. There are tutorials out there and even tools for the proper initial register setup, which is the most daunting task of using these things is setting them up properly, but you can usually steal someone elses setup.

    The 'dumb' RF modules just don't make sense anymore as they are generally even more expensive for both modules than a full HopeRF or Nordic Transceiver.

    Setup tool:
    http://tools.jeelabs.org/rfm12b

    I did a ebay search and oddly they are selling RFM12B's for way more on there then they are at the regular higher priced retailers. I got a bunch directly from the manufacturer for $4 each, but I don't think that's an option anymore.
     
  16. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,672
    Likes:
    215
    Location:
    Brisbane, Australia
    As far as all the manchester hype goes, it's not required for short distances (no idea about long), even for cheap receivers (e.g. http://www.electro-tech-online.com/custompdfs/2012/02/650201133G_um.pdf, this board doesn't even use resistors as a cost-saving exercise; it uses carbon traces as resistors)

    For a 2400,8,n,1 transmission of "\x05\x0A", the receiver waveform is attached; note there is some noise before the data, but the data is well represented.
     
  17. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,229
    Likes:
    641
    Location:
    Derbyshire, UK
    Showing just the receiver output isn't much of a demonstration - try displaying both input to the transmitter and output from the receiver on a double beam scope.

    This make sit pretty obvious why Manchester (or something else) is very important for wireless communication.

    As long as slow speed is OK, and reliability isn't important you can 'get away' with inverted RS232, in the case I used it (simple remote control for a robot) it worked fine, because of slow speed and continually sending the data.
     
  18. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,672
    Likes:
    215
    Location:
    Brisbane, Australia
    The scope trace shows a nicely formed 2 byte reception. For your enjoyment, the transmitter data is shown above

    Not obvious in this case, no.

    The OP's requirement for an output when a switch is pressed fits in with both the 'low-speed' and potential for continuous sending of data; consequently there is no need to confuse him with extra encoding/decoding requirements.
     
    • Like Like x 1
  19. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,807
    Likes:
    135
    Location:
    morristown,tn
    I've looked at a bunch of apnotes and code and they all show simple serial out serial in works fine as long as your in range.
     
  20. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    I'm not taking either side re the manchester but it does look in your example that the first few received bits have an imperfect mark:space ratio, then near the end of the transmission the received bits look to have settled down to the proper mark:space ratio.

    As a suggestion you could transmit a leader byte like 0x55 that balances the AC receiver before the proper data byte(s)?
     
  21. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,672
    Likes:
    215
    Location:
    Brisbane, Australia
    They're still readable though



    A nice idea, but I'm not sure how much help that will be; you still need a method of extracting the 0x55 or else you won't be able to detect the start and stop bits of the characters
     

Share This Page