Introduction
The first project I posted on element14, and one of the first electronics projects I did after retirement were Halloween themed. In fact, the avatar I use is based on a Halloween airplane costume I made for my grandson about 5 years ago. The early creations were based on my own ideas but these days I get a lot more input from my customers (grandchildren) as well as their representative (my daughter).
For the last few years their representative has wanted me to outfit a wagon to pull the youngest child in. The first year it was a Washington State Ferry since they lived in Seattle. That was the year I made my granddaughter a "ferry princess". Last year the customers all wanted to dress up as characters from the Mario games and I made a castle like the one that Princess Peach lives in. And this year it is the Steel Bridge in Portland since that is where the customers now live...
{gallery} Halloween Wagon |
---|
Washington State Ferry Boat |
Mario's Castle |
Portland's Steel Bridge |
Why a Bridge?
According to Wikipedia, the Steel Bridge is a through truss, double-deck vertical lift bridge across the Willamette River in Portland. It was built in 1912 and carries railroad, pedestrian, bicycle, road, and light rail traffic. The two lifts are independent - that is the lower deck can be lifted for moderate height marine traffic without impeding traffic on the upper deck. Both decks can be lifted for higher marine traffic. The machinery house sits atop the upper truss. It is of course a Portland landmark. Cool...
But why a bridge? Well, the real reason is because my daughter said so but also the expansion of humans during recent centuries has caused trolls to adapt to new habitat and many have taken up residence under and around bridges as is well known. Originally though the trolls primarily lived in the mountains with some in the forest. There is a well known troll that lives under the Fremont bridge here in Seattle. But I stray from my subject...
How to Build a Bridge on a Wagon
These projects always start with a large moving box and the wagon. The box doesn't really fit so it is cut down and reassembled until it is a fairly snug fit.
To give additional rigidity and keep the box from moving on the wagon wooden bracing is fabricated and glued to the ends of the box.
In the photo below the bracing has been installed and the smaller box behind it is being cut up to form the lift section.
For various reasons there was less time than normal this year and not a lot of planning or finesse. For the better builds I normally buy heavy colored paper and apply it to the carboard boxes and then use a sealer over that to make it somewhat waterproof. No time for that this year. I pasted paper from paper grocery bags over a few spots and painted the rest with acrylic paint. The photo below shows the carboard complete and mostly painted.
The portion of the bridge that lifts and the machinery house can be seen to straddle the main body and obviously a lift mechanism is required. Rather than wire cable and a pulley arrangement I settled for something a bit easier.
The Lifting Mechanism
I found a really nice 3D printed linear servo actuator on Thingiverse that looked like it would do the trick (thanks potentprintables). The 3D printed pieces are the rack which is printed in white below, the pinion which is printed in blue and surrounding the circular horn in the photo, and the large blue body. The servo is a Hitec HS-311 with the potentiometer still active. The completed mechanism is attached to the bridge body with a block of wood. Two actuators are required, one on each side.
As is often the case, the design had to be modified slightly before use. My circular horns did not fit in the pinion gear so the opening was enlarged in Fusion 360. A hole was also placed in the center so that the pinion could be removed and replaced at will. In the original design the pinion gear is permanently mounted which means the servo cannot be easily used for anything else. A view in the Cura Slicer is shown below.
It was also necessary to modify the rack slightly since tolerances were off for my Anycubic I3 Mega printer and the fit was too snug. To fix this the rack was aligned along the X axis and then the Y axis was scaled smaller. After hitting it with some sandpaper and adding some petroleum jelly it slid smoothly as seen in the video.
The servos are controlled by an Adafruit M0 Express Feather development board. Power comes from a 18650 rechargeable battery in a carrier that also boosts to 5V for USB power to the Feather. It also powers the two servos. In the photo below testing and alignment is being done prior to completing the build.
To stop the lift portion of the bridge from binding small scraps of wood were glued to the racks for the lift to rest on. Holes were then punched into the cardboard and a compartment made so that the development board and battery were out of the way of little hands.
The circuit and code to lift the bridge up and down are very simple. It was written in the Arduino IDE and lifts the bridge slowly then holds it for several seconds. It then lowers the bridge, waits a while, and starts all over again. Power goes from the 3V output of the 18650 to the servos. The Arduino servo library is used in a manner very similar to the example code provided in the servo library. The pins used by the Feather M0 Express to drive the servos is documented in the code below.
/* * Controls linear servo actuators on Halloween Bridge * Written and tested on Feather M0 Express w/ Arduino 1.8.9 * Frank Milburn October 2019 */ #include <Servo.h> const int leftServoPin = 10; const int rightServoPin = 11; const int ledIndicatorPin = 13; const int servoDelay = 20; const int bridgeOpenDelay = 2000; const int bridgeCloseDelay = 3000; Servo leftServo; Servo rightServo; void setup() { leftServo.attach(leftServoPin); rightServo.attach(rightServoPin); pinMode(ledIndicatorPin, OUTPUT); } void loop() { int i = 0; for (i = 10; i <= 170; i++){ digitalWrite(ledIndicatorPin, HIGH); leftServo.write(i); rightServo.write(i); delay(servoDelay); } delay(bridgeOpenDelay); for (i = 170; i >= 10; i--){ digitalWrite(ledIndicatorPin, LOW); leftServo.write(i); rightServo.write(i); delay(servoDelay); } delay(bridgeCloseDelay); }
I barely completed the project in time and drove it down to Portland over the weekend. It lifts off the wagon for transport and can then be placed back on in seconds.
In the video below the test engineer waves at the end of a successful acceptance test.
Conclusion
The project was successful but there are a number of things I would consider doing differently if I had more time and were building it again.
- Build quality could be improved - The Mario castle is still in use but I don't expect this project to last as long
- Artistry - nothing more need be said :-)
- Could add sound - instead the Rainbow Ukulele is being used which works well
- Could always add LEDs - LEDs are always good
OK, here are a couple of questions for the reader...
- What movie does the phrase "What is the Airspeed Velocity of an Unladen Swallow" come from and how is it related to bridges?
- What is the name of the orchestral music being played during the acceptance test by the test engineer above? Who is the composer and why is it appropriate here?
Please give your answers in the comments below and thanks for reading!
Past Halloween Projects
Top Comments