Building a Universal RF Remote - Questions

remote.JPG (48665Bytes)

More Recent UPDATE: the competed remote can be found here. Thanks to fritsl and rik for their respective helpfulness.

UPDATE: Attached (and blurrily pictured below) is my schematic that i think will work for this remote. Yes I drew it in paint, Yes it took too long:

*The "To Breadboard" leads are included so that the remote may also serve as a portable power supply.




Can an RF transmitter like THIS and its corresponding reciever communicate with more than one command at a time? What I mean is, if i press two buttons on a remote will both commands be able to be sent to the reciever?

(Thoughts to myself: Is this a matter of whether it can send two or more commands at once, or whether I can program to cover the combinations of buttons pressed and compile the desired outcome of pressing two (or more) buttons into one serial message sent over RF... which i guess is possible.) This will be my first robotics related project undertaken without a step by step guide, but I still need a little help :)


The reason i ask this question is because the answer dictates how i construct the remote. As seen below is an IR remote that is not dissimilar to what i'm thinking. However, its button layout is momentary push buttons in series, in parallel to resistors in series, connected to an analogue input. That is, when a button is pressed, the analogue input gets fed with a specific resistance value for each button and so does what you tell it to when it gets that reading. The problem with this however is that only ONE button may be pressed at a time (in most cases, you can press two but only one will be active because it short circuits the second one.) If RF does not support multiple RF commands, then i would simply wire the remote in a similar fashion to this one, as it is simpler.


 If however, RF can support multiple commands then I can dedicate one digital input to each button, and two analogue inputs to each joystick (two of them). This will, however, create a lot of connections to be made between two protoboards that are going to be stacked with small spacers (like in , second project down.)


The number of I/O pins available is not an issue, as i plan to use a PICAXE 28X2 (for educational reasons i thought it would be a good idea to expand my experience to the X2 range at some point.)


Other details about my project.

Signal: RF Link Transmitter - 315MHz

2 x Analogue joysticks and up to 10 momentary push buttons

Mode select button to allow multiple uses of each button (this is universal, i have to keep the future in the scope of the project)

powered by a single AA or AAA cell, by using a Pololu 5V Boost Regulator NCP1402

connections between the two boards will be made using break away male headers soldered to one board, mating with break away female headers soldered to the second board.

Well as far as i know TVs
Well as far as i know TVs only accept one single command at a time. Trying to send more then one at the same time would probably send a screwed up command (a mix of the two) that TV won’t understand. So if the TV is what you are trying to communicate with, i’d say just go with a command at a time. This also applies to the RF module. (…and you would need two MCUs to send two commands at a time)

resistor networks

All those 1 KOhm resistors together form a “resistor network”. If you replace the network with a different one, you could have a combination of switches that, together, code for many different digital/binary values. Each value can be decoded by the receiver to give you the combination of buttons pressed on the transmitter.

I am talking about a R2R network, which consists of resistors in series AND in parallel with each other. Four buttons would code for 2^4 = 16 different combinations. Ten buttons would encode 1024 combinations. Each combination is ultimately a voltage between 5V and 0V. You would need a very sensitive ADC to read those voltages discretely. The picaxe basic command readadc10 will not cut it. So you’d have to lose two or more buttons.

Sea of keys

Now that rik mentioned the problem of reading multiple keys I remembered this link:

There’s an implementation of “sea of keys” (127 keys) done with 08M. You might find that useful. I haven’t tried that myself. I just ran into it when I was looking for material about tri-stating.


Forget the input buttons.

This has nothing to do with your input buttons. Input whatever data you want to input to your 08m (or any other chip for that matter) in any way you want. Use a pot and input button or a resistor bridge like you have etc. Does not matter.

Now, multi “commands”… What is a “command”? And what are “commands”?

When you are sending a signal via RF RC, you are sending serial data. You can send one bit, one byte or a 100 bytes. If each byte is a “command” then you can send an unlimited number of them.

First off, these cheap Rx TX units need a few little tricks to get them working. Basically, they need to be warmed up… Friits figured this out here.

As for serial data, this might help:

I use these $5 Tx Rx units for Walter. Lets take RC mode for example. This is a simple “remote control car” mode. I have to send 3 bits of info: Left wheel, right wheel and speed. I have coded (on the transmitter) how to convert the X/Y of the joystick to a byte for each wheel. This byte is in reference to the eventual PWM speed sent to that wheel via the picaxe chip on board the robot. In addition, I want to limit the max speed of both motors. This is done with a pot on the side of the transmitter going into an ADC on the transmitter’s pic. So in total, we have 3 bytes to transmit. And I transmit them. Thats it.

