I am having issue powering up my new Motes RFM69HW when connected to VIN. I searched the forum and found this info: https://lowpowerlab.com/forum/moteino/moteino-power-up-problem/msg16607/#msg16607.
However, I shorted GND and DTR with a wire and it worked once only. I tried adding a 0.1uF cap across RST and GND. I see 3.3V at both 3v3 output pins. The first mote would blink a couple times then stay solid for a second while the 2nd mote won't even blink.
Both motes work flawlessly powered through FTDI/USB computer.
What is the resolution to this issue?
Thanks
Jim
Can you give more details how you are using them? Anything attached to them? Are you using the SPI?
What sketch are you trying to upload?
The initial blinking is from the bootloader.
One node has a CO2 sensor connected to it through UART (D5/D6 with software serial), and the other node has a SHT31 temp/hum sensor (I2C). The sketches work fine powered by USB/FTDI computer. They are just the modified sketches from your node/gateway examples with the necessary libraries for the sensor integrations. Both are attached.
SPI....that's for the wireless programming, right?. I am not doing any wireless flashing.
These are the motes I just received a couple days ago. BTW, I have the start of my wireless Pi gateway working with some simple python code. I am just want to power my nodes by battery to continue my testing. Each node needs to have both the CO2 sensor and SHT31 temp/hum sensor integrated.
Lastly, I am powering it with a 9V battery through VIN/GND...not the 3v3 pin OUT. I learned my lesson on that one :)
Thanks for your help in advance
Jim
If you have any signals connected to a device when the decive is supposed to be powered down be aware that if those signals are high they can parasitically power the device through the device's substrate diodes. For example, if you've got an FTDI connector driving the MCU's RX pin, but not supplying power, the MCU may remain powered up and might not get a reset. Just something to be aware of.
Mark.
Hi Mark,
I connect to the FTDI/USB to verify the sketch is working. I unplug it from FTDI/USB power and it takes about 10 sec to hook up the battery power to VIN (I've tried 4 different batteries and tested them w/multimeter as well). Even if I wait 30 min, there is no difference.
I've even taken the sensor off so there is nothing connected to the mote. Makes no difference.
I have tried both motes. Neither one blinks when I connect battery. There is 3.3v at 3v3 pin out.
And both work fine connected through FTDI/USB computer.
Such a simple thing....what am I missing?
More Info:
I powered my mote through the FTDI/USB, confirmed its working, connected the battery then disconnected the FTDI/USB power and the mote continues to work fine.
If I try to connect the battery directly, it still doesn't work.
(in the meantime, I integrated both the temp/hum & CO2 sensors, and had it powered by battery using the trick above. This trick won't work long term so I need a permanent solution.)
I'll try the the pull-up 10K resistor between SCK and 3V3, and report back.
With two Motes:
I added a 10K resistor between 3v3 and pin 13 (SCK), and tried to power with battery. No luck. LED did not blink.
I moved the resistor between 3v3 and pin 12 (MISO), and tried to power with battery. No luck. LED did not blink.
Now what??
Quote from: odiephd on February 27, 2017, 08:23:36 PM
With two Motes:
I added a 10K resistor between 3v3 and pin 13 (SCK), and tried to power with battery. No luck. LED did not blink.
I moved the resistor between 3v3 and pin 12 (MISO), and tried to power with battery. No luck. LED did not blink.
Now what??
You need to do some debugging. I think you're going to have to use a 'scope and toggle an I/O pin or two to get to the bottom of this. Can you reduce the code down to the simplest possible program that shows this behaviour?
First is to check whether the processor actually comes out of reset (toggle a I/O pin and look at it on a 'scope). Look at 3.3V on a 'scope, does it discharge fully before you re-enabled the power? Is the RST signal clean, and what you expect? If it does come out of reset is it blocking somewhere in the code and where? Is there an interrupt continually firing and making it look like it has slowed right down to a crawl (that would make the blinking frequency really, really slow so might appear to be stuck)?
Mark.
Good morning Mark. Thank you for the reply. I'm sorry, I don't have an oscilloscope to check the pins.
I just took one of the two offending motes, uploaded the basic node-testing sketch, and confirmed it worked through FTDI/USB, then disconnected it I attached the battery and it worked perfectly. I did this because last night I assembled two other motes and did the same and they worked perfectly.
Now, the problem must be the code. Oh my! My plan is to reduce my code to find the issue. I only added a couple libraries to integrate two sensors so it shouldn't be too hard to find the problem.
I will report back soon. THANK YOU !!
Jim
I suggest starting from a plain simple blinky (no extra libs or hardware). The normal blink will tell you the main program is running. Thats the simplest way to debug this problem.
I am starting with the node_testing program because it works perfectly from FTDI/USB and battery power. I compiled the sketch and looked more carefully through the log, and found a warning near the top as follows:
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_MOTEINO -DARDUINO_ARCH_AVR "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\Odiephd\Documents\Arduino\libraries\RFM69-master" "-IC:\Users\Odiephd\Documents\Arduino\libraries\SPIFlash-master" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SPI\src" "C:\Users\Odiephd\AppData\Local\Temp\arduino_build_882262\sketch\Node_testing_example_HP.ino.cpp" -o "C:\Users\Odiephd\AppData\Local\Temp\arduino_build_882262\sketch\Node_testing_example_HP.ino.cpp.o"
In file included from C:\Users\Odiephd\Documents\Cell Safe\Moteino\Node_testing_example_HP\Node_testing_example_HP.ino:27:0:
C:\Users\Odiephd\Documents\Arduino\libraries\RFM69-master/RFM69.h:128:40: warning: unused parameter 'CTLbyte' [-Wunused-parameter]
virtual void interruptHook(uint8_t CTLbyte) {};[/size]
I really don't know what this means exactly but could this be the start of the issue? How can I tell if I am using the most current RFM69 library?
Quote from: odiephd on February 28, 2017, 01:07:57 PM
How can I tell if I am using the most current RFM69 library?
Download from GitHub and you will have the most current;
https://github.com/LowPowerLab/RFM69
That's where I got it so I'm good there...
I started with the node_testing_example using Mote #1, added the Adafruit SHT31 libraries, and line by line I checked that it would power between FTDI/USB and a 9V battery on VIN. I successfully built and transmitted a new payload (called playload) with Temp, Humidity to a nearby MoteUSB receiver/Pi gateway.
I added the SandboxElectronics library & SoftwareSerial (in the correct initialization order) for the NDIR-Z16 CO2 sensor.
//#include <SoftwareSerial.h>
//#include <NDIR_SoftwareSerial.h>
//NDIR_SoftwareSerial mySensor(5,6); //Rx=5,Tx=6
- Before I added these 3 lines, Mote #1 worked perfect between FTDI/USB power and battery power.
- I added the CO2 sensor to digital pins 5,6
- When I added the below 2 libraries and initialized mySensor, it worked powered by FTDI/USB but not battery.
- When I removed 3 these lines, re-compiled, and uploaded, it worked using FTDI/USB but NOT battery.
- Including only the library include lines caused no issues.
- Problem with powering from battery occurred when I added the 3rd line, and it went to initialize mySensor which was connected.
- Tried to get Mote #1 to work right so I uploaded the original Node_testing_example to Mote #1 but it won't power by battery.
So, I switched Motes and uploaded this sketch to Mote #2 with the 3 lines above commented and the temp/hum sensor connected, and it works perfectly between FTDI/USB and 9V battery power.
Here's the stupid/newbie questions/comments:
1. Is my problem because I am using pins 5,6? Can I used pin 1=Tx, pin 0=Rx for serial communication for my CO2 sensor?
2. The two motes I used yesterday and had this problem seem to reset overnight and when I tested them with the node_testing_example, they worked perfectly. Yet, I cannot get Mote #1 to work for the moment even though I shorted RST & GND (no power connected). I also tried powering it by battery with shorted DTR and GND (a trick from another thread).
What do I try next?
Thanks
Jim
I started with fresh Mote #3 and connected my CO2 sensor only. It could not be powered by the 9V battery, yet it worked fine connected to USB. A light bulb went off and I decided to check the power requirements for the sensor.
CO2 sensor: http://sandboxelectronics.com/?product=mh-z16-ndir-co2-sensor-with-i2cuart-5v3-3v-interface-for-arduinoraspeberry-pi
Give a big warning in middle of page saying that its best to power the arduino with 12V power supply.
However, the specification sheet for the sensor says it only requires < 85mA.
See here: http://sandboxelectronics.com/wp-content/uploads/2015/06/MH-Z16_CO2_datasheet_EN.pdf
Question/comment:
- Doesn't the arduino have a voltage regulator on it? Why would powering it with a 12V supply be best?
- I was powering the Mote & CO2 sensor with 9V battery? Why wouldn't that be sufficient??
- I don't have alternative 3.3/5V power supply to connect to the sensor.
- I ordered female USB connectors and a 5V/1A cube to power my Mote and sensors. When I get that tested, I guess I will know more.
Rather confused & very much appreciate the support of the forum,
Jim
Now I'm confused.
Can you tell me
exactly what you have and
exactly how are they all connected together? Have you got an arduino? An arduino uses 5V logic on its I/O pins BTW and a moteino uses 3.3V logic and as far as I am aware not 5V tolerant.
This is the bit that I'm confused about though:
Quote
I started with fresh Mote #3 and connected my CO2 sensor only. It could not be powered by the 9V battery, yet it worked fine connected to USB.
The sensor you quoted requires a +5V supply, so presumably is that coming from the +5V rail on the arduino? If you only connected the CO2 sensor and nothing else to your moteino, how are you powering the +5V of the sensor?
That arduino +5V rail comes either directly from a USB connector, or from the output of a +5V regulator which is powered by Vin and which has to be 7V to 12V (and if it is powered from Vin there is a FET on the arduino that automatically disconnects the USB +5V from that rail). My guess is the regulator provides much better regulation on the +5V than the USB which is why they recommend using 12V.
Mark.
Mark,
I have Moteino RFM69HW version (no Arduinos). The sensor can be powered by 3.3V/5V according to website but the spec sheet says 5V. It works great when I power the Mote with USB power.
In addition to the C02 sensor, I have the SHT31 temp/hum sensor, and a photoresistor. All are connected now, powered by USB through the moteino and it streams data beautifully to my Pi gateway which has the MoteinoUSB attached.
(The part you said was confusing) If I wire up the CO2 sensor only with the moteino and power it with USB power, it works great. But, if I try to power it with a 9V battery through VIN, it does not work. It says it only draws <85mA so I don't understand why it can't work with 9V battery.
Thanks for your help!
OK. I can find no reference to being able to power it from 3.3V on the website (it mentions 3.3V or 5V selectable for IO signalling, but that's a different thing). Unless you can point me to where it explictly says this can be powered from 3.3V I think this device requires a 5V supply.
The other thing worth noting is you're taking at least 85mA from the 3.3V regulator on the moteino, which has 9V input from the battery. The regulator is dissipating (9 -3.3)*0.085 watts, i.e. about half a watt. This is a MCP1703 in what appears to be a SOT-23 package so it'll get up to 168 deg C above ambient according to the datasheet, that's some way above max working temperature. It would not surprise me if the regulator is continually thermally shutting down, that could be your reason why it doesn't work.
Mark.
This is starting to get stranger. The thread title suggests this is just the Moteino, but its clear that's not the case now.
@odiephd I want you to try a unmodified moteino only, with nothing else attached (well headers are OK), load it with a blink sketch (no sleep, no libs, nothing else). Program via FTDI then unplug and power from 9v batt. Let me know if the LED still blinks.
Felix,
Sorry I think you missed some of the info, probably because I've been posting my troubles a lot.
I did start with the node_test_example sketch with nothing connected to the mote, and it worked perfectly every time. Then, I started adding code back to try and determine if was my code. I added line-by-line checking to make sure it worked off battery each time for the SHT31 temp/hum sensor. I integrated the temp/hum sensor and had no issues at all powering it from USB or battery.
I proceeded with same mote to add the code line-by-line for the CO2 sensor. I added the #include library stmts and had no issue. Once I added the line to establish mySensor with the library, that is when it would not power up using the battery. That's what has lead me to believe I have a power issue. But, I don't understand why because the spec sheet says it draws <85mA.
To make my problems more interesting, I tried to get the mote to work again. I couldn't get the mote to work off battery even after removing the line and re-uploading the sketch that worked moments ago. It worked powered off USB. I even uploaded the node_test_example on the mote and tried to power off battery but no. To make it more confusing, it sat overnight, and the mote worked perfectly with the node-test example. Actually, two of them that I was using for testing behaved the same, and both worked after they sat overnight.
Yesterday, I started with a fresh mote and node_test_example. All worked fine. I added the code again for the CO2 sensor alone (not with the SHT31 as above). It had the same problem at the same line of code, establishing mySensor using the library. CO2 sensor was attached in all cases. It was also consistent in that I couldn't get the mote to work off battery power, no matter what I did....like DTR-GND short, RST-GND short. It has been sitting overnight and I am just getting started this morning.
Currently, I have a FTDI/USB powered mote with the SHT31 (i2C), CO2 sensor(I2C), and photoresistor (A0) integrated and streaming data to my Pi Gateway/MoteUSB. It ran overnight flawlessly. I say this because I am made some great progress, and I am very excited about using Moteino as the basis for my project.
Let me know if I can clarify anything else. Most of all, thank you to everyone for your time!
Jim
I suggest again that it's the regulator on the Moteino getting too hot and thermally shutting down. With USB you only have 5V going into the regulator so power dissipation is much less than with the battery which is 9V. This would explain why it works up until the sensor is turned on and starts to sink 85mA, and why it works with USB and not the battery.
Mark.
Ok....that is a great theory. A couple days ago I ordered parts so I could power everything with 5V/1A cube plugged in the wall using mini-USB connector to power sensors and mote, and not use the mote to power the sensors. I am just waiting for parts. Will revert back with outcome.
Thanks again!
Quote from: perky on March 01, 2017, 10:52:09 AM
I suggest again that it's the regulator on the Moteino getting too hot and thermally shutting down. With USB you only have 5V going into the regulator so power dissipation is much less than with the battery which is 9V. This would explain why it works up until the sensor is turned on and starts to sink 85mA, and why it works with USB and not the battery.
Mark.
Totally....