Attached is a video of the bridge in operation. I had hoped to wait for the scenery to get finished but feared if I waiting I would miss the deadline for the challenge.
When I was employed in engineering post project reviews, were a chance to look at what we did correct and what we could improve on. I will take a few lines to do that with this project.
In the past, prototyping before production has been a strategy that has given me the most success. In this project, that didn’t happen. The model railroad layout builders assembled the bridge and installed it before considering the requirements.
The motor selection, although great for price, was not ideal for the application. My coding and electronic skills did not achieve the motor control I would have liked. It rises and falls too fast.
A DC motor was not ideal. A stepper motor would have provided more control. The builders had a DC motor bought and paid for, to raise and lower the bridge, so they used it.
The positioning of the servos to control movement and the sensors to monitor the bridge proved to be a challenge. The location of the bridge is above a section of the layout that has the most 2X4 wood framing supports. This left little room to mount stuff underneath the layout.
If you have ever been involved in building construction, you know the challenges. If you are the last contractor to do installs, you have to work around the plumbing, HVAC and electrical work already completed. Being one of the first contractors on site gives you space to work.
Controlling the motor took on a life of its own. I started with the plan to use one Arduino Uno to create the automation. In the end, there are three Nanos involved.
Sound_and_Light-Nano: receives input from Bridge_Servo_Controller-Nano. Sound_and_Light-Nano, plays warning alarm sounds and flashes lights. Bridge_Servo_Controller-Nano manages the complete sequence. Triggers sound and lights, controls servos and triggers the bridge motion. Bridge_Motor_Controller-Nano manages the motor and sensor that controls its movement. It also drives an LED array to show sensor status.
I am currently testing the battery operated vehicle (bus) that will travel over the bridge. It follows a wire embedded in the roadway. Determining its location and motion throughout the layout is the next task on my plate.