Read my blog with this tag
Follow my feed with this tag
Searching for: embedded
wwvbpy: WWVB timecode generator in python [01311601289]
Side track: wwvb links [01308865139]
Chris asks what advantage GPS has over WWVB for my clock
project. I don't have a good answer for that (except that having enough
controls to select one of 4 mainland US timezones and whether to apply DST
is undesirable). However, this did prompt me to do some googling about WWVB.
I found some interesting links about generating WWVB signals at home.
Towards my GPS LED Light Clock [01308773950]
A few years ago, I made a CCFL light clock using an Arduino with a custom
shield containing a transformer (to get a reliable 60Hz timebase) and a
triac (for solid-state switching of the lamp). By having a simple 7-day alarm calendar (set at compile time), the clock seldom requires interaction except for the reading lamp function.
However, the design has two main problems:
at90usb162 single-sided board [01246277973]
I got an e-mail request for this board. You may use this eagle (4.x) library,
schematic, and board under the GNU GPL version 2 or later, or CC-BY-SA.
qq: quick & dirty terminal [01241487838]
Facepalm of the day [01236908015]
I wrote this code for my red alert box and tested it
using a shorter timeout than 60 seconds--it worked fine with a 10-second
timeout. Just today I realized that the 60s timeout wasn't working; even after
several minutes without communication, the globe was still showing green. The
cause of the bug is left to the reader, but a hint is available if you click
"more inside".
void loop()
{
unsigned long now = millis(); // time since boot in milliseconds
if(Serial.available()) {
level = Serial.read() % 4;
last_message = now;
} else if(now - last_message > 60*1000 && level < 3) {
// if no message received after 60*1000 ms, increase alert level
last_message = now; // well, sorta
level ++;
}
if(level != oldlevel) {
set_led_color(level);
oldlevel = level;
}
delay(50);
}
Red Alert Box [01233419381]
(M)(L)Oh no, vmware crashed again
Every morning I get up too late, and then I think to myself "I'll just check
real quick to see that everything on my home network is running". 45 minutes
later I've browsed all the new lolcats and read a few personal trainwreck posts on askme, and now I'm running really late.
This is the kind of problem we can solve with technology!
Autoreprogram for DFU devices [01223124878]
at90usb162 gotcha: PC0 vs XTAL2 [01223089539]
Xilprg: Zoltan Csizmadia's xilinx jtag programmer [01220321934]
I was thrilled to discover xilprg. Now I can test a new FPGA firmware by just
typing ":make flash" in vim: It successfully programs the xc3s200 fpga and
xcf02s platform flash on the digilentinc.com s3board using their parallel
cable, without requiring proprietary linux kernel modules. Apparently it also
works with the digilentinc USB cable.
Two-element capacitative touch sensor [01219970985]
(M)(L)Touching the sensor
(M)(L)The finger position readout
As a distraction from my real project -- building a lightbulb alarm clock for
the coming winter -- I've been playing with capacitative sensors. My first
effort was a wire taped to a piece of metal foil, and that worked OK. The
present iteration is a two-element touch sensor on a milled circuit board.
The sensors are each about 1" by .5" and are connected to the arduino by a
3-pin header. The components on the board are very simple -- two 1M resistors.
With a combination of software running on the microcontroller and in the PC,
the sensor is made into a virtual slider.
High speed transfers for sump.org logic analyzer [01219362482]
… dual-channel 200Msps boards. keyword software embedded electronics…
The sump.org digital logic analyzer [01216696167]
(M)(L)Triggering on a
glitch (unexpected low time) on channel 5
Ever since Steve Padnos let me borrow his commercial logic analyzer at CNC
Workshop, I've been wishing I had one. Several years ago, fenn alerted me to
minila, which consists of GPL
hardware and software, but there don't seem to (presently) be any pre-built
boards available for purchase, and I don't relish soldering surface-mount
parts.
Then I stumbled on this FPGA Based Logic Analyzer. It's works on the still-available, $100 "S3BOARD", and
the FPGA firmware is GPL. (It also has somewhat more memory than minila, and
can also go up to 200MHz. On the other hand, it doesn't have a mode like
minila's "state analysis", and it transfers over slow RS232 serial instead of
EPP). I got the board today, and have some initial experiences to report.
pincompare.py: compare pin assignments from two Quartus II .qsf files [01184030881]
Recently when developing pluto_step I wanted to make sure I knew the relationship between its pinout
and that of pluto_servo. For that purpose, I wrote this script.
Files currently attached to this page:
pincompare.py1.4kB
Pluto_Servo has landed [01166994496]
Pluto-Servo: EMC2 Servo Controller [01166412010]
Pluto_servo is an emc2 driver
and associated firmware that allow the Pluto-P board to be used to control a
servo-based CNC machine. The Pluto-P is an inexpensive ($60)
FPGA board featuring the ACEX1K chip from Altera. Pluto_servo will be released
under the terms of the GNU General Public License version 2. The pluto_servo
system is suitable for control of a 4-axis CNC mill, a 3-axis mill with PWM
spindle control, a lathe with spindle encoder, etc.
Do not buy: PCI-8255 [01165433819]
Pluto_servo progress: It's running cradek's lathe! [01165199941]
Chris is "successfully" running his lathe with a firmware. I used the
scare quotes because there have been a few problems, not all of which have been
resolved. But he reports that he was able to get better tuning, quieter moves,
and of course higher resolution without the /16 quadrature divider.
More on the pluto-p (including FPGA pin numbers for the "JTAG" connector [01165081407]
There are a lot of questions about the pluto-p that are left
unanswered by the website and the "getting started" document to which you're
given a link to after you order. I've tried to answer them for myself,
and now I'm sharing those answers with my readers. The most important thing
I report here is the ACEX pin numbers for the JTAG connector.
Software Uploader for Pluto-P board [01164408418]
I just got a "Pluto-P" board from http://fpga4fun.com. I have
wanted to learn about FPGAs for some time, and my project ideas include making
a HAL module for the "flashy" digital oscilloscope. Later, I hope to
investigate hardware quadrature counting and/or step generation, a sort of
hobbyist-level alternative to Jon Elson's fine boards.
Update: The HAL driver for this board has been included in emc since version 2.2
1MHz+ Quadrature Divider for attiny13 [projects/01149348342]
Quadrature divider board. Actual size: .7x.4 inches (about 18x10mm)
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.
400kHz Triple quadrature divider for atmega8 and quadrature state table generator [projects/01149271333]
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. Update, 2007/01/04: Want true high-resolution PWM
and multi-MHz quadrature counting with emc2, for under $100? Try this!
Creating a Quadrature Divider: What Won't Work [projects/01149094674]
A proposed quadrature divider circuit, and a
waveform that it will treat incorrectly
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.
ET-ARM Stamp [projects/01141702410]
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:
4-axis half-stepping translator in AVR [projects/01129403515]
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.