stardance has been extended another month! the new deadline is october 31 :)

You are browsing as a guest. Sign up (or log in) to start making projects!

53m 42s logged

Today I did a bunch of work on the arduino circuit and kinda got it to a place where i think it will work. AI use disclaimer - I did try to see if Chatgpt could help me understand how the parts on tinkercad interact with each other and learned a bunch about a ton of different components. I still think my wiring and stuff is wrong for the mosfet and diode and the whole motor circuit - still having kind of a hard time understanding it.

I think the reason I’m so confused is that the diode part of the circuit is supposed to protect the circuit from the voltage increase after the fan is turned off. I think thats because when the encoder stops sending the pulses to the arduino, which triggers the mosfet to close, stopping the current. I think that current is like flow of a river (just how i learned it), so if it suddenly stops (maybe a clog triggered by the mosfet), then voltage (pressure) increases a ton, which isn’t good for any pipes (wires and components i guess. I’m just confused on how to revert the voltage then, since it needs to go somewhere, so i have a diode from the negative terminal of the motor directly to ground (seems stupid ik), since then the pressure can go back to the ground to relieve itself instead of building up.

That was a long mind dump session. Anyways, I only did about an hour of work today since i had to study for Calc and did a TON of vibe coding for an app im building for myself. It’s my first time building an actual app rather than a webapp or something, so I’m learning a little and prompting a lot haha.

Thanks for reading all the way if you’re still here! Shout out @ball @gemzaidahmad and everyone else who’s been on this journey with me!

Pictures: Messy Arduino circuit (i tried to clean it up i promise) and Schematic

0
14

Comments 2

@gemzaidahmad

Your analogy about the river is quite logical, however a better way to explain it is that when the motor suddenly stops, the “momentum” tries to keep the current flowing, which can cause a voltage spike. However, the flyback diode gives it another path to flow instead of damaging the circuit, and since the diode is normally in reverse bias(it won’t allow current to flow in that direction) it doesn’t affect the circuit in normal conditions.

This is because the motor kind of behaves like an inductor (basically if you wrap a coil around something and let current pass through it, it will try to resist changes in current).

Why do we care and How does it work?

Because when the motor stops suddenly, this “momentum” wants the current to keep flowing, but since the magnetic field (caused by the motor itself) decreases, it induces a voltage that tries to keep the current flowing.

This voltage can exceed the supply voltage and damage your MOSFET.
But the diode can now provide a path for the reverse voltage without flowing through the MOSFET.
(The current could flow through the MOSFET, but it normally prevents current from flowing in the opposite direction. If the voltage gets large enough to reach its “breakdown voltage”, the MOSFET can start conducting, which can damage it. So the current flows through the diode instead, as it provides a much safer path.)
A good analogy is that if a pump is connected to a flywheel and you instantly stop the pump, the flywheel will start pushing the water backwards.

Hope it helps! :3

@gemzaidahmad

Also if this is a flyback diode(preventing voltage spike when motor turns off ) it should have been wired in reverse bias that is, the terminal which you wired to gnd should be connected to positive and vice versa