0
\$\begingroup\$

I have a cheapo bench PSU with one pair of terminals on it and I am trying to wire the pictured circuit correctly and in best possible practice. As my description on the schematic says, one LED device will be under the control of Arduino/mosfet/buttons combo, while the other LED device will be wired in a plain manner, straight to the power source, with a basic toggle switch to turn it on/off.

I tried to wire it as best as I know, since this is workbench environment I don't have anything but crocodile clips, but there was a mistake on my part because the "Arduino controlled" LED didn't shut off completely when Arduino said it should, it would turn off to 50% brightness, and the MOSFET got superhot. Also, I do have to say it, in my Arduino code every pin is used with "INPUT_PULLUP" rule applied.

So, before I smoke something here I'm asking for some help, maybe some of you can scribble the proper wiring approach on this diagram. My understanding on how to properly ground things in this scenario is not the best. Thanks for help!

enter image description here

\$\endgroup\$
7
  • \$\begingroup\$ MOSFET S to ground, D to LED minus, G to MCU output. LED plus to PS +. If it does not work, you burned transistor. One button to MCU input and ground. \$\endgroup\$
    – user263983
    Mar 15 at 11:26
  • \$\begingroup\$ I tried to simulate how I'd wire this thing using these crocodile clips I have, so I hope you don't mind my crocodile symbol standard in this schematic :D but is this the correct way then? Also I'm reading something about high side low side mosfet switch...is this something I should consider here too? i.imgur.com/Lv0mLYZ.jpg \$\endgroup\$
    – Varonne
    Mar 15 at 12:37
  • \$\begingroup\$ N-channel MOSFET used as low side switch , connect load to ground. P-channel is usd as high side switch, connecting to PS+. But control signal more complicated, should be used another transistor to pull gate to +12V. \$\endgroup\$
    – user263983
    Mar 15 at 13:31
  • \$\begingroup\$ Why do you need the buck converter? Are you using an Arduino flavor that doesn't have an on board regulator? \$\endgroup\$ Mar 15 at 15:24
  • \$\begingroup\$ @ScienceGeyser if this circuit proves to work nicely in my bench test, it will be used in a 12V DC environment, so some spikes in voltage are possible, I just want to keep Arduino safe in 5V with the buck. \$\endgroup\$
    – Varonne
    Mar 15 at 15:37
0
\$\begingroup\$

This wiring scheme should suffice, but your really don't need the additional 5V regulator.

enter image description here

Link to TinkerCAD Circuit

\$\endgroup\$
5
  • \$\begingroup\$ Thanks for the sketch! I'm confused on the mosfet resistors, is gate bridged with source, why is that? \$\endgroup\$
    – Varonne
    Mar 15 at 20:35
  • \$\begingroup\$ I do that out of habit of working with some open collector outputs. It's not strictly necessary for push-pull outputs like on the Arduino, but I like to include it just as a reminder that the gate needs a discharge path to turn off quickly. If your particular application really needs to full V+ of the output on the gate, it can most likely be omitted without consequence. \$\endgroup\$ Mar 15 at 20:53
  • \$\begingroup\$ I would like to run my vehicle headlights (12V DC) with Arduino control and mosfet for sequence, so not well educated to asses if such approach with bridged source-gate is needed. \$\endgroup\$
    – Varonne
    Mar 15 at 20:55
  • \$\begingroup\$ @Varonne If you are connecting to car please add that to question since that changes many requirements and if the 12V is from a car battery \$\endgroup\$
    – Ernesto
    Mar 16 at 3:40
  • \$\begingroup\$ @Ernesto my mistake! I figured 12V from bench will emulate my motorcycle battery. The LED bulb is H7 12V chinese thing with no other rating on the box - but from what I managed to google it has 30W, so 2.5A typical vehicle led bulb. So wiring the Arduino and Mosfet in the motorcycle battery circuit changes the layout? \$\endgroup\$
    – Varonne
    Mar 16 at 11:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.