Currently I have two boards in use.
One controls an outdoor shower booth with a solar collector, electric boiler, heating, a circulation pump and a valve, all powered from the grid.
After a power loss, there is no certainty that the board starts normally. About half the time the LCD display is blank; if I pull the plug for a few seconds and put it back in, the board boots normally.
This is a nuisance because there are many blackouts and brownouts. If this happens during a cold night my anti freeze routine (pumping water through the solar collector) will not work.
The other board controls the entrance gate of my property and is powered by a car battery and a solar panel. In winter I switch it off at night because the battery charge is critically low and the installation with an LCD display and backlighting draws more current than I hoped for.
This one NEVER starts the 1th time. Sometimes I have to play with the on-off switch several times before the display starts showing data.
CDK1:
These boards are supposed to be 100% compatible to the Uno, so boot problems are probably not restricted to the Robored.
I recommend disconnecting any sensors, displays, and shields from the boards, and upload the blink sketch to them. See if they start up reliably all the time, even after power losses. If they do, then the problem may be with your wiring or your code. That would narrow down the problem.
If they still don't start up reliably, then start looking at the power supply. If you have brownouts at the DC power supply level you are feeding into the boards, I recommend fixing that so if you are having low power, shut down the power supply completely, and don't allow low voltage levels to power your board. You could probably do that with a relay circuit of some kind. You may need to completely redesign your power supply or figure out how to optimize your project to use less power.
dmjlambert:
I recommend disconnecting any sensors, displays, and shields from the boards, and upload the blink sketch to them. See if they start up reliably all the time, even after power losses. If they do, then the problem may be with your wiring or your code. That would narrow down the problem.
There never has been a boot issue with bare boards regardless of the power supply, so yes it has to do with wiring. I do not believe it can be in the code because the board doesn't reach that point.
My sketches start with assigning I/O pins, init of the LCD display, a few blinks and writing static text. If booting fails the display doesn't blink and remains blank, output pins remain high, input pins are ignored.
For the shower booth I made two linear power supplies with suppressors over the AC side. Switch mode supplies die here at the first thunderstorm, so do cell phone chargers, LED lamps etc.
There are 4 optically isolated relays switching light AC loads and 2 solid state relays with 1 Kw loads, waterproof Dallas temp sensors with 8 ft cables and a control panel a few inches from the board. During normal operation there are no issues.
All PC's have a "power good" signal that triggers the CPU at startup, I do not know what makes the Atmel chips start. It may be that a minimum rise time is required for a correct start.
After a power failure, certainly if it has lasted for several hours, all fridges and freezers on this island represent a very heavy load when the power returns, so the voltage takes several cycles to reach 230V. That may be to long for the Atmel to properly initialize.
I will modify the 9V supply for the Robored board so it keeps the output low until the voltage is stable. There used to be voltage regulators with such a feature built in.