I want my robot to go straight, I use transistor with variable resistor. It is going forward but it is not a good method, when turn off and turn on I have to change the variable resistor until it go forward straight again.
-Any cheap method?
I want my robot to go straight, I use transistor with variable resistor. It is going forward but it is not a good method, when turn off and turn on I have to change the variable resistor until it go forward straight again.
-Any cheap method?
Hi sir!
hi sir,
expand please…
arduino+ transistor + 6
arduino+ transistor + 6 Vmotor
If you are using an arduino,
why don’t you make use of PWM? That is how I do it. I am fairly sure that is how most of us do it here.
Pulse width modulation
Pwm works for setting speed, but sometimes the gearmotors aren’t perfectly equal and wheels may have imperfections.when i tried to make a differential drive bot i just gave more power to the left motor if it was going slightly left.
This way going forward was actually left.write(123);right.write(120) when i wanted it to go straight forward at half speed using arduino and motor shield.
Later i found that the left motor was slightly damaged, but the compensation works. With a properly insulated magnetometer or an optic feedback a robot could be programmed to make that calibration automatically:)
You can use the Optical Flow
Basically, if your bot has space for a camera you can do it like we do: by seeing how the background flows across our vision.
There is a camera that is designed to just do this, or you can use OpenCV and a small Linux board (RasPi or BBB or whatever); I have a Parallela that arrived a few weeks ago that I need to try out.
This would allow the robot to apply corrections to the individual PWMs as needed.