Question:
I bought an Arduino nano clone a couple of months ago on ebay. When I plug it in, the nano lights up and works and everything, the problem I am having with it is that every so often I plug it in, the digital pins don't get powered. There is nothing wrong with my code or circuit because it works sometimes(I have to unplug the Arduino, plug it back in and then reload the sketch) and works perfectly. So my question is, is this a software problem with my Arduino Chinese clone, or could it be a hardware problem, because my header pins are poorly soldered(they are on the board and have a good connection, but doesn't look nice.)
My Goal:
I am trying to make an automatic plant waterer for my indoor house plant using a soil moisture sensor and a mini liquid pump. When I attach my sensor to analog pin 0 it reads fine. Although, when I use my pump (pin 11)when the sensor is below a certain point, sometimes it does not work. For me to get it to work again, I would need to unplug the arduino, plug it back in and reload the sketch.
Note:
-The red led works fine when detecting the signal from the sensor(however green does not).
-The pump works fine when connected to the 5v, so the pump is not broken.
-I've had this problem with many of the outputs in the past(motor, buzzer)
stuartfong:
because it works sometimes(I have to unplug the Arduino, plug it back in and then reload the sketch) and works perfectly.
does NOT exclude:
stuartfong:
There is nothing wrong with my code or circuit
I never had a problem with a Chinese clone. And it shouldn't be, all it is is a ATmega32p soldered to a board. And even if it was a fake ATmega32p, I never came across a not working one and an intermediate fault would be rare. Bad soldering might happen.
stuartfong:
and reload the sketch.
You never need to reload the sketch unless you made a bug with EEPROM
And what do you mean by "does notwork"? That's the most terrible phrase when troubleshooting. Doesn't it become HIGH or LOW? Did you try to add debug info (serial prints)? And if yes, what is the output when it goes wrong?
The Arduino is powered by my computer, and when I mean does not work, I mean it returns nothing at all(not powered). and the times that it does work the serial prints still do print correctly, as I mentioned, everything else seems to work fine except output like motors, pumps, etc.
Sorry, I don't know how to make a hand drawing of a circuit, I made a Fritzing sketch and made it as neat as possible! Please let me know if anything is unclear or covered up. Forgot to mention this earlier but I am fairly new to Arduino, started a couple of months ago, barely touched it until the beginning of summer.
I've just finished doing that. Could the problem be that when I remove the wire that's connected to my pump and plug it back in that I have to power off the Arduino and power it on again?