One Arduino resetting another by cutting Vcc

I my (second) alarm clock design, there's one main Arduino that does most work, and another one that shows some information and relays some buttons. They communicate serially, and this all works fine.

I want the main Arduino to be able to reset the remote one, and thought I could do this by switching it's power off and on. This doesn't work, and I'm trying to find out why.

Arduino II gets four lines: Gnd, Vcc (12v), RX and TX.

My question is: is it possible that the Arduino gets a little power from RX instead of the (cut) Vcc? That would explain why it crashes so enthousiastically when it should be silent...

Thanks,

Rob

I'm sure someone else can give you a more accurate technical answer but I have observed Atmel chips running with the power disconnected but the UART still connected so yes, they can 'run' from parasitic power off the RX line.

This was with standalone chips rather than an Arduino board though. Also I've no idea how well it ran but it was enough to light some LEDs connected to the chip.

It will indeed run with phantom power / paracitic power. Just don't cut the power.

Better questions:
a) Why do you need two Arduino's for a simple alarm clock anyway?
b) Why on earth do you want to reset one of the two?

Thanks for both answers! They saved me a lot of searching and trying. I'll switch off the serial port now too while the power is down, that should put it down properly.

And for your questions:

septillion:
a) Why do you need two Arduino's for a simple alarm clock anyway?

Because my first version experienced too much interference over a 10m cable.

septillion:
b) Why on earth do you want to reset one of the two?

To synchronize after resetting the main one, which is the easiest way to prevent a clock overflow.

Sub-questions / comments

a.1) Straight TTL Serial isn't going to help you with 10m cable... (Why does a clock have 10m data cable?)

b.1) You have to disable Serial on the non-reset Arduino
b.2) Why can't you just make that a serial command?
b.3) How can an alarm clock overflow??????!!!!!

TIP
If you want more useful help, post the schematic and tell a bit more about it. We can help you NOT to reinvent the wheel :wink:

septillion:
a.1) Straight TTL Serial isn't going to help you with 10m cable... (Why does a clock have 10m data cable?)

Actually, it works fine. I used 57600 bps first, but then went back to 4800 so both Arduino's could keep up. :slight_smile: The main Arduino is in my living room, where I can set the correct alarm time and break off the noise. The other, "remote" Arduino is over my bed showing the time and enabling me to switch its display on and off.

The first version of this alarm clock contained 1 Arduino, with a much more expensive (13 pin) 10m cable, which didn't work reliably. So far, this works better. Apart from the detail I'm struggling with now. :slight_smile:

septillion:
b.1) You have to disable Serial on the non-reset Arduino

I did that, when I realized that the power from TX/RD was used...

septillion:
b.2) Why can't you just make that a serial command?

I suspected that wouldn't work, and decided to do it by simply cutting the power. Actually I could make it a serial command now, or better: not reset the remote side at all, but I need to fix the crashing problem anyway (see below).

septillion:
b.3) How can an alarm clock overflow??????!!!!!

Because millis() overflows after about 50 days, and I wanted to be sure it wouldn't mess up anything then. The easiest solution was to reset the whole Arduino after each team the alarm is rung.

The trouble I'm having now, is that the remote Arduino resets perfectly right when I'm using the USB 5v but crashes in a matter of microseconds when I'm using 12v. (The main 12v power is attached in the living room, and shared with the remote Arduino by the cable.)

Next, in the coming half hour or so, I'm going to try using a bigger elco for buffering the power on the remote side...

Have you considered using a real time clock module? You may know about them, you may not, or you may be deliberately choosing to work without one. It doesn't solve your current problem, I'm just asking out of curiosity.

bigred1212:
Have you considered using a real time clock module? You may know about them, you may not, or you may be deliberately choosing to work without one. It doesn't solve your current problem, I'm just asking out of curiosity.

Sorry... This is one of the disadvantages of using word processors: sometimes you wrote something, and forget you've removed it. Yes, I use a real time clock. :smiley:

The bigger elco didn't work, and I'm going to make a new question. At least one problem is solved now: a too tight connector in a too small casing, combined with a broken connection, gave almost the same problems that my power-by-10m-cable seems too cause. Sigh.

Thanks anyway. :slight_smile:

Suggestion, add RS485 :wink: TTL Serial, even at 4800 baud, is kind of a hack.

And resetting an Arduino because of millis() overflowing is definitely a hack / bad coding. Just read Blink without delay and do:

  • use an unsigned long for storing millis
  • always check like millisNow - millisLast >= interval
    And you have zero problems. Now you just build a Goldberg machine :wink:

And for cable, cat5/cat5e/cat6 :wink: