Wednesday, February 07, 2018

How I reprogrammed a Deltang Rx102 with a Prog3

Introduction

The Deltang Rx102 receiver can be reprogrammed to change the default servo outputs from the pins to on/off outputs. This means that......
  • LEDs connected to the receiver can be turned on and off remotely by a transmitter, 
  • other devices can be operated through a relay 
  • or sound effects on sound cards can be triggered 
 ....... by pressing buttons, flicking switches or wiggling joysticks on your transmitter.

In my case, I wanted to reprogram my Rx102 so that it could be used to trigger the additional sound effects on a MyLocoSound steam soundcard, including as the whistle and safety valve.

Most sound cards which have additional sound effects (eg the MTroniks DigiSound, the Dallee and the Phoenix sound cards) require their inputs to be connected to 0v to trigger these additional sounds (see How to interface sound cards with Deltang receivers). Some receivers, such as the Deltang Rx65b are already programmed to provide 0v outputs for sound triggers, but the Rx102 does not. However, with a Deltang Prog3, reprogramming the outputs of the Rx102 is relatively easy.

Before ploughing through the instructions set out below, I would suggest you watch the video which I have made, demonstrating the process. It should, hopefully, make what follows a lot more understandable.

Contents

  1. Preparations
  2. Binding the receiver to the Prog3
  3. Programming the Prog3
  4. Transmitting the instructions from the Prog3 to the receiver
  5. Checking
  6. Conclusion

1. Preparations

 i. Deciding what you want to do

The first job is to decide what you want the outputs from the receiver to do. You can change any of the outputs to give:
  • Servo outputs
  • On/Off outputs
  • Auto directional lighting outputs
The default outputs from the signal pins on the receiver are:
Pin 1 - Servo output in response to Channel 1 on the transmitter
Pin 2 - Servo output in response to Channel 4 on the transmitter
Pin 3 - Servo output in response to Channel 3 on the transmitter
Pin 4 - Servo output in response to Channel 2 on the transmitter
Pin 5 - Servo output in response to Channel 5 on the transmitter
Pin 6 - Auto directional lighting (forward)
Pin 7 - Auto directional lighting (reverse)
Pin 8 - Servo output in response to Channel 4 on the transmitter (Pin 8 is located on the side of the receiver)
So, any pin on the receiver can be reprogrammed to respond to any Channel in any way you choose.

I decided that I wanted my receiver to be reprogrammed to give:
  • 0v on Pin 5 when Channel 5 went low (ie when the Bind Button on my Deltang transmitter was pressed)
  • 0v on Pin 4 when Channel 3 went high (ie when the Direction Switch on my Deltang transmitter was clicked in reverse)
  • 0v on Pin 3 when Channel 3 went low (ie when the Direction Switch on my Deltang transmitter was clicked forward)
 My next task was to consult the programming chart for the Rx102 on the Deltang website to discover what codes needed to be sent to the Rx102 to effect the changes I wanted.

ii. Consulting the programming chart

At first sight, the chart on the website can look a bit daunting. However, it actually makes a lot of sense when you work out how the various columns map on to the things you want to change on the receiver.

The part of the chart which was of interest to me was the second row (shown in bold):

2. PROGRAMMING OPTIONS:

Level 1 Level 2
Output number
Level 3
Output type
Level 4
Channel number
Level 5
Other choices
Information
1 flash 1-8 flash = P1-8 1 flash = Servo 1-7 flash = Channel 1-7
(eg: 1,2,1,4 = P2, Servo, Ch4)






1 flash 1-8 flash = P1-8 2 flash = On/Off led 1-7 flash = Channel 1-7 1 flash = ON when Ch is low
2 flash = ON when Ch is mid
3 flash = ON when Ch is high

4 flash = OFF when Ch is low
5 flash = OFF when Ch is mid
6 flash = OFF when Ch is high
Off in other positions (eg: 1,3,2,5,1 = P3, On/Off, Ch5 Low ON)


