Pages: [1]   Go Down
Author Topic: Robotics Idea?  (Read 1075 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 27
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dubuque, Iowa, USA
Offline Offline
Edison Member
*
Karma: 44
Posts: 2459
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Faraday Member
**
Karma: 80
Posts: 3790
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).

Logged

Although I answer in good faith, remember always: Your Mileage May Vary.
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Shanghai,China
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Make it right then turn it on!

Pages: [1]   Go Up
Jump to: