obligatory obscure reference


self-deprecating yet still self-promotional witty comment

October 4, 2008

Eagle Library - Arduino Nano

Filed under: Arduino, Hacking — jet @ 3:39 pm

After ~5 minutes looking on the interwebs, I gave up and just made my own EAGLE library file for the Arduino Nano. I haven’t used it to make a board yet, so I’m going to call this the “alpha” version until I do. Use as you like, just don’t blame me if it’s broken.

jet’s EAGLE lib o’ doom

Technorati Tags: , ,

September 26, 2008

Which Arduinio is Right for You? (alpha)

Filed under: Arduino, Hacking — jet @ 6:13 pm

Ok, first cut at a spreadsheet comparing Arduino types. I still need to add the LEDuino and probably some new columns, so consider this an alpha at best.

CSV, PDF, and Excel(-ish) formats.

Technorati Tags:

September 18, 2008

preview — which Arduino is right for you?

Filed under: Arduino — jet @ 5:53 am

As part of figuring out which Arduino to use, I’m making a chart of the various characteristics of Arduino boards.

So far I have the obvious — # I/O pins, form factor, required power, etc. Anything in particular that you (collective) would find useful in such a chart that I might not think of? For example, do you care about weight? Physical dimensions without pins?

Let me know in email or in comments.

Technorati Tags: ,

April 18, 2008

Arduino: Generating the Morse Code

Filed under: Amateur Radio, Arduino, Hacking — jet @ 4:08 pm

Ok, this was stupid fun and really easy. I’m relearning the Morse code — I originally learned it using the excellent ARRL CDs. As part of re-learning it, I thought it would be fun to see if I could learn it visually as well, by looking at a blinking LED. It kinda makes my brain hurt, but it actually might be doable.

So here it is, my simple Morse Code arduino sketch.

I think I might try parsing Morse next, it’s a much more interesting problem…

Technorati Tags: ,

April 11, 2008

Arduino: Reading the SHT15 temperature/humidity sensor

Filed under: Arduino, Hacking — jet @ 2:04 pm

Ok, this was a bit more fun and geeky. The SHT15 is a temperature/humidity sensor made by Sensirion. I bought mine from Sparkfun, and at $42 it’s a bit pricey, but it’s pre-mounted on a breakout board saving me a nasty soldering job.

The SHT15 isn’t as fragile as a lot of other electrical components — you can get it wet, put it in the sun, etc. I’ll probably just mount it at the end of some very long leads and not bother putting any sort of protective case on it.

Being the rocket scientist that I am, I didn’t download the specs until I decided to actually write code. Turns out that the SHT15 uses a serial protocol developed by Sensirion; but they were kind enough to post some sample code for the 8051 so it wasn’t too hard to get working on the Arduino.

If you’re trying to get this working, take a look at my Arduino sketch. Writing code to read serial protocols using clock and data pins isn’t for the newcomer, but it isn’t terribly difficult if you know a bit of C, bit-wise operations, and have sample code to reference along with the timing diagrams.

Technorati Tags: , ,

March 15, 2008

Arduino: Reading the ADXL 3xx Accelerometer

Filed under: Arduino, Hacking — jet @ 5:08 pm

Reading the ADXL 3xx is pretty straightforward — give it power, run lines from the x,y,z pins to three analog pins, and do analogRead()s on the pins.

What’s a bit trickier is dealing with the sensor values. Resting flat on my desk, the x, y, and z values all vary on each read. It’s only by one or two steps, but it’s still noisy and could introduce a lot of jitter into your code. One way of eliminating/reducing noise is to take a running average of sensor readings, then use those to make your decisions.

Here’s an example Arduino sketch that reads the sensors, computes a running average, then displays the previous average, average, and current raw value for each axis.

A couple of related notes:

  • The power you give the ADXL needs to be the same as the reference voltage on your Arduino. If you power the ADXL directly from the Arduino, then everything is fine. If you power it from another source, you might need to use the external power reference features on the Arduino.
  • While you put power to the ST pin, the ADXL will force all three outputs to the middle value. This is useful for calibrating the ADXL by reading what it things its middle values are for each axis. However, it’s not something the average person will probably care much about, I find it useful as a “is it really working” test while I’m debugging a circuit.

Technorati Tags: ,

December 2, 2007

Arduino: Reading the Maxbotix Ultrasonic Rangefinder

Filed under: Arduino, Hacking — jet @ 6:32 pm

This was so easy it wasn’t even funny. I think I spent more time discovering that I was trying to read the wrong pin than I did actually getting this to work. The main reason I’m posting it is so that people considering this rangefinder can see just how easy it is to use compared to some of the other rangefinders out there.

This reads the voltage from the AN (analog) pin on the Maxbotix LV-EZ1 Ultrasonic Range Finder (I got mine at SparkFun). Connect power and ground on the Maxbotix to a reference ground and power, then connect the AN pin to the analog input of your choice.

Here’s a simple program to read the sensor and report the range in inches on serial:


//-*-C-*-
// read values from a LV-MaxSonar-EZ1 sensor
// this is for the Arduino MINI -- change the pin values to suit your board.
// jet@flatline.net
// 1 Dec 2007

//Output
int statusLed = 13;

//intput
int ez1Analog = 0;

void setup() {
pinMode(statusLed,OUTPUT);
pinMode(ez1Analog,INPUT);

beginSerial(9600);
}

void loop() {
int val = analogRead(ez1Analog);
if (val > 0) {
// The Maxbotix reports 512 steps of information on AN
// but we read that as 1024. Each step is 1", so we need
// to divide by 2 to get the correct rough range in inches.
//
// this value should also be calibrated for your particular
// sensor and enclosure
val = val / 2;
Serial.println(val); // inches
}
blinkLed(statusLed,100);
}

void blinkLed(int pin, int ms) {
digitalWrite(pin,LOW); // turn it off it was on
digitalWrite(pin,HIGH);
delay(ms);
digitalWrite(pin,LOW);
delay(ms);
}

Technorati Tags: ,

Powered by WordPress