Go Down

Topic: Motor wont start until 128pwm (Read 288 times) previous topic - next topic


I am making a line follower for a competition and i am using following components
micro gear motor(3000rpm)
arduino nano
pololu qtr 18rc
But for some reason pwm is acting like digital pin as it wont start until the value of pwm is greater than 128.I thought there was problem with nano so i tried with uno but the result was same.
Thanks in advance.


A0 and A5 are not PWM pins so doing analogWrite() to them will indeed act like a digital command. Try using proper PWM pins instead. See https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/



Thanks Steve,i was considering a0-a5 analog output pins but they are analog input pins.


128/255 is a bit high to be the cuttoff but there is always a level below which the low duty cycle means the motor doesn't get enough "voltage" (or rather voltage averaged over time) to operate. The higher the torque the motor has to ovecome the greater this threshold. You'll find the cutoff to be around 50/255 to 90/255 when you try analogWrite on pins 3,5,6,9 or 11 (the PWM enabled ones).

Go Up