Go Down

Topic: Robotics Idea? (Read 1 time) previous topic - next topic

1EAS1

I'm thinking of making a robot that is controlled by a tv remote and has 2 hobby motors.However I have a few questions,1. Do I need a motor shield or can I just use a breadboard?2. What would the code be? I already know how to find the value of the buttons on the remote using serial monitor but don't know the code to control motors (forward,backwards,left and right) can anyone help me?

Thanks for all the help,
Ethan

Chagrin

The L293 or SN754410NE are 16 pin DIP chips that will drive two motors up to 2A and can be stacked for 4A (PEAK, non-continuous power).

http://letsmakerobots.com/node/2074?page=5

If you dig around the letsmakerobots.com site you'll find tons of examples like this one.

JimboZA

You don't necessarily need a shield, but you will need something to do the motor reversal. So you could use a 298 chip on the breadboard. I've used a MotoMama shield which uses a 298 but the 298 has a huge voltage drop and you need to counter that with your power supply.

Better would be a controller like Pololu's 2130.

Either of those controllers uses PWM. So based on what IR signal you read, in an "if", you control the appropriate arduino output pins to send the appropriate signals to the controller pins, and they take care of what goes out to the motors in terms of polarity (direction) and voltage (speed).

Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

Stargazer


I already know how to find the value of the buttons on the remote using serial monitor but don't know the code to control motors (forward,backwards,left and right) can anyone help me?

you may make a differential-drive robot. To make your robot move forward,backwards,left and right, the only thing you should do is to control the direction and the speed of both left motor and right motor. As for the code... Here is my concept, analog input 4 control signal: left direction, right direction, left speed, right speed(you can use 2 swiches to generate direction signal, and 2 potentiometers to generate speed signal). Then map the speed signal to the range you need or you can use PID control algorithm or something to deal with the input speed control signal and output a PWM driving signal. As for the direction signal, output it directly. Then send the 4 output signal(2 speed signal and 2 direction signal) to a motor driver sheild to make it move. If necessary,  a feed-back system can be applied to make your control system complete.
Make it right then turn it on!

Go Up