Arduino Leo shuts down connecting PSU cable to wall but PSU is not turned on

I have wired ATX psu to encoder and outputs are stepped down from 12v to 5v and connected to arduino . Arduino is connected to USB.

I'm running 2 separate grounds. One goes to DC motor controller pins. But doesn't touch 12v. Other Ground is connected to A B Z outputs which are stepped down from 12v to 5v. Encoder is connected to PSU 12 and 0V, the common from encoder is connected to second GND pin to the Arduino Leonardo and stepped down 12v outputs.

It also happens when i connect psu ground to arduino ground without turning on Psu or connecting PSU to the wall

Without a schematic of your connections, we would be just guessing.

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Please include all power supplies and their connections.

Thanks.. Tom... :slight_smile:

.

It also happens when connect encoder ground to 12V ground , but when I release arduino turns on
But the PSU is disconnected from the wall

Hi,
You are using pin0 and pin1, they are the programming pins and should be avoided.
Please post your code, but first change your input pins for the encoder and try your project again.

Thanks.. Tom.... :slight_smile:

I am using EbolzMagy tutorial , he uses 0 ,1 and 6 for his encoder
Link // DIY arduino forcefeedback steering wheel | PART2 | CONNECT THE ENCODER - YouTube

Main problem I'm having is when I connect psu to the wall and the arduino switches off
Im using flashed HEX file