Monday, September 26, 2011

Solar tracking water purifier


I wanted to learn more about alternative energies, and came up with a project to use solar cells to run an autonomous, scalable water purifier.  The high level block diagram consists of a few major pieces:  1)solar tracker/charger and battery, 2)water pump, filtration, and barrel/storage, and 3)on demand purification.   The overall idea is to have a deep cycle marine battery that is charged efficiently from solar cells to provide all the power to the system.  When the water in the barrel gets low, a low voltage, slow pump would start to fill the barrel.  And when a user puts a container under the spigot and pushes the button, filtered water would flow through an ultraviolet lamp/tube at a rate that kills all bacteria and viruses.   An Arduino microprocessor would monitor inputs and outputs to coordinate the actions of the three main pieces, based on user inputs.  So far, we have built a prototype of the solar tracker that tracks the path of the sun and aims the solar cells directly at the sun for maximum efficiency.  We are using a simple set of solar cells, with a diode in line to prevent reverse current from the battery, when the solar cells are in the dark.

Motor controller for shoe controlled prosthetic arm

My brother and I came up with the idea of making a prosthetic arm that was controlled by motions of your shoe.  We had been looking for a cool project on the web, and saw a person who made their own prosthetic arm.  It worked, but was controlled by a chin switch, which meant that using your arm made you move your head everywhere.  We came up with the idea of moving your foot instead.  Our prosthetic arm uses a shoe controller with 4 degrees of freedom (currently).  Tilt shoe Left/Right rotates the arm left/right.  Tilt shoe up/down moves the wrist joint up/down.  Click the big toe down closes the gripper, and click the big toe up opens the gripper.  There are other switches inside the shoe for additional degrees of freedom, but we aren’t using them right now. 
We are using an Arduino microprocessor with pololu 6 axis servo controller to run the mechanicals.  This project is in the early stages.

CNC Mill conversion






My brother (mechanical engineer) and I were working on developing our own rapid prototyping process, where we could either draw (AutoCAD or Solidworks) or 3D scan a part that we wanted to make, and then machine the part, and test it – all within a day.  I had developed a 3D scanner that created full 3D mesh files, and we had student versions of AutoCAD and Solidworks, so we needed a way to output these files to a mill.  My father bought us a small, cheap benchtop mill from Grizzly, and we came up with a plan to convert it to full CNC.  We used a ball screw conversion kit to change from lead screws to high precision ball screws, which had less backlash and much lower friction, and then put in stepper motors and drivers.  We researched and chose Keling tech drives and motors because they were specifically designed for small mills.  We used an old computer case to house the electronics, and bought an old computer ($100) to run the software.
Once the mill was built, we chose CAMBAM to create the g code and Mach3 to run the g-code and drive the motors.  We chose this software as it didn’t cost nearly as much as software like MasterCam, but still had thousands of users and an active help forum.  This came in very handy when we were trying to get all the parameters correct to cut some simple profiles.
One of the pictures shows a hemispherical part that was a mold we cut out.  The mold was they used on our homemade thermoforming machine, to make parts.  We can now go from concept to part in a single day.

Solenoid powered product tester


First Wave Technologies hired me to build a life tester for their new product.  They had a prototype of their second generation pill crusher, and wanted to run a cycle every 30 seconds until the internal software sensed a low battery level and shut off the unit.  They would then put the unit on a charger and repeat the cycle again.  I came up with a simple solenoid powered fixture that would press the on button every 30 seconds.  I used my Arduino to send a 5V signal to the gate of an N channel mosfet for 1 second every 30 seconds.  The mosfet acted like a switch, and turned on 18V to the solenoid (rated for 12 to 24v).  This pulled down a lever that turned on the unit.  I counted each cycle and output the number of cycles to an LCD display.  The LCD display had a “backpack” on it that utilized I2C protocol, so that I didn’t need to use many digital lines on my Arduino microprocessor to accomplish the display output.  They used this fixture to run 2 complete charge/run-discharge cycles per day for 30 days.  Based on this, they made a few slight changes to the electronics, but concluded that their overall design was sound.

High Voltage



I am interested in high voltage, and how dealing with electricity is different at higher voltages.  However, I wanted to be very careful and very safe in doing these projects, so I started with just trying to produce a spark gap from a flyback transformer.   So I designed a simple 555 timer circuit that would trigger the gate of an N channel power mosfet.  The mosfet was connected to the input of the flyback transformer.  I then used a third hand to hold the HV output (secondary winding) near the ground of the secondary winding.  When energized, this produced a purple/blue spark of about ¼ inch.   I approximated this to be about 6KV based on the breakdown voltage of air (1MegaVolt per meter).   I was discussing why the spark was smaller than I thought it should be, when it occurred to me that the transformer is an inductor, and maybe my clock frequency from the 555 timer was too high.  Inductors don’t pass high frequencies very well.  So I lowered my clock frequency by changing the resistors on my 555, and got a spark that was almost 1 ¼  inches long.  I estimated that to be around 30Kv.
I took this output and created a lightning storm in a light bulb.  I put the HV output to the bottom of the light bulb, and taped a piece of aluminum foil to the back of the bulb and attached the ground to the aluminum foil.  This creates a lightning storm in the bulb.  However, I need to heatsink the mosfet better.  I can’t run the storm for long, as the mosfet gets very hot. 
My next HV project is to design and build a HV plasma arc speaker.  This will be challenging, especially in switching the high currents required and controlling the heat generated so that I don’t damage the circuitry.

LED Tower VU meter




As I was working on my design for a plasma arc speaker, I wanted to give it a little more  visual effects.  I had seen an led VU meter someone had built for their stereo, and decided to build a large one with acrylic lenses and high power LED’s.  I used the previous work I had done on a simple 386 audio amp for use with my iPod, and added an additional digital section, using a 3915 LED bar driver chip.  This chip sinks up to 30mA of current for each LED.  However, the high power LED’s I wanted to use could take up to 70mA of current.  So I used each of the 3915 outputs to drive the base of a PNP transistor, which could handle the 70mA of current for the LED.   I then built a 10 inch high tower of acrylic lenses and glued each LED into the back of each lens.   This setup works really well.
I am now trying to develop a more sophisticated version of this, which includes a microphone and multiple colored or RGB LED’s as a commercial project.   I am doing a provisional design patent, and  I already have a meeting scheduled with a manufacturer who is interested in the project.

Breathalyzer




I was interested in how different sensors worked, and came across a series of gas sensors which were low cost.  I decided to buy the alcohol sensor ($7) and play around with it, by making a breathalyzer.  My breathalyzer is an Arduino microprocessor based unit, using a low cost MQ-3 sensor.   The sensor uses a tin dioxide layer to sense the presence of alcohol in the air, and changes resistance with increasing concentration.    I created a voltage divider with the alcohol sensor and measured the drop in voltage when sensing alcohol, compared to no alcohol.  The most difficult part of this project was calibrating the sensor.   Per the manufacturer’s data sheet, I created an alcohol/water mix of 0.4mg/l and used a load resistor in the voltage divider of 200K.  However, the sensor output also varies with changes in temperature, relative humidity and presence of other gases.   It also seems to vary with the amount of time you blow over the sensor.  To convert this gas concentration to a blood alcohol content (BAC) concentration, I used the conversion value that I found on Wikipedia, of 0.10 mg/L breath alcohol concentration = 0.021g/dL blood alcohol concentration.  My software continually averages the BAC readings and displays the 3 second peak BAC on the LCD display.  Although a good project, I don’t believe this is accurate enough without humidity and temperature compensation to be useful as a BAC monitoring device.

Sunday, September 25, 2011

386 Audio Amp for iPod

I wanted a simple audio amp to play my iPod thru speakers when I am working on electronics.  So I chose the LM386 Audio Amp to build a simple stereo.  Initially, I checked the voltage output from the iPod headphone jack and compared it to the output from my computer.  I used a 2 channel digital oscilloscope to look at the average and peak voltages from different songs.  I noticed that the voltage output of the iPod was just a little more than half the output voltage compared to the computer, or about 100-300mV.  The base 386 is configured as a 20x gain amp, which would result in an output voltage in the 2-6V range.  The speakers I had were 25 ohm, so the power requirements were less than the 0.5W rating of the 386.  I used one 386 each for the left and right channels.  There was slight hum in the speakers, so I added a 100mF capacitor from Vcc to ground to effectively short out the high frequency hum from the power supply.  The sound is pretty good, though it doesn’t have much bass.  Next, I want to see if the 386 chip has enough power to drive higher quality, 8 Ohm speakers.
I shared my design with an electronics design engineer that works with my Dad, and he liked the overall design.  He gave me some tips about avoiding ground loops by placing the return of the speaker as close to pin 4 (ground of the amp) as possible.  Also, he suggested bypassing Vcc to ground right next to the audio amp by placing a 2.2uF tantalum capacitor in parallel with a 0.1uF ceramic cap.

3D Laser Scanning system


As part of a rapid prototyping approach, I wanted to be able to scan objects into a 3D CAD file format, and be able to manipulate them, and produce them on my CNC mill.  I found free scanning software on the internet called DavidSoft.  I then built a precise background for reference.  Using a webcam as the camera and a line laser module that I bought on the internet, I was able to scan in objects.  I also found free mesh software that would allow me to scan the object from several directions, and put them together into a total mesh file.  The first way I did this was handheld, which resulted in somewhat sporatic file quality.  I then designed and built an Arduino microprocessor based scanning system.  I put together a stepper motor and lead screw to smoothly scan the laser, and a stepper motor with platform to precisely turn the object after each scan.  This allowed the files to have much greater image quality, and the total mesh files to closely resemble the actual object.  I am in the process of trying to produce these files as physical objects on my CNC mill.

Electronics Burn-in Fixture


First Wave Technologies, Inc was designing a second generation medical device, and wanted the initial quality to be perfect.  Looking at the data from the launch of the first generation product, most of the initial quality problems were due to electronics failures and connectors.  I designed and built a electronics burn-in fixture to exercise each board continuously for 24 hours.  Electronic failures occur due to premature component failures and thermal cycling, with the most stressful times being startup and shutdown of power.  Boards were put through a functional tester, and then put into this burn-in tester.  The fixture was Arduino based, and would turn on the power to the board, run through initialization, charge the battery, shutdown, and then repeat.  In order to not overcharge the battery, we put in a voltage monitoring circuit based on a voltage divider monitored by the Arduino analog input, and turned on a relay to put a power resistor across the battery when the voltage exceeded a set amount.  When the battery voltage dropped below a lower voltage threshold, the Arduino would open the relay and take the power resistor out of the circuit.  A thermistor monitored battery temperature as well.  The fixture was designed to be scalable and low cost.  We ended up scaling the board burn-in fixture to equal 1 day’s worth of production.  This fixture was a key component of a successful product launch.

Pneumatic Parts Fabricator



 I did this project for First Wave Technologies during the summer.  I was working with the team that was developing generation 2 of their medical device.  In the meantime, they also wanted to do some incremental, fast, low cost improvements to their first generation product.  One of the engineers came up with an idea around using secondary spring forces to increase crushing efficiencies.  We ran designed experiments (DOE’s) and found that his methodology was quite good, and could be optimized.  After optimizing the geometry and materials, I developed a pneumatic parts fabricator that cut silicone rubber square rope to the correct length.  The pneumatic cutter runs at 80 psi, with a electronic timer. I also developed the safety guarding on the machine to ensure no accidents.  The safety guards are hard to see in the pictures because they are made from clear acrylic stock, but they are designed to prevent entry of anything bigger than a pencil into the cutting zone.  The fabricator runs at approx 4000 parts/hour.  I was going to develop a stepper motor driver to automate the feeding of the raw materials, but the machine worked so fast that we completed all the parts in less time than it would have taken me to design and build a stepper-based feeder.   We then found we could use it for other part fabrication, including some parts for increasing strength on strain reliefs for power supplies.

Laser Light Show



This project was a fun personal engineering project, where I created a laser light show using 5mW red and green laser diodes, along with microprocessor controlled spinning mirrors.  I used 5V DC motors and epoxied small round mirrors on the ends of the shafts.  The mirrors needed to be slightly off axis to create different patterns, so I epoxied them on close to perpendicular.  Each of the motors was controlled by a microprocessor, using PWM (pulse width modulation) to change the speed.  I wrote code in C that generated random numbers for each motor and for each delay between cycles of the main control loop.  These random numbers were scaled to a range between off and full speed for each motor, and they generate many different, changing patterns.  I am currently working on re-writing the code to use TouchOSC to be able to control the Laser Light Show over the internet, from my Android phone.  In the TouchOSC rendition, I am setting up software sliders to PWM the motor speed for each of the three motors, and on/off switches for each of the lasers.

Tuesday, July 19, 2011

First Blog

Okay.  Just created the Mad Geek Engineering Blog.  Got to set up Flickr and YouTube accounts to highlight the cool projects