Getting started with the Maxbotix sonar sensor – quick start guide

Maxsonar-Ez1 Lrg-1
The MaxSonar EZ1 provides very short to long-range detection and ranging, in an incredibly small package. It can detect objects from 0-inches to 254-inches (6.45-meters) and provides sonar range information from 6-inches out to 254-inches with 1-inch resolution. (Objects from 0 inches to 6-inches range as 6-inches.) The interface output formats included are pulse width output (PWM), analog voltage output (Vcc/512 volts per inch), and serial digital output (9600 baud). A good sensor for when a Sharp IR distance sensor won’t cut it.

Pt 1997
If you’re a pro cut straight to the data sheet – if not, here’s a quick start guide on using the Maxbotix sonar sensor

Things you’ll need:
An Arduino
A half size breadboard
A piezo buzzer
Wires
MaxSonar sensor

All of these are available in the Adafruit store.

Solder it up!
Pt 2002
Solder 3 wires to the Maxbotix sonar sensor. Ground, power and analog. That’s all we’ll need for this simple test, and for the most part if you’re just using this sensor with an Arduino it’s all you’ll likely use.

Wire it up!
Pt 2001
For this example we’re going to use a half size bread board, some wires and a piezo buzzer with the MaxSonar and Arduino.

Run some code!
The MaxSonar EZ1 outputs analog voltage with a scaling factor of (Vcc/512) per inch. A supply of 5V yields ~9.8mV per inch. On the other hand, the Arduino’s analog-to-digital converter (ADC) has a range of 1024, which means each bit is ~4. 9mV. For that reason, to convert the number returned by the ADC to inches, we have to divide by 2.

// using the maxsonar quick start http://www.adafruit.com
// http://www.adafruit.com/index.php?main_page=product_info&cPath=35&products_id=172

int sonarPin = 0; //pin connected to analog out on maxsonar sensor
int piezoPin = 9; 
int inchesAway; 

void setup() {
  pinMode(piezoPin, OUTPUT);

}

void loop() {
  inchesAway = analogRead(sonarPin) /2;
 
  if (inchesAway < 24) { // if something is 24 inches away then make a 1khz sound
    digitalWrite(piezoPin, HIGH);
    delayMicroseconds(500);
    digitalWrite(piezoPin, LOW);
    delayMicroseconds(500);
  }
}

Xposted to Instructables



Arduino 16 and Apple’s latest Java update…

Pt 1995
After updating to Apple’s latest Java via software update Arduino 16 stopped working (see error message above)… there’s a simple fix it seems, just get info on the Arduino 16.app and check off “Open in 32 Bit Mode” – see below…

Pt 1996
More information can be found in the Arduino forums too…

Filed under: arduino — by adafruit, posted at 11:45 am


Wii Motion Plus + Arduino = Love

1Zxryax
Wii Motion Plus + Arduino = Love – knuckles904 writes…

Ok so I, after much research, have been able to read the gyro data of the new wii motion plus peripheral with the arduino microcontroller. With this code and the code previously developed for the wii nunchuck (here), we are able to create a 6 DOF IMU for under $40. Thanks Nintendo! Best of all, everything is I2C so only 2 analog inputs (A4 and A5 needed for the wire library) are needed to read 6 sensors and no ADC conversion happens on the arduino board.

Filed under: arduino — by adafruit, posted at 10:10 am


Super Mario stepper motor music with the help of an Arduino…


cmhiekses writes -

This is the first of many videos I’ll be posting of my stepper motors playing music. The data for the music is taken from a MIDI file I made. The code for interpreting the data and moving the motors was written by me over the course of a few days.

The sound you’re hearing is coming entirely from the motors. The motors are screwed into some pieces of aluminum from an old project to help them resonate. I’m taking requests for other songs to play.

Currently, the information for the song is stored on the Arduino. Plans for implementing a realtime MIDI stream are underway. Eventually I’ll be able to plug in a keyboard and play the motors as though I were playing piano.

These motors (and their L-shaped aluminum bracket mounts) were taken from The Pipe Dream MIDI Robot that I built in 2008 (see my other videos). I reluctantly disassembled that machine when I moved out of my old house.

Filed under: arduino — by adafruit, posted June 22, 2009 at 11:00 pm


Twitter Monitoring Typewriter (TwypeWriter)

3651494046 Ccd4F5E99A B

oomlut writes -

The love for Twitter around the .:oomlout:. office is undeniable. We check it constantly, and as those of you who follow us know post to it far too often (or if you don’t follow us we’re @oomlout :) ).

We thought it appropriate to allow Twitter to be more than just an on monitor phenomena. To accomplish this we have combined an Arduino, Ethernet Shield and typewriter. We added a little bit of solder (we’re spoofing keystrokes) and some coding (available here) and what we have is a twitter monitoring machine.

It search’s for a term every 10 seconds (in our case ‘oomlout’ although ‘#haiku’ is good fun too). When a new tweet is posted it will proceed to whir to life and type it out (at the same time making us feel like we’re back in the 1970s).

Filed under: arduino — by adafruit, posted at 2:24 pm


The compact marble machine 4


Mesmerizing marble machine 4…

Filed under: random — by adafruit, posted at 2:18 pm


Adafruit SENSOR PACK 900

200906212213
The electronic sensor pack of tomorrow – TODAY. The Adafruit SENSOR PACK 900 – An assortment of the most common sensors used in electronics. 9 sensors and 3 additional components to interface with the ‘analog world’. We have some tutorials here, to get you started.

Includes:

Filed under: announce — by adafruit, posted June 21, 2009 at 9:14 pm


Solar-Powered temperature sensor


Steve writes

In case you’ve not heard, there is a Green Revolution in progress. To quote a popular commercial, “The way we use energy now can’t be the way we use it in the future. It’s not conservation, or wind, or solar. It’s all of it.” I have long kept a solar-energy project in the back of my mind, so I ordered a 12v/2A solar panel power supply from a vendor. As a first step project, I figured I would power up my Arduino, use my shiny new XBee modules, and relay some sort of meaningful data back from this wireless solar-powered microprocessor.

Filed under: xbee — by adafruit, posted at 12:22 pm


Controlling a Roomba with an Arduino


JRH writes-

I set out this weekend to get an Arduino board to control my Roomba. (The Roomba has a great – and generally open – interface, and iRobot deserves significant credit for encouraging creative repurposing/extensions of their producs.) I’ve got a few project ideas in mind, but for an initial step just wanted to verify that the Arduino could a) send control commands (”move forward”, “turn right”, etc.) from the Arduino, and b) read sensor data (”something is touching my left bumper”, “I’m about to fall down the stairs”). This post contains my notes, which hopefully will help others doing this sort through some of the issues in a bit less than that I spent.

Filed under: arduino — by adafruit, posted at 12:17 pm


PV-Battery-Xbee


Mikey writes –

Have you ever wanted to monitor how much voltage/current your small PV solar panels are producing? It is easy enough with a multi-meter, but what if you just want to monitor it remotely and log the data on your computer. This high level overview shows a xbee setup remotely logging a PV panels volts/amps to a mac laptop. It makes use of only 10 ohm resistor and 2 ADC ports. No additional microcontrollers were necessary for this example. The PV solar panel is made by Voltaic Systems and costs only $30 (it peaks at 10.2V @ .133A)

Filed under: xbee — by adafruit, posted June 20, 2009 at 1:49 pm


Music & sound add-on pack for Arduino

Wavepack Lrg


Its a Wave shield party pack! Just add an Arduino to create your own iPod-killer, audio art, sound-effects box… It’s the Music & sound add-on pack for Arduino!

  • Latest Wave shield kit, works with more SD cards and with older NG Arduinos! Unassembled
  • 2 GB SD card (brand may change, but we test one of each kind to verify it works well)
  • Speaker – 3″ diameter (77mm), 8 ohm impedence, good response between 200Hz to 10KHz (10KHz is the max frequency the Wave shield can make). The speaker is rated for 1W so if you want you can even stick a small amp between the shield and the speaker to boost up the volume
  • Some wire for connecting up the speaker

