Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

IR remote, my first prototype

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
9 postsPage 1 of 1
9 postsPage 1 of 1

IR remote, my first prototype

Post by inaki » Mon Aug 21, 2006 3:46 pm

Post by inaki
Mon Aug 21, 2006 3:46 pm

I have made a remote controller for the Bioloid using a SX28 micro and following the encoding that I explain in my other thread 'IR Codes: can you decipher this?'.

I have used exactly a 40Khz carrier and 800us pulses.

Then I use a simple BCP program that reads continuously the 'RX remocon data' register:

START
Loop:
LOAD CM5.PRINTLF, AX.100.RX_REMOCON
DELAY 10
JUMP Loop
END

What I have found is that this register, the so called 'RX remocon data', rembers forever the last read data. I mean, if you send the data 85 from a remote controller it remembers this data. So anytime you read it thereafter you will read 85, no matter the sender has stopped sending data, and so until a different data is sent to the sensor.

This is not the behaviour I expected. I thought it would erase the incoming data once it is read but it does not. (Have I missed something about this register?)

There is another register called the 'IR incoming data' but I have not found its meaning. It reads zero when there is no data available and 2 when there is an available data.

So the solution I have found to send distinctive data to AXS1 is by sending pairs of data with a slight delay, with the following scheme:

'Codes sent from my Remote Controller:
Send MyData
Delay X
Send Zero

So, when the AXS1 reads IR data it will read MyData for a short time but will read zero thereafter.

I am thinking here about the following scenario:

You want to manage your robot so it moves right for example when receiving data A and moving left when it receives data B. Simply sending A would move the robot to the right forever until another command is sent. The zero after the A command would prevent this.

I don't say the 'RX remocon' behavior is wrong in all cases. It is simply not the best approach for most cases.

Anyway this experiment proves my analysis of the IR codes works. So it is possible (and pretty easy) to make an IR remote controller for our Bioloid robots.
I have made a remote controller for the Bioloid using a SX28 micro and following the encoding that I explain in my other thread 'IR Codes: can you decipher this?'.

I have used exactly a 40Khz carrier and 800us pulses.

Then I use a simple BCP program that reads continuously the 'RX remocon data' register:

START
Loop:
LOAD CM5.PRINTLF, AX.100.RX_REMOCON
DELAY 10
JUMP Loop
END

What I have found is that this register, the so called 'RX remocon data', rembers forever the last read data. I mean, if you send the data 85 from a remote controller it remembers this data. So anytime you read it thereafter you will read 85, no matter the sender has stopped sending data, and so until a different data is sent to the sensor.

This is not the behaviour I expected. I thought it would erase the incoming data once it is read but it does not. (Have I missed something about this register?)

There is another register called the 'IR incoming data' but I have not found its meaning. It reads zero when there is no data available and 2 when there is an available data.

So the solution I have found to send distinctive data to AXS1 is by sending pairs of data with a slight delay, with the following scheme:

'Codes sent from my Remote Controller:
Send MyData
Delay X
Send Zero

So, when the AXS1 reads IR data it will read MyData for a short time but will read zero thereafter.

I am thinking here about the following scenario:

You want to manage your robot so it moves right for example when receiving data A and moving left when it receives data B. Simply sending A would move the robot to the right forever until another command is sent. The zero after the A command would prevent this.

I don't say the 'RX remocon' behavior is wrong in all cases. It is simply not the best approach for most cases.

Anyway this experiment proves my analysis of the IR codes works. So it is possible (and pretty easy) to make an IR remote controller for our Bioloid robots.
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by Pev » Mon Aug 21, 2006 5:38 pm

Post by Pev
Mon Aug 21, 2006 5:38 pm

Wow, this is very cool. Way above my skills too, respect.

Right, my understanding of the 'IR incoming data' was that it toggled to 2 when there was data to be read and returned to 0 once that data had been read so you only needed to read data when 'IR incoming data' was 2 and the new incoming data overwrote the existing data that had been sitting there....... erm redundent I guess.

