Teensy 3.6 Now Compatible with Shagmatic

I recently bought some Teensy 3.5 and 3.6 boards to test with the Shagmatic. I was disappointed that the 3.6 did not work with the current Shagmatic firmware. It seemed that the Accelstepper library was not compatible with the 3.6. I had just installed the new Teensyduino which included a copy of the Accelstepper library so I thought it should work. Checking online I found that several updates had been made to the library after the one included with the newest Teensyduino, so I copied the new library to the appropriate location from which is is used in compiling the code. A very pleasant surprise is that it now works.

I have several ideas that I want to test with the new Teensy. It has much more of everything, speed memory, features. There is a flash card socket on the board and many more easily accessible pins. The improvements can be found on the Teensy reference pages.

Fortunately I had the forethought to include a jumper for selecting 3.3 volts for the encoders and other inputs/outputs on the Shagmatic board so the board meets the 3.3 volt limit of the Teensy 3.6. The 3.5 is 5 volt tolerant so it will work as well but there is no advantage to using it unless you are connecting other 5 volt devices.

I also got some audio boards from PJRC to experiment with. I plan to add audio response to the Shagmatic so it can respond to musical beats and human sourced noise. It should be possible to clap for control or let the machine follow the music of your choice. I need to figure out exactly what degree of control the music beat should have. Initially I will probably allow the beat to alternate direction of motion and to have the distance moved be keyed to the intensity of the peaks. Any ideas as to what makes sense will be appreciated.

I have also added a quadrature encoder to the timing belt machine. This will allow for absolute position accuracy and correction of missed steps.This is particularly useful if you want to use the machine for extended repeated motion as it can prevent drifting. Also if the machine is operated by hand by a partner who is not watching what the machine is doing, they should be able to achieve positional accuracy as long as the joystick is moved a fixed amount repeatedly. In addition it will make recording and playback or performances feasible as there can be more accurate synchronization of the playback with the original. The additional encoder requires more machine resources but this will not be a problem with the Teensy 3.5 or 3.6. I am really pleased that it is now working.

Once I get the encoder working, I will re-visit the idea of control by audio encoded data. I put this aspect of development on hold because I did not think it would be reliable without absolute position accuracy. I did write and debug the recording and playback code and convinced myself that it is working.

Now I just need to find a big chunk of time to work on  all these new developments.

 

This entry was posted in Uncategorized. Bookmark the permalink.

2 Responses to Teensy 3.6 Now Compatible with Shagmatic

  1. Azura says:

    How can I build my own board? I am very interested in starting this build but I am a bit hung up on the board choices.

    • shagmatic says:

      in terms of the mocrocontroller, you can use anything from Teensy 3.1 to teensy 3.6. if you want to build the basic machine, the 3.2 is fine. if you want to do the audio following version once i make it public, you should anticipate this by getting a 3.5 i have just one board left and am not sure if i am going to make more since i have a bigger better version in the works. it is entirely possible to build the shagmatic with just a screw terminal breakout board. when i have time i will write a little set of instructions as to how to do this but for those who are adept with electronics it should not be difficult using just the pinout diagram and the clues in the firmware. the one mystery is the purpose of the resistors and capacitors on the limit switch lines. these are there to provide denouncing but may not be necessary depending on the length of the lines to the switches. this page references the screw terminal board that i recommend. it is not made for the teensy and has two extra terminals that are not used. the pin marking are totally wrong so they need to be ignored and the reference on the teensy site be used. http://shagmatic.com/couple-bargains-fucking-machine/

Leave a Reply

Your email address will not be published. Required fields are marked *