Tuesday, January 22, 2008

Arduino Diecimila Reset Discussion

Note the Atmel's Reset pin characteristics

Also, note the brown out specs,

Monday, January 21, 2008

Arduino Motor Driving Discussion

Some people are having issues with resets when driving DC motors from their Arduinos. It has been suggested that previous Arduinos (without auto reset) are less sensitive to noise than the current ones. Lets not talk about the difference in Arduino makes for right now. Instead lets concentrate on whats happening with the motor setup and why this could cause problems. Finally, we'll suggest a proposal to reduce the noise in the circuit.

First, the different components involved are
1.) DC motor
2.) Output drive circuitry
3.) Arduino (of course)

In it's most simple form (forgetting back EMF) the motor would look like this circuit:

The Arduino would be driving this motor with an external transistor configuration shown below using a fixed frequency and variable PWM (pulse width modulation) to control motor speed,

Now, lets put them together and we have our basic motor drive circuit,

Now lets look at how the current flows when the transistor is on,

Notice the clamping diode installed around the motor. This will help clamp any energy coming from the coil in the reverse direction when the transistor switches off.

Now that we understand the basic setup. Lets see if we can shed some light as to why resets are happening.

Lets start off with making sure we still have a clean 5v supply running the Arduino when we're running the motor...

DC motors can suck a lot of juice from the 500mA limited USB supply. Lets look at the high side of the motor's supply to make sure we're doing anything nasty to the poor USB.

The below image shows how a capacitor is used to bucket the energy.

So maybe, we should limit the capacitor's ability to draw too much current from the supply by adding a series resistor. Using a passive component like a resistor has some efficiency implications. There are much better ways to limit current through the use of active components.

For our purposes of trying to clean up the 5v supply, we can entertain the idea. See the image below.
Say for instance, the bucket capacitor is 10uF. On power up, it will take 25ohms * 10uF = 250 microseconds to charge up to 62% or 1 time constant. After that, the voltage ripple on your 5V supply should be much less than before because the current is safely limited to motor.

Wednesday, January 16, 2008

Bug Labs Packaging

Bug Labs is finally releasing pictures of their upcoming Bug modules on their website. Now more than ever we're able to see what they've spent their time working on.

These days, it takes a lot for mass produced electronics to get noticed. Usually when I look at something electronic these days, I tend to notice the outer packaging. Shopping for cell phones, mp3 players, etc. I usually go with the one that looks best.

Playing with electronics hardware has kept me busy and awake all hours of the night because there's something inherently self-satisfying about using electronics to create something. Wiring, connecting, and sometimes soldering to create projects has enabled me to learn a lot about electronics.

From the pictures, they've spent lots of time making the packaging of the modules, but it seems like they've missed the idea. How do premade and pre-packaged device allow people to make electronics creations?

Since I like to tinker, what if I don't like their screen or camera module? What do i do if it can't fit into my application? I'm just not sure I'll have enough ability to customize the modules to my liking. Where is the hardware tinkering? Everything is already done for you.

They have done a decent job at selecting some of the modules that people might like to play with, but I hope they leave something for me to do with them!

Tuesday, January 15, 2008

GPS for Arduino in less than 30 minutes!

I just grabbed a Libelium GPS shield for my Arduino, and wanted to make it work. With minimal effort (about 20 minutes), I was able to get a fully functional GPS system working - incredible. Pardon my enthusiasm, but rapid design and prototyping like this was never possible when I was in school. We were too busy making LED's blink back and forth ala nightrider - and for the adventurous - debounced button inputs ala simon. Fastforward to 2007, and you can have a fully functioning GPS-enabled accelerometer hiking / backpacking logging device in less than an hour of mixing parts together.

Without further ado, here's a picture of the GPS shield sitting on my Arduino:

I'd go into further detail about the circuit or the schematic, but there's really nothing to talk about. You just pull the board out of its wrapper, snap on the antenna, plug in +5V (red wire) to the pin tower labels "+5" and ground (black) to the pin tower labeled "GND". Set the board starting at the Arduino's pin number 8, and you're set to go.

As usual, I've posted the source code for the project over at liquidware - enjoy!

Prototyping board

This past weekend, I bought another prototyping shield from Ladyada here in NYC - but this time in an unassembled kit form. The funny thing is that it would have been much quicker to just drive down to Adafruit's headquarters downtown (from midtown) to pick it up. But the package showed up two days later, which isn't bad for NYC mail.

Here's a picture of the contents of the kit, poured out onto my desk (which is actually a small piece of cloth-covered corkboard from my old office):

I then clamped the PCB onto the "3rd hands" and began soldering away:

After only 15 minutes with the gun, and only 1 redo, I sat back and appreciated my work of art:

But it got me thinking... why not make an extender board, that allows someone to attach two modules onto the Arduino base? That way, you could put two breadboards on one Arduino, or possibly a breadboard and a GPS kit?

The possibilities would be endless... and I shall call it the "Pin Replicator Shield". I've started a project entry over at liquidware to hold my thoughts and progress on the new shield.

Saturday, January 12, 2008

Review of Bug Labs' launch

It looks like the folks over at Bug Labs have finally announced pricing, and it has been received with a giant thud. For the unfamiliar, Bug Labs is a startup based out of NY with a vision for making modular consumer electronics devices. On paper, this idea sounds great. If you look at most consumer products on the market today, most tend to consist of 4 main components:
  1. A screen
  2. An input device (buttons, switches)
  3. A power supply
  4. A functional component (GPS, MP3 decoder, Wifi, Cell phone, etc.)
If you can standardize the first 3 components, the 4th is effectively the primary differentiator of a consumer electronics device, and why not make it modular enough to plug-and-play and upgrade over time? The vision for consumers may be a modular device that they can build from components as they desire.

Sunday, January 6, 2008

Arduino Hardware Playground

Just the other day I picked up my first Arduino.

The first thing I did was rush over to the Arduino website and start browsing around. In search of ways to play with it, it didn't take me long to stumble on this section,


Wow! I could not believe how many hardware devices there are here. Tons of contribution to this area has really expanded the capability of my $30 Arduino. Definitively well spent cash.

It's so unbelievably easy to use one of these things. Take for example, you want to print out a number to PC via the serial port, you don't even need to do any processing at all on the bytes to get it into ASCII form -it's all done for you.

void setup()

unsigned char num;

void loop()

This may seem silly to write about, but I'm used to writing tons of support code to make this soft of thing work. It really is plug-in and "play"!