Anyway that was my take on it. Top marks again for the solution, would love to hear more details but do keep it simple I am a bit challenged lol

Thanks again

Pev
Wow, this is very cool. Way above my skills too, respect.

Right, my understanding of the 'IR incoming data' was that it toggled to 2 when there was data to be read and returned to 0 once that data had been read so you only needed to read data when 'IR incoming data' was 2 and the new incoming data overwrote the existing data that had been sitting there....... erm redundent I guess.

Anyway that was my take on it. Top marks again for the solution, would love to hear more details but do keep it simple I am a bit challenged lol

Thanks again

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by pepperm » Mon Aug 21, 2006 7:00 pm

Post by pepperm
Mon Aug 21, 2006 7:00 pm

Inaki

Top work well done.

Just a thought about the sticky code problem, is it possible to write to the IR registers? You could then write a known code to it (or the register that indicates a change) after the read, thus avoiding the repeated read of the same code problem.

Just a thought.....

Mark
Inaki

Top work well done.

Just a thought about the sticky code problem, is it possible to write to the IR registers? You could then write a known code to it (or the register that indicates a change) after the read, thus avoiding the repeated read of the same code problem.

Just a thought.....

Mark
pepperm
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 190
Joined: Sat Jul 01, 2006 1:00 am

Post by inaki » Mon Aug 21, 2006 10:13 pm

Post by inaki
Mon Aug 21, 2006 10:13 pm

Pev, good point! Actually the 'IR incoming'(called IR remocon arrived in BCP) register goes to zero after I read it. So I can use it to test for a new byte!

Pepperm, yes these registers can be writen too. Of course it is easier than sending two codes from the sender.

I have modified the test code on the BCP program as follows:

START
Begin:
IF AX.100.RX_REMOCON_ARRIVED != 2 THEN JUMP Begin
LOAD CM5.PRINTLF, AX.100.RX_REMOCON
JUMP Begin
END

And it works as expected!

By the way, do you think it would be worthy to make our own remote controller board ? How many buttons ? I think 9(3x3) or perhaps 16 (4x4) would be nice to have. Anyone interested? It would be necessary to order a PCB, but it can be ordered cheap for 5 units or so.

I have not calculated the prices but the necessary components would be:

- One 555
- Three capacitors
- One potentiometer
- One 74LS04 logic gate
- One SX28 micro
- One battery holder (with batteries)
- One 2 way switcher
- One power regulator LM7805
- One IR led
- One keypad (9 keys would be enough I think)
- One PCB

Box enclosure is not required but it would be nice...
Pev, good point! Actually the 'IR incoming'(called IR remocon arrived in BCP) register goes to zero after I read it. So I can use it to test for a new byte!

Pepperm, yes these registers can be writen too. Of course it is easier than sending two codes from the sender.

I have modified the test code on the BCP program as follows:

START
Begin:
IF AX.100.RX_REMOCON_ARRIVED != 2 THEN JUMP Begin
LOAD CM5.PRINTLF, AX.100.RX_REMOCON
JUMP Begin
END

And it works as expected!

By the way, do you think it would be worthy to make our own remote controller board ? How many buttons ? I think 9(3x3) or perhaps 16 (4x4) would be nice to have. Anyone interested? It would be necessary to order a PCB, but it can be ordered cheap for 5 units or so.

I have not calculated the prices but the necessary components would be:

- One 555
- Three capacitors
- One potentiometer
- One 74LS04 logic gate
- One SX28 micro
- One battery holder (with batteries)
- One 2 way switcher
- One power regulator LM7805
- One IR led
- One keypad (9 keys would be enough I think)
- One PCB

Box enclosure is not required but it would be nice...
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by Pev » Tue Aug 22, 2006 6:17 am

Post by Pev
Tue Aug 22, 2006 6:17 am

inaki wrote:By the way, do you think it would be worthy to make our own remote controller board ? How many buttons ? I think 9(3x3) or perhaps 16 (4x4) would be nice to have. Anyone interested? It would be necessary to order a PCB, but it can be ordered cheap for 5 units or so.



