wanna mention im new to the forum, so if i may make misstakes pardon them please.
Ive done some research on this topic and done a schematic of how it should look like for just testing.
Id like to ask about the capacitor and diode used to smooth out ripple and eliminate backcurrent coming back from the motor.
What value should i use for the cap? Is 100microF enough?
I also like some suggestions for diodes. I currently have these 2 at home:
I should also mention, external power supply will a labbench powersupply for the time beeing, but i wanna look into alternatives. Ive seen some yt vids on people powering stepper motors with USB-pw. I also have several powersupplys from laptops and other laying around, aswell as a unused pc power supply that could provide enough juice to power everything. Suggestions are appreciated again .
Ive wanted to build a cnc for myself and just want to lay the foundation, even if it is a bit wonky, so tips on how to convert the speed of the motor into torque (like planetary gears, etc.) would be nice too.
The connection of the base resistor to A0 is wrong.
I assume this is because you think an analogWrite function uses an analogue pin, it does not.
The base of this transistor should be connected to any PWM capable pin, and your software changed accordingly. PWM capable pins as shown tith a ~ next to its name.
As Tom said the IRLZ44 is not a NPN transistor, it is a FET. So it needs more drive (voltage) than an Arduino pin can supply, so it needs extra components to boost the voltage. See:-
However if you search for a "Logic level FET" that will work with the signals that an Arduino can supply.
Ive done the schematic yesterday to show how ive connected it. The old pcb used in the drill uses a 555 timer and a variable resistance to create a pwm signal.
Thanks anyway, probably would have forgotten it and wasted some time figuring out why it wont work.
Could that not be a problem because logic level of IO in the arduino is 3.3V? If the potentimeter has a 0ohm position, that could be a problem. Should i just use one with more resistance at the low end?