Author Topic: Need Help Writing Program for AM-1S  (Read 3044 times)

Jimk33

  • Fireman
  • **
  • Posts: 21
Need Help Writing Program for AM-1S
« on: February 28, 2017, 08:09:29 PM »
I'm trying to write a simple program for the AM-1S to supply power to some incandescent lights in a village on my layout when I push a button on my HC-2b.  The AM-1S manual shows an incandescent light wired from the common C1 terminal to output O1, and a LED wired from C1 to O1 with O1 being the positive supply.  Seems simple.  But I can't figure out how to turn it on.

The programming guide in RailPro Assistant shows some examples, but none for simply turning on output O1 of the AM-1S.  There's an example for O1 on the LM-2.  Moreover, the only outputs available in RailPro Assistant when writing a program are Motor 1, Motor 2, and O5, O6, O7 and O8.  None of the terminals on the AM-1S are labeled Motor 1 or Motor 2, but the manual says you can connect a motor across O1 & O2, or O3 & O4, etc.  Maybe O1&O2 is motor 1.  So if you use O5 as an output, where is the other termination?  I figured I could just put the lights across the motor terminals, but that didn't work either.

I tried wiring the lights from C1 to O5, the first programmable output available, but when I tried it I got a a "common short" warning on the HC-2b.

Can someone tell me what wires to connect to where, and what program to write to get power to some incandescent lights?  I know the light wiring is good because I have it powered from a 12V wall wart but want to be able to turn them on and off from the hand controller.

This shouldn't be this hard.

Thanks for any help,
Jim

William Brillinger

  • Dispatcher (Admin)
  • Conductor
  • *****
  • Posts: 1326
    • Precision Design Co.
Re: Need Help Writing Program for AM-1S
« Reply #1 on: February 28, 2017, 10:16:22 PM »
Are you sure you wired the light between O5 and C1 ?

The manual indicates: IMPORTANT: The maximum allowed current for outputs O1-O8 is 400mA per
point continuous and 400mA continuous for all points combined. Some
acceptable examples would include: 1) Two 200mA loads run at the same time
or 2) Four 400mA loads but only one run at a time.

What is the total current draw of your lights?
Does it work if you connect only 1 light to the AM-1S?
« Last Edit: February 28, 2017, 10:18:51 PM by William Brillinger »
- Bill Brillinger, RPUG Admin

Modeling the BNML in HO Scale, owner of Precision Design Co., and RailPro Dealer.


G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1193
  • I'll think of a catchy tag line one day
Re: Need Help Writing Program for AM-1S
« Reply #2 on: February 28, 2017, 10:27:39 PM »
Jim,

I'd suggest downloading the Caboose Project from RE. All it does is turn on one light. You can edit the project in RPA (and save it as something else if you like). This would be an easier way to learn how to write accessory programs. In fact, downloading the projects he has already done and studying them is a better way to learn accessory programming than reading the manual.

Now please note, the AM-1S is not for driving motors, throwing switch machines etc so those outputs don't exist on the AM-1S. I did make mention of this before but not with those exact words so my apologies to those who didn't see what I was saying.

- Tim

William Brillinger

  • Dispatcher (Admin)
  • Conductor
  • *****
  • Posts: 1326
    • Precision Design Co.
Re: Need Help Writing Program for AM-1S
« Reply #3 on: February 28, 2017, 10:45:19 PM »
Quote
Now please note, the AM-1S is not for driving motors, throwing switch machines etc so those outputs don't exist on the AM-1S. I did make mention of this before but not with those exact words so my apologies to those who didn't see what I was saying.

Page 9 of the AM-1S manual contains instructions for wiring up to 4 motors.
What good would the AM 1 be if it couldn't be used for crossing gates - ie: Sound plus Motors ;)
- Bill Brillinger, RPUG Admin

Modeling the BNML in HO Scale, owner of Precision Design Co., and RailPro Dealer.


G8B4Life

  • Signalman (Global Mod)
  • Conductor
  • *****
  • Posts: 1193
  • I'll think of a catchy tag line one day
Re: Need Help Writing Program for AM-1S
« Reply #4 on: March 01, 2017, 05:02:14 AM »
Page 9 of the AM-1S manual contains instructions for wiring up to 4 motors.

What was I thinking? You are of course correct Bill. What I had meant to say is you can't use it for driving turnout motors (or switch machines); well, Ring makes no instruction for doing so anyway.

It must have been the high heat and the perplexing problem with a machine today addled my brain; yeah, that's my excuse and I'm sticking to it :D

- Tim

