Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: mobz on December 13, 2007, 07:48:01 AM
-
Hey there.i have managed to complete my first robot thanks to you guys.but one thing is im not controlling my speed so when turning it crushes into walls.i researched that with pwm,i can give 1 wheel say 20% the other 80% and make a smooth turn.i googlled it but nothing .can somebody help??
And last thing how can i increase my ir sensor range ??im getting small ranges i dont know why??
-
Can you tell us more about your hardware?
Are you using DC motors? And what kind of motor driver do you have?
PWM is when you turn your motor on and off really really fast. So if its off 50% of the time, your motor will go at about 50% speed. Just send a square wave (off on off on) to your motor controller.
For example:
pin_high
delay_5ms
pin_low
delay_5ms
loop
-
im using GM8 DC motors,quad h bridge and an atmega8.
-
What kind of IR sensors do you use?
-
quad h bridge and an atmega8.
quad? are you controlling four motors? which pins are you using to control the h-bridges and what are you doing in software?