Search results

Read my blog with this tag
Follow my feed with this tag

Searching for: embedded

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.

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:

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.

400kHz Triple quadrature divider for atmega8 and quadrature state table generator [projects/01149271333]

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 "", 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.

Software Uploader for Pluto-P board [01164408418]
I just got a "Pluto-P" board from 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

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.

Pluto_servo progress: It's running cradek's lathe! [01165199941]
Note, 6/2014: I do not recommend choosing pluto hardware for any new projects. 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.

Do not buy: PCI-8255 [01165433819]

Pluto-Servo: EMC2 Servo Controller [01166412010]
Note, 6/2014: I do not recommend choosing pluto hardware for any new projects. 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.

Pluto_Servo has landed [01166994496] 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

The 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.

High speed transfers for logic analyzer [01219362482]
… dual-channel 200Msps boards. keyword software embedded electronics…

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.

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 s3board using their parallel cable, without requiring proprietary linux kernel modules. Apparently it also works with the digilentinc USB cable.

at90usb162 gotcha: PC0 vs XTAL2 [01223089539]

Autoreprogram for DFU devices [01223124878]

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!

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 = % 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); }

qq: quick & dirty terminal [01241487838]

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.

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:

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.

wwvbpy: WWVB timecode generator in python [01311601289]

Helpful Scripts for CircuitPython & Real Time Clocks (RTCs) [01594912346]
I have used two different RTCs in the Feather form factor. One has the PCF8523, and the other has the DS3231. The former has an SD card slot while the latter has higher precision including a temperature-compensated crystal oscillator.

Calibrating the DS3231 and PCF8523 RTCs [01594923755]
The DS3231 and PCF8523 real time clocks (RTCs) can both be calibrated by writing various register values. To follow the calibration procedures you'll need a frequency counter you trust, with at least 6 digits to calibrate the PCF8523 and 7 digits to calibrate the DS3231. (It also has to operate at the comparatively low frequency of 32.768kHz; a common inexpensive 8-digit frequency counter such as the "SANJIAN STUDIO" has a minimum of 100kHz so it's not usable for this purpose) I use an old HP 5315B universal counter that has been calibrated against GPS time.

Minimal Time-Zone Handling for CircuitPython [01595021837]
For my clock, I want automatic handling of Daylight Saving Time. However, CircuitPython doesn't build in any distinction between local and UTC time, and fitting in the entire Python3 datetime module or an Olson time zone database is simply not going to happen. What can we do that is simple enough to fit, but can represent the reality of timezones where I live?

Quad CharliePlex FeatherWing hack [01595078470]
Adafruit makes these neat "CharlieWing" displays that allow you to control a 15x7 LED matrix using the I2C bus. I2C uses two signal wires (called SDA and SCL, for Serial DAta and Serial CLock), and can connect multiple devices as long as they have different addresses. I noticed that the bigger brother of this device, with a whopping 144 LEDs, could be configured for 4 different I2C addresses, while this one could only be configured for 2. Or could it?

Si5351 Frequency Planner in Python [01597601150]

Some notes on the Si5351a [01597715716]

Pi Zero W USB Proxy [01599489100]

Use printf() in Arduino programs [01635628323]
… way to set up an embedded software project that's not to different from C(++)? I have…

Didn't find what you wanted?


Website Copyright © 2004-2024 Jeff Epler