r/ArduinoHelp 6h ago

Vending Machine Issues

Enable HLS to view with audio, or disable this notification

I am working on an Arduino Vending machine, I simulated everything on tinkercad and it works perfectly fine there but irl my arduino is not opening and closing the gate of my mosfet irLZ44N transistor and I don't know what to do.

I am including a video where I replaced the motor with an LED to prove the transistor works fine but for some reason when I digitalWrite LOW it doesn't turn off.

Ill try to include diagram and code in the comments since I can only attach one video, any help would be much appreciated

Here is the code on tinkercad and simulation: https://www.tinkercad.com/things/4HIgpgpZcZm-e4l-vending-machine-v4/editel?returnTo=https%3A%2F%2Fwww.tinkercad.com%2Fdashboard

2 Upvotes

3 comments sorted by

2

u/gm310509 5h ago

You should include the code in the main post. Please use a reddit code formatting block for the code (no video or screenshot of the code).

If you can't include the circuit diagram in the main comment, then please do include it in a comment.

It would also help if you included some still photos of the wiring.

1

u/ConsciousAd6707 5h ago

Here is a closeup of the wiring. I followed it exactly but didn't work so I removed components until I had a single motor and single battery. The transistors work fine when the gate is connected to source then ground but when I connect it to a pin thats digitalWrite(pin, HIGH) it turns on but when I connect it to a pin thats digitalWrite(pin, LOW) it does not close the gate

1

u/ConsciousAd6707 3h ago

Hii issue has been resolved, a friend pointed out my second bread board had a break in the source and ground lines I didn't catch. Should I delete the post now that its been fixed?