u/Reasonable_Finger278

Arduino disconnecting from serial monitor USB after running relays
▲ 16 r/arduino

Arduino disconnecting from serial monitor USB after running relays

I've got an arduino nano running an 120V AC motor through a sunfounder 4 Relay board.

When I plug in the arduino to control it through Serial.read() and see outputs from Serial.println() it works for about 30s then the arduino IDE says "Not connected" and I can no longer give or receive anything. The arduino remains powered and the program continues running.

On the left in the extension cord I've got that board powered by an external 5V supply, and the motor 120V supply plugged in. On the right is the motor run capacitor. The arduino does not disconnect like this when the motor is not plugged in.

I would appreciate any feedback on what might be causing this issue. Thank you!

Edit: Update, the issue is definitely the motor. When switching the 3 relays on/off at once the arduino does not disconnect from the serial terminal, but when the motor is turning on and off it does.

u/Reasonable_Finger278 — 2 days ago

How do I replace this three position 6 pin switch with something that can be programmed?

https://preview.redd.it/1e2okutybphh1.jpg?width=2853&format=pjpg&auto=webp&s=4e4dab977977cba7f767e1c9abd8f2881bc57da0

I am doing a project where I'm programming a light duty hoist. The hoist is controlled by a 3 position 6 pin switch (S1 in the diagram). I want to replace that switch with something that can be programmed to make the winch go up/down/stop based on arduino code.

I have used arduino a fair amount before and I've got an intermediate understanding of circuits. I was thinking of using something like mosfet, maybe putting one across each pair of poles on S1, Then toggling them on and off similar to how the 3 position switch would function? I haven't used mosfets but that's my best idea so far. Let me know what you would do, thank you for the help!

Edit: updated diagram

reddit.com
u/Reasonable_Finger278 — 15 days ago