Remote Control Can Talk to a Picaxe

I had asked in a forum post if a picaxe could "read" a servo output comming from another source... Thanks to the OddBot, as he nailed it. By the way, O.B. I simply ran the receiver off the same 5V supply I was using for the Picaxe board --No resistor bridge needed, everyone was happy with the same 5 volts. Here is the original post.

 

In this case I am using a VEX brand transmitter, but understand, really it is exactly the same as a RC car or model airplane transmitter --All outputs from the receiver are for servos.

I was really quite surprised at how easily this is done. I simply connected the data wire and ground from the receiver servo connector to a digital input pin of the picaxe. I skipped the positive wires, all that is needed is the one data wire and for the grounds to be tied together. Also, on the board, I have a 10K pull-down resistor tied to the input. (I don't know if this is needed or not)

Now for the even easier part!!! (The code I used in the video)

main:

pulsin 5,1,w1

pwmout 1,63,w1

low 0

goto main

That's it! --Really. Using the pulsin command simply sticks a number in to the word variable between 0 and 255 in relation to where the stick on the transmitter is.

So there you go, folks... It works, its simple and if you buy one of those huge controllers with all the extra switches and buttons and the LCD and all, you will just look that much cooler!

https://www.youtube.com/watch?v=1MXWYofJBiU

Very cool!A good start to

Very cool!

A good start to interfacing RF frequencies with the Picaxe.

 

There are too many good ideas on this site. I think I’m going to have to make a list of things I want to build now.

That’s badass, $0 to build,

That’s badass, $0 to build, but I bet that remote and reciever were well over $60 USD :stuck_out_tongue:

But what the hell Chris… you’re not Ting-ing anymore at the end of videos… we can’t have that

Well this will come in super
Well this will come in super handy, awesome reseach there ctc!

A little more than that, C.O…

Actually, the whole Vex kit retails for about $400. I did a little side job for a homeowner who’s husband bought it, never used it and died. -Really. I got the whole kit, including the remote and all the parts I used in this guy for about 2 hours work. This has been a great kit by the way, I am still scrounging parts from the box!

 

-Sorry about the lack of “ting” in my post… It’s this damn cold bringin’ me down, man.

You would not believe…

Everything you see here on this site was built or coded ONLY between the hours of 8:00 and 10:30 PM. -Seriously. The only real chunk of time I have is after I put the boys down and when I go to bed. --Just gotta be efficient, my friend… Well ok, the crystal meth does help a bit… :slight_smile:

 

Chris, this is just about

Chris, this is just about the coolest ever come from you, and in fact it rates the over all top 10 of cool stuff ever in this field!

I never thought about it, it’s brilliant!

I do believe that the vision “Autonomous robots wandering about on the streets having their own mind” is nonsense. Humans want tools, extensions of themselves, why would we need independent robots?

However, the best tools are “intelligent” tools. And therefore it is good to make a robot autonomous, because then you have something “intelligent” to control, if you catch me :slight_smile:

All this comes down to; I think that remote controlling self-thinking robots is the way ahead.

- And thanks to you, it just got a lot easier to make a lot stronger applications; Taking apart say a cheap or even used / broke RC toy, hack in with a Microcontroller with this brilliant invention, and you are go!

Too much cool stuff to make on this site, as Zanthess said :slight_smile:

Wicked, thanks for inventing & thanks for sharing!

 

BTW; You would not need a Word variable, when only dealing with values between 0-255, so I should think that the code could be optimized to:

main:

pulsin 5,1,b1

pwmout 1,63,b1

low 0

goto main

-And then just for the record; Using the pwmout limits you to 2 special outputs, and only these on a Picaxe 28. There will be 1.001 more options - for an example, one could control 8 servos, or 2 motors and 4 servos or set this up on a dedicated servocontroller board and control 21 servos or whatever … the Pulsin command is the brilliant part here, the rest is optional. I know you know, it’s just for the record if anyone saw this and started to make things more complicated than they had to, because they figured that pwmout had to be part of the Chris’s invention :slight_smile:

 

Further work

Nice. Pretty cool that the PWM input is provided for you in BASIC.

Now, you’ve got a 4 channel system there, which is pretty good, but poor folks like me can only afford 2 channel kit. So, in my RISC assembly implementation (I time the length of the pulse in microseconds, with the result being approximately in the range 900 to 2200), values below 1550 have a different function to tose above 1550.

So, if I push the stick forward, for example, the vehicle goes forward, but if I pull it back, this toggles the headlights on and off. 2 functions per channel!

I’m starting to wonder if a data stream could be sent from the transmitter to teh receiver, where a pic would control the pulse width at the transmitter end…

are you suggesting

to hack an RC controller into a serial data transmitter? Hoping to find a way to encode (up to) 256 different messages over one channel?

that would be clever and useful at the same time!

@rik
In terms of a data stream from the transmitter, I think it is just a pot inside… It has little springs to return it to center, but really just a pot. I am sure there are many ways to substitute the pot for something else spitting out a given resistance.

Sure is, just use buttons
Sure is, just use buttons that the axe can see as an input. send a puls signal based on this button. This could allow for quite a few signals to be sent out from the radio.

Some info on the picaxe

Some info on the picaxe forums delving into this topic.

http://www.picaxeforum.co.uk/showthread.php?t=10033&highlight=pulsout+servo

I scored just the TX/RX

You have great timing CtC. I just scored this very same transmitter/receiver (only), new in the box for $30US from AllElectronics.

http://www.allelectronics.com/make-a-store/category/395/Miscellaneous/5.html

They are a great surplus seller for those of us in the US. Unfortunately, international shipping would probably reduce there appeal. I’ve never had any problems with the several orders I’ve placed with them. My intention was to do just what you did. You’ve probably saved me some time and head scratching. Thanks CtC.

I’ve actually been to that
I’ve actually been to that shop a couple times. They have all sorts of goodies, and lots of electronics to play with, like a thrift store of electronics goodness…

What he says
As Chris points out in a completely different thread, for some bizzarre reason, the sticks are attached to pots. Since digital pots which can be controlled by I2C are freely availalble, I figure on replagin the pot with one of these. I’d probably aim for only 6 bit accuracy at first because I’m not too sure how stable the transmitter is with declining battery voltage, but you appear to be thinking the same thing as me…

for pic16f84

I been working on something like this for the past few months, got a 4 channels RC and trying to hookup together with pic16f84.

Can the code use on this PIC16f84.

 

 

Lab-tech.blogspot.com

a-tech.deviantart.com

A place to get the same controller/receiver
I came accross this in one of my zines I read, the whole transmitter/reciever is $30.00 there, not too shabby. It’s the exact same as the one you’ve used here :slight_smile:

digital buttons
can you send i2c information through one of the digital buttons of the remote?

Some Vex info

Here’s some bits I found and remember about the Vex stuff, pretty cool system. The transmitter and reciever is available new from a number of places for about $130 retail, but the reciever part is actually just a little yellow box that plugs into the silver rounded box that CtC was working with. Inside the silver rounded box are 2 PICs that decode the reciever signal to make the RC servo drive pulses, having the whole system operate in a similar fashion to the normal RC reciever does, as CtC pointed out in the video. That rounded silver control system can be reprogrammed to do other fun things as well, using a special programming cable and I think a Light version of MPLab, though I could be mistaken on the software. Anyway, the Vex Microcontroller runs about $150 by itself, adding up to $280 retail to get a similar setup with just the electronic bits.

http://www.trossenrobotics.com/store/p/3134-VEX-Transmitter-and-Receiver-Add-on-Kit.aspx trans/rec only

http://www.trossenrobotics.com/store/p/5676-VEX-Micro-Controller.aspx Microcontroller

Alternatively, there are some surplus Vex transmitter/reciever sets on sale for a whole $30.

https://www.allelectronics.com/index.php?&page=item&id=JS-6&index=1

http://www.mpja.com/prodinfo.asp?number=17044+MI

Some feedback about the transmitter says that a CirrusMRX-6 reciever can directly convert the PPM signal to RC servo ouputs, without the need for a decoding micro, as long as you use the Vex reciever crystal in the MRX-6. This seems to be a bit difficult to find, but think it ranges between $22 and $30

http://www.hobbypeople.net/gallery/443536.asp

Some info about just the transmitter/receiver combo:

How to decode the receiver signals with the Parallax SX/B http://www.allelectronics.com/mas_assets//spec/JS-6.pdf

How to decode it with an AVR http://frank.circleofcurrent.com/vexrx.php

How to decode it with an Arduino http://profmason.com/?s=reciever

 

Edit to add: Vex Signal Splitter $19.99, splits out pulses to 6 servo channels