Well here we are again. It’s always such a pleasure.
This is the thrilling conclusion to a long and varied adventure. There were lots of bumps along the way, but I’ve enjoyed the experience immensely. It’s a bit sentimental so forgive me. On the other hand, lots of pictures.
After replacing my cowardly and broken Arduino,
I decided that I would also like to be able have an actual on/off switch that wasn’t locked inside the Box. I had two pieces the Box came with: the visible dial and the actual switch.
It had several powerful springs inside that made it very hard to turn, so I broke it open and removed those.
Then I attached mounting pieces to some scrap wood to hold the switch in place.
Now the entire face was used. Hooray!
You may remember from last time about my sensor interrupt troubles. As a quick recap, the smaller pistons were moving too fast for the program to catch their sensors, so I tried wiring them to an interrupt pin (which would make the program pay attention regardless of what it had been doing) so that every time a sensor was hit, the program would know. This time around I was able to test it with multiple sensors through a common interrupt pin.
The problem I ran into was that the interrupt would only trigger when the signal went from low to high. But if a piston stopped on a sensor for a while (like if it was done cycling), it would stay high and no other sensors could trigger it. What I needed was a way for the signal to start out as high, then drop quickly automatically. That way each sensor could trigger the interrupt no matter what else was happening.
My brother-in-law suggested using capacitors, which would change their voltage over time. I figured out a simple circuit of just a capacitor in series with a resistor, then measuring the voltage over the resistor. Using a diode as well meant that the signal wouldn’t also go back through the circuit and give a false positive reading for all the other sensors.
I added another resistor in parallel to the capacitor to allow it to discharge after the sensor reading went low (the diode prevented it from discharging through the normal circuit). The resistor values were found using science (below) and guessing and checking.
The capacitor value was found using the age-old engineering method of it being the only one available.
A little bit of tweaking and voilà! Newer, nicer circuits. Just look at all the color!
To make some of the power wiring a bit easier, I also cut a piece of an unused breadboard and glued it onto the Arduino.
Then I had to wire everything back to the Arduino for the first time in several weeks, which was not terrifying at all. I totally remembered where everything went and didn’t have to triple check each step.
And that’s it. It’s done. After months of design, coding, building, and fixing, it is completed. It has been a wild and exceptionally fun ride. To give some idea of how much the design has changed, here are the original and final circuit diagrams side by side:
Also, I’ve gotten a lot of questions of what cycle testing is actually used for, so here is an example I set up for the “Demo mode” when we have tours through the department:
I have loved working on this project so much. This has easily been the biggest and most complex project I’ve tackled on my own and I’m very happy that I was given that chance. I’ve learned a lot while working on it, from technical stuff like how to use keypads and pistons, as well as more general things, like buying extra small, cheap components in case some break (they will) and assuming the project will take longer than you originally plan (it will).
Once again, I am so thankful that I was given this opportunity to improve my skills, learn new things, and work on a larger scale project. I’m also happy to have been able to share it with all of you.
Hopefully I will return shortly with a new project to document.
Until next time,