DIY custom 2.4ghz RC radio system for robotics

Thanks, but as you said the credit should go out to several people here, including, Jim(Robot Dude) who wrote most of it, Xan who made a lot of nice improvements, Eddie who helped Jim with some of the Algorithyms as well as the electronics, …

Kurt

I thought I would do a follow up post of some of the things I am considering to do next to see if it may overlap with anyone elses desires.

  1. Update my rover code with the new functionality of the test program.

2)Change the Pulsin7 function on the receiver to maybe use the WTIMER values instead of directly computing time. This will hopefully allow me to still have accurate enough values even if I am processing interrupts. This would make it incompatible with HSERVO as hservo uses Wtimer directly.

  1. Also considering changing the pulsin function to allow the user to set the Mask of which pins are used to any of the first 16. Would probably keep the code simple by saying that the array awPulseIn size needs to be the index of the largest one used +1. Only those pins that are set in the mask will have their values set in this array… Not sure if any of you would find this functionality useful, but I may experiment as to make it so I can free up some of the Analog pins as well as to not necesarily eat up the HSERIAL pins.

  2. Play with XBEE. I would start out simple and hopefully use it as a serial port replacement. Would probably make it conditional and maybe only change the GeneratePulses function to simply send the two byte values for each of the 7 channels. On the receive side may simply use HSERIN to read in the 14 bytes and everything else could be reasonably transparent. If this works out we could then add in bidirectional communication…

That is all for now. What do you think?
Kurt

Hi Kurt,

Great that you’ve got the binding part working. I didn’t had time to try it but the way you describe it, it should work perfect! Great work with the assembly code to. How did it work out? Is it more accurate then the basic code?

Thanks for sharing your next plans. This keeps us from inventing things twice. Not that I was thinking of one of your points. (except maybe for point 4 :stuck_out_tongue:)

I’m not totally sure that I understand what your saying but if you can improve the pulsin command it would be great. Can I still use the timer to read the cycle time? (I think this is the WTimer but correct me if I’m wrong). I personally don’t have a problem with loosing the HSERVO command. My SSC32 does that for me. But I don’t know about the other users. I think the mask will be a good idea to keep the code easy to read.

Bidirectional communication would be great and the single pin serial input would be much faster and uses less pins. I was thinking about Bluetooth but this takes much more current then XBEE. I’m not sure yet but I might try something later on. But make it switchable so I can always use the DM8 as well.

Thanks for all the great work you put in to this!

Xan

I think it is more accurate going into the transmitter, but what I found was that the transmitter itself is the thing that was not completely accurate. So if I generated the pulses exactly for 1500 it may output 1495 and for 1000 may output 1003… So I started playing around with a fudge function at the start of the transmit code and then hooked up the logic analyzer to the 7 channels on the receiver and kept playing with the fudge factors until they appeared to be close enough.

Yes we could setup WTIMER to use common code such that multiple of us can use it’s tick. Awhile ago Nathan (AcidTech) was working on an experimental version of the BAP ide and he was proposing supplying a wtimer service. I don’t remember what resolution he had it set for (ie counting in tics or ticks/8…), but we can easily settle on one.

Now the reason I am considering comverting the code from using the calculated number of cycles where is very accurate is because we may want to use interrupts for other things like your timer tick. Or maybe on my Rover to to handle the encoder(s). The current code does a good job of counting clock cycles for the main code, but suppose while it is counting tics for a channel to go back low, we get a WTIMER overlow interrupt. My quick calculations are that processing one WTIMER overlow may take (14 cycles to handle intterupt, + 40 cycles in the interrupt handler) or 54 clock cycles, which when divided by 16 implies our pulse width would be off by 3 or 4, and that is for one interrupt.

Does that make sense?

That is the idea, although I can imagine that once we have bidirectional communication working, we may diverge some. For example maybe you want the LCD on the transmitter to display other information, like maybe power levels on the robot, or information from a sensor…

Should be fun!

Kurt

You may have already figured this out, and it fooled me at first too. The solution should be pulsout (800) 400uS then pause for the 1100uS. Pulsout is 0.5uS resolution. :slight_smile:

Hi Kurt,

I’ve tried V1.2 yesterday and to keep it short: Your binding methods rocks! 8)
It took me some time to figure out the steps. I’m the typical technician that always reads the manual after trying to figure it out by itself…Now it works perfect! If the radio is switched off the phoenix easy returns to his rest position and switches off.

I didn’t tried compared your receiver part with mine. Put I’m planning to do that later on…

Xan

Hi Orac,

I don’t know the exact cost but I can help you make a shopping list :wink:
1 x Bot Board 2
1 x BASIC Atom pro 28
1 x DSM2 Airmod
1 x Keypad
1 x Display MOS-AL162-A, Maybe somebody can fill me in where you can get them.
2 x Joystick. Maybe somebody can fill me in where you can get them.
2 x slider potentiometers I think 10k will do the job but I can check out the once I’ve got.
1 x 6V Battery pack
2 x Switches for switching the power to the BAP and DSM2
1 x Casing, I have to lookup the size of that… Or maybe someone knows the exact type.
Hope I didn’t forget something…

If you are planning to build the same setup you can easy download the program of this topic.
If there are any questions, please let me know.

Xan

Hi Xan,

Thanks!

As for the parts list. I think you can order the LCD directly from Matrix Orbital. matrixorbital.com/mosal162abw-p-334.html

Kurt

I can help.

The joysticks were from Hitec Laser 4 radios. Any RC gimbal should work for this.

