Seth Foster's Projects and Fun Stuff http://blogs.sccs.swarthmore.edu/sfoster Adventures in Projects on a Shoestring Mon, 18 Feb 2013 01:05:28 +0000 en-US hourly 1 http://wordpress.org/?v=4.2.1 PUMA – Transmission http://blogs.sccs.swarthmore.edu/sfoster/2013/02/16/puma-transmission/ http://blogs.sccs.swarthmore.edu/sfoster/2013/02/16/puma-transmission/#comments Sat, 16 Feb 2013 21:11:49 +0000 http://blogs.sccs.swarthmore.edu/sfoster/?p=24 Continue reading ]]> Because the PUMA applies force, it needs an actuator. That’s a CIM motor, from www.andymark.com. We picked these because they’re powerful – about a half horsepower – and cheap, as well as being easy to control since they’re just simple brushed DC motors. However, they’re very current-hungry, so we bought a motor controller – a Jaguar from TI – to do all the current amplification, since that’s not really in the scope of our project.

The problem with the CIM motor, out of the box, is that at its max efficiency point, it’s too fast and low torque for us. Remember, we’re using this thing to pull a cable, not spin a wheel, and with a lot of force. So we need to gear it down – by about a factor of 100. We did this with a worm gear transmission, since it’s an easy and most importantly compact way to get that sort of gear reduction ratio. (Ideally we’d have used a harmonic transmission, but those are really expensive and not exactly something you can knock together yourself). That transmission then turns a pulley, that we’re using as a cable reel. This is what it all looks like:

PUMA transmission

Contained in a section of rectangular pipe, this transmission has a 100:1 gear reduction and turns a cable reel.

 

The casing there is just a chunk of steel rectangular tubing, since it was available. Our flange bearings are from McMaster, our gears from wherever we could find them, and the pulley from McMaster. This allows us to get the force at the pulley edge that we require. Fabrication was a bit of a pain for two reasons.

1) I haven’t worked in steel before, so I was breaking a lot of tools doing things like milling keyways on that shaft that holds the worm gear and the pulley, or center drilling the face of the tubing which is a bit slanted due to being stored under a few hundred pounds worth of other crap in the shop.

2) The lathes we have don’t like turning things down to a quarter inch while being two inches away from the jaws of the chuck. The piece pushed away constantly, causing any run down the shaft to end with the shaft being thicker near the end than near the chuck. This meant I basically put a bunch of tiny little steps in that had to be smoothed down with a file, and in fact the process for sizing the thing right to have both the worm gear and the pulley press-fit on was to file a bit, try to apply the gear, file it more, try again… until it worked. And that is pretty aggravating.

In retrospect, this would have been solved by slapping a live center in the tail stock of the lathe and pinning the piece at the end away from the chuck. But the cutting tool would probably have to be extended way past the end of the holder to actually hit the piece without the cross stock hitting the tail stock… And in the end neither I nor the machinist thought of it in time. Save it for version 2.

]]>
http://blogs.sccs.swarthmore.edu/sfoster/2013/02/16/puma-transmission/feed/ 0
PUMA – Elastic Stage http://blogs.sccs.swarthmore.edu/sfoster/2013/02/16/puma-elastic-stage/ http://blogs.sccs.swarthmore.edu/sfoster/2013/02/16/puma-elastic-stage/#comments Sat, 16 Feb 2013 20:21:58 +0000 http://blogs.sccs.swarthmore.edu/sfoster/?p=20 Continue reading ]]> Because the goal of the PUMA project is to have a prosthesis with significant and controllable force output capacity, the way we do the motor transmission and the overall actuation strategy is a pretty key part of the design. Now, neither Allen nor I are mechanical engineers, so we’ve based this on reading literature of people who have done similar things and asking all the usual stupid questions to folks who know more than we do – for instance, the long-time Swarthmore Engineering machinist Grant Smith, who knows more about how to actually fit things together than most professors.

As I’ve previously mentioned, the actuation is provided by a series elastic actuator. This puts a spring between the actual actuator and the load. The spring provides some safety factor, since you can push back against it if something goes wrong, and allows for simple and cheap force sensing using any sort of linear displacement sensor.

Since we require a pretty serious amount of force output with not a lot of linear space – there’s about a foot of linear space between the shoulder and the wrist with the arm contracted as far as we want – we need some short extension springs with pretty serious load capacity. We also don’t have the time or funds to get them custom made, so we decided to make a few end plates that can have multiple springs attached in parallel to distribute the load. It looks, conceptually, like this:

Elastic element for PUMA actuator

This provides the elastic part of the series elastic actuator for the PUMA.

There are two big problems with this idea that have come to light since we came up with it.

1) McMaster isn’t very good at listing spring constants. Both of the kinds of spring we ordered, despite being listed as ~25lb/inch, ended up being more like 60 lb/inch. The problem is, we do need something that’s reasonable elastic, both because we want to be able to push back on the actuator as a safety feature, and because the less the springs displace the more precise our linear displacement sensor has to be. So we ended up only putting three springs on the plate instead of five.

2) It has a tendency to wiggle axially. If there were only springs on the plate this wouldn’t be a problem, but the linear sensor has to be there too. That’s implemented as a quadrature encoder fixed to one plate and a code strip fixed to the other plate. If those wiggle with respect to each other, either the code strip or the sensor could break; and even if they didn’t, it would certainly cause count problems. This one we solved by adding linear bearings, consisting of steel rods fixed on one plate and running through Teflon bushings on the other.

The hooks on either end are the attachment points for the rest of the system. We’re using 1/8th inch aircraft cable for tendons, and they’ll hook on with standard shackles.

]]>
http://blogs.sccs.swarthmore.edu/sfoster/2013/02/16/puma-elastic-stage/feed/ 0
PUMA – Goals and Reasoning http://blogs.sccs.swarthmore.edu/sfoster/2013/02/11/puma-goals-and-reasoning/ http://blogs.sccs.swarthmore.edu/sfoster/2013/02/11/puma-goals-and-reasoning/#comments Mon, 11 Feb 2013 02:19:40 +0000 http://blogs.sccs.swarthmore.edu/sfoster/?p=11 Continue reading ]]> So, it’s the last semester of my time at Swarthmore College. That means it’s time for E90, the senior capstone project. I’m working with Allen Welkie ’13 on this one. We’re making a system for human motion and strength augmentation, specifically for flexion of the elbow. It will use a series elastic actuator for the actuation side. The user’s intentions will be sensed through a combination of EMG (see the previous post) and force/torque sensors between the device and the user, using a controller as detailed in the IEEE Transactions on Systems, Man, and Cybernetics by Kiguchi, et. al. I don’t think I can upload the paper since I got it off ILL, but if you have IEEE or interlibrary loan access you can get it. The system is based on a neural network trained to fit a particular user, with an encompassing controller that switches out weights based on the position of the user’s arm (the geometry of the shoulder means that the same set of muscle activations with the arm in different positions leads to a different desired force vector)

 

The biggest difference between our project and that of Kiguchi et. al. is of course scale – they work at a large research university whereas Allen and I are of course at a small liberal arts college, and our budget for the entire thing is $400. We also only have 18 weeks to take the project from a glimmer in our eye into something that at least moves on its own, with a full report. All that adds up to the decision to only implement the system for flexion of the elbow, instead of both directions as well as the shoulder. This is a bit easier to deal with in our timeframe and with our budget.  We’ll integrate (and upgrade) the EMG sensor system I made for my project last semester. We’ll add to it a physical framework made out of steel sheet. The motor will be a half-horsepower brushed DC motor, the CIM motor from Andymark (familiar to anybody who’s done work with FIRST robotics and an incredible deal – seriously, grab one of these if you need a nice motor at a great price, as long as you’re not overly worried about power consumption). There is a spring plate, the elastic part of the series elastic actuator, fabricated ourselves and incorporating springs from McMaster. Its position sensing is with a quadrature linear actuator. The microcontroller will be a C2000 from TI, mostly because we have some at school.

 

The question, though, bears asking – what’s the point of doing this, aside from “hey we need some kind of project…”? We’re not really doing anything new and bold, just implementing part of somebody else’s project. Well, there are a few reasons.

First, there’s a saying about Swarthmore E90 projects – you can do something big, or you can do something new. And for the purposes of this project, this is actually pretty big: it involves hardware, one of only two this year, and two different systems to be integrated.

Second, this isn’t really something either Allen or I have ever done before. Human machine integration is a pretty new thing as integrated controllers get powerful enough, and batteries power-dense enough, to enable things to actually be mobile instead of part of   a wheelchair rig. We’re both really interested in the subject, and I’m particularly interested in prosthetics. This gives us a solid chance to get our noses into the field. So even though this project won’t be doing anything revolutionary, we’ll certainly be learning a lot – and since this is in fact an academic class, that sounds pretty good to me.

 

 

]]>
http://blogs.sccs.swarthmore.edu/sfoster/2013/02/11/puma-goals-and-reasoning/feed/ 0
EMG Prototype http://blogs.sccs.swarthmore.edu/sfoster/2012/12/20/emg-prototype/ http://blogs.sccs.swarthmore.edu/sfoster/2012/12/20/emg-prototype/#comments Thu, 20 Dec 2012 17:18:49 +0000 http://blogs.sccs.swarthmore.edu/sfoster/?p=6 Continue reading ]]> I just finished making a prototype EMG reader. It starts with electrodes and ends with a DC voltage output that scales with the RMS value of the EMG signal. This is basically to set up the sensing side of the project I’ll be working on in the spring: a system to amplify human strength.

How does EMG work?  A good resource (that I’ve used pretty constantly) is The ABCs of EMG. It’s got all the pretty pictures that I normally use in my presentations in it already, so check it out if you want to know more about the biology.

The quick summary is basically that when your muscles contract, they produce a bioelectrical signal which is detectable by skin electrodes. This signal tends to have more power in it when more power is exerted by the muscle, but has enough random elements that naive measurements like maximum voltage won’t give you a good measure of the biological effort.

What you do is subtract the outputs of the two skin electrodes, amplify it, and do an RMS calculation on it. The circuitry to do all of this is pretty simple and cheap, and looks like this:
Picture of all the circuitry for this beast

In order (top to bottom), those chips are

  • A TI AMC1200BDUB, which is a differential amplifier with a 95 dB Cmrr, which is recommended for this sort of application. It’s also an isolating amplifier, which means if it’s hooked up right (and in this circuit, it’s actually not) with a separate power supply for input and output, if the output power supply shorts and connects you to 120VAC, you won’t punch yourself in the face. This guy has 8 built-in absolute gain and costs $6.
  • An L741 op-amp in a hi-pass, inverting amplifier configuration. This re-centers the signal around 0 (the diff amp centers it around 2.5V) and gives 10 absolute amplification. It costs less than a dollar.
  • Another LM741. This one does a bit more than the first. It has a hi-pass section to get rid of the previous op-amp’s output bias; it has a hi-pass anti-aliasing filter to feed into the microcontroller.
  • A full-wave bridge rectifierto rectify the signal. Most of the ones on Mouser are big, big overkill since they’re for power. They still only run you a dollar or two.

After the analog stage, the signal goes into the microcontroller. I used an MSP430 Launchpad from TI, which is one of the best deals available for microcontrollers. $4.35 gets you a microcontroller, development board with debugger, and a free download of Code Composer, which is a perfectly reasonable IDE, as well as a graphical configuration tool for all of the peripherals on the chip. Excellent.

This circuitry, all in all, costs you about $10. Here’s what its output looks like:

Contraction burst

This is still pretty crappy, but you can definitely see the EMG output. That burst in the middle is a contraction burst. It’s the subject, in this case me, flexing the muscle under test, in this case the bicep.

This signal can be improved in a few different ways, all of which I’ll be looking into for revision 2.

For instance, using a programmable-gain amplifer instead of rolling my own amplification stack out of the lowest-end op-amps and 5% resistors will probably gain me a solid amount of noise reduction – both because it means that the values will be way more precise, and because it’ll make the system monolithic. This entire thing (less the microcontroller) should be able to fit on a PC board about the size of the last joint of my thumb – and in fact in a lot of commercial designs some of it does, often preamps are integrated into the electrodes themselves.

There’s also some code optimization that can be done, but I’ll get into that when I post about the code used in this project.

Here’s the circuit diagram for the input side. It’s pretty simple. Note that I used +-13V for the power to the 741s. This isn’t mandatory, and it can be pretty much anything as long as it’s greater than +-3.3V (the full-scale value for the MSP430’s ADC).

]]>
http://blogs.sccs.swarthmore.edu/sfoster/2012/12/20/emg-prototype/feed/ 0