The Buck Convertor is instaled with the output terminals to the top of the board and it's blue potentiometer is on the left.
There are 10 screw terminals located at the bottom of the board. They are numbered 1 through 10 starting from the left. The square pad on the left is pin 1.
(All three Base Posts are common on the board. Use one to connect to transformer and the others for accessories.)
The terminals are as follows for standard AC powered trains:
In order to get the two lamps to flash separately, you will need to separate the lamps on the 759 and run a wire for each of the lamps. I did this by making a new strap for the back of the lamps out of single side PC board but just carefully cutting the metal strap in the center might be easier.
The chip has four pins programmed as outputs and one pin programmed as an input.
The input pin is connected to an opto isolater (U6) and when the track trip is pressed down, it provides a low to the input pin to start the program running. As long as the trip is pressed, the program will run continuously but as soon as it is released, the program will time out after a few more cycles.
The 4 output pins drive opto isolated trigger chips (U1, U2, U4, U5) which drives the four triacs.
All this was done because we are switching 16 VAC on and off and the processor chip can only drive 5 volt devices.
The chips are all socketed to make repair possible if one of them gets damaged. I could have done surface mount for everything but that is almost impossible for the average person to repair if needed.
If you order boards through https://easyeda.com/gwcohn/gwcohn/af-crossing-control-with-ir-and-sound-options, here are some tips on how to assemble them.
First install the bridge rectifier diode and the buck convertor. Make sure the blue poteniomer on the buck convertor is towards the left of the board. Then attach a train transformer to the first pin at the bottom (square pin) and the 3rd pin. This supplies 16 VAC to the rectifier which then powers the buck convertor.
Adjust the blue potentiometer on the buck convertor to get 5 VDC from the output pins. If you do not do this, they come set to their maximum output voltage which would destroy the microproccesor chip.
Once that is done, you can install all of the resistors, capacitors, IC sockets, terminal strips and triacs. The resistors and capacitors have no polarity but I try to install the resistors reading left to right or top to bottom for consistency and the capacitors reading from the top of the board. This is mostly asthetics and does not affect operation. Only the diode, LED, bridge rectifier, buck convertor, and the chips are critical to get the orientation right.
Note: Some of the Buck Convertors come with a surface mount power LED. In that case, the green LED and resistor R9 (220 ohms) are optional as it only duplicates this function.
Intall the IC sockets with the notch to the top of the board. Then install the IC's making sure to observe that pin one is to the upper left. Most IC's have a notch or a dot and the notch chould match the socket or the dot should be on the top left.
Note that 4 of the 6 pin chips are triac drivers part number MOC3023 and U6 is a different part number, 4N33 which is an opto isolater. Don't mix up the part numbers or it will not work correctly.
After this is done, you can connect the board as shown above and it should be ready for operation.
Part List — Revised Arduino Crossing Gate Controller R2.3
Here is my approximate cost for making up one board: Crossing_Parts I typically order 10 - 50 pieces of a part and often from a Chinese supplier.
If you shop a local electronics part supplier for one or two of each item, you will find your cost can be 10 times higher.
If you want to order a board through https://easyeda.com/
/* American Flyer 759 - 761 Danger Bell\Crossing gate control.
When train runs over track trip, it starts a cycle of 10 light
flashes and dings which continues until last car clears track trip.
Also can control a crossing gate like a 592, 23601, etc.
Requires modification to 759 or 761 to separate the two lights and/or
the bell. Also requires a triac driver board to convert logic signals into
controlled 16 volt AC pulses from transformer.
George Cohn - April 8 2018
This code is in the public domain and can be used or modified as needed.
By using this code, you accept all responsibility for damages if implemented incorrectly.
Revised June 2020 to accomodate using a DY-SV8F sound card to play recorded
bell sounds. This allows the board to work with only 760 crossings without a physical bell.
*/
// the setup function runs once when you press reset or power the board
int cgate = 6;
int llamp = 3;
int rlamp = 4;
int dbell = 5;
int scard = 2; // Added output to control sound card
void setup() {
pinMode(6, OUTPUT); // Crossing Gate
pinMode(5, OUTPUT); // Bell
pinMode(4, OUTPUT); // Right Light
pinMode(3, OUTPUT); // Left Light
pinMode(7, INPUT); // Track trip or sensor, pull low to flash-ding
//Apply 14 VAC from a track trip
pinMode(2, OUTPUT); // Output select for sound card
digitalWrite(4, HIGH); // Sets up at power on to turn Right light off
digitalWrite(5, HIGH); // Sets up at power on to turn Left light off
digitalWrite(6, HIGH); // Sets up at power on to turn Bell off
digitalWrite(3, HIGH); // Sets up at power on to turn Crossing Gate off
digitalWrite(2, HIGH); // Sets up at power on to turn sound off
}
// the loop function runs over and over again forever
void loop() {
{
if((digitalRead(7) == LOW)){ // Waits for you to pull low to flash lights and ding bell
for (int i = 0; i < 10; i++) { // Will flash-ding 10 times then stop after pin 4 goes HIGH
digitalWrite(cgate,LOW); // Turns on crossing gate
digitalWrite(scard,LOW); // Plays bell sound on sound card
{
digitalWrite(llamp,LOW); // Turn the LEFT Light on
digitalWrite(dbell,LOW); // Dings bell
delay(50); // Wait for 50 milliseconds
digitalWrite(dbell,HIGH); // Turns Bell off-Short duty cycle prevents coil overheating
delay(200); // Wait for 200 milliseconds
digitalWrite(llamp,HIGH); // Turns Left Light off
delay(250); // Wait for 250 milliseconds
digitalWrite(rlamp,LOW); // Turn the RIGHT Light on
digitalWrite(dbell,LOW); // Dings bell
delay(50); // Wait for 50 milliseconds
digitalWrite(dbell,HIGH); // Turns Bell off-Short duty cycle prevents coil overheating
delay(200); // Wait for 200 milliseconds
digitalWrite(rlamp,HIGH); // Turn the RIGHT light off
delay(250); // Wait for 250 milliseconds then repeat
}
digitalWrite(cgate, HIGH); // Turns off crossing gate
digitalWrite(scard,HIGH); // Stops Sound Card Playing
}
}
}
}