arduino

You are currently browsing articles tagged arduino.

I finally got around to posting an updated version of the C328R camera library. The new version is a minor update that now adds checksums to ensure no data is corrupted when transferring JPEGs from the camera. I’ve never encountered any data corruption in the past with this camera, and thus never added the feature, but it’s definitely a welcome addition. The update is courtesy of a patch submitted by John Jarvis, as featured in his very nice geotagger project. Thanks John!

Tags: , ,

I have this peculiar fascination with obsolete display technologies like nixies and numitrons; they emanate a warm, inviting glow, they have a bit of heft, you can physically see how they work, and they’re nicely encased in glass. It’s little wonder, then, that my first “real” electronics project was a nixie clock. Nixies are fantastic eye candy, but they are also somewhat of a hassle to work with because they require a high-voltage power supply (180V) and something like the long-outdated TTL “power pig” 74141 to drive their respective cathodes. Recently, however, I got a hold of a bunch of Russian IV-9 “Numitrons” for additional, cheaper, clock projects — an easier-to-use display technology that doubles as a nice Nixie alternative. I use “Numitron” in quotes because the word Numitron is originally a trademarked name of RCA, the originator of Numitron technology (circa 1970), and what I have are cheap Russian knock-offs of the real thing. (Real RCA Numitrons currently cost about $10 a piece on eBay, whereas the IV-9 can be purchased in bulk for less than $1 per unit.)

If you’re at all familiar with common anode 7-segment LED displays, then working with like a Numitron shouldn’t prove too difficult. In fact, the procedure is pretty much the same — just substitute each individual LED in a 7-segment LED with a glowing filament (like an incandescent bulb) and you have a Numitron. And because they use a glowing filament, unlike LEDs, Numitrons do not require a current-limiting resistor on each cathode.

I read — somewhere — that the recommended max voltage for IV-9s is 4.2V. Standard Arduinos run at 5V, but a simple 1N4001 diode in series with the Numitron anode gives the exact 0.8V drop needed to achieve 4.2V.

In the video above I use an Allegro A6278 serial-parallel LED driver to drive each of the individual cathodes. Shift registers like these are a great way to conserve I/O pins on the Arduino (I always give out A6278s at my “Intro to Arduino” workshops) and they are not at all difficult to use, even for the beginner. This tutorial, which uses the popular 74HC595 will get you up and running with shift registers if you’ve never used them before. (Pay particular attention to the shiftOut() function provided in the code samples.) The A6278 works almost identically to the 74HC595, with the exception of an REXT pin on the A6278 that requires an external resistor for setting the desired current for the outputs. The beauty of this feature, however, is that for LED applications you need only 1 external resistor instead of the normal 7 (1 per cathode) you’d need with the 74HC595! A 900Ω resistor on the REXT pin, for instance, will give you a 20mA output on each output pin, exactly what you’d need for a red LED display.

IV-9s are readily available on eBay, so if this is a display technology that tickles your fancy, try picking up a few to hack around with on your next project.

Tags: ,

NOTE: Registration for this event is now closed.

The first-ever Gizmologi.st workshop — Intro to Arduino: Electronics for Artists, Tinkerers, Inventors and Hackers — will be taking place on August 8, 2009 at San Diego State University.

Photo by Todbot

Photo by Todbot

Come join us on this all-day hacking session. This will be a great workshop for beginners to the DIY electronics world of microcontrollers, as well as for altruistic “old hands” looking to show off their skills and help the newcomers. If you’ve ever dreamed of building your own robot, UAV, home automation system, digital clock, synthesizer, portable gaming system, etc., but aren’t quite sure how to get started, then this is the workshop for you.

What You’ll Learn

We’ll cover as much as possible from the list below:

  • Arduino basics: Getting up and running, basic Arduino programming, blinking an LED
  • Beginning digital circuits: Using shift registers to control 7-segment LED displays and multiple LEDs simultaneously
  • Sensor basics: Reading and acting on digital and analog sensors, including buttons, photocells, thermistors and maybe some more sophisticated sensors like ultrasonic range finders or heartrate monitors
  • Communicating with PCs: Fundamentals of Arduino serial communication
  • Controlling motors: Using relays to control motors and/or solenoids

Read the rest of this entry »

Tags: , ,

Have you ever wanted to build your own wearable spy camera, UAV or other small, camera-enabled gizmo, gadget or device? While Arduino provides a wonderful prototyping platform for creating all sorts of DIY electronic gadgets, experimentations in physical computing, robotic artworks, and the like, it’s slim pickins’ when it comes to finding a tiny, easy-to-use digital camera to pair it up with. Fortunately, a company out of Hong Kong, COMedia Ltd., makes the C328R, a relatively small cell-phone style camera module that includes built-in JPEG image compression and UART serial communication. Couple the camera module with an Arduino and external storage (EEPROM, microSD, etc.) and you can have an instant Arduino-powered digital still image or video capture solution. That is to say, “instant,” once you have a working software driver … Fortunately for you, I’ve already done that work.

While working on a pigeon-based aerial photography solution as part of PigeonBlog for Beatriz da Costa, I wrote a library in C++ that allows the Arduino to communicate with the C328R camera over UART using the camera’s built-in communications protocol. Here’s a sample picture to prove that it works:

Sample C328R picture

Sample C328R picture

The camera can take pictures in a variety of color depths (2- to 8-bit grayscale, 12- to 16-bit color, JPEG) and resolutions (80×64 to 640×480) with serial communication up to 115,200 baud. It’s fairly versatile and not terribly expensive (~$50) given the fact that it does a lot of work for you (i.e. on-board JPEG compression).

The rest of this post assumes that you have the camera and an Arduino Duemilanove (or similar) in hand. If you don’t, I suggest that you get them. You’re also going to need some type of external storage for the pictures, because the Arduino doesn’t provide any sufficient storage on-board. The sample code that follows assumes a 256KB Atmel SPI serial EEPROM or similar SPI EEPROM.

Read the rest of this entry »

Tags: , , , ,