h o w > t o > m a k e :

sam calisch

cba

week eleven: output devices



Lots of fun this week -- making boards to move things in the world. I was pretty distracted over the weekend with a post-composites-week activity: skinning the kayak! I ordered heat-shrink dacron (polyester) and used a clothes iron to shrink it over the frame. Check out the linked page for photos of the process.


While waiting for epoxy to dry, I made Neil's stepper motor and RGB LED boards. Who knew Neil was out in the internet, waiting to dance in clamp form?



I threw the RGB inside the kayak and instantly wished I had decked out the frame with LEDs before skinning. After all, this is MIT, where everything is cooler with an LED on/in it. I may need to do some careful LED insertion in the near future.



Without much time left on Tuesday, I needed to make something beyond the Hello boards. Neil has spoken so highly over the new H-Bridge, so I decided to drive a DC motor with it. To control the output, I added a step response input, in order to have as much flexibility for what sensor to attach. This was essentially a mash-up of hello.txrx and hello.H-bridge.




Note: There is a MISTAKE in this board. I naively hung RX off of PB2 instead of one of the ADC pins, like the nearby PA7. Some post-fab surgery corrected this mistake, and the code linked below used PA7 as RX and PB2 as TX. Further, the headers on this board are a little too close -- they fit, but it's tight.


I also mashed-up the code from the two projects. The loop averages 25 step responses, and takes the difference between up and down time. I changed this from 100 responses in order to get faster response to sensor input. Then I rate the size of this difference to set a slow, medium, or fast impulse to the motor (corresponding to long, medium, and short delays in the PWM loop). I do the rating in an ad hoc way, finding cut-offs that work through trial and error. These cut-offs will depend on the geometry of the step response sensor, so using a baseline measurement would be a preferable way of rating the signal.


The video below shows the DC motor responding to the pressure sensor. It doesn't work perfectly, but it's good enough for tonight.



Files:


MAS.863 2012