On in other positions
(6 options from v110-3)


The first column just tells the receiver the menu from which we are selecting our instructions. For the Rx102 there is just this one menu (for the Rx65b there are 13 different menus). The first code number is therefore 1.

The second column determines which output pin we want to change. I decided to start off by changing Pin 5 as I wanted to use this to trigger the whistle sound effect when the bind button on the transmitter is pressed. So, the next number I needed in my list of instructions for the receiver was 5 (ie pin 5)

The next column tells the receiver what action you want it to perform on the chosen pin. I wanted the on/off option (rather than controlling a servo or have directional lighting) and so my next instruction code for the receiver was 2.

The fourth column determines which Channel the pin on the receiver will respond to. In my case, I was wanting Pin 5 to respond to Channel 5 (ie the Bind Button) and so my fourth instruction was 5.

The fifth column tells the receiver how it must respond when receiving a signal on the chosen channel. In my case, I wanted the pin to give 0v when the Bind Button was pressed. Pressing the Bind Button on the transmitter makes Channel 5 go low - so I needed to use instruction 4 (ie turn OFF the output from Pin 5 when the signal from the transmitter on Channel 5 goes low).

iii Working out the codes I needed to send to the receiver

This gave me the following series of codes for the receiver:

1, 5, 2, 5, 4
ie:
  • 1= Menu 1
  • 5 = Pin 5
  • 2 = On/Off
  • 5 = Channel 5
  • 4 = 0v when the channel goes low
For my the other changes I wanted to make to the receiver, the codes are:

 1, 4, 2, 3, 6
ie
  • 1 = Menu 1
  • 4 = Pin 4
  • 2 = On/Off
  • 3 = Channel 3 (Direction switch)
  • 6 = 0v when the channel goes high (ie when the direction switch is in reverse)
..... and

 1, 3, 2, 3, 4
ie
  • 1 = Menu 1
  • 3 = Pin 3
  • 2 = On/Off
  • 3 = Channel 3 (Direction switch)
  • 4 = 0v when the channel goes low (ie when the direction switch is forward)
You might need to take a little while to grasp the logic of this - particularly how the values in the fifth column relate to the response you want to get when a button, switch or joystick is operated on the transmitter. Just remember, that moving a joystick, flicking a switch or pressing a button will make a particular channel go high or low (or higher or lower if it is a proportional control).

2. Binding the receiver to the Prog 3

The Prog3 is very much a stripped down transmitter and so the bind process is similar to any transmitter.

The first job is to put the receiver into bind mode. I had an earlier version of the Rx102 which requires a manual approach to putting the receiver into Bind Mode.
1. The receiver was turned off.
2. The large (black) bind plug was connected to signal pins 5 and 7
3. The receiver was turned on
4. The LED on the receiver flashed rapidly showing it was in Bind Mode
5. The Bind Plug was removed
NOTE: If you have one of the later Rx102s (marked Rx102(AB)) then it will go into Bind Mode automatically. Make sure the transmitter and Prog3 are turned off. Turn on the receiver and wait ten seconds. The receiver should go into Bind Mode (ie the LED on the receiver should flash rapidly).

To put the Prog3 into Bind Mode, I:
  1. Held the Bind Button on the Prog3 down
  2. Turned on the Prog3 (with the button still held down)
  3. Released the Bind Button
  4. The LED on the Prog3 and the LED on the Rx102 flashed once a second
  5. When the LEDs stopped flashing the bind process was completed.
  6. The LED on the Rx102 started flashing three times, then pause, three times, etc to show it was communicating with the Prog3
NOTE: Sometimes the bind process doesn't work first time. If so, turn off the receiver and the Prog3 and try the process again, moving the receiver and Prog3 to a different orientation. Also make sure there are no other transmitters on close by.

I then turned off the Rx102 to make sure I didn't accidentally reprogram it before I was ready.

3. Programming the Prog3

The Prog3 needed to be programmed with the first of the codes shown above (ie 1, 5, 2, 5, 4)

