Welcome
This Site is Under Construction 12/2/2024
This site is optimized for computer screens

So, you want to make a kinetic sand table. Good for you!

My sister asked if I could make a "sand table", I said "sure, for what?" I could just make a table with edges and fill it with sand. She said "no, no, a kinetic sand table like the ones from Sisyphus." Interesting, fasinating! My mind started to design and my fingers did their research. There are a number of sites and videos that outline how to make a somewhat similar table, but none that I liked. Some made the process far too complicated, particularly in component manufacture and programming. Some were based on x-y tracking and were rectangular. I wanted a round one and something with straight-forward programming. Also, it had too look good, not like it was made by amateurs (even though that is what we are right?) To make a long story short, I am on my fifth table and am very happy with the current design and programming. This site outlines its creation.

To make this table, you need some serious skills. You should be able to do basic woodworking and have solid familiarity with electronics including Arduinos and stepper motors. A 3D printer also helps, but you only need it for a few pieces that could be fabricated using classic techniques. This is not a project for the beginner. When I explain how the table works to "normal" people, their eyes glaze over. That tells me you must be an avid "maker" to understand and build this project.

In General

I chose the Arduino Due instead of any other Arduino flavor since the Due is fast and has ample memory. I like the new Giga with its exteme specs and ability to connect to the Gige display, but I had problems. The Giga display did not work well in testing and caused my Giga to overheat. No, it wasn't my connection skills, the display is a direct plug-in. Seems many people are having this problem. But worse, I could not get the Giga to work with Accelstepper/Multistepper libaries, currently they aren't supported. These are essential, so I chose the next best thing. You could use a Mega, in fact four of my tables are based on Megas, but the Due has more memory and runs faster. Yes, if you want, use a Mega, but authentic units cost about the same so why not go with more ooomph?

Arduino Due with Block Connectors

I chose Arduino instead of Raspberry Pi because I have a lot more experience with Arduino than Pi. For this particular table, the Pi is overkill and leads to more problems in programming; the Arduino programming is very straight-forward and easily interfaces with the display, encoder, and SD card. I toyed with adding bluetooth and making a phone app for control, but my skills were not that solid and things got flaky. I guess if you use a Pi you can do that easier, but it's out of my wheelhouse and I don't want to spend time learning since it's not necessary, in my humble opinion. Also, the accelstepper/multistepper libraries for Arduino made stepper motor programming much simpler. Let's get to work.

The base

The base holds most of the table's components. Since we are making a round table, I made my base round. The table surface will be about 32" so your base can not be any larger than that or else it would stick out of the overall unit. Since my The Home Depot sells small sheet materials in 2'x2' and 2'x4' size, I made my base a 24" circle. I can't move full sheets of plywood in my vehicle, so anything I buy has to fit into an SUV.

Bottom spacer on right, 2'x2' particle board (doesn't look square because of image distortion.)
Square mounted on spacer, jig post in place, router with jig

I used a Dewalt Plunge Router attached to a Router Circle Cutting Jig with a 1/2" spiral cut bit but you can use any size trim bit. First I cut the wood into a 2 foot square. In this case I used particle board because it was cheap and plywood splinters. I'd rather use MFD, but the particle board was about 1/3 the price. Then I marked the center and screwed a piece of scrap on my table to give me room for routing. Then I screwed the square onto the scrap using countersunk screws so the router jig wouldn't hang up on a screw head. I screwed the router jig center post in the middle and set the bit to be right at the edge of the square then locked the jig size. I set the router bit to cut about 3/16" deep on the first go around, then moved it lower to make the second cut, repeating until the circle was done. You could cut the circle in one take, but my experience has not been the best doing it that way; sometimes the bit catches and you don't get a smooth cut, even though it really doesn't matter since the base will not be seen.

Marking 120 degree spacing for feet
Feet screwed in at 120 degree intervals

After that I put three 2" high feet on one side of the circular base made from 3/4" x 1.5" wood. This will provide room under the base for components while we build things. I used three legs to avoid any rocking, but it's a personal choice. For my legs I used some scrap walnut I had around rather than plywood, MFD, or particle board since solid wood won't split as easily even with pre-drilling and counter-sinking.

The Adafruit 12-wire slip ring has an inner mount diameter of 22 mm which is a bit less than 7/8" so I drilled a 7/8" hole in the center of the base circle. Using the screw holes on the turntable ring, I centered the ring and penciled the inside and outside diamters. Then I attached the 200-tooth gear to the turntable and mounted the turntable using wood screws after centering it using screwholes as guides on the pencil lines I made to find the board center. The only cut we need to make now is for the stepper motor. So let's do that.

I put the 20-tooth gear in place and marked its center. Then I traced the stepper motor body, centered on the gear center mark, and elongated the radial lines to allow for in/out adjustment of the gear/stepper motor and cut using a jig saw.To mount the stepper, I connected it to the flat metal motor mount, put it in place and marked holes for mount bolts that go through the base and allow for gear adjustment. I drilled them with a 5mm bit to accept a 4mm bolt.

One problem I had was finding an adapter for the 5mm stepper motor shaft to the 3/8" hex gear. There are ample 5mm round to 12mm hex adapters, and even though you can buy the 20 tooth gear with 1/2" hex, 1/2" is 12.7mm and that would just be too sloppy. I solved my problem by buying a 3/8" hex shaft, putting it in my lathe, and drilling it out to accept the 5mm stepper shaft. You could do this with a vice and hand drill since the shaft already has a smaller tapped hole at its end, but since I have a lathe, might as well use it. Then, I had to drill and tap the newly made bushing for a 4mm set screw as well as doing the same for the gear. I used a 3.5mm drill bit in my drill press and a 4mm tap. Then I cut the shaft to about 7/8" in length. It needs to be fairly short so it doesn't stick up higher than the gear or it could interfere with the rotating arm.

I put it all in place while being careful not to mount the small gear too tightly to the 200-tooth gear. Spin the system around and check for adjustment. I put a bit of Vaseline on the gear mating surfaces and while the gears are plastic, I just felt like it would help a bit, but you probably don't need it.

Mount Electrical Components

Time to mount the Arduino, power supply, stepper motor drivers, 5V distribution board, SP105 LED controller, and slip ring. Layout is not critical, but I try to position things to keep wiring simple and short. I also try to keep away from the outside edge since supports for the table top will be screwed there. Jump ahead to that section to see what I mean. Drivers are mounted so they can reach stepper motor wires without having to extend the wires and facing in a way that the switches are easily accessed. I placed the Arduino where I could connect things easily to it. I used small screws on the components and hot-glued down wires to keep them from moving around.

Tips for Wiring

Base Wiring

Test Program

Time for the smoke test. Plug in the base and check for smoke! Download the Rotation_Test .ino file or copy and paste it from below into your IDE. Assuming all goes well, connect the programming port (the one closes to the power supply input connection on the Due), and upload the test program. The program is well documented so I won't go into any detail here on its function. If all goes well, the gear will start to spin one way and then the other and continue to do that. CONGRATS! Troubleshoot anything that goes wrong, part of the fun. I set the maximum speed to 2000 in the program but when we get to the actual program, we won't run that fast. I leave the unit running for a few hours and see how hot the stepper motor gets. It will probably warm up, but should not be too hot to the touch. If so, double-check the driver current settings.

Download .ino File Download File

Linear Arm

I first used a Linear Actuator Bundle from RobotShop for this project. Currently it is selling for $127.99 but when I bought mine it was on sale for $39. Buying the components seperately will cost you about $100, but you will end up with a better product in my opinion, but for $39 I could not resist. If you are new to 2040 extruded aluminum and belt drives, I would suggest you get the bundle. I will put a component list for the arm in the parts list if you do want to build from scratch. Construction of the commercial arm is not difficult and there are youtube videos to tell you how, so I will not detail that here. After some thought though, I decided to build my own arm using 3D printed components. I think the end result is very solid and I have made a seperate page for its construction. If you have a 3D printer, I would suggest taking this route. Linear Arm Project

To extend the magnet on the carriage, I made a holder using my 3D printer. It has a place for the magnet and sides that are extended in the I-beam fashion to keep the holder from bending. I also 3D printed a holder for the optical switch that helps us find the carriage end point, and a spacer for under the magnet holder to raise it above the arm's end and drop down tab to block the opto switch. The commercial linear actuator ends stick above its main bar and we need the magnet to move above the end piece in order to get maximum extension. .STL files are here:

Opto Holder Magnet Spacer Magnet Holder

The following pictures are from older designs where I used a 1.5" magnet (new design uses a 0.75" x 0.75" cylindrical magnet) and glued on the opto switch break. The new STL files are a bit different with new pictures on the Arm Page.

magnet holder, magnet, spacer, and opto switch holder
opto switch on its holder
Magnet holder on spacer on carriage

Once the arm is together, I mounted the optical switch to its holder. Then I mounted the magnet holder with spacer and the optical switch assembly to the arm. You want to position the optical switch at the very end of the bottom rail, but leave a few mm for adjustment. It doesn't matter that the switch is not at the very end since the bar that breaks the switch will be glued under the carriage holder at the appropriate position - more on this later. Then, mount the arm to the gear using angle brackets with bolts and nuts made for extruded aluminum (see parts list.) There are two types of extruded aluminum nuts - ones that must be slid in and ones that will auto-align and can be placed in anywhere along the track - you want the latter or plan to take your arm apart... You want to use holes in the gear that allow the arm to be centered across the gear diamter and also positioned so the magnet is directly over the center of the board when at its closest position. You can tweek the latter later if need be, but try to get it right the first time.

Arm mounted onto Gear showing center position.
Arm mounted so magnet center is in center of "closest" linear position.
Arm mounted onto Gear showing farthest position.. Blue tape is TEMPORARILY holding loose wires.

Now that everything is together, plug the unit in and let it rip. Spin the arm and make sure it spins freely. Be cautious - I found out that my stepper motor hex shaft stuck up too high and jammed the arm. I had to take off the gear and grind down the adapter. Then, a loose wire got caught in the gears - tape any loose wires out of the way during testing but those coming from the slip ring should be taped to the gear or arm since they need to swivel - not to the base. Plug your board back in with the USB connector connected to your computer so you can see the serial monitor. The unit should start rotating at a rate of about one rotation per 30 seconds. If it runs too slowly or rapidly, check your stepper motor driver settings. Mine was moving utterly slow and it turns out I had the driver settings set wrongly. I let the unit run for a few hours, again noting stepper motor temperature and checking if anything loosens up, or falls apart. Using the commercial arm in our configuration allows for a 16" radius track, or 32" in diameter. If you want a larger table, you can buy a 1000mm piece of 2040 extruded aluminum and cut it to your requirements re-using the ends of the commercial arm. The only thing you need to add is a longer timing belt. Since the belt goes through the center of the 2040, it is best to use 5mm width belting that is not very easy to find, seems that the standard is 6mm. 6mm is just a bit too wide to move easily inside the 2040. It does fit, but the tolerance is a bit too tight for my liking. Amazon does sell the 5mm width belt - you can find the source in the parts list.

Connect Linear Wires

Time to connect the linear stepper motor wires to the slip ring wires. I use the same colors as on the stepper wire (Black, Red, Green, Blue) to keep things consistent. Make the wires short enough so that they fit into the extrusion bottom track. I shrink tube all connections, much better than electrical tape and a shrink tubing kit and heat gun are not very costly - it's something you should have in your general tools! Connect the optical switch with three wires being mindful of your color choice - it is easy to get confused. I sharpie write the color codes on the base so I never forget. Connect the wires under your board to the appropriate places (optical switch data to Arduino pin 7, power to the 5V bar, and ground to the ground bar.) Again, neatly tuck the wires into the lower section of the extrusion arm. I hot glue the wires in place so they don't come loose or use commercial slot cover. The slot cover inserts allow for easier repairs and look neater. You can cut short the slip ring wires that aren't used, but don't hot glue them down to the base like I did at first. I forgot that the wires for the arm are turning but the wires not used and glued to the base are not. Everything got tangled and ripped to shreds... You might not want to cut them too short in case you want to use them later for adding something to the arm, or replace a wire whose ring has failed. Just make sure they are free to spin and won't get caught in the gears.

Arm wires hot-glued into slot. Note angle brackets that hold arm onto gear.
Arm wires hot-glued into slots

Opto Switch

The optical switch is at the end of the linear track and allows the program to find the track's end. It also serves later as an interupt in case of linear position overshoot. To break the opto beam I made a little prong that glues onto the carriage. The .STL file is here:

Download Magnet Holder .STL file

Glue prong on using superglue (cyanoacrylate). I cut a few mm from the bottom of the prong to fit the opto switch. Put the carriage ALMOST to the end of the track and position the prong to break the beam. You don't want it right at the end to make sure the carriage doesn't hit the end every time it is at maximum extension. You can fine tune the opto sensor by sliding it backwards or forwards if need be.

Opto Switch breaker prong
Opto Sitch breaker prong glued in place.

Finding the End

Hopefully everything is working, so it is time to fire up the system and check linear and rotational motion. Rotation is straight-forward since the arm just rotates - there is no constraint. Linear motion has constraints - you don't want the carriage jamming into either end of the track. You also need to determine how long in steps the linear motion ranges. One full revolution of the track is 16,000 steps: 1600 steps/rotation (set at driver) * (200 teeth/20 teeth).The linear movement is driven by a 20 tooth gear with a 2mm pitch. This means the belt will move 40mm per revolution. Since we have the driver set for 1600 steps per revolution, we can calculate that 16 inches, about 400mm requires 10,000 steps to move the carriage from center to end. But there are always small perturbations in build so we need to determine the linear range in steps experimentally.

We do this by using a program (linear_calibration.ino) that runs the carriage to the end where it breaks the opto switch, then runs backwards a given number of steps to the center. We can change that number of steps (LinRange) in the program parameter and starting small, experimentally determine the appropriate linear range noting how many steps it takes for the magnet to stop at the center. My table works best with LinRange=9,900. Here is the Linear_calibration program for download:

Download linear_calibration.ino File Download File

All Together Now

Now that you have your LinRange, let's put it all together and get both linear and rotational motion happening at the same time. Download Rot_Lin_test.ino file and change the LinRange variable near the top of the program to reflect your value. Then upload the code and run. Looking at the code you will see it is very similar to the linear_calibration program BUT the "linear calibration" was made into a routine and placed at the end. The calibration is only called once during set up since it is only needed once - accelstepper remembers (unless you get a jam and teeth skipping - then restart.) The code is well documented so I won't go into detail here but notice the beauty of multistepper. Once coordinates are given, multistepper calculates the best path and executes moving both motors at the proper speed to meet the end at the same time. My hat is off to the creator of that library!

Be careful with direction of motion. Depending on what side you mount your stepper motor on the track (mine is on the left looking towards the opposite end) your motion can be positive or negative. Unfortunately, for me inwards from end to center is negative so I needed to change that or change the program. To change so positive is moving from the center of the arm to th end, I could either switch the stepper motor to the other side, but I am lazy, so instead I switched the A+ and A- leads on the driver. My rotation is positive for clockwise as viewed from above. When making future arms I paid attention to put the stepper motor on the right side so I didn't need to do that.

Download Rot_Lin_test.ino File Download File

Theta Ro and Tracks

The tracks our table use are stored in what is called "Theta Ro: row coordinates; polar coordinates listing the angle in radians (2pi radians = 360 degrees = 1 revolution) and linear distance from the center. Since every table is different with the radian measurement being the same but the linear distance different, tracks are stores in radians and a number from 0 to 1.000 to represent length, or radius. In our program we multiply the length measurement by LinRange to get the proper radius for our track. The track is made by moving the magnet from point to point using multistepper commands. Tracks can have hundreds of points, each on its own line with theta and ro seperated by a space, and look like the following:

0 0
0 0.995
0.013065 0.99349
0.026129 0.98896
0.039194 0.98146
0.052259 0.97105
0.065323 0.95782
0.078388 0.94185
0.091453 0.92332
0.10452 0.90239
0.11758 0.87922
0.13065 0.85411
0.14371 0.8273 ... + hundreds of more points

If we want to choose from over 100 tracks, it would not be possible to save all these data (yes, "data" is plural!) in our program because of memory limitations and ability to add or delete tracks easily. Now that we have made a very simple track, we need to be able to store tracks externally. I chose to put track data on a Micro SD card and connect the SD card reader to the Arduino.

Micro SD Card Reader
Micro SD Card With Wiring Harness

Our next step is to add that card reader and test it's operation. The reader has 6 pins, Vcc and GND for 5V power, and MISO (Mastr In Slave Out) , MOSI (Master Out Slave In) , SCK (Serial Clock), and CS (Chip Select). The card reader is an SPI (Serial Peripheral Interface) device that connects to the Arduino using specified pins. We need to add the SD.h library to our code to enable SPI usage.

On the Due, these pins are located in the 6 pin hearder between the microprocessor chip and the dual header at the end of the board. Holding the board with the dual header down, the header pins are numbered starting at the top right as #1 (MISO), #3 (SCK) the middle of the top row, and #5 (RESET - not used) the top left side, under that starting from the right we have #2 (+5V), then #4 (MOSI), then #6 (GND) on the bottom left (download the Due pin schematic under Useful Tidbits on the left.) The allocation of CS is up to you, I used pin 53 and that is what will be used in any following code. On the Mega assignments are: 50(MISO), 51(MOSI), 52(SCK), and 53(CS). BUT, the Mega also has same 6 header labelled ICSP with the same pinouts as the Due. You can use this, but keep in mind that pins 50, 51, and 52 are connected to these and not available for digital I/O. Note that some folks call MIPO by the name POCI or COPI and MISO by the name PICO or CIPO. SCK is sometimes called SLCK.

I made a 6 wire harness using four length standard Arduino Dupont wires using red, black, orange, yellow, green and blue. The harness is about 32" long. I made it longere since I am not sure where the ontrol panel will be places and don't want length to be a constraint. All ends are female except the CS wire which has one male connection at the end so I can screw it into the Arduino. I used heat shrink around all the connections to keep them from coming apart- this is critical beause they will come apart if you do not secure them. Write down your color for each pin since it is very easy to get confused with these connections. For me, Red 5V, Black GND, Yellow SCK, Blue MISO, Green MOSI, and Orange for CS.

Micro SD Card Connected to Arduino Due

When I first connected the SD Card Holder with an SD Card, the program could not find the card. I checked and re-checked my wiring, swapped out the SD Card Holder, and even changed Arduinos all to no avail. Turns out my SD Card was formatted as ExFAT when it needs to be FAT 16 or FAT 32. Formatting an SD card can be done with a right click, but, FAT 16/32 is not an option so you need an external program. I used DiskGenius. After formatting you need to put a track on the disk. Right now, it doesn't matter what track files you use, but they need to be .TXT files. Here are two you can download and put on your disk. Download trk1.txt file Download trk2.txt file. Put them on your SD card and insert the card into its holder. To test SD operation download the test program, put it into your IDE, and upload to the Arduino. Make sure your serial monitor is open and if all goes well you will see the names of the two files listed.


Download SD_test.ino File Download File


If things don't go as planned, and for me it never does.... I follow these steps to troubleshoot. I've had all these problems at one time or another.

  1. Make sure the SD card is FAT 16/32 formatted and seated properly in the holder.
  2. Check that connections are correct, then check again.
  3. Check for 5V power and ground at the SD card.
  4. Check continuity in wires in case something broke loose.
  5. Swap SD card holder for another in case there is a hardware problem.

Where to Get Tracks

Take a look at the track files you downloaded. You will see that they are just a list of Theta Ro coordinates in a list and nothing else. When you download someone else's tracks, you need to edit them to get rid of extraneous data. Chances are they will be .thr extensions. You can open them in Notepad (Windows, Mac people are on their own.) Files must be saved with the .txt extension. I usually use 4 character names for tracks to avoid memory problems. A few talented people have very kindly posted their tracks. Here are some sites to download tracks:

Sisyphus has a community of track contributors, but unfortunately the company is very protective of its work (and won't share the contributions of others.) So you can't get those tracks unless you buy a table from them. There are two online sources for making your own tracks that are marvelous. These are:

The latter allows you to upload an image and convert it to a .THR file, then you need to massage it and save as a .TXT file. Sandify is utterly marvelous. There are many tutorials on how to use it to make your own tracks. Again, it will export a .THR file, then you need to massage it for .txt getting rid of the leading initial settings data in the file.

But, Um, What Do I Do With Tracks?

Well, you might think we are getting ahead of ourselves since there is still a lot to do before we can actually make tracks. For one, we have no way of choosing what track to make, yet alone don't have a magnet and sand platform. We also don't have any control over the table - no reset, no power switch, no lights, no pause, and no "erase track" which you don't even know about yet!

We are going to use a Rotary Encoder (tutorial listed in Useful Links) for choosing the track, a 20x4 i2c LCD Display for communication, and 3 SPST switches. For on and off power, you can use an inline switch on the power cord. Since I leave my tables on all the time, I just unplug if I want to turn it off. On my first table I put a rocker switch for power, but people kept accidently hitting it so after that, no power switches. All of this is mounted in a 3D printed control panel:

Front of Control Panel with Components
Front of Control Panel with Components

Download .control_panel.stl File Download File

First, let's test out the rotary encoder. It has 5 pins, 5V, GND, CLK, DT, and SW. SW is the switch of the encoder; when you press the encoder shaft, you close the switch. CLK and DT are used by the Arduino to determine if the encoder has spun and in which

direction. Spinning the encoder clockwise usually makes the encoder go negative which I don't like. To reverse this, just reverse the CLK and DT pins on the Arduino. I set it up to go positive for clockwise motion. Connect the encoder with +5V and GND to the power block, SW to pin 4, DT to pin 2, and CLK to pin 3. Yes, you will see that this is opposite what the sketch tells you, but remember I switched directions so just do what I said and don't change the code.

LCD Display and Encoder Back. Note small board on LCD.

Download encoder_test.ino File Download File

If you want, you can test the encoder now, but since we will be mounting it in the control panel and there are many more wires to go to the panel, I wouldn't recommend making long wires just yet. Wait until we get all the components tested and mount them in the panel. Then we can make a wiring harness. But it's a good idea to test the encoder and make sure you understand how it works at this point. I've never had any problem with encoders so I can't recommend any troubl shooting other than the obvious checking wires and connections.

Next is the display. We are using a 20x4 i2C LCD display. Don't use a 16x2 - we need four lines to display files and all code is written assuming a 4-line display. The i2C (Inter-Integrated Circuit - its a serial communication protocol) display uses, well, the i2C Arduino i2C interface. On the Due, pin 21 is SCL and pin 20 SDA. This is the same for the Mega. To use i2C we need to include the Wire.h and LiquidCrystal_I2C.h libraries. It takes care of all the nitty-gritty. If you bought a display that does not support i2C (you'll know by not seeing the extra little board on the back of the display), then you are screwed. Go get one that does. Using the display is very straight-forward. You connect power, 5V and GND to the power block, and SDA to pin 20 with SCL to pin 21 of the Arduino. Probably the easiest part of this project! One word of caution, often the display "brightness" needs to be tweeked using the little potentiometer on the small display board. If you connect everything up and run the test program but do not see letters, the first thing to do (after checking connections) is to adjust that potentiometer. That should solve the problem. Leave the encoder connected for now and connect up your display. Download, upload, and run the test program.

Download encoder_test.ino File Download File

Panel with Wiring

Good, you are almost done with the control panel components. The only thing left is to mount 3 SPST mini switches and a reset button. Wiring these is straight forward. One prong goes to ground on each and the other goes to the respective Arduino pin. The switches will control Sleep (pin 37), Erase (pin 41), and Random/Choose (pin 39). Sleep stops the code from running past the current track point (remember multistepper blocks execution while it is running to a point), Erase sets whether or not you want the previous track erased prior to a new track by running the Erase routine (magnet moves through 50 rotations while going from maximum extension to zero), and Random/Choose sets whether you want the Arduino to randomly choose a track or if you want to choose one.

I make a list of all connections and what color wire is connected to each and where on the Arduino that wire is going. I cut my wires to 36" length and wired things up using solder and female pins soldered to Dupont wires that I cut in half. Long wires make great antenna and I've had problems picking up stray signals in the past. With the wires braided and bundled, I did not have that problem with this build.

First I solder all switch and button grounds together using a single stripped wire making a ground rail and solder the ground connections from th LCD, encoder, and SD card to that ground rail. Then for each component I solder the wires to the female connectors of each and braid those wires together so I don't get wires of the same color mixed up. I hot-glued the SD card onto the control panel so everything would be in place. I left it sticking slightly out of the top so changing cards would be easy. After all is in place and wired, I cover the mess of wires with plastic spiral wire wrap to keep it all together. Then everything gets wired to the base. Take your time.

Testing

The big moment. You already have test programs saved, let's run them again. Start with testing Rot_Lin_test.ino. Position the carriage to be off-center, upload the program to the Arduino, then plug in your base. Hit the Reset buton on your control panel and make sure that works also note that the red LED light on the opto-switch should be lit. The carriage should start running towards the end, the prong will break the opto beam, and then the carriage will go back to zero. After that, it should starty going around and out and then around the other way and in, repeating until you stop the program.

Next, let's test the SD card by running SD-test.ino. Upload and see if all goes well on your serial monitor. Hopefully it does, if not troubleshoot like we did before. Chances are that if there is a problem, it is in wiring since we tested the card already. Finally, check the LCD Display and Encoder using encoder_LCD_test.ino like we did before. Spin the encoder and watch the fun. You may see that it's not a rock solid system. Sometimes the encoder will backstep, particularly if you spin rapidly. No big deal, just the way it is. When I hit the encoder switch, my Arduino reset. Checking connections showed that the switch connection came loose at the control panel. In the words of Rosanne Rosanadana "It's always something." Great, everything is working!

Time to Rock and Roll

This is it, time to dowload and upload the final sketch (kinetic_table.ino) that brings everything together and runs the track. Set the control panel for Sleep OFF, Erase OFF, and CHOOSE/RANDOM set to random.