A Bridge Model that Swings

The Third Avenue is a swing bridge just like several of the other bridges over the Harlem River. To stay close to the prototype, I decided to build a structure on the center swing pier that would be both realistic and functional. Again, I had several photos of the original bridge plus some more detailed photos from the sister Willis Avenue bridge.

Designing the structure for laser cutting wasn’t particular difficult. I’d build a supporting body under the center of the bridge. The body rests on 3/4″ rollers which in turn run on a 4.5″ wide gear. To simplify the design, I just used four balance wheels with mini roller bearings to carry the entire structure.

The core would be MDF and I’d cover it with MicroEngineering 80′ and 40′ as well as with scratch-built Styrene plate girders. With the plate girders glued over the MDF structure, the rollers are barely visible. Painted and weathered, the turntable looks pretty convincing, and I am very happy with the result.

In a next step, I motorized the turntable. When I redesigned version 2 of the turntable, I made sure to accommodate the planned shaft that would drive the gear. A pinion on that vertical shaft that rolls on the large gear and reaches into the body under the bridge transmits the drive of a small electrical motor. An integrated worm gear reduces the RPM of the 12V motor to 22. The motor and the micro controller are placed in the swing pier housing under bridge deck. The vertical space of less than half an inch is tight but sufficient for the motor and the circuitry. The motor is controlled by an Arduino Pro Mini through a BD65496MUV brushed DC Motor Driver. The motor driver has an operating voltage range of 2 V to 16 V and features variable switching speed when controlled by the Arduino’s PWM output pins.

The Arduino Pro Mini micro controller is mounted on a custom designed PCB that implements an NMRA compatible accessory DCC decoder. The board integrates an AC to DC rectifier that supplies the 12 V (VIN) motor power and an optocoupler that transforms the DCC digital signal into a voltage acceptable for the Arduino. It also includes a fixed voltage regulator that provides the 5 V logic power (VCC) for both the Arduino and the motor controller. Through its PWM pins, the Arduino controls speed and direction of the motor but it also controls the simulated rotary beacons and the lights on the bridge and in the operators house. The DCC functionality is simple and is limited to open and closing the swing bridge and turning lights on and off. I mostly designed the custom PCB and Arduino software by myself based on publicly available building blocks. This includes the NMRA DCC library for ATmega328-based Arduino products.

Due to space constraints, the current design of the swing mechanism does not use limit switches. I planned to use an accelerometer/magnetometer sensor but my first attempt failed due to lack of precision. I might give it another try when I have more time. Right now, the 90 degree rotation is hard-coded into the Arduino program. It is sufficiently precise as the timing for both the rotation into the open and back into the closed position are absolutely identical down to the microsecond. This short video shows the swing bridge in action.