Chiropractic Table Restoration

Hi all!

I worked on this project with some members of the Iowa State University Robotics Club. We restored an old chiropractic massage table which wasn’t working properly. Youtube video in reply since this is my first post.

We used an arduino to control three AC motors, one for travel, one for upward pressure, and one for vibration. On the PCB you can see 5 optocoupler-triac circuits, (2 each for different directions on travel and pressure, and just 1 for vibration). Also, you can see cords for switches and motors plugged into the PCB using the original connectors on the old chiropractic table.

The arduino is connected to the PC via USB, and talks to the touchscreen GUI (written in Java) with a custom communication protocol. Since Java & serial don’t play well, there is also a C# application which exposes the serial port via a standard TCP/IP socket. Thus, the communication is:

Java GUI <–> C# TCP-to-serial <–> Arduino

We used Java because our GUI developer was more experienced with development in Swing than any other language.


Here's a youtube vid:


Since Java & serial don't play well

Can you explain why you reached this conclusion ? Most serial code (at least RXTX) is actually written in native language, so it's actually not Java.


I searched for a few methods for accessing serial ports in Java, primarily rxtx and also researched the Java Communications API.

Before I implemented the C# solution, I spent a few hours trying to use rxtx and couldn't get it to work. Not sure if this was an error on my part, but I configured all of the serial settings properly and tried sending data to the arduino - I would see the arduino's "rx" led light up, but I had code running on the arduino to echo what it received back to the original Java program, and it woudn't echo back. I didn't experience this writing a similar program in C#, and not wanting to waste time, I chose to go the C# route.

Hope that answers your question. Has anyone else had similar problems using rxtx?

No, works fine here on java. Arduino ide is coded in java ;)

Arduino ide is coded in java

And programming is done using avrdude, which is definitely not Java :)