The slider pots must be linear taper, not audio taper. I got them from Mouser. The pots are 312-9201F-5K, and the 450-3051. The price is $1.38 each.

The keypad is a simple 16 key row and column keypad. I found them at electronix express elexp.com part number 17KP1604. I like this one because it has the ABCDEF keys instead of the telephone * # stuff… The price is $6.25 each.

The display is from Matrix Orbital.

The case was from Polycase. I paid like $75.00 setup for them to mill the case down to just 1.5" tall. The cases were around $8.00. I doubt they will allow anyone else to buy them with my mill down setup charge even though I don’t care. They wouldn’t even let me return 2 of the unmodified ones I bought earlier to have them cut them down. The top panels were made by me using my laser. Unfortunately I’m not able to make these parts for sale.

Hi,

Thanks for your great work with the code Kurt!
The v 1.2 works fine, have not tried the BIND function yet…
I’m just finished sandblasting and remounting the DIY remote. Mounted the antenna in a similar way like Xan did. And also added a serial/com extension plug.

Picture of my precious DIY remote. :smiling_imp: :

Thanks again Jim! 8)
BTW, I just had to replace some of the screws… :unamused:

Looking great Kare! 8)

Oh BTW Kurt and EddieB, I still have the antenna mounts we forgot to send. They are here if you guys want them. Just let me know… :blush:

I was sort of wondering what to do there and now it makes more sense. I was going to try out one of the 2.4GHz antennas from the WiPort too though so I wasn’t stressing too much. I need a couple SEA-01 for that other project there so I’ll place an order later this week and put a note on it to bring it to your attn. so you can throw it in the box if you get the chance. :wink:
EB
:mrgreen:

You can build some pretty decent 2.4ghz antennas with little work although id just buy some high gain omni’s like the ones used on linksys radios with the reverse TNC connectors.

On the previous page of this thread I noticed that you guys had some code that allowed the phoenix to drop when the radio was turned off, there is a pin on quite a lot of these receivers and the voltage changes on this pin due to signal strength coming off the transmitter and goes to some voltage when the transmitter is off, this pin isn’t accessible from outside the receiver so you need to crack the case and find it,

I know this is the case for some of the analog futaba receivers.

–Aaron

Hi,

I’ve done some testing with the v1.2 transmitter code and Kurte’s receiver test code. And the receiver code works great, I measured an average reading time for all channels to 15 mS ! Much better than the way I did it (reading all pulses in two rounds). Great work with the code Kurt! 8)

I’ve some questions about powering the DIY. The battery Jim provided is that NiCd or NiMh ? What are the recommended charging rates? I charged it ones but it didn’t last for more than 30 minuttes. The battery is rated 1600 mAh and the DIY draw 270 mAh.

Does anyone know what voltage range the Spectrum DM8 support? I didn’t find it in the documentations, only for the receiver.

Hi zenta,

You should build your own pack like i did

http://img88.imageshack.us/img88/3149/battery2ux2.jpg

As for charging rates, I use this
http://img241.imageshack.us/img241/822/Charger.jpg and I charge it at 5.0 amps takes around 45 minutes or so.

as for lifetime I believe its around an hour or so?? I haven’t actually had my phoenix operating until the thing beeps at me due to low voltage.

they are 5x 4700Mah NIMH cells I had bought online… they are the largest capacity in current available in the subC size without going to a more radical battery like the lipo. and at around 5-7 dollars a cell they are quite inexpensive to construct your own pack.

It also fits nicely in between the two plates of the phoenix.

and i don’t have a picture of it.

either way BUILD your pack! and get a sweet charger for it, that charger i have charges everything pb, lipo, nimh, nicad, Ion,

genius. GENIUS.

anyway…

–Aaron

Hi LikWidChz,

I’m not sure if I need more amps for powering the DIY remote, since the battery supplied are rated 1600 and the DIY draw about 270 mAh.

Another thing is that I doubt I would make a large battery pack fit into the DIY case.

Thanks for your suggestion though!

When it comes to powering my A-pod I’m using LiPo, I recently bought two of these:

:smiling_imp:
I just had to beat Xan’s beefy 4900 mAh polyquest… :laughing:


Ok, I don’t want this thread to get off topic. So any answers to my previous post are appreciated.

Hi Zenta,

Jim provided the DIY with a NiMH battery. I’ve purchased a universal Turnigy charger for the Lipo which I’m using in the phoenix. I’m also using it for charging the DIY. The charger let me choose a program (fast charge, tickle charge, discharge/charge) and takes further care of the configured amps. The charger automatically stops when it’s done. What kind of charger do you use?

I’ve configured the fast charge program to 1C and the tickle charge to C/10. So i think the fastest recharge time is 1 hour…

Xan

:open_mouth: :open_mouth: :open_mouth: [size=150]DAMN!! [/size] :open_mouth: :open_mouth: :open_mouth:

Thanks Xan,

I’m using a iMAX B5 charger. I’ve been very pleased with it until now. I’ll give the battery a second chance and try charging at 1C again.

The batteries are NiMH. They require several charge/discharge cycles to get into spec. We buy them in large quantities in order to keep the prices low. So it’s normal to have to do this when NiMH batteries are stored for a while.

The AirMod is made for a standard Futaba radio which is powered from 9-12vdc depending on battery type. I have powered it up with as little as 5vdc and it did operate. I don’t know if the range was effected. In fact I haven’t tested the range yet. Has anyone else tested the range yet?