Hello all,
After the startling Adafruit/Sparkfun showdown this week, I figure it's as good of a time as any to share my robot arm project on here that I've been working on sporadically for the past couple years.
This is a small (if you consider 70lb small) "laboratory grade" robot arm that I found surplus. Somewhat expectedly, the software needed to control it is long gone, along with the company that built it. Luckily, the power electronics were all still usable. The motor amplifiers work on a -10 to 10V signal, and the encodes are quadrature with RS422 signal levels.
I can't say I really know how to build robot arm software properly (I only took one controls class in college); I think most would use an FPGA for this but I know MCUs better and figured a really fast one might do the trick.
The Teensy 4.1 takes the place of the original control electronics board (some old DSP chips, FPGAs and a tiny embedded 486 computer), and uses these things:
... and almost every pin on the 4.1 is used for something.
That "yellow box with levers" also has a Teensy inside, an old Teensy 3.2, which I picked because I had an extra one lying around and it has a bunch of ADCs and the libraries to drive a small color LCD.
Of course it still isn't finished, I don't even have a good algorithm to move smoothly between two positions yet, let alone any IK stuff or motion planning, but I can move it around and poke at stuff.
I do plan to do a full write up of it eventually, but if you'd rather listen to me ramble about it for an hour and a half I have made a couple of videos:
first part:
building a 'sense arm'
I've been very pleased with the Teensy. I've actually been leveraging some of the audio features of the 4.0 for another project at work, but I don't think I can comment on that one.
After the startling Adafruit/Sparkfun showdown this week, I figure it's as good of a time as any to share my robot arm project on here that I've been working on sporadically for the past couple years.
This is a small (if you consider 70lb small) "laboratory grade" robot arm that I found surplus. Somewhat expectedly, the software needed to control it is long gone, along with the company that built it. Luckily, the power electronics were all still usable. The motor amplifiers work on a -10 to 10V signal, and the encodes are quadrature with RS422 signal levels.
I can't say I really know how to build robot arm software properly (I only took one controls class in college); I think most would use an FPGA for this but I know MCUs better and figured a really fast one might do the trick.
The Teensy 4.1 takes the place of the original control electronics board (some old DSP chips, FPGAs and a tiny embedded 486 computer), and uses these things:
- IntervalTimer interrupt at 1000 Hz, to run the main control/timing loop
- runs PID controllers, handles reading encoders and writing to motors
- encoders are handled by dedicated encoder counting chips
- analog -10 to 10V signal to the motor amps handled by some DAC chips
- both communicate with the teensy over SPI
- plenty of processor time left over for the other non-realtime tasks
- runs PID controllers, handles reading encoders and writing to motors
- UARTs, to communicate with peripherals at 100 Hz over RS422
- first one is the yellow box with levers (another surplus item) to select modes, move individual joints, see what's going on
- second one is a scaled down 'sense arm' which I can move around and the big arm will copy it
- a third spare UART
- PSRAM, for record/play
- I can record either the current encoder positions or the inputs to the PID controllers in real time, and then play them back later (by feeding them into the PID setpoint)
- at 1000 Hz and uint32_t's, 16MB of PSRAM gives several minutes of recording time
- SD card
- for storing the encoder position between reboots so I don't have to re-home the arm each time
- will probably eventually store saved PSRAM record/play recordings
- DUAL_SERIAL over USB
- one for a status screen which I can use to see a bunch of values at once
- one for a command line interface, so I can change things like PID gains, etc. without needing to reflash the board
- CAN bus
- currently unused, pland are to use it to talk to a future Hand (unless I decide to use a UART instead)
- Ethernet
- at some point, I think IK solving and motion planning will be done on a regular computer; ethernet will connect it to the Teensy
... and almost every pin on the 4.1 is used for something.
That "yellow box with levers" also has a Teensy inside, an old Teensy 3.2, which I picked because I had an extra one lying around and it has a bunch of ADCs and the libraries to drive a small color LCD.
Of course it still isn't finished, I don't even have a good algorithm to move smoothly between two positions yet, let alone any IK stuff or motion planning, but I can move it around and poke at stuff.
I do plan to do a full write up of it eventually, but if you'd rather listen to me ramble about it for an hour and a half I have made a couple of videos:
first part:
building a 'sense arm'
I've been very pleased with the Teensy. I've actually been leveraging some of the audio features of the 4.0 for another project at work, but I don't think I can comment on that one.