The first five pins on the Prog3 represent the five columns (or Levels) on the programming chart. So, I needed to change the values on each of the pins to those needed to reprogram the Rx102.

The 'values' on each pin are shown as a series of flashes of the LED on the Prog3.
  • 1-flash means the value on that pin is 1, 
  • 2-flash means it's 2, 
  • 3-flash means it's 3,
  • and so on........
 To change the values on each pin, we use the Bind Plugs which come with the Prog3. The Large Black Bind Plug increases the number of flashes on the pin it's connected to. The Small Red Bind Plug decreases the number of flashes on the pin.

When a Prog3 is delivered new, the values on each pin are 1, and so the Large Black Bind Plug is needed to increase them.

To check the value on Pin 1, I connected the Large Black Bind Plug to Signal Pin 1 and Negative Pin 1.

The LED started by flashing once, then pausing, showing the pin had the expected value of 1. I quickly removed the Bind Plug so it wouldn't increase to 2. (If it had, I would have used the Red Bind Plug to reduce it - the Red Bind Plug is connected to Signal Pin 1 and Positive Pin 1 (ie the middle pin)).

To change the value on Pin 2, I connected the Large Black Bind Plug to Signal Pin 2 and Negative Pin 2.

The LED gave 1-flash when it was connected, it then repeated 1-flash and went on to 2-flash, repeated, then 3-flash, repeat, 4-flash, repeat, then 5-flash. At this point I removed the Bind Plug and the LED repeated its 5-flash before going out. This showed the value on Pin 2 was now 5, as required.

I repeated the process of putting the Large Black Bind on Pin 3 until it showed 2-flash. Then Pin 4 until it showed 5-flash and finally Pin 5 until it showed 4-flash.

To 'fix' these values, the Bind Button was pressed on the Prog3.

The Prog3 was now ready to transmit the information to the Rx102.

4. Transmitting the information from the Prog3 to the Rx102

I first checked that the transmitter to which the Rx102 had been bound was off. It's not essential, but it is advisable so that nothing untoward happens.

The Rx102 was switched on and I waited until it started flashing three times, pause, three times etc, to show it was in communication with the Prog3.

I then pressed the Bind Button on the Prog3 and the LED on the Rx102 flashed rapidly to show it was receiving the information.

I released the Bind Button and the LED on the Rx102 returned to 3-flash.

The programming was now completed.

I turned off the Rx102 to make sure the new instructions were processed and also turned off the Prog3

5. Checking

To make sure all was well, I wanted to check that the instructions had been correctly transmitted and also that they were giving the output I was expecting.

I turned on the transmitter to which the Rx102 had previously been bound (in my case a Tx20) and then turned on the Rx102.

Once the LED on the Rx102 was glowing steadily, showing it had 'found' the Tx20, I connected an LED to Pin 5 of the Rx102. I had wired up an LED to a servo plug, the white lead (yellow on other servo leads) to the +ve leg of the LED and the black lead (brown on other servo leads) to the -ve leg of the LED. There is no need to connect a resistor in series with the LED as the Rx102 outputs are buffered with suitable resistors. The middle red lead was left unconnected.

When initially connected, the LED glowed, showing it was receiving 3.2v from the receiver (ie the output from Pin 5 was on).

I then pressed the Bind Button on the Tx20 and the LED went out - showing the output from Pin 5 was dropping to 0v. As expected.

I then reprogrammed the other two pins in the same way

Conclusion

The ability to reprogram the outputs of the Rx102 makes them even more versatile. There is no need for additional circuitry connected to the output pins for switching on lighting or accessories or triggering sound effects.

NOTE: The switched outputs are non-latching and so some sort of circuitry will be needed if the switch on the transmitter is also momentary. A latching flip-flop module such as this (£3 each on eBay) can be connected to the pin to provide a latching output.

See - How I created latching on/off outputs from a Deltang Rx102 receiver or see How I used a latching flip flop switch with reed switches for lighting circuits in my coaches)



No comments: