By Rick Curl, Chief Engineer at Hatchery Electronics
Once a month, I go see my chiropractor. One day, as he was working his magic on me, he mentioned that his favorite adjustment table had broken and that no one could repair it. Being a good engineer, I immediately took this as a challenge.
If you’re not familiar with chiropractic adjustment tables, they are mechanical marvels, with hydraulic or pneumatic cylinders, motors, and all sorts of mechanisms that operate the padded panels, or “drops”. In this case, the table in question was an older one with a relatively simple hydraulic system. I removed the cover where the circuit board should have been and discovered that one of the previous technicians who worked on the table had removed it and apparently disappeared from the face of the earth.
So, now I’m stuck with a table with a missing (and unobtainable) circuit board. I was very lucky, though, for two reasons; first, I was able to find a picture of the original board on the Internet, and second, there was a frame wiring diagram on the underside of the board cover.
The photo of the original board revealed a basic “dumb” control system, so I saw an opportunity to make a few improvements. I was able to identify the connector types used on the wiring harness and obtain the board dimensions from the mounting holes in the frame. It was a simple matter to deduce the function of each wire from the frame wiring diagram.
The next step was to select a microcontroller. I needed only 11 input/output (I/O) pins, plus the programming header. The processor would not need to do much heavy lifting, since this will mostly be a state machine. I chose a Microchip PIC18F1220 because they are cheap and readily available (and I had a few on hand).
I wrote the code using Positron BASIC (bit.ly/49ORwox). I think I just heard a gasp from the reading audience. No, BASIC is not dead. In fact, the Positron compiler is actively supported, frequently updated, and has a loyal and helpful following on its forum. I love the way it creates tight code and will do a good job of trapping errors and helping me understand how to correct them.
I added several features that did not exist on the original PCB, such as a timer to shut down the pump if it ran too long and a safety to prevent the table from moving unexpectedly if the patient accidentally stepped on the footswitch. Also, I’m a big fan of putting status LEDs on most of the I/O lines to simplify troubleshooting. I added a medical-grade power supply that conforms to ANSI 60601. Even though this PCB will not be directly connected to a patient, as would be the case with an EKG or TENS unit, I wanted to have isolation from the mains that was superior to the very basic power supply that was on the original PCB.
I designed the PCB in Diptrace (diptrace.com). It only took an evening, and the boards turned out very nice. My chiropractor was very happy with the result. Now he has his favorite table back, and it’s better than it was before.