William Brillinger

  • Dispatcher (Admin)
  • Conductor
  • *****
  • Posts: 1326
    • Precision Design Co.
Re: Need Help Writing Program for AM-1S
« Reply #5 on: March 01, 2017, 07:09:40 AM »
Tim is correct, the AM-1S is not for Turnouts. Although the manual does not say so, the AM-1S webpage on Rings website does say "The AM-1S is not for use with turnouts.  Please use AM-1 for turnout control."
- Bill Brillinger, RPUG Admin

Modeling the BNML in HO Scale, owner of Precision Design Co., and RailPro Dealer.


Jimk33

  • Fireman
  • **
  • Posts: 21
Re: Need Help Writing Program for AM-1S
« Reply #6 on: March 01, 2017, 06:58:34 PM »
Thanks for the responses.  Apparently, I was overloading the AM-1S.  After fiddling with it I connected my VOM and measured an output of about 14V from the common to the Output5 terminal.  I tried that before and it didn't work, but maybe that's a programming issue.  I have 6 grain of wheat bulbs which are supposed to draw about 30ma, but also a couple of only lights I inherited from my father-in-law which appear to be the culprits.  The ammeter on my VOM wasn't working so I connected an LED with a resistor and it worked fine.  I'll need to either replace the incandescent lights with LEDs or hook in a low amp relay.

As far as programming, for future reference, I discovered that you can't just take the Caboose program for the LM-2 and install it on the AM-1S.  When you start a program RailPro Assistant requires you to choose which type of device you are programming for, and I couldn't find a way to go back an change it.  However, the caboose program did show me what steps were needed, so thanks for the suggestion.

I now have a toe hold on programming and can experiment from there.  Thanks for the help.


Jim

William Brillinger

  • Dispatcher (Admin)
  • Conductor
  • *****
  • Posts: 1326
    • Precision Design Co.
Re: Need Help Writing Program for AM-1S
« Reply #7 on: March 01, 2017, 07:09:45 PM »
Glad we could help Jim!
- Bill Brillinger, RPUG Admin

Modeling the BNML in HO Scale, owner of Precision Design Co., and RailPro Dealer.


Alan

  • Conductor
  • ****
  • Posts: 1073
    • LK&O Railroad
Re: Need Help Writing Program for AM-1S
« Reply #8 on: March 01, 2017, 11:15:56 PM »
Quote
I'll need to either replace the incandescent lights with LEDs or hook in a low amp relay.

To keep costs at rock bottom you could simply use a NPN transistor of sufficient current rating and a resistor in place of a relay. Here are 20 transistors for $0.99 that will handle up to 2 amp load.
http://www.ebay.com/itm/20PCS-2SC2655-Y-C2655-Y-2A-50V-NPN-TO-92L-DIP-transistor-s-/232192544323?hash=item360fc10e43:g:7VkAAOSwjDZYaQaI

NPN-transistor-biasing.png

Alan

LK&O Railroad website

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro

Jimk33

  • Fireman
  • **
  • Posts: 21
Re: Need Help Writing Program for AM-1S
« Reply #9 on: March 02, 2017, 07:38:52 PM »
Alan,
I'm a mechanical engineer so bear with me.  There are 2 wires from the lighting circuit, and 2 wires from the AM-1S, that's 4 wires.  But there are only 3 connections to your NPN circuit.  Which wire goes where, and where does the 4th wire go?  My first thought was a common ground, but can you connect the common from the AM-1S to the negative of an independent power supply?

Also, how do you determine what resistor to use?

Thanks,
Jim

Alan

  • Conductor
  • ****
  • Posts: 1073
    • LK&O Railroad
Re: Need Help Writing Program for AM-1S
« Reply #10 on: March 02, 2017, 08:45:49 PM »
I don't own an AM-1 and Ring's documentation is poor at best. I am basing on the way it is shown to hook up a Tortoise style machine on pg 8 of the AM-1 manual.

Connect the base (B) resistor to O1 or O2 on the AM-1. Connect the emitter (E) to the negative of the power supply you are using with the AM-1. Connect one of your lights wires to the collector (C). Connect the other light wire to the positive of the power supply you are using with the AM-1.

Use a large value resistor to start with just to be safe. Something like 100K ohms. If the lights don't fully come on then use a lower value resistor. Don't go below 10K ohms. This way we know nothing will ever damage the AM-1 output transistors.

If your lights draw >50% of the transistor rated current then put a heat sink on the transistor or use a different transistor with a higher power rating.
Alan

LK&O Railroad website

When I was a kid... no wait, I still do that. HO, 28x32, double deck, 1969, RailPro