ATMega32u4 + RFM69 + MySensors = Working!?



  • I designed a ATMega32u4 + RFM69 radio PCB for my own use and I wonder if the 32u4 chip has been used or tested with MySensors.

    I started a thread many, many months ago where I was testing a Pro Micro board with MySensors, and never got it to work. Pro Minis worked just fine.

    I see everyone using Nanos and Micro with the ATMega328p chip, but almost nothing at all with the ATMega32u4. and I wonder why?

    Before I start down that road, I figured I'd ask.


  • Hero Member

    Im by no means an expert...but...
    isn't the key difference of the two that one 32u4 has a built in USB controller, whereas the 328p doesn't and relies on an external USB controller (FTDI usually.)
    All other pins are the same
    So assuming the available arduino memory space etc is the same ( or more) then I cant see why it wouldn't work.

    Personally I use Nano's are they are real cheap, or boards that require an external FTDI programmer ( Rboard/RBoardMini/Sensbender ).

    I do have some Leonardo's which use the 32u4 chip, but never tried them with MySensors....

    Didn't answer your question eh!.... Perhaps someone else is using them? 😉



  • Just a question, why do you use the 32u4 ? from my newbie perspective when comparing it to the mini pro it costs 2-3 times more but have the advantage of adding the usb function.

    But if I want also usb I could buy the nano witch has more GPIOs and is around 50% of the price.

    Or have I missed something?



  • A 32u4 based Arduino board will be more expensive vs a 328p board. That is for sure. But I find some advantages with going the 32u4 route.

    1. a big one on my list is support for an attached rechargeable Lipo battery and the recharging of that battery through the onboard microUSB port. If rechargable bty support is not required, this may not matter. Of course you can always detach the LiPo and charge separately, but I like the convenience, especially when nodes are installed and a pain to move.

    2. back to cheaper. to me its a toss up. By itself the 32u4 chip is more expensive vs the 328p but if the number of nodes is low you need to factor, you paid for a separate FTDI programmer. In large networks, the extra costs savings per node will be significant but with smaller networks negligible.

    Also, I just like the simplicity of one connector for charging/programming. Plus, no ugly FTDI pin headers on my nodes.

    Not sure if this compelling for everyone, but I like it.

    So back to the original question. Does a 32u4 Arduino board work WELL with MySensors? I know the RFM69 library that I plan to use supports 32u4 MCUs.\

    thanks.


  • Admin

    Someone seems to run 32u4... took in a PR which fixed some problem in January.

    https://github.com/mysensors/Arduino/pull/378



  • You can use a cheap usb to rs232 like "CH340G"


  • Hero Member

    @gregl said:

    isn't the key difference of the two that one 32u4 has a built in USB controller, whereas the 328p doesn't and relies on an external USB controller (FTDI usually.)

    That's important, but there are many other differences vs ATMega328p. Offhand, there's an extra 0.5K RAM. Second 16 bit timer (Timer3) instead of 8 bit Timer2; plus high speed 10 bit Timer 4. SPI and TWI on different pin #'s (as seen by Arduino). More ADC pins, and a 10x/200x differential amplifier; different voltage ref (2.56v vs 1.1v). And various changes to interrupts or registers based on these. So some less-used libraries need porting, as well as changes to example code. Not sure how these differences affect the core of MySensors; you might have to try it out. There's a good chance that it would work, or that the changes needed would be minor.

    The Leonardo is gone from the Arduino.cc product line, but the Micro is still sold so presumably the chip continues to be supported.


Log in to reply
 

Suggested Topics

  • 87
  • 5
  • 10
  • 7
  • 3
  • 7

56
Online

11.4k
Users

11.1k
Topics

112.6k
Posts