high B.3 pause 3 low b.3 pause 1 serout 7,N2400, (85,85,“motornumbers”,b5,b6,b3)

The high/low stuff and the 85, 85 is part of the “warm-up”

“Motornumbers” is just the qualifier

b5 and b6 are wheel speeds and b3 is the max top speed

In some of my other communications, I have used up to 8 bytes and 3 bits in one “send”.

That’s it.

CtC knows what he’s talking

CtC knows what he’s talking about here =)
You should also take a good look into the R2R networks (and their cousins) as rik has suggested.

Sounds like you need to have a think about how much data you actually need to transmit. Are your analog sticks single or dual-axis? What precision do you need to read them with? How many simultaneous button presses do you want the remote to be capable of supporting?

If we take the example of 2 x dual-axis analog sticks read with 10bit precision and then scaled back to 8bit, 10 buttons with all possible combinations covered, then we have a total data ‘package’ of:
[1byte analog stick1 axis1]+[1byte analog stick1 axis2]+[1byte analog stick2 axis1]+[1byte analog stick2 axis2]+[10bits button data]

If you are able to further reduce the amount of data transmitted then naturally you can speed up the transmission time, which will decrease the lag between entering a set of commands on the remote and having the target respond. Plus it is often nice to be able to condense your data into single byte blocks, at least if you’re working with 8bit procs like the PICAXEs.

Not to mention "codes"

When you are sending serial data, you will also need to figure in a “code” or system that the sender and receiver can both understand. This system should make sence to you. For example, upon start-up my two main brains have to say “are you there” and “yes I am here” to eachother so they both know they are on. I have always used 104 for this i.e. 10-4 good buddy! When I am in RC mode, I limit the speeds of the motors to 250 --250 is “top” speed. I do this so when I want to exit RC mode and return to the main menu, I can simply send 255 from the transmitter and the reciever then knows to ignore anything above 250 as a speed number and instead goto allstop and return to main menu. Using this >250 rule eliminated an extra bit I would have to send. You can come up with all kinds of tricks here… Of a 3-digit byte say, 157, you could have the hundreds spot mean one thing and tens another and the ones still another. You could also code so that odds mean something and evens mean another. If you play around a little, you can find all kind of ways of stuffing info into bytes.

Oh, one more! Remember, bytes are just 8 bits… If you want to downgrade to 8 buttons, you could send the position of all of the buttons (pushed or not pushed) in only one byte. On a picaxe x2, you have 32 available bits to use --that is 32 individual on-off switches right there.

I’ve added my schematic plan - There is bound to be flaws in there somewhere, educate me!

Everything looks alright at
Everything looks alright at a glance except those analog sticks - they simply won’t work as they currently are. Does the variable resistor on each axis of the stick have 2 or 3 terminals? There are a few different ways you can wire them up for reading with an ADC depending on the type.

OT: blurry ms pain schematics

Those simple monochrome circuits should not be blurry. Just do not use JPG as your file format. It will compress and lose quality (unless you specifically instruct it not to).

Rather use GIF or PNG (surprise for me!). Start out with a monochrome canvas (save as monochrome). And try to avoid formats bigger than 600 pixels, so it will fit LMR layout. These examples are 600 pixels wide and rescaled in my reply to 400 pixels. Click them for full scale.

JPG, blurred by compression:


GIF, can problematic when scaled down to 500 pixels during upload (this one looks ok though):


PNG, not so bad:


Never use BMP on LMR. It cannot be rescaled and it is a ms-painful format anyway.

I shall remember this.
I shall remember this. Initially i just picked the most familiar format that would be compatible with LMR posting scheme

the joysticks have 4

Ah yes i see the problem. The first time i uploaded the schematic i fogot to include the joysticks entirley, and now i’ve forgotten to give them power!

I will remedy the situation.


the joysticks have 4 terminals each, so two per axial resistor.

Specifically, they are the Thumb Slide Joystick from

Most joysticks have 3
Most joysticks have 3 terminals per axis in the classic voltage-divider potentiometer arrangement, but all the required connections are already made internally in the modules that you’ve got, very convenient.

The writer’s presentation
The writer’s presentation is exquisite, he explained the whole process, you can see with naked eye he is an expert even in matters regarding a RF combiner he could totally handle. The fact that he managed to build an universal RF remote is an admirable thing and he should be proud of his work.