In life and embedded systems timing is everything. Give [Frank's] web-based timer calculator a try. Set your system clock resolution (in hertz making sure you account for any system clock divider), select your timer resolution and prescaler, then calculate based on desired ticks, overflows, or real time. He’s built this with the AVR chips in mind but it should be handy for any family of microcontrollers.
Of course none of this is rocket science, but if you’re trying to use one timer for two differently synchronized events this can save you a lot of trial and error time.
Tool Tip: microcontroller timer calculator
AVR Dragon wiring alternative
We love our AVR Dragon programmer. It is a small board with a lot of functionality: in-circuit serial programming, JTAG, debug wire, and high voltage serial programming. Unfortunately, out of the box it is not quite ready for action. The Dragon ships with an unpopulated prototyping area and missing a pin header for the HVSP. For most people this means soldering on pin headers and a ZIF socket then jumpering between the various programming headers and the header for the socket. Tired of working with jumper wires, [Jussi] designed a small PCB to make the connections (original link in…
Universal credit card in the palm of your hand
Do you remember the magnetic card spoofer in Terminator 2? It was a bit farfetched because apparently the device could be swiped through a reader and magically come up with working account numbers and pin numbers. We’re getting close to that kind of magic with [Jaroslaw's] card spoofer that is button-programmable.
Building off of a project that allows spoofing via an iPod and electromagnet, [Jaroslaw] wanted something that doesn’t require a computer to put together the card code. He accomplished this by interfacing a 20-button keyboard and a character LCD with an AVR ATmega168 microcontroller. Card codes can be…
Web controlled Dark Crystal
[Reza] sent in his mood rock. Unlike other “mood” devices, instead of showing what mood you’re in, it shows what mood the internets are in. Two ShiftBrite modules are controlled by an AVR ATmega8 which then connects to a computer via USB. The assembly is placed inside of a piece of alabaster.
USB communications are controlled by the ATmega8 running V-USB (formerly AVR-USB) firmware. [Reza] wrote some code to control the colors from the web using Perl and AJAX. Head over to the web interface to set the colors yourself. We’d love it if a live webcam was added…
EDuino – Arduino or AVR breakout?
We’ve had a lot of requests in the comments for more Arduino centered posts so we were happy when [Njay] told us about his EDuino board. This is a minimal Arduino clone that has a crystal and it’s capacitors, a pull-up resistor and button on the reset pin, and a detachable serial programming connection. He also has a breadboard-friendly version seen above with all the interface pins on one side of the board. This is certainly a useful project and we’re glad to see the board files available for download. This does get us thinking… is this an Arduino,…
Touch sensitive keypad
[Viacheslav] built a keypad that uses human capacitance to detect key presses. Unlike normal keys which close a physical connection, his project detects touch through the PCB substrate. He uses the ADC capabilities of an AVR ATmega8 to measure a change in capacitor charges for each sensor in the keypad.
He’s posted the schematic, Eagle files, and source code with his writeup. He also points to a document on the theory behind this: QMatrix Technology White Paper (PDF). We’re impressed at how simple the circuit is: a microcontroller, capacitors, resistors, and a homemade PCB.
Software pulse width modulation
Pulse Width Modulation is a topic that tends to give a lot of beginners trouble. [Daqq], whose nixie plasma ball we covered a few days ago, has a simple but effective PWM project that you should take a look at. The circuit used 9 LEDs clustered together into 3 sets of RGB modules and connected them to an AVR ATtiny2313 through some current limiting resistors. Most of the time the PWM function of the AVR’s timers would be used to generate the signal but this application calls for 9 signals which is more than can be produced by this…
Arduino command interpreter shell
A lot of people like fancy GUIs and nice graphics, but some of us just feel more at home in a command prompt. [nevdull] is one of those people. Instead of just using the Arduino dev tools that are available for download, he wanted the ability to shell into his Arduino, so he created AVR Shell. AVR Shell is a UNIX-like shell that allows you to “log in” to your Arduino/AVR and see what’s really going on; letting you read registers, scale the CPU speed, create/edit/delete variables, and even set up timers. The shell is even user-customizable! Those of…
Controlling an R/C car with a pic16F84
[GuySoft] sent in this project. He doesn’t normally mess with electronics, but decided to give it a try. He chose a fairly complicated project to be his first, but seems extremely comfortable with it. This project was to control his R/C car with a pic16f84. That chip was chosen simply because it was the only one available at local stores. Though we’ve seen much more complicated projects in the past, he does a great job of showing exactly what has been done. He shares his thoughts and source code with us as well. He has express a little frustration…
AVR controlled Rubik’s cube solver
[Andrius] just sent in his robot Rubik’s cube solver. It isn’t as fast as the solver we saw last year but it also doesn’t require as many parts either. This project utilizes two claws, each actuated by just two servo motors. The thinking is done by a PC which calculates the necessary moves to solve the cube. Each instruction is then passed via USB to the AVR ATmega16 microcontroller that is responsible for the servo operation.
Right now it looks like the colors for each starting face have to be entered manually before a solution is calculated. We think…
Tiny light-seeking robots
[Alex] continues to delight us with his projects. His third-generation tiny Braitenberg vehicle, a light seeking robot, is a big improvement over its predecessor, the mini Braitenberg vehicle. He’s moved from an Arduino based design to using the AVR ATtiny25v, replaced the breadboard with a PCB, and reduced the parts count. We think it was a great idea to use shrink tubing to shield the back of the photo-resistors from ambient light. Don’t miss the video of these little guys chasing a flashlight beam after the break.
Interfacing a digital rotary switch
[hw640] has put together a well written and detail packed explanation of how to interface with a digital rotary switch. These digital opto encoders have just two outputs with four possible logic levels (00, 10, 11, 01). The relative position of the switch is insignificant but the direction of rotation is what matters.
The short and dirty: Each of the switch’s 2 output pins is attached to a pin change interrupt on the microcontroller. Every time the switch moves it generates either a rising edge or a falling edge on one of the two pins; both edges cause an…