Sketch works on Uno, but not pro mini



  • Hi all. I'm not entirely new to the MySensors library, I've used it successfully for sending temp data to a gateway, then logging it to a database.

    My problem now: I'm trying to build a node which can both send and receive data. The node has a 16x2 LCD attached via I2C, two DS18B20 temp sensors, two relays, and of course the radio.

    I prototyped the node with an Uno and breadboarded the sensors and relays. The code successfully sends data to the gateway.

    My final intended form factor is a pro-mini with a proto board I put together with connections for everything. Connecting the Uno to the pins where the pro-mini would be sitting, everything still works as expected.

    Now, plug in the pro-mini and download the sketch. During the initialization, the call to node.begin(xxx, xxx) never returns. I followed it all the way down until I hit the RF24 library. The MySensors library tries to find a parent node by sending a message. The RF24::write function is called, but never returns.

    I also tried this on a breadboarded bare bones 8Mhz arduino with the same failing results as the pro-mini. I've tried a different pro-mini, from a different manufacturer with the same failing results. I tried my older Duemilanove with a 328 and it works like the Uno.

    Bottom line: The sketch works great on a full size arduino, but fails on a mini and breadboarded 8Mhz chip.

    Final note: Both pro-minis were running at 5v, 16Mhz, just as the Uno. The code is right around 24k when compiled.

    Anyone have any thoughts for this weird problem?



  • This could be a power problem. The UNO has a much better voltage regulator circuit. Did you connect a capacitor to the nrf24?



  • For power, I'm using an LP2950 3.3v. I'm using a separate LP2950 5v to power the arduino and LCD. The 3.3v rail only powers the radio.

    Short answer, yes, I've tried radios both with and without the capacitor.

    Funny thing though... with my power arrangement, the power from the USB adapter provides the 5v rail, but not the 3.3v rail. Your answer made me think about that.

    So, I tried both the radio with the capacitor, and plugging in my external power supply. But never did both together. In this application, the external power was necessary to power the 3.3v rail, and the capacitor was also necessary.

    Thanks so much for guiding my thoughts in the right direction!

    To clear up any ambiguities: The capacitor was the key to solving this problem. That and the external power. The project now works as expected (minus any debugging I might still need to do).


Log in to reply
 

Suggested Topics

  • 1
  • 10
  • 2
  • 1
  • 2
  • 3

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts