Saturday, October 30, 2010

My instructables Halloween contest entry

My latest work: it's been two months since my last post, that's actually been due to a deluge of projects, not a shortage of them. The cyclic load fatigue tester has been upgraded, both with better control software and a sturdier table. In senior design I'm working with two other students on a Thermoaccoustic engine, I'll post about that when it's further along. In experimentation I've just started on a fluid temprature regulator, a machine that cools or heats water to a desired temperature. Then there's the human powered vehicle, I'm head of the components team and we've just finished the prototype for the front wheel drive/front wheel steering drive train. I'll have picture of this all as it completes. For now, check out my Instructable, and if you have an account there, vote it up.

Saturday, August 14, 2010

The cyclic load fatigue tester

My project for most of the summer has been this cyclic load testing machine. It is an unpaid research project that will earn me some class credit. The idea is to create a machine that can apply a controlled force to bend the bicycle fork back and forth thousands of times, measuring the load and displacement and recording the two. The goal is to find out how well current specifications for bicycle forks, typically made of metal, predict failure in composite forks, such as the one mounted in the machine here.
Most of the electronic equipment is from Enfield, they supplied the PID (green) the servo valve (black just above the pid) and the pneumatic ram with a built in potentiometer to detect position. I fabricated the mounting structure for the ram, and the mount for the head tube was created by another student before I began this project. A PID is a device which outputs a control signal which is intended to control something so that the feedback signal matches the command signal. for example if you used it on an oven the control would control the heating elements, the command would be a signal equivalent to what the temperature sensor would read at the temperature you desired and the sensor would of course be the temperature sensor. In this application I wired the feedback to a load cell (a sensor which detects force) and the control to the servo valve that lets air in and out of the ram. Then I give the PID command signal corresponding to the load cell reading for the amount of force I want, and it adjusts the valve accordingly. To generate the command signal I have a LabJack U3, one of many data acquisition devices available. We chose this one because it is fast, has good sample code in many languages, and includes analog outputs, so we can use it for control as well as recording.
At this stage in the project I have the machine working, and I have figured out the commands to control it from VB or C++ (.NET 2008 versions), so it's mainly a matter of writing the software. There does seem to be an issue with the range on the load cell, but I have others I can try. I just got as far as making the force feedback work with the PID. In general my plan is first make it work, then make it better.

Tuesday, June 29, 2010

The tank drive RC motor driver

I started working with electronics about a year ago. Most of the things I created during that time were simple learning exercises, such as blinking a light with a PIC chip, or with a radio transmitter. Recently I completed the first working build of my first real electronics project. It is a board that interprets the signal from a radio receiver for an RC servo set and generates a corresponding motor power output, two of them actually.

First there was the development of the code, I used a PIC 18F1320. I mainly chose this chip because I had experience with it, and I knew it was just powerful enough without being excessive. Most of the time on this went into making the PWM signal interpretation code. The signal that is output by the servo for the receiver is pulse width modulated, that means it sends pulses of various lengths to the servos to indicate the desired position. For most servos the standard is that a 1 ms pulse is all the way to the left, and 2 ms is all the way to the right, 1.5 being the center. To make it as precise as possible I use the capture module on the chip so that instead of checking the ports on regular intervals, I could have it check the time when the logic level at the port changed. The problem with that is that there is only one CCP (capture, compare and pwm) module on this chip, and I wanted to capture atleast two servo signals.
Eventually I learned that most RC receivers output their signals for each servo with a given space in between, I figured I could use this gap to differentiate between them with just one pin, but that didn't work. Eventually I hooked it up to an oscilloscope and found out why: on my receiver the pulses had no space between them, furthermore if I connected any two adjacent channels to the same pin they shorted out the receiver and the whole thing shut down. Fortunately the two problems can solve each other, since the signals are stacked together, and my receiver has three channels, I can just capture the first and third, and the gap between them is the length of the second. Here's the code I came up with, it's kind of long to re-post here.
After that adding the motor PWM features was fairly easy. I added a button to calibrate the board (turn the transmitter high, press, leave it neutral, press, turn it low, press, so on for the next channel) and two lights to indicate the calibration state.

Next was designing the board, I used an L298n H-bridge chip to amplify my pwm signal to actually power the motors, and drew the whole thing up in eagle. Note the filtering diodes on the signal in, this is to keep the thing from shorting itself out, oddly it usually works without them, but not always.

After that I soldered the prototype board, to my surprise it worked in the first try. My only other practice at circuit board soldering was when I made my Junebug kit to start programming PICs. For that I just watched some youtube videos on how to solder perf boards and I got a 30W soldering iron from sears.

With that made and tested I made some adapter wires using some old lego wires of mine that had come loose. They have pins made from snapable headers at one end and lego plugs at the other, I figured a versatile testing medium for the RC controller would be legos and here is the resulting robot:

just the body

with the driver board and receiver

The next step in this project is a more solid version, I'm working on the schematic to create an actual board. I've built a gearbox, and I plan to make a solid works model for a simple frame, then fabricate it out of aluminum. It will be a bit more compact than the prototype, I've ordered some L293D chips, which are smaller than L298s and drive about half as much current (the dual gearbox uses 800ma motors), they also have built in clamp diodes which should save some space on the board.

For now I'm having fun driving the lego version around, I stuck on the wireless camera and a flashlight and drove it around from the TV like a space probe.

Wednesday, May 26, 2010

The Story So Far

It's time I start keeping some kind of record of all the thing's I make. I'm a creator, I don't claim to be good at everything, but I am good at making things. Some of my projects from the past have no record, but I'll add old ones as I find them. I'm not going to list it all off, it would be better to just show you the old and new projects as I recall and create them. I am a Mechanical Engineering student at UW Milwaukee, I have a welding and fabrication degree which I earned in North Carolina, I've worked as a ranch hand, a welder and an industrial engineer, and freelanced as an artist here and there.

These were our costumes at ECU Halloween 2006, I am not a big sewer, though my mom did teach me how. I designed and created the costume that I'm wearing here. It's actually based off of a pattern for a George Washington costume, the tails and narrow waste worked well. I thought I should include this to show some variety, since at the moment I don't have many pictures but the industrial and electronic stuff. These costumes, along with Kelly and Aaron's march hare and red queen costumes, won the ECU costume contest.

Formula Hybrid 2008, on the NCSU team. This was more fun than I can explain. I was the welder on the team and helped with the frame and built the battery guards and most of the mounting required (that's me on the left in the build picture). We started just six weeks before competition, and took it up to New Hampshire. We finished it in the track side garage, staying up all night and sleeping in a truck was hard, but it was fun. We didn't win anything, but we qualified. And I'm sure they're going to do something great next year. I had to move, so I reluctantly left the NC state team and went to Wisconsin where I transferred to UWM.
Now I'm head fabricator on the UWM ASME's unfortunatly named HPV (human powered vehicle) team. I had a co-op term that interrupted this, but here is a pic of the rolling frame prototype we built up. I may have to limit how much I show of this until competition, for the sake of confidentiality.

I've also recently gotten into electronics. This is a starter project I'm just finishing up, and it will probably be my first full post about a project. It's a RC motor controller, it takes the signal from a RC receiver and will use it to directly control two motors, maybe more. The one shown can only control one. Its using a PIC18F1320 to capture the signal and produce the variable speed motor control signal and a L298 Dual H-Bridge to amplify the chip's output and drive the motor. I'm going to take it to the school lab and use the oscilloscope today to get a better idea of what the timing is of the output from that RC receiver. I've got a program for the chip to interpret many signals at once almost worked out, but I can't get the timing right, so I'm hoping that will help. Once it's all working I'll probably make a little RC tank or a lego motor controller with it.

I respond to comments so ask about anything that interests you.