# Function decoding with Airwire Drop-in - working!



## ereuter (Feb 7, 2017)

I recently bought an Airwire Drop-in and Phoenix P8 for my first engine, a USAT GP-9. I was curious what the Airwire was sending the P8, so I put a logic analyzer on the orange line (the control line). It was clearly sending DCC packets, at around 10 - 12V, referenced to battery ground. I did some analysis, and the Airwire board passes speed, direction, and function (0-12) states, but changes the address to 3 regardless of the address set on the board. 

This means that a microcontroller can monitor this line and decode the DCC data alongside the P8. I had already rigged up an Arduino Pro Mini to operate a Kadee remote coupler using the AUX light output as a trigger, but DCC control would be more elegant, and allow me to control the front and rear couplers separately, plus have as many aux light outputs as I want. 

I hooked the Airwire up to an Arduino Uno, and using the NmraDcc library, I was able to get a coupler working without much trouble. The interface is a voltage divider with two 680k resistors, splitting the voltage in half and limiting the current draw to less than 10 uV. So there's no reason that the P8 and this decoder can't coexist. 

The Uno is enormous, but this will easily transfer to a Pro Mini, the size of a postage stamp. 

To power the Pro Mini and servos in my GP-9, I used a 5V UBEC, which is much more efficient than a linear regulator.


----------



## ereuter (Feb 7, 2017)

I guess embed isn't working. Here's a regular link:


----------



## Greg Elmassian (Jan 3, 2008)

The embed code used to work, when you were in advanced mode looking at code.

I believe you just add the link now.

So I think you might use a DCC function decoder for the coupler, although my choice would be deadrail or the "Convrtr" and a regular motor/sound decoder with servo outputs, like a Zimo.

The ideal thing would be the drop in board with the Convertr built in, and a 12/10 pin socket.

Overall cost will become an issue as you do more locos. The complexity of an airwire decoder, a separate sound board and a separate function/servo board would not be how I would want to equip an entire fleet.

So, it's great to see you are having fun with what is currently offered.

Greg


----------



## ereuter (Feb 7, 2017)

It would be nice to have an all-in-one solution, but I was just trying to find a way to get more outputs, servo or binary, from the Drop-In. A regular decoder that relies on power and DCC data from the same input won't work, but this is one solution. I can have a servo and/or binary output for each of the 13 functions supported, all for around $5. 

The other options for the servo-actuated couplers seem to be the Phoenix and Kadee boards, which are both pretty expensive.

And since I have a microcontroller, I could program it to do things related to speed, like close the coupler when the speed gets to 3, or something like that. 

Anyway, part of why I got into this was to tinker with the electronics, so I'm having fun.


----------



## Greg Elmassian (Jan 3, 2008)

I certainly agree with you given you want to work from the drop-in, and also agree that the Phoenix and Kadee boards are expensive (way too much in my opinion).

Greg


----------



## Treeman (Jan 6, 2008)

The Converter may be a good device to try next. It is very simple, DC in, 6A DCC out.

http://www.reindeerpass.com/airwire-convtr-w-external-antenna-1.aspx


----------



## Greg Elmassian (Jan 3, 2008)

I wish they would make a Convrtr drop in... having the convenience of a drop in would help justify the extra cost, and bundling them together should be easy for the manufacturer.

Then have a screw terminal option and a socket option.... there you go.

Greg


----------



## Bill Swindell (Jan 2, 2008)

When you measured the DCC on the orange wire, what was the other lead that you used for the DCC output? The lack of the easily available DCC output is one of the things that I don't like about the drop-ins.


----------



## ereuter (Feb 7, 2017)

Bill Swindell said:


> When you measured the DCC on the orange wire, what was the other lead that you used for the DCC output? The lack of the easily available DCC output is one of the things that I don't like about the drop-ins.


It's referenced to the second pin, which is one of the two power leads for the P8. That pin is tied to the battery ground. You can see a gray wire attached to the connector in the video I posted. On the actual harness, this is the second of the two green wires.


----------



## ereuter (Feb 7, 2017)

Here's the dual coupler driver (Arduino Pro Mini clone) ready for installation in an F3. It works well in tandem with the P8. It will live right next to the P8 when I install it.


----------