Inaki,

Brilliant to hear you've got so far with this and yes I think making our own remote would be a great idea. I am definately up to be included and share the costs.

Congrats again

Pev

PS I think the 16 button option would be the way to go as I think we'll all use up the 9 button remote pretty quick but hey thats just me being greedy lol
inaki wrote:By the way, do you think it would be worthy to make our own remote controller board ? How many buttons ? I think 9(3x3) or perhaps 16 (4x4) would be nice to have. Anyone interested? It would be necessary to order a PCB, but it can be ordered cheap for 5 units or so.



Inaki,

Brilliant to hear you've got so far with this and yes I think making our own remote would be a great idea. I am definately up to be included and share the costs.

Congrats again

Pev

PS I think the 16 button option would be the way to go as I think we'll all use up the 9 button remote pretty quick but hey thats just me being greedy lol
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK

Post by pepperm » Tue Aug 22, 2006 4:18 pm

Post by pepperm
Tue Aug 22, 2006 4:18 pm

What code are you using to generate IR signals from the SX28? It may be that it could be written for a cheaper processor such as a PIC or AVR. I may be able to do this if you give me an indication of the codes sent. Also it may be that the codes could be written into one of those JP1 remotes. There are some guys on Yahoo Groups that do wonders with JP1 remotes.

It seems such a long way around the IR remote control problem to construct yet another remote design.

Mark
What code are you using to generate IR signals from the SX28? It may be that it could be written for a cheaper processor such as a PIC or AVR. I may be able to do this if you give me an indication of the codes sent. Also it may be that the codes could be written into one of those JP1 remotes. There are some guys on Yahoo Groups that do wonders with JP1 remotes.

It seems such a long way around the IR remote control problem to construct yet another remote design.

Mark
pepperm
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 190
Joined: Sat Jul 01, 2006 1:00 am

Post by inaki » Tue Aug 22, 2006 5:50 pm

Post by inaki
Tue Aug 22, 2006 5:50 pm

Pepperm, you can check the other thread 'IR coding: can you decipher this?'
There I explain the full details about IR coding on Bioloid. You should be able to encode the IR commands with any microcontroller using this guide.

Of course it can be done with a PIC, even the most modest one.

I will check JP1 remotes to see what can be done with them. Of course I am the least interested in making a work that is already made.
Pepperm, you can check the other thread 'IR coding: can you decipher this?'
There I explain the full details about IR coding on Bioloid. You should be able to encode the IR commands with any microcontroller using this guide.

Of course it can be done with a PIC, even the most modest one.

I will check JP1 remotes to see what can be done with them. Of course I am the least interested in making a work that is already made.
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by inaki » Wed Sep 20, 2006 1:12 pm

Post by inaki
Wed Sep 20, 2006 1:12 pm

My first finished prototype for a IR remote controller.

Works with a standard 9V battery or a rechargeable 7,2V.
It uses an SX28 micro to control the keyboard and send IR codes.

It generates 12 codes. As it is a matrix keyboard mixed hotkeys could be detected too but I have not added this feature.


Image
My first finished prototype for a IR remote controller.

Works with a standard 9V battery or a rechargeable 7,2V.
It uses an SX28 micro to control the keyboard and send IR codes.

It generates 12 codes. As it is a matrix keyboard mixed hotkeys could be detected too but I have not added this feature.


Image
inaki
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 233
Joined: Sun Mar 06, 2005 1:00 am
Location: EH

Post by Pev » Wed Sep 20, 2006 7:16 pm

Post by Pev
Wed Sep 20, 2006 7:16 pm

Inaki,

Brilliant!!!!! it looks good too.

Pev
Inaki,

Brilliant!!!!! it looks good too.

Pev
Carl
-------------------------
www.alt-view.co.uk
Pev
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 547
Joined: Sun Feb 26, 2006 1:00 am
Location: UK


9 postsPage 1 of 1
9 postsPage 1 of 1