Electronic – arduino – COM port goes down unexpectedly, but Arduino Leonardo keeps running

arduinomainspower supplysolid-state-relay

I am observing strange behavior with my Leonardo board.

I use 9V AC/DC adapter to power it. Relay extension board is attached to digital pins, and relays are used to control several valves and motors.

I've left only one small 220V 0.2A AC motor for testing. It is connected to the same wall socket as 9V adapater. Arduino connects to the notebook with a short USB cord equipped with ferrite ring.

Now here is my problem: using the serial connection I turn relay on and off a few times and COM port connection dies sooner or later. PuTTY window displays error, the COM port stays listed in Windows Device manager, but I can't reestablish connection unless I plug USB cord out and back in. Surprisingly, Leonardo keeps running. I know for sure it doesn't reboot – I've added buzzer beep to the setup() to hear when it does.

It could be the noise caused by the motor's coils that messes with DC adapter – I don't have capacitors on them. (And it is not the relay board – it has diodes for every relay's coil). My question is different:

I wouldn't be so stunned if it was Arduino UNO. But Leonardo has a single chip for both USB communications and work – so if one fails, the second should, too – right?

How could it be happening?

Best Answer

Although they are one the same chip, the USB and MCU circuits can function independently. For example, the USB part can be used to reset the MCU part.

Related Topic