Now in the Adafruit store! AND Check out some of these cool projects with a WaveShield!



Barebones AVR dev. board – on sale for $10.00

Atmegaxx8Target Lrg
Atmegaxx8Targetprog Lrg

Special introductory price!

We took the business-card-sized AVR target board from Evil Mad Scientist Laboratories and added a few components to make an AVR dev board that has only the bare minimums!

Comes unassembled with:

  • Printed circuit board
  • Blank ATMEGA8 with internal 1 MHz oscillator selected
  • 28-DIP socket
  • 6-pin ISP AVR programming header
  • 0.1uF ceramic capacitor
  • 5mm diffused red LED
  • Resistor for LED

We suggest using this board in conjunction with a USBtinyISP programmer (not included), and having the programmer provide USB power to the board. Of course, any programmer can be used, just make sure that you also power the target board somehow.

To get you started, here is a ‘hello world’ zip file. It contains a C program, compiled .hex file and Makefile for a blinking LED connected to pin PB5. Wire up the board as shown here (don’t forget the 3 jumper wires up top, they are essential!) Then install WinAVR or equivalent and run make program in the uncompressed folder to compile and burn the example.

Can easily be turned into a ‘Minimal Arduino’, simply follow the instructions from TodBot (You’ll need a programmer like a USBtinyISP or similar to burn the bootloader onto it).

In the Adafruit store now!

Filed under: announce,avr development — by adafruit, posted at 3:03 pm


Arduino laser camera trigger

Adam writes -

One of my current projects is an Arduino powered camera trigger. I made one using my Arduino a laser pointer, and my digital camera. At first I thought it would be no big deal, but it took a little more effort because of the camera I was using. My Canon Powershot does not allow for remote shutter controll by default, but after a little inernet-vestigation I stumbled on the CHDK (Canon Hack Development Kit). After some firmware hacking and a couple components; I was up and running…

The Key is the CHDK firmware that allows the remote shutter trigger. The laser reflects off of a mirror onto the photoresistor. The photoresistor is being measured by Analog 0. When the beam is broken the Arduino runs through a series of high and low on digital 12 (with varying delay to account for the auto focus feature of the camera). This then triggers the camera to focus and take a picture.

Connecting the camera to the Arduino is done by modifying a mini USB cable. There is a USB remote cable page on the CHDK wiki with instructions/diagrams for making a Homebrew remote. So I just used that but left out the switch and battery because the Arduino would act as the switch power source. We’ll be using the +5V (red wire) and Ground (black wire) – (see below for picture of cable, code, and more pics)

Filed under: arduino — by adafruit, posted at 1:28 pm


Drawdio: Synaestheisiasizer!


Drawdio: Synaestheisiasizer!

Filed under: random — by adafruit, posted June 18, 2009 at 2:00 am


Another Side Of In…

Another Side Of In from Jamie Robertson on Vimeo.

Jamie writes in about the new EZ1 sonar sensor we have

“Another Side Of In” is an interactive multimedia collaboration between Phish musician Mike Gordon, artist Marjorie Minkin and creative technologist Jamie Robertson. Part of the 2009 Boston Cyberarts Festival, the exhibit allows viewers to interact with 3-dimensional artwork, controlling sound and light through proximity to the works.

This is a quick behind-the-scenes look at the technology.

I recently used the EZ1 in an interactive exhibit for the 2009 Boston Cyberarts Festival, and can attest to how easy it is to work with. I used the serial TX output with a PSoC micro, and with a little filtering, got accurate and repeatable sensing of people in the 3 to 6 foot range. Here’s a short video about the project, though there’s not much in there about the EZ1 specifically.

Filed under: art — by adafruit, posted June 17, 2009 at 11:00 pm


www.flickr.com
adafruit's items Go to adafruit's photostream
www.flickr.com
items in Adafruits More in Adafruits pool