Nano requires manual reset when not connected to computer

I am building a controller for my RV fridge & freezer using a Robotdyn Nano v3 clone soldered onto some project board with some external components including a 1602 LCD, a few reed relays and a single momentary push switch (schematic attached).

When connected to and powered by my development computer everything boots and runs fine. However if I power the project from a 12V source with the computer disconnected, or I take the USB cable out of the computer and plug it into a USB power supply (e.g. as used to charge my iPad), the boot hangs until I press the reset button - at which point it boots and runs correctly. So the issue seems to depend upon whether or not the computer is attached rather than the power source.

I read here of issues regarding LCD startup timing causing a hang, so switched to using the simple LED blink example, which exhibits the same failure to boot and obviously doesn't touch the LCD. So I assume the root cause doesn't lay in the code or in any LCD initialization software timing.

At this point I'm suspecting the issue is with my electronics. The question is, is there anything wrong with my circuit design, or is it likely my messy soldering? Or is there another likely reason for this issue? I'm happy to build another, but don't want to do so if the design is bad.

Thanks for any guidance.

Schematic.pdf (68.6 KB)

What exactly are the extra 12v and usb supplies?

Since this is for the RV, ultimately I want this to run off of 12v from the house 200Ah AGM battery bank. I say 12v, but the actual voltage will vary based on the charge state from ~12.3v to ~14.2v.

As I developed my code the Nano was powered through the USB connection to the computer, and this booted and worked as expected. I then took what I thought was the completed project to the RV and connected the house bank to the points shown in the schematic as +12v and -ve; the Nano then repeatedly refused to boot until I pressed the reset button.

Reading elsewhere that powering from 12V uses some different circuitry on the Arduino than powering through USB I thought I might narrow it down a bit by powering my project through USB from a wall charger. I used a couple, including an Apple iPad charger. This also failed to boot until reset was pressed.

So it seemed to me the important factor was whether or not a computer was connected. I wondered maybe whether the timing of the startup sequence was different when attached to a computer, and this was in some way leading to the failure to boot. Other things I tried included inserting a 10 second delay as the first statement in setup(), which didn't solve the hang.

Thanks for your interest. I hope I answered your question?

If you plug it out of your computer, then plug it in again (so without uploading a new sketch or so), do you see the same behaviour?

Reason I'm asking this: when uploading a sketch, or when opening the Serial monitor, your Arduino receives a reset signal over the USB. When just plugging it into the computer's USB port, you should not be getting this reset signal and it should be the same as plugging it into an external 5V supply.

That would confirm consistent behaviour, and show it's not the better grounding of the computer that makes the difference. That doesn't yet explain why it happens, just that it's not the computer USB per se that's preventing it.

Great question. However if I simply plug it into the computer to power it and don't upload a new sketch, it still boots properly. :confused:

Another interesting data point: As mentioned, plugged into the (Windows 10) computer it boots fine. However if I go into Device Manager and disable the CH340 driver, then unplug and re-plug the Arduino, it fails to boot even when attached to the computer. Once I re-enable the device it boots and runs.

Another interesting data point: As mentioned, plugged into the (Windows 10) computer it boots fine. However if I go into Device Manager and disable the CH340 driver, then unplug and re-plug the Arduino, it fails to boot even when attached to the computer. Once I re-enable the device it boots and runs.

That pretty well confirms the Arduino is rebooting when the monitor code sees the PC is connected. In the past, problems like you are experiencing are a result of incorrect power-on sequencing of components in your design. Something is beginning to operate before the Arduino is ready for it.

Can't offer any advice.


That makes the USB adapter of your Arduino a prime suspect of being defective in some subtle way.

Or as #6 - for that we need to see complete schematics (& code maybe?).

Why have you no diodes across those relay coils.

A working Arduino will start up when power is applied, is it a real Arduino or a ripoff clone?

Thanks everybody for your thoughts. In no particular order...

is it a real Arduino or a ripoff clone?

Its a clone. I started with a couple of real Nanos, but they suffered from the touchy FTDI chip issue (How to fix moody Arduino nano – Ketturi electronics). I trashed both of them trying to put a solder bridge between the FTDI TEST and Ground pins with my old guy's poor eyesight and unsteady hands. So I didn't feel too bad about subsequently buying clones.

Why have you no diodes across those relay coils.

The HE3600 reed relay has an internal diode. I should have drawn them in on the schematic; sorry.

Or as #6 - for that we need to see complete schematics (& code maybe?).

The schematic in my first post pretty much covers it. There is a momentary push switch connected externally where shown. The digital temperature sensors will connect to the OneWire bus through the three connections shown, but are currently disconnected. The fridge relay will ultimately be used to switch on and off a spill-over fan from the freezer compartment, but currently has no connections to the output contacts. The freezer section of the circuitry takes the place of a mechanical thermostat... the thermostat wires from the compressor will be connected where shown, and my controller will switch one of four preset resistances between them to control the compressor speed; but again these connections are currently disconnected. So the schematic is pretty much it.

I think how I'm going to proceed is to start pulling components off the circuit board, in the hope that at some point the Arduino boots as expected. While I'm at it I'll re-make all the solder joints. Hopefully that will narrow this down a bit - either to a component that is leading to the failure of the startup sequence, or to a broken Nano.

Thanks again.

Have you got both gnd pins on the nano connected together on the PCB, rather than rely on the nano to provide the connection?
Your schematic, good layout, does not show the gnd on pin4 connected to pin29 externally.
At the moment you have relay coil current flowing through the nano internal gnd circuit.

I always bridge gnd pins on an IC, even if they are connected internally.

Tom... :slight_smile:

Thanks Tom. I was relying on the internal connection between the two ground pins. I'll add an external bridge as you suggest. My background is in software; I haven't tinkered with electronics since I was a kid, so this is exactly the sort of mistake I guessed I might make.

Did you manage to find a solution?

I'm having the same issue with my Arduino Nano 3.0

When plug in with any extra power supply (let's say +5V @2A USB power adapter), the sketch runs only if I push the reset button, otherwise it will never be executed.

On the other hand, when plugged to the USB laptop, the sketch runs only when start the Serial Console (meaning that the Reset was executed via USB).

I tried an experiment by creating a sketch that combines the "Blink" led example with some other functions for GSM.

Seems that the "Blinking led" portion gets executed at start-up, but GSM portion is not.
The whole thing works only when either push the Reset button, or open the Serial Console in laptop, but if only a external power supply is applied, only the Blinking led section seems to start with no problem.

I solved the problem using a one second delay as first instruction on Setup()

Same here-- program starts and runs when connected to laptop, requires reset button press when connected to stand-alone power supply.

I also added a dummy delay at start up and seems to work now.

Thanks for posting this solution.