Projects

Here are a few of the hardware projects I've been working on in my spare time:

3 June 2006, 15:25 UTC

1MHz+ Quadrature Divider for attiny13


This untested code, along with an Eagle schematic and board layout, are for a quadrature divider that polls at over 1MHz. The R and S test points are used to program the device.

Like the 400kHz triple divider, this program uses a state table generated by "mkstate.py", and is GPL software.

For real-world use, external pull-ups should probably be added to the board's input side, according to the directions of the encoder manufacturer.

read more…

2 June 2006, 18:02 UTC

400kHz Triple quadrature divider for atmega8 and quadrature state table generator


summary I promised a single, 800kHz quadrature divider for the attiny13. Well, I haven't done that yet (I don't have any attiny13s to test on anyway), but I have something else instead.

As I mentioned earlier, Chris had already milled a servo control board for his lathe. Like the Etch Servo board, it controls two servo motors with a single L298 chip. Unlike the Etch Servo, it has 3 encoder inputs (X, Z, and spindle). His servo motors have 500-line encoders and have a no-load speed of about 4000 RPM, while the spindle will have a 1024-line encoder with index pulse, but rotate slower (much less than 2000RPM when threading). 133kHz is too fast to count in the PC, but divided by 8 or 16 it's very managable.

mkstate.py is a Python program which generates a quadrature divider table. By changing 'N', 'M', 'x' and 'ux', it's possible to generate tables with different properties. After generating the table, a variety of tests are performed on it to verify that it is correct. Output can be a "C" array or a table of bytes for an assembler program.

qq2.S is a GNU assembler program that actually performs the quadrature division. According to my cycle counting, it polls at 470kHz when a 16MHz crystal is used, so it is expected to work reliably with a 133kHz quadrature signal. So far, though, it has been tested with a single motor spinning at hundreds of RPM.

mkstate.py and qq2.S are released as free software under the terms of the GNU GPL.

Traceback (most recent call last):
  File "/home/jepler/emergent.unpythonic.net/index.cgi", line 766, in markup
    text = getattr(this_module, 'markup_'+command)(text, meta, **thing_context)
  File "/home/jepler/emergent.unpythonic.net/index.cgi-data/_lib/local_code.py", line 414, in markup_showfiles
    string.join(file_list, u'') +
AttributeError: module 'string' has no attribute 'join'

[permalink]

31 May 2006, 16:57 UTC

Creating a Quadrature Divider: What Won't Work


As an improvement to the simplest possible closed-loop servo system, I've been trying to design a circuit that will function as a quadrature divider: the input and output are both quadrature waveforms with the same direction, but the output waveform is 1/8 or 1/16 as fast as the input.

Because emc2's encoder module poops out somewhere around 20 microsecond polling intervals, an external divider is the only way to get accurate feedback from a fast servo motor with a high-resolution encoder. Division by 16 lets the PC see a 25kHz quadrature signal instead of a 400kHz one. For Chris's lathe retrofit, the target speed is actually around 125kHz (1250 mm/min, 1mm/rev leadscrew, 3:1 pulley, 500 line/rev encoder), but to keep it from being too easy, he's going to do 3 such decoders on a single 16MHz atmega.

Many people seem to hit on the idea of using an up/down counter to process a quadrature input. Chris and I managed to convince a couple of bright guys on the #emc channel that this would work to create a quadrature divider circuit. Well, it doesn't.

read more…

22 May 2006, 13:13 UTC

Two-axis servo schematic and board


I didn't originally include the eagle-format schematic and board for this project. Well, here it is.

read more…

14 March 2006, 14:50 UTC

Parallel-port Two-axis PWM servo controller for Etch CNC


Inspired by discussion on #emc and by the fact that I'd already bought two tiny servo motors, I've designed and built a two-axis PWM servo controller with a parallel port interface.

read more…

7 March 2006, 3:33 UTC

ET-ARM Stamp


I recently got an ET-ARM Stamp (a very wide DIP-format board with an ARM microcontroller on board). I haven't done anything exciting with it yet, but I will as soon as I can think of something! Some notes about the thing:

read more…

17 December 2005, 15:53 UTC

SOIC-8 to DIP adapter board


This little board is an adapter from SOIC-8 to .6"-spacing DIP. It allows a surface-mount or thru-hole decoupling capacitor to be placed on the board as well. I'll be using this to breadboard a flash trigger circuit. The op-amp I chose is in a surface-mount package.

The board very cleanly milled. Two areas needing just a bit of additional cleanup are visible at the bottom, and that was solved with nothing more than the tip of the fingernail. To give a sense of scale, the board is about .4x.75 inches overall (10x19mm), with the holes being .1" (2.54mm) apart.

I took the photo with my new macro lens. I used a combination of back-lighting and the camera's built-in flash. The photo is hand-held with an exposure time of 1/125s (ISO 100, f/8.0), and postprocessed with gimp's perspective tool.

Traceback (most recent call last):
  File "/home/jepler/emergent.unpythonic.net/index.cgi", line 766, in markup
    text = getattr(this_module, 'markup_'+command)(text, meta, **thing_context)
  File "/home/jepler/emergent.unpythonic.net/index.cgi-data/_lib/local_code.py", line 414, in markup_showfiles
    string.join(file_list, u'') +
AttributeError: module 'string' has no attribute 'join'

[permalink]

15 October 2005, 19:11 UTC

4-axis half-stepping translator in AVR


Chris started with a MAXNC 10 open-loop machine. The included driver boxes (which we came to understand were complete crap) use one pin per winding. This requires two parallel ports for 4 axes. So, a year or so ago, before he switched to L297/8-based boards, I helped Chris design an avr-based translator from step+direction pulses to the individual winding activation signals. Today I'm posting the program, which I compiled with avr-gcc. In the future I might post the board, which was a double sided design created in eagle.

read more…

26 May 2005, 0:36 UTC

XY display update


New CRT, new board, same software...

read more…

3 April 2005, 20:19 UTC

Regulated LED flashlight -- update


It was a bust. The button cell I selected just can't supply the required current. When I hooked up a pair of AA batteries, it worked well.

Later, when I tried to substitute a 1F capacitor (thinking "tiny *rechargable* regulated LED flashlight) I screwed up and either damaged the tiny SMD button or bridged some pads under it, because now it is stuck "on". Oh, and it doesn't run long from the capacitor anyway.

I still like the idea, but I need a different power source. Oh well.

[permalink]

29 March 2005, 23:57 UTC

TI serial-interface DAC

25 March 2005, 15:23 UTC

Regulated LED flashlight

19 March 2005, 17:55 UTC

Another constant-current circuit

All older entries

Stippler: Glowing displays from digital images

Etch CNC: Computer-controlled etch-a-sketch


Website Copyright © 2004-2024 Jeff Epler