Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
RC Control for B-Robot
02-23-2020, 05:42 PM (This post was last modified: 03-14-2020 05:47 PM by closedsink.)
Post: #1
Wink RC Control for B-Robot
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/showthre...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! Smile
Find all posts by this user
Quote this message in a reply
02-23-2020, 08:51 PM
Post: #2
RE: RC Control for B-Robot
***** 5 Stars contribution! Thank you! I am making one as well! :-D
Find all posts by this user
Quote this message in a reply
03-12-2020, 07:54 AM
Post: #3
RE: RC Control for B-Robot
Thanks for the wonderful project.
I also created it.
Micro RX is on the right side of the control board.
           
Find all posts by this user
Quote this message in a reply
03-12-2020, 03:55 PM
Post: #4
RE: RC Control for B-Robot
Video or never happened! :-D
Visit this user's website Find all posts by this user
Quote this message in a reply
03-12-2020, 10:55 PM
Post: #5
RE: RC Control for B-Robot
(03-12-2020 07:54 AM)S_daisuke Wrote:  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.
Find all posts by this user
Quote this message in a reply
03-12-2020, 11:56 PM
Post: #6
RE: RC Control for B-Robot
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/
Find all posts by this user
Quote this message in a reply
03-13-2020, 12:08 AM
Post: #7
RE: RC Control for B-Robot
Hi... Thanks for your work. I am struggling around with this receiver https://www.vgr-technology.de/p/empfaeng...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?
Find all posts by this user
Quote this message in a reply
03-13-2020, 04:26 AM
Post: #8
RE: RC Control for B-Robot
(03-13-2020 12:08 AM)Greengecko Wrote:  Hi... Thanks for your work. I am struggling around with this receiver https://www.vgr-technology.de/p/empfaeng...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.
Find all posts by this user
Quote this message in a reply
03-13-2020, 01:49 PM
Post: #9
RE: RC Control for B-Robot
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?
Find all posts by this user
Quote this message in a reply
03-13-2020, 03:20 PM
Post: #10
RE: RC Control for B-Robot
(03-13-2020 01:49 PM)Greengecko Wrote:  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. Big Grin 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] < 0 ) chan[3] = 0;
if (chan[3] > 255) chan[3] =255;
if (chan[2] < 0 ) chan[2] = 0;
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)