Go Back  R/C Tech Forums > General Forums > Radio and Electronics
Control rc car with Raspberry Pi >

Control rc car with Raspberry Pi

Community
Wiki Posts
Search

Control rc car with Raspberry Pi

Thread Tools
 
Search this Thread
 
Old 08-26-2015, 07:43 AM
  #1  
Tech Rookie
Thread Starter
 
Join Date: Aug 2015
Posts: 4
Questions?? Control rc car with Raspberry Pi

I'm working on a project where the goal is to be able to control a remote controlled car with a phone through WiFi. I'll be doing this by using a Raspberry Pi and a project called "pi-blaster", which enables pulse-width-modulation (PWM) on the GPIO pins of the Pi.

I have some ideas on how to use PWM to control the car, but I'm not so good when it comes to wiring and such, I'm better at the software, so I'm looking for advice in this area.

If I've understood things correctly, different voltages will result in different speeds and different "wheel angles". So if I measure that the car goes full forwards when the motor is given a voltage of 0.5V, it will go full forwards if I set the PWM of the speed pin to 0.15 (1 would be 3.3V), and if it turns full right when the servo is given a voltage of 0.3V, it will go full right if I set the PWM of the steering pin to 0.09. Is this correct or am I wrong?

I'm also wondering how I would go about to connect the PWM GPIO pins to the ESC and the steering? Would I just connect the PWM wires into the ESC and the steering instead of the signal wire?

Thanks in advance, and sorry for being a noob.
Trettman is offline  
Old 08-26-2015, 06:16 PM
  #2  
Tech Champion
 
Join Date: Oct 2007
Posts: 7,342
Default

It's not the voltage per se, but rather the length of time of each pulse:




The PWM signal goes to the control wire of the three wire servo plug on a servo or ESC.

There needs to be a ground connection between the ESC signal and control source. It can be through the main battery lead or servo lead ground depending on the complete system details, but be careful with ground loops for best practice, I'd try with just the battery ground first.

A couple of many sites with info. Search "RC servo signal" for lots more, image search works well too. Robotics sites might be better sources than RC, as your type of control approach is not unusual in that realm.

R/C Control Signals

Servo control interface in detail

Hope this helps.
Dave H is offline  
Old 08-27-2015, 04:09 AM
  #3  
Tech Rookie
Thread Starter
 
Join Date: Aug 2015
Posts: 4
Default

Thanks for the answer!

I've read a fair amount about servo signals and such, but I don't quite understand it all since my knowledge of RC cars in general is pretty bad, even though I've read a fair amount about them as well.

As far as I understood, I can just replace the signal wire to the ESC and servo with the wires from the Raspberry Pi using PWM?

I've drawn a wiring scheme the shows my understanding of how to wire the car:

Would something like this work or am I way off?

Sorry if I sound stupid or ignorant, but I'm completely new to remote controlled vehicles, and I don't know much about them. But that's why I'm doing this project, to learn.

Thanks in advance!
Trettman is offline  
Old 08-27-2015, 05:02 AM
  #4  
Tech Regular
iTrader: (3)
 
B16A2's Avatar
 
Join Date: Jan 2009
Posts: 420
Trader Rating: 3 (100%+)
Default

Originally Posted by Trettman
As far as I understood, I can just replace the signal wire to the ESC and servo with the wires from the Raspberry Pi using PWM?
Yes, wire the signal wires for the ESC and Servo to your PWM Outputs of the PI. You can feed power to the motor and ESC from the LiPo 7.4v battery, then use the BEC of the ESC to feed power to the steering servo.

Depending on your power consumption of the PI and operating voltage you may need to provide a battery for that as well. The BEC of the ESC will be 6v and depending on the ESC specs they can supply anywhere from 1A to 3A.
B16A2 is offline  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.