Record PWM values over time, tweak graph, playback to robot possible?

Hi All,

I'm trying to find the best way for me to drive an RC car around, have either the transmitter or car send the PWM values its using back to a computer which will record it over time.  I then want to tweak the graph, and then play it back, and have the computer send the RC car the new "tweaked" PWM data and it will then drive around by itself.

I've seen some projects that use a software called Blender to manipulate the animation curve of a 3D model, then have that model affect a real world model (eg robot arm). Those examples used servos, but in this case it is DC motors.

Can anyone point me in the right direction of how to accomplish this? I'm trying to see where it can be done more easily with ROS, Blender, or some other software package that I haven't come across yet. And by easily, i mean that its not going to be easy at all, but Blender (since its an animation software) has a GUI with playback of keyframes and a visual representation system already in place, but doesn't have a lot of "robo" things going on.

ROS on the other hand, is all about robots, but I will probably have to dive in and create this whole visual graph system by myself, which is going to take me a long time.

Learning programming is a real uphill and long-term battle for me and i just want to make sure i'm heading in the right direction before I start with either ROS, Blender, or something else. I'm ready to jump into either of those cars and go full speed ahead with my project. Thanks in advance for any insights that anyone can provide!

Starting with ROS is a good
Starting with ROS is a good thing, IMNSHO. ROS will allow you to both share your work, but also use a lot of prebuilt stuff. ROS already includes a virtual robot, because you need to design your robot in ROS anyway so they might as well be able to use this 3d model in an animator. I believe that much of what you want to do is already part of ROS.

You can program the linux side of ROS with c++ or with Python. You can program ROS nodes on Arduinos and such.

Just my 2 cents. I can’t afford to adjust it for inflation, sorry. :frowning:

Dangerous Thing: thanks for

Dangerous Thing: thanks for the info, i think i’m leaning towards linux and ROS now


Duane Degn: It’ll be the pulses sent to an h bridge that i’m looking to record.  I think that on the software side of things, when the RC car is generating the PWM, it will have to send it to two places: the H bridge, and then to some wireless device that will transmit back to a computer to be recorded.

**Unless I’m missing something . . . **
I really can’t see this concept working; there are just too many variables between one run and the next to use PWM as a way of recording the route. For example, the starting angle and position will have to be exactly right, the motor temperature will have an effect, the battery voltage too, any slippage on the drive wheels . . . Just too many things can change.
Encoders on the wheels would be a more standard way of doing this.

A similar system is already

A similar system is already in place where “tricks” are recorded for rc vehicles, and then triggered by buttons on the users handheld transmitter.  

Tonka XT Riccochet tricksters (kid RC) is one example, where a kid can press a button which triggers a preprogrammed manouever by the vehile. 

And I’ve seen a small quadcopter with a trick button as well, that causes it to do a flip when pressed.

My question is, how did the creator of the quadcopter record that behaviour in the first place?  either he/she attempted the feat 100s of times, or perhaps did it once, tweaked the pwm graph for each motor, and then fine tuned the flip after each attempt.  That’s what i’m trying to do.  

After much more research, it looks like Blender 3D is the way to go.  I saw some clips of blender moving servo, and then stepper motors.  and even accelerometer data can get into blender.  It looked a bit choppy, but i wonder if it was just the user’s machine.  I’ll have to hook up an imu and try to get it working myself to see for sure.

Hi Duane,That’s a remarkable

Hi Duane,

That’s a remarkable example!  did you record the servo command on your transmitter, or on the robot?  Was a separate MCU used?  I’m guessing the answer is no, since you used a propeller.  


And an off topic question, what transmitter are you using, and if you have the info available, whats the center to center distance of the control sticks?  i can’t seem to find that measurement for transmitters anywhere.

Thanks for the detailed

Thanks for the detailed information and TX specs.  I think i would like to do the same and record the PWM values coming out of the RC receiver onwards to the motor driver of a car, or ESCs of a multirotor. I’m not sure if the recorded PWM should be sent back live, or when the recorded manouever has completed.  probably the latter because i would have no use for the data while i’m still recording.  However, have it sent back simultaneously would mean that its ready for me immediately upon completion of recording.

Now i’m I’m trying to figure out what type of hardware is required for the RC vehicle to send to the PC and the PC to communicate with an RC multirotor receiver and/or flight controller.  I know that a computer program can be written, to convert PWM information to a serial format and send it out of the PCs USB port.  But how do these serially converted PWMs get into the RC multirotor’s receiver/flight controller?  I say receiver / flight controller because i’m not sure which one the PC should be talking to.

Its as if i would need the host pc to broadcast its PWM/Serial data wirelessy, then

- the RC vehicle would need its own wireless to serial adapter

- which would be plugged into a single board computer on the vehicle

- then the single board computer would take the serial data and send it to something like the Pololu Micro maestro

- which will create the required signals to go to the multirotor ESC units.

That seems like a long chain of things for a PC to communicate with.

I’m flipping through the book Mastering Beaglebone Robotics, and the last chapters deal with a multirotor, and suggest setting up a LAN between host computer and multirotor, as a way of getting the PC information out to the multirotor, but a beaglebone black would be onboard the multirotor craft.

Is there any type of shorter bi-directional chain that can be made in between a PC and RC receiver?

I think i’ve read somewhere that an arduino can be set up to take incoming serial data and send out pwm to a motor driver.  So perhaps if i can broadcast the host PCs usb port via some type of wireless-serial adapter, the craft would just need a small arudino, with another wireless-serial adapter connected, and this combo can be connected to the ESCs to give them the signal they need?


okay after much more

okay after much more research, it seems like there’s no single perfect way to accomplish, but it can be approached from many different ways.  

If the PC can playback PPM signals, they can even be sent into the trainer port of the RC transmitter, to be sent to the vehicle also.

I will have to draft of a plan that involves buying the least amount of new hardware/devices, inlclude as much hardware that I already have, run into problems, and then solve them at that time.


hey i never thoght about

hey i never thoght about reducing the byte size, or even in that clever way, thanks!

Yes i know your choice of microcontroller alright, I’ve looked into propeller before but i programming in general is an uphill battle for me, and i think it may be well out of my league.

I read that Ardupilot can do datalogging using something called RCOUT, which is related to ardupilot in some way.  But it seems tricky to find more information on this.

I didn’t know that a lot of boards include UART connections, i’m going to look our for that.  And that’s a great hack with the Wii nunchuck, propeller, and quadcopter.  Thanks for all of the information also!