kwartzlab makerspace

Archive for the ‘Projects’ Category

Oct
3
2012

Update on the LPKF board mill

By » 2 Comments

Over the past few months, Richard and myself have been trying to get the LPKF PC board mill working. The past few weeks we have been joined by Tennessee, who has been invaluable in homing in on the problems. We’ve been doing this on a weekly basis at pretty much every TON since the start of the summer.

At last report we had the main board in the mill working properly, allowing XY motion, head lift/lower, and chuck open/close. Getting the mill to this stage required replacing a shorted capacitor in the 5-volt power supply.

However, the so-called HF board which controls the spindle drive and tool crib is still non-responsive. It was not clear originally if this board was defective or whether a problem in the main board was impeding communications between the boards.

In August, Chris Ware from LPKF came to have a look, and determined that the problem was in the HF board, and later provided a price quote in the order of $650 for a board (with trade-in), shipping and taxes extra. Not having that kind of pocket change we persevered in diagnosing the problem.

One week we convinced ourselves that the communications were fine (both ends of the board-to-board connection use RS232 driver chips, which are pretty resilient).

Another week we determined that the “overload” light on the HF board was due to a power-up transient not being reset by the firmware, which in turn implied something else was getting the firmware upset.

Another week we determined that the processor was not even running (or, at least, not doing any program ROM accesses).

Another week we determined that the processor RESET line was being held low; it should normally hold low for 10-20ms on power up, then go high allowing the processor to run.

The next week a closer examination revealed that the RESET pin was not making contact in the IC socket anyway. Somehow the pin in the socket had been pushed back and was not springing out to contact the terminal on the IC. However, inserting a small wire to make full contact made no difference.

The RESET pin is driven by a very simple circuit: It is grounded through a capacitor, so on power-up the pin starts off at ground. The processor chip has an internal pull-up current source on the pin which charges the capacitor towards +5V. Once the capacitor is charged enough, the Schmidt-trigger input tied to the pin senses the end of the Reset state and starts the processor running. At least, that’s how it is supposed to work. In our case, the pin was being held stubbornly at about 35mV (when a wire was used to make the socket pin contact the IC pin). Using an external resistor to +5V to try to pull it up only raised the voltage by a few mV, which implied that there was (somewhere) about 20Ω to ground on the pin. On the other hand the external capacitor checked out fine.

This week, given that the socket was clearly defective and the processor condition was unknown, we pulled the processor from its socket and removed the socket from the board. The board (a fibreglass one) suffered some delamination in the process but all the vias are still fine. Cleaning up the solder holes in the board was a bit comical: we had Tennessee with the soldering iron, Richard holding the board, and me holding a vacuum cleaner nozzle to the back of the board, to suck all the holes clear of solder to allow a new socket to be inserted. It worked like a charm (and the vacuum nozzle was grounded metal so no worries about static discharge damaging the board).

three people, a vacuum cleaner, and a soldering iron to clean holes on a PCB

Richard is holding the edge of the board (and the camera), I’ve got the vacuum cleaner hose under the board, and Tennessee is holding the corner of the board and wielding the soldering iron. It looks really awkward but was very effective at clearing out the solder from the holes in the PCB.

For next week I will have a new socket so we can see if this magically fixes the problem; if not we will have to try replacing the processor. Fortunately they are still available as NOS from Hong Kong, and they contain no ROM so we don’t have to worry about programming them.

Sep
10
2012

Raspberry Pi Jam and Laser Cut Case

By » 5 Comments

Come out to the Raspberry Pi Jam on Saturday Sept. 15, 2012 at 4pm and laser cut a case.  Show off what your Raspberry Pi can do. Make a case with our laser cutter. Learn how to write code for it and much more! Open to all.

Jun
29
2012

Arduino Car

By » 3 Comments

Hacked RC Car

My goal in this is to learn about motor drivers, distance sensors, and have a platform that I can use for experimentation.

To that end, I preformed a frontal lobotomy on a remote control hummer. The car was originally around $20, so even if it went up in flames I wouldn’t be out that much (initialy).

The first step was to take the outer body off. Then snip snip the brains are out. The mechanics of the car seem to be really well designed, the electronics not so much.
Next is upgrading the battery to a lithium-ion battery instead of the double A’s. I’ve done this with other projects. I use the VPX’s which are a 7 volt battery used in home power tools. They are no longer in production, so I snarfed up the last available from Home Depot. They are great because I’ve got a charger made for them, they are relativily small, and they don’t put out enough voltage to make me want to wear rubber gloves.

The next step was put in a motor controller, as well as an arduino. Both were bought from solarbotics. The motor contoller (a fun little project in itself) is mounted above the battery, and the arduino above that. The motor controller has LEDs that show the direction of the motor and when the motor is turning, and the motor controller can control two motors, so 4 lights in total. These got attached to the outer body.

The next thing added is a distance sensor. This is the first sensor added and where the software starts. My first project with my new platform was to make it stay a certain distance from whatever is in front of it. Through experimentation, I’ve found that I need to have a delay in the loop, otherwise the poor thing just sits there nervously shaking, decisions happening faster then it can react. I then tried from memory adding PID code, which gave it a rather agressive stance. It would run at an object, slow down, then back away from the object, over and over. I believe that I’m getting closer. wikipedia has some psudocode for PID controller

previous_error = setpoint - process_feedback
integral = 0
start:
  wait(dt)
  error = setpoint - process_feedback
  integral = integral + (error*dt)
  derivative = (error - previous_error)/dt
  output = (Kp*error) + (Ki*integral) + (Kd*derivative)
  previous_error = error
  goto start

That i’m going to try soon.

One problem that I noticed was that the usb connected to the Arduino was affecting the readings, so I could get things nicely tuned on a stand with the Arduino attached, but as soon as I disconnected the PC and ran strictly off battery power, the settings changed.

To that end I’ve added a bluetooth addapter. I’m excited about this, because I realized that I can do some major cpu programming on my laptop and the little Arduino only has to handle the I/O. I’d like the whole thing to be autonomous, but for now this is good. Maybe my next one will lug around a laptop.

The blue tooth adapter works fine on the Arduino, but getting the laptop to talk to it ended up being rather difficult. Finally got a device to work at /dev/rfcomm0 and if I cat’d that device I’d get all the data that the Arduino was spewing out. (Distance measurments and so on).

A trick I discovered the hard way is programming the Arduino can’t be done while the Bluetooth is online. Another switch to come for easy Bluetooth disconnect.

