Hi All,
Recently I purchased a B-Robot kit, and it’s amazing, but me being an RC guy, I really wanted to be able to control this via radio control, so I’ve been working on that. I’m happy to say that I’ve been successful:
https://www.youtube.com/watch?v=yTt-qRCKlSM&t=11s
I wrote up the details of my work on my blog over at rcgroups:
https://www.rcgroups.com/forums/showthread.php?3530517-B-Robot-RC-Conversion
I’ve also posted the code on github:
https://github.com/closedsink/B-Robot_RC
There’s not much needed for the change, other than a radio transmitter and receiver. To hold the receiver, I made a modded version of the top cover, with some curved channels for tie wraps. These can be used to secure the RC receiver:
https://www.thingiverse.com/thing:4179830
Notes about the mod:
– This hack is for the Devia board only. It might be possible to do a similar mod for older versions, but I haven’t looked into this, as I don’t have the older version.
– You need to be able to upgrade the Arduino code for this mod. This requires a USB cable, and the Arduino suite, which is free.
– This should work for any RC receiver that outputs PPM (CPPM). I’ve tested the following receivers and verified they work:
Frsky XSR
Orange R610 V2
Mini RX 1.1g compatible with Futaba SFHSS(8CH) – (verified by S_daisuke)
V-Technology V702 (verified by Greengecko)
– I stripped out Wifi control in this version of the code. Wifi can be restored any time by reinstalling the code from the JJrobots website. Currently Wifi and Radio Control don’t exist in the same code base.
I designed the tires seen in the video, and they were printed with Ninjaflex TPU, which is nice and grippy. These fit on the o-ring version of the wheels:
https://www.thingiverse.com/thing:4150443
If anyone else tries this, I’d love to hear how it goes! 🙂
***** 5 Stars contribution! Thank you! I am making one as well! 😀
Video or never happened! 😀
Thanks for the wonderful project.
I also created it.
Micro RX is on the right side of the control board.
That’s great! Did you have any issues getting it to work? Which receiver are you using? I’ll add it to the list of verified receivers.
The name of this receiver is (Mini Futaba SFHSS Compatible 8CH Receiver PPM).
It was purchased 4 years ago and used for micro drones.
Product link.
http://goodfpv.jp/ca24/1449/p-r24-s/
Hi… Thanks for your work. I am struggling around with this receiver https://www.vgr-technology.de/p/empfaenger-v702-fuer-dsmx-dsm2-spektrum-ca-1800m-rx-full-range
Is it possible to change the Code for this 6 channel Receiver? Or can you explain how and where I have to change the Code?
Hi… Thanks for your work. I am struggling around with this receiver https://www.vgr-technology.de/p/empfaenger-v702-fuer-dsmx-dsm2-spektrum-ca-1800m-rx-full-range
Is it possible to change the Code for this 6 channel Receiver? Or can you explain how and where I have to change the Code?
OK, for a 6 channel receiver just change the following line in the file BROBOT_EVO2_23_M0_JM.ino:
#define CPPM_CHANNELS 8
to
#define CPPM_CHANNELS 6
That’s all you need to do.
Good Luck! Let me know how it goes.
That have I changed already, but it this doesn’t work. I have the reciever binded to my Spektrum DX6 and after the robot has stabilized itself he’s going crazy, he drives forward and spins right and left. Any idea what can I do? I’ve tried CPPM debugging but I don’t know what values the serial monitor should show? Can you make a screenshot while debugging?
That have I changed already, but it this doesn’t work. I have the reciever binded to my Spektrum DX6 and after the robot has stabilized itself he’s going crazy, he drives forward and spins right and left. Any idea what can I do? I’ve tried CPPM debugging but I don’t know what values the serial monitor should show? Can you make a screenshot while debugging?
OK, maybe your channel mapping is off. Here’s a tip – you can use the debugger with your robot laying down. That way it won’t run away. 😀 With CPPM_DEBUG 1, you should see the following on the debug screen, after all the init stuff is finished:
125 125 0
125 125 0
125 125 0
125 125 0
125 means the variables are at the midpoint. This repeats over and over. You’ll also see occasional battery voltage bytes (i.e. “B20”)
The first byte is the throttle variable (0-255)
The second is steering (0-255)
The last value is the servo. This will be 0 or 1. 1 means the servo is activated.
If you move your sticks, you should see the variables change corresponding to the stick inputs.
I have my radio mapped TAER: Channel 1=Throttle, 2=Aileron, 3=Elevator, 4=rudder. I have the servo mapped to Ch5. If you can get your radio mapped like this, then you shouldn’t need to change any code. If you can’t, then you will need to change the channel mapping in the CPPM_DEC2 module. The following will need to change:
chan[3] = (chan[3] – 1000)/4;
chan[2] = (chan[2] – 1000)/4;
if (chan[3] 255) chan[3] =255;
if (chan[2] 255) chan[2] =255;
ch_thr = chan[2];
ch_str = chan[3];
if ((chan[4] > 1900) && (chan[4] < 2100))ch_svo = 1; else ch_svo = 0; // servo activates if this channel is maximum
cppm_rdy = 1; // data ready flag
All the "chan[2]" instances will need to change to your THROTTLE channel, all the "chan[3]" instances will need to change to your AILERON channel, and the "chan[4]" instances will need to change to your RUDDER channel. Note that in the code it's zero-based, so channel 1 is 0, channel 2 is 1, etc.
If the above channel mapping seems strange, it's because for the Brobot, I'm using the ELEVATOR channel for the robot's throttle. This felt more natural after flying quadcopters.
Let us know how it goes.
Thanks for your patience, but it doesn’t work at the moment. I’ve seen these values in the monitor
19:20:12.398 -> 137 239 1
19:20:12.398 -> 137 239 1
But it doesn’t work nevertheless. After reading more and more code I’ve found this …
int16_t chan[8] = {1100,1100,1100,1100,1100,1100,1100,1100}; // initialize to midpoint
Should this also be changed to 6 channels?
Thanks for your patience, but it doesn’t work at the moment. I’ve seen these values in the monitor
19:20:12.398 -> 137 239 1
19:20:12.398 -> 137 239 1But it doesn’t work nevertheless. After reading more and more code I’ve found this …
int16_t chan[8] = {1100,1100,1100,1100,1100,1100,1100,1100}; // initialize to midpoint
Should this also be changed to 6 channels?
No need to change this. It’s just an array where the channels get stored. With 6 channels, two of these are just not used, but this won’t cause any issues. I did verify the code works with a 6 channel receiver that I have (different from yours), and the only change needed was the one I already mentioned.
The throttle and steering variables are initialized to 125, then get overwriitten when there is valid data from the RC receiver. Since your variables are not 125, that indicates that the code is getting information from the receiver, which is good news.
In your debug window, do you see the data values change when you move the sticks? What is your channel mapping on your transmitter?
Yes it looks like that the receiver responds to some signals from the DX6, but not these I wish to have.
My channel mapping is:
1. Throttle
2. Aileron
3. Elevator
4. Rudder
5. Gear
6. AUX
I’ve tried a lot of mappings, but at the moment I can’t find the issues…
Yes it looks like that the receiver responds to some signals from the DX6, but not these I wish to have.
My channel mapping is:
1. Throttle
2. Aileron
3. Elevator
4. Rudder
5. Gear
6. AUXI’ve tried a lot of mappings, but at the moment I can’t find the issues…
OK, sounds like your mapping is the same as mine. Then, in your debug window you should see:
The first value should change when you move the Elevator stick. At midstick it should be around 125.
The second value should change when you move the rudder stick. At midstick it should be around 125.
If this is not what you see, then if you describe which sticks are corresponding to the values in the debug window, we can try to figure out what’s wrong. Is the third value changing at all? I’m not sure if you have the Gear channel mapped to a switch, but if you do, you can see if toggling the switch has any effect. Also, if the values are changing, what is the range you are seeing (min/max)?
Sorry for the late answer, yesterday I had to stop my searching the bug because I had to go to work.
Today, good news. The Robot corresponds to my receiver like it should be. The issue was a fucking little problem in the disciption of the receiver, it’s not a 6CH receiver, it is a 7CH receiver. In the menu of the DX6 I saw a entry with telemetry data and this had opened my eyes to try it with 7CH in the code and it worked. Now the serial monitor shows the values when I move the sticks around.
Only one little problem, the robot is not standing still, after turning on it is moving slowly forward, but I think this is only a problem with trims and subtrims. I will try it later and let you know.
You could add this receiver to your list of tested receivers….