Go Down

Topic: Nano requires manual reset when not connected to computer (Read 370 times) previous topic - next topic

colinh

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.

bluejets


colinh

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?


wvmarle

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.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

colinh

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.  :smiley-confuse:

colinh

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.

Paul_KD7HB

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.


Paul

wvmarle

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?).
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Grumpy_Mike

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?

colinh

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 (https://ketturi.kapsi.fi/2014/04/how-to-fix-moody-arduino-nano/). 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.

TomGeorge

Hi,
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... :)
Everything runs on smoke, let the smoke out, it stops running....

colinh

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.

Go Up