At this point, the RC Car has:

  • a front motor removed, (it was 4 wheel drive) because the motor was too flaky.
  • 1 distance sensors
  • 2 light sensors on the bottom, (line following fun to come)
  • 1 motor controller (for 2 motors)
  • 1 arduino
  • 1 bluetooth RC module
  • I’ll do more updates as I progress.

    May
    27
    2012

    Project: Wooden Table

    By » 1 Comment

    I managed to complete a table I’ve been working on for a number of months, and has been in and out of the Heavy Lab.

    I found an Ikea Molger frame in the As-Is section (my favourite haunt!), and thought it would make a good base for a table.  So, I procured two planks of wood (walnut I think?) from the annual Woodworking Show at Bingeman’s.  I think glued them together, added dowelled wooden gussets underneath to ensure a strong bond, then planed down the top until it was smooth.  Planing was the most repetitive step, and it was fortunate that the ‘Lab had enough space to hold the tabletop until it was completely levelled.  I connected the tabletop to the frame with dowels running through the four posts, then varnished the top.

    After all was said and done, it was still rather wobbly.  To strengthen it up, I got eight shiny turnbuckles, and attached them domed screws and nuts to both sides of every post.  The great thing with turnbuckles is that you can control the tension that they have on the legs by just turning them, so I tightened them until I had a much more rigid frame.

    I’m not sure quite what to do with the table yet, but it’s doing a great job holding mail in our front room right now…

     

    Mar
    16
    2012

    Laser cut Police Box (aka TARDIS)

    By » 4 Comments

    Working on a 1/12 scale Police Box for my kids since they started playing Doctor Who (no really, honest.)

    Based on pictures of the 50′s era Police Box, but lots of liberties taken to make it easy to laser cut. First version was 1/8 scale to make it easier to figure out the cuts.

    Laser cut from 3mm hardboard and assembled with a bit of glue, but mostly it press-fits together.

    Sep
    15
    2011

    Hacky Hallowe’en!

    By » 3 Comments

    Tonight we landed a $1000 grant from the appropriately-named KW Awesome Foundation to launch an event we’re calling “Hacky Hallowe’en”*.

    The plan is to teach two fundamental and essential skills that are sadly neglected in our education system.

    1. Pumpkin carving
    2. Soldering

    Did you know that many children reach adulthood today without ever having learned how to carve a pumpkin? We’ll provide a safe, supervised environment in which children 8 and over can learn this crucial skill, under the guidance of expert pumpkin carver and friend of the Lab, Jeff Schmidt.

    Rather than simply outfitting the carved pumpkin with an old fashioned, dangerous and–dare I say–obsolete candle, Hacky Hallowe’en’s participants will then move onto building an electronic device that will flicker with beautiful LED light.

    Soldering, of course, is foundational to Kwartzlab’s DNA. We’ve held several Learn to Solder workshops in the past and have been itching to do it again. This way, we can take out skills out to the community and instruct many more people than we can accommodate in the Lab.

    Hacky Prototype Hacky Prototype all lit up


    Read the rest of this entry »

    Aug
    9
    2011

    Creating 3 dimensional objects on a Taig mill with a Rotary Axis

    By

    In my last blog I detailed the conversion of a manual rotary axis into a CNC rotary axis. I finally got some time to mount the rotary axis on the mill, configure the stepper in Mach3 and run it through some tests. The parameter for the g-code command to position the rotary axis is a positive or negative number ranging from 0 to 360 degrees. Positive numbers rotate clockwise and negative numbers rotate counter clockwise.
    I started by creating a 3 dimensional object using Solidworks and designed a projectile that will eventually be milled in metal for a coil gun project that I’m working on. I decided to do the cut in wood since this was the first project using the rotary axis and I wasn’t sure how it would work out.


    Read the rest of this entry »

    Jun
    11
    2011

    Arduino-Compatible Multi-Threading Library v0.5 Released

    By

    It’s been a while since I’ve touched this project, but I’ve decided to re-visit the multi-threading library I wrote for the Arduino (largely because of the amount of consistent traffic those particular blog posts have generated… it’s satisfying to know that someone other than me seems to appreciate my work). Although, I’ve made some minor edits to the internals of the Thread class, the most important update has been the addition of the EventHandler class. As it’s name would suggest, it provides the framework for basic event-handling.


    Read the rest of this entry »

    Apr
    23
    2011

    Etching PCBs without Ferric Chloride

    By » 4 Comments

    I came across this tutorial a while ago detailing how to etch PCBs using common household chemicals instead of ferric chloride. Being a lazy person who doesn’t want to drive out to Sayal (in Cambridge) to get ferric chloride, I decided to give it a shot and take pictures documenting the attempt. Here’s the result:

    Read the rest of this entry »

    Mar
    5
    2011

    Homebrew Arduino 0-10v Shield

    By » 5 Comments

    One of the things I’ve wanted to learn to do since joining the lab has been designing my own printed circuit boards. Also, having worked with the Arduino for a little while, one of the things I’ve found it lacks is support for 0-10v analog outputs. In fact, it really lacks any analog outputs at all; the closest it has are six 5v pulse width modulation outputs, which I find less useful than a proper analog output. The logical solution to both of these dilemas was to design my own shield which would allow the PWM outputs to be converted to 0-10v.


    Read the rest of this entry »