Hey /diy/, I recently got a RPi3 and decided to build a small remote controlled robot with it for my brother's birthday. I can easily set up a python script to control the GPIO pins and move the robot using an SSH connection but I need help on the physical part. I am very new to hardware (I've only worked on PC and its components when it comes to hardware) and I don't even know how to begin.
As I mentioned earlier, I have a Raspberry Pi 3B to do the processing, and I also have a motor with two wheels from an RC I bought last year but never used. I heard that if I connect the motor directly to the Pi it will basically fry it. Do I need a controller or is there a way to "bypass" it and just connect it straight to the pi? Also, do I need any other components except from the pi, motor and wheels (and perhaps the controller)?
>>1204036
wire gpio to the remote of a remote controlled car
http://www.ismailfatihiltar.com/2014/09/raspberry-pi-ile-servo-motor-kullanm.html use chrome to translate to English but this should work
we used servos for our last robotics project
damn, this thread makes me really want to build a robot that uses a ps3 controller. Pi3 has built in bluetooth. Seems like the ultimate toy and fun build.
You need at least a transistor. It acts kind of like a switch to control a large current with a small one.
I'd use a TIP31 and a 3906 OR a TIP32 and 3904 because have them on hand. There's probably better options. The first transistor (3904 or 3906) keeps the GPIO current low, the second delivers the power to the motor.
For reversable, you need an H bridge. It can be made with transistors or just buy one.
>http://www.talkingelectronics.com/projects/H-Bridge/H-Bridge-1.html
This one will drive 2 motors (or one stepper motor)
>http://www.ebay.com/itm/1X-Dual-H-Bridge-DC-Stepper-Motor-Driver-Controller-Board-Module-Arduino-L298N-/322510190413
Not recommending it, it's just the first one I looked at.
>>1204249
not OP, but how quick is this? can you do PWM to vary the speed of the motor this way?
>>1204265
>PWM
Yes.
Also, make sure an H-bridge never gets both direction signals at the same time.
>>1204036
>I also have a motor with two wheels from an RC I bought last year but never used. I heard that if I connect the motor directly to the Pi it will basically fry it
You'd want a relay. You'd want a low-power end of the robot and a high-power end. The low-power end handles sensors, computing, the likes, while the high power end uses servos, motors, and high-power equipment in general. Some visualization or radar technology may end up in the latter category. Small servos may be able to function in the former. You're entering a cesspit of infinite choices here, so I really need to ask what you want this robot to actually do.
>>1204249
>TIP31 and a 3906 OR a TIP32 and 3904
>have them on hand
This is probably a question better suited for /ohm/ but how did you buy the parts? All separately or as a kit with tons of small parts? If you got a kit, can you recommend how to find one?
>>1204277
Ebay IIRC
Got lots of 10 for the TIP's and lots of 100 for the 3904 & 3906. Less than $4/lot