RC Robot Car - RC C...
 
Notifications
Clear all

RC Robot Car - RC Controls and Arduino


DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 2 years ago
Posts: 1004
Topic starter  

Learn how Radio Controllers work, see how we can add an Arduino to the picture, and then build a radio-controlled robot car!

Today, we will be using a Flysky FS-I6X, a very popular and inexpensive radio remote control transmitter with receiver.

I’ll show you the principles of this control, which is pretty well the same as any inexpensive 2.4 GHz unit. We’ll then hook it up to a few servo motors to see how it operates on its own.

But the real fun comes with attaching an Arduino to the receiver, and I’ll show you two ways of doing that.

The first way is to connect each channel's output to an Arduino Uno and read the pulses generated by the receiver in response to the transmitter. It’s pretty simple, and it gets the job done.

But another way of doing this is to use the iBus serial interface. This lets us use only one wire to get all the data from the receiver.

We’ll then take what we have learned and build a cool little radio-controlled robot car! This little toy has two modes, normal driving mode and a “spin” mode as well.

Here is the table of contents for today's video:

00:00 - Introduction
01:57 - How RC Controls Work
06:12 - Flysky FS-I6X
10:17 - Using a controller on its own
13:42 - Using a controller with Arduino
23:49 - Using iBus Output
29:23 - Build a Radio-Controlled Car
45:05 - Conclusion

As always, there is a corresponding article on the DroneBot Workshop website, where you can get all the code plus more information about using the Flysky FS-I6X with an Arduino.

Hope you enjoy the video!

"Never trust a computer you can’t throw out a window." — Steve Wozniak


Quote
3Dietrich
(@3dietrich)
New Member
Joined: 7 months ago
Posts: 3
 

Hey,

thank you for explaining this topic. RC remote is a new topic for me and you explain it excellently as always. But I have one question:

In chapter "Using iBus Output" you say: "we're using the Mega because it has multiple hardware serial ins and outs and we are going to require that". But then you use (beside +,-) only one wire. 

Couldn't Arduino Uno (or Nano) do that with its RX? Or is there any other solution to use a smaller board? The use of Mega for one wire seems a little over the top for me..


huckOhio liked
ReplyQuote
Umar
 Umar
(@umar)
New Member
Joined: 4 weeks ago
Posts: 2
 

@3dietrich Your question really make sense because i was also thinking the same thing. Here is what i found. it might be the reason why. https://www.arduino.cc/reference/en/libraries/ibusbm/

This post was modified 4 weeks ago 2 times by Umar

ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1079
 

@3dietrich & @umar

Two serial ports were used in the sketch for the RC car.  Right at the beginning of the setup() code is this:

  // Start serial monitor for debugging
  Serial.begin(115200);

  // Attach iBus object to serial port
  ibus.begin(Serial1);

The "Serial.begin(115200)" uses the first serial port, and the "ibus.begin(Serial1)" uses the second serial port.

Hope that helps with the two serial port question. 

 

SteveG


3Dietrich liked
ReplyQuote
Stargatefan
(@stargatefan)
Active Member
Joined: 2 years ago
Posts: 13
 

I have a question about these Arduino cars in general.  But this car illustrates it as well.  Most of these RC cars that I see for Arduino use the inexpensive yellow DC gear motors.  I would like to build one of these cars but with more speed.  I believe the controlling factor for speed is the DC gear motors and what the TB6612 motor controller can handle.  Is there a faster motor that can be used with the TB6612?

I've built an older style Arduino based car that was controlled by Bluetooth and used the L298N.  It also used 4 of these yellow DC gear motors.  I would like to build a faster version that uses the Flysky that Bill just introduced us to.


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1079
 

There are plenty of high speed motors you could use, such as the kind used to to fly model airplanes as well.  You will need an ESC, electronic speed control, to control the motor and bigger batteries.

Plenty of YouTube videos on the subject.

SteveG


ReplyQuote
Stargatefan
(@stargatefan)
Active Member
Joined: 2 years ago
Posts: 13
 

@codecage I thought the TB6612 was an ESC of sorts.  If it's anything like the L298N which can be sent a PWM signal to vary the speed doesn't that make it an ESC?  I figured I would need bigger batteries.


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1079
 

@stargatefan 

I could be wrong, and I thought I was once, but found I was mistaken, 😎 but the TB6612 is sort of like an ESC, but not able to handle the loads of the bigger motors.  But I'll let the more knowledgeable chime in here. 

SteveG


ReplyQuote
WhitneyDesignLabs
(@whitneydesignlabs)
Trusted Member
Joined: 8 months ago
Posts: 56
 

Excellent tutorial and video. Thank you, Bill. I posted the below comment at the bottom of the Flysky robot car article, but this forum is probably a more appropriate place for my question:

I am excited to receive my new RC radio and incorporate it into my rover project. My thinking is to use a MEGA as shown by Bill. I also would like to upgrade the transmitter’s firmware to allow for 10 channels. Is there a good article about the upgrade, and can I assume with the upgrade, an Arduino MEGA via IBUS, that all 10 channels will be usable on the GPIO pins on the MEGA?

My project is a 6wd rover style robot, using wheel chair motors & wheels, with the design goal being indoor/outdoor, human-rideable, electric "utility cart" of sorts, and eventually have some autonomy and possibly a robot arm.

So I like the idea of 10 channels and programmable modes, so that the joysticks could be used for conveyance, then when stopped, be switched over to robot arm control, etc.

Like: Python, Adept: C++, Don't like: Java


ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 2 years ago
Posts: 1079
 

@whitneydesignlabs 

If you have the FS-i16X there is no need to do a firmware upgrade to enable the transmitter to handle 10 channels.  It is already built-in, the unit just ships from the factory in the 6 channel configuration.  It is only the the FS-i6 that needs a firmware upgrade.

Hopefully you have the "X" model.

SteveG


ReplyQuote
WhitneyDesignLabs
(@whitneydesignlabs)
Trusted Member
Joined: 8 months ago
Posts: 56
 

Cool! "X" it is. I ordered Flysky FS-i6X 6-10(Default 6)CH 2.4GHz AFHDS RC Transmitter w/ FS-iA6B. I should have it next week. I didn't realize it is just a configuration change, and not a full firmware upgrade to get the 10 channels. Awesome.

So with the FS-iA6B transmitter, but using IBUS with an Arduino MEGA, will I be able to have 10 GPIO pins at my disposal?

Like: Python, Adept: C++, Don't like: Java


ReplyQuote
WhitneyDesignLabs
(@whitneydesignlabs)
Trusted Member
Joined: 8 months ago
Posts: 56
 
d5db1a76cf9c24db6060ace338e85d96aeb4f9aa 1
9d3e5badd33d848fb8e96b70943f26aa223618a1 1
4a3a0ff1148f4c436a49c232a65c62101bd9418b 1

Designed based on the efforts of many people before me. Here are today's drawings and build pics. This is very rough proof of concept and prototype. My homage to the salvage yard gods, has clearly been recognized. The most expensive part of the project, so far, was the hole saw to make the pivot points.

This post might benefit better somewhere else. I plan on doing initial hardware/drivetrain testing with the Flysky, but the robot rover bogie-rocker details, do not really fit with the topic heading. 

Like: Python, Adept: C++, Don't like: Java


ReplyQuote