Posts

Veroduino Mk 2

Image
I'm making good progress on my MicroWriter clone. I decided to start by building Mk 2 of my Veroduino . Mk 2 is more compact, and the green LED is connected to pin 13 by a jumper; one of my keyboard circuits needed to use pin 13 as an input, and the LED would have interfered with proper operation. Mk 2 uses as resonator rather than a crystal; it also corrects a defect in the Mk 1 design, which tied the analog reference voltage pin ( Aref ) to Vcc . Aref is not normally connected; if it is, it should linked to ground by a small capacitor, but that's only recommended if you are doing very precise analog measurements. I've corrected the schematic .

Microwriter revisited

Image
I'm taking a break from Test Equipment, and resuming a project that has been on hold for a couple of years. It's a home brewed compact one-hand chorded keyboard inspired by the Microwriter . I started the project using an Atmel ATMega8 hosted on SimmStick hardware. My tools for software development were primitive. WinAVR was still in its infancy, so like most Atmel developers I used AVR Studio and programmed in assembler or programmed in BASIC using Bascom from MCS Electronics. I decided to use I2C to connect the micro controller to the keypad and LCD display. Driving I2C in assembler was a pain, and writing the keyboard handling in Basic was positively soul-destroying. I decided to wait until technology had improved enough to make the project enjoyable. Fast forward two years. The Arduino offers an affordable hardware platform and an easy-to-use IDE. The main challenge is the keyboard itself; I'm going to experiment with QTC pills which look perfect for this sort...

Arduino I2C Data Logging Board

Image
I'm making great progress with my family of I2C™-based Test Equipment. This data logger is one of the smallest, cheapest and simplest boards so far. It uses a 247C256 eeprom memory which has an I2C interface. This gives 32k bytes of external memory. The chip is widely available for £1 or so. This picture includes a five-pence piece to give some impression of the scale. If you're logging something like sunlight or wind speed, 32k bytes allows you to log an 8-bit value every minute for over 22 days. A small design change would add more memory; the chip has eight possible addresses, so a board can contain eight of these chips, storing a total of 256k bytes. Other chips offer even greater memory capacity. The back of the strip board has just 3 breaks, with pins 1-4 of the chip strapped to ground. That sets the configurable part of the chip's I2C address to 0. You can drive the board with the Arduino's Wire library, and there is a sketch using this chip in the...

Arduino as an ISP

Image
Yesterday, while experimenting with my Veroduino board, I managed to destroy its boot loader. Annoying, but not a show-stopper; I'd recently built the USBTinyISP from Adafruit, and felt sure I could quickly restore the corrupt boot loader. Revenge of Windows 7 Not that simple, alas. I attached my USBTiny to my Windows laptop. It runs Windows 7, which refuses to load unsigned drivers without some fairly vigorous persuasion. Even when persuaded, it would not load the driver for the USBTiny. I think the driver may not not compatible with my laptop's 64-bit AMD processor. After an hour of  unsuccessful experimentation I decided to try something else. My next two attempts also failed. I can drive the USBTiny using avrdude on one of my Linux servers, but I can't install the latest Arduino IDE on that machine. The server is is running Ubuntu Hardy Heron, and I can't upgrade it easily. Its main job is to act as VMware host to a bevy of virtual servers, and VMware server...

Arduino DVM with LCD Display

Image
A Digital Voltmeter (DVM) is one of the first things you need if you're building electronics projects. Most of us have one. But what if you need more than one? Enter the Arduino. If you have an Arduino that can drive an LCD, you've got a multi-channel voltmeter! #include <lcdi2c.h> #include <wire.h> int ADDR = 0x21; LCDI2C lcd = LCDI2C(ADDR); float volts[4] = {0.0}; int pin; void setup() { Wire.begin(); lcd.init(); lcd.print("4-ch Arduino DVM"); } void loop() { lcd.cursorTo(2,0); for (pin = 0; pin < 4; pin++) { volts[pin] = (5.0 * analogRead(pin)) / 1023; lcd.print(volts[pin], 1); lcd.print(" "); delay(10); } } The sketch above turns an Arduino with an I2C LCD display into a four-channel voltmeter. The Atmel ATMega328 on which the Arduino is based has six analog inputs but two of them are used by the chip's I2C support. That leaves four channels - plenty for most purposes. The sketch uses my LCD I2C library; I...

An Excellent Eagle Course

Image
I spent this Saturday at a free CadSoft Eagle course for Arduino users which had been organised by Tinker London and Farnell's Element14 . Over twenty of us crammed into a well-equipped course room at the Cavendish Conference Centre. The main presenter was Tinker's Peter Knight. Alexandra Deschamps - Sonsino (the CEO and co-founder of Tinker) explained that when she first asked Peter to run the course he said he could cover the subject in three weeks. Somehow he managed to cover the essentials in just a few hours! Peter was supported by Lynn Ma, Mei Wang and Alistair Winning from Farnell , and by Richard Hammerl from CadSoft . Richard knows Eagle inside-out; he's an active member of the Eagle forum on Element14, so I know I'll get a fast and helpful response to any queries I have about using the software. Everyone had done their homework and arrived with the latest version of Eagle on their laptops. In the morning Peter covered creating a schematic and layi...

I2C LCD board

Image
In the previous post I mentioned that most of the boards I'm working on use I2C™ port expanders. The latest is an LCD driver which uses a Phillips PCF8574 I2C 8-bit expander to drive a 2x16 character LCD. The only Arduino pins used by the display are pins 27/28; they can be used to drive other I2C boards as well. The Arduino software to drive the LCD is very simple. Here's the code used for the picture above: #include &lt:lcdi2c.h> #include <wire.h> int ADDR = 0x21; LCDI2C lcd = LCDI2C(ADDR); void setup() { Wire.begin(); lcd.init(); lcd.print("test"); } void loop() { lcd.cursorTo(2,0); lcd.print("time:"); lcd.cursorTo(2,6); // print the number of seconds since reset: lcd.print(millis()/1000); }