Lifelong Learning Knowledge should be uncompromisingly sought after and freely given away.

30Aug/090

Using the Maxim7219 with Arduino

A few weeks ago I setup my Arduino to power a simple single digit 7 segment LED array. It took lots of pins from the Arduino (one per segment) to power it.Maxim7219 In Action Nice simple setup but I knew it would never work for powering more than a single 7-segment digit. I found the Maxim 7219 which is a chip designed specifically to drive LED arrays. It's really a neat device (although a bit expensive). I decided I'd pick up some 7291's from Jameco (I often switch between them and Digi-Key) and picked up a few of thier 4 digit 7-segment LED arrays (common cathode) as well to test the IC out. You'll definitely want to take a look here which outlines the library used, basic schematic and the really important calculation of the RSet value. I've included a demo sketch, high-res pictures and the Maxim 7219 datasheet in the ZIP file below.

 

4DigitLEDWithMaximIC
Title: 4DigitLEDWithMaximIC (838 clicks)
Caption:
Filename: 4digitledwithmaximic.zip
Size: 2 MB

4DigitLEDWithMaximIC
Title: 4DigitLEDWithMaximIC (838 clicks)
Caption:
Filename: 4digitledwithmaximic.zip
Size: 2 MB

18Aug/090

The Hall Effect…

Hall Effect Sensor With ArduinoI got an order in from Jameco yesterday and inside found a long awaited sensor! I had ordered a couple of the Allegro linear hall effect sensors. These are different than the others I purchased from SparkFun.com, they are not latching sensors but measure the magnetic force applied which is more of what I was looking for. I wanted something that I could use as a proximity switch and this worked out much nicer. They are a breeze to use and even more fun to play with than I had imagined. I've included some high res pictures and the Arduino code I used to test the sensor with below. I do have a proto shield from AdaFruit that I use and it has a green and red LED onboard, but you can easily hook up a couple of LEDs (don't forget your resistors). I'll be using this in a bigger project soon...

 

AllegroHallEffectTestApp
Title: AllegroHallEffectTestApp (681 clicks)
Caption:
Filename: allegrohalleffecttestapp.zip
Size: 2 MB

AllegroHallEffectTestApp
Title: AllegroHallEffectTestApp (681 clicks)
Caption:
Filename: allegrohalleffecttestapp.zip
Size: 2 MB

16Aug/093

Controlling a servo with a TV remote using Arduino!

Ardunio IR Servo Controller

I decided today after I got home from work, I'd try to get my next quick project done. I wanted to control a hobby servo using a standard TV remote. I had a RadioShack IR receiver (Part No. 276-640) already as well as a standard hobby servo.

I quickly hooked things up. 10k resistor between the PWM pin on the Arduino and the servo sensor wire. 200ohm resistor between the digial pin on the Arduino and the output of the IR reciever. Hooked up my 5v to both and grounds and I was done.

I found some sample code as referenced in the Ardunio code below and modified it to find out what codes my remote was outputting for different keys. I decided I'd have it move the servo left and right using the left and right arrow keys on the remote and then center it at 90 degrees when the "OK" button was pushed.  I also output the keypresses to the serial port to verify movement...

Worked like a charm! Amazing how simple tasks like this are with such a great community of folks posting example code and a wonderous board like the Ardunio!

Arduino IR Servo Controller

Hi resolution pictures and the Ardunio code can be found in the attached ZIP file.

IRServoProject
Title: IRServoProject (1087 clicks)
Caption:
Filename: irservoproject.zip
Size: 2 MB

IRServoProject
Title: IRServoProject (1087 clicks)
Caption:
Filename: irservoproject.zip
Size: 2 MB

16Aug/090

Digital Temperature with the Arduino

Arduino One Wire Temp SensorI was waiting on an order I had placed with Tayda Electronics (they rock) for my One-Wire temperature sensors.

If you haven't heard of One-Wire or these particular sensors you need to check them out. They are made by Dallas Semiconductors and they are amazing. They are a bit $$, which is why I opted to have them shiped from the philipeans directly. I got them for $1.60/each as opposed to ~$5.00/each from any of the domestic online retailers. The shipping only took ~8 days and the shipping was only ~$4.00. Can't beat that huh?

Anyhow, I got them in and wanted to see them in action, so I threw together a quick circuit which reads the temp and displays it on a LCD screen I had laying around (got it here). The end result is a quite nice and very accurate thermometer! I've posted my code and some high-res pics in the attached ZIP file below if you are intrested. Get your LCD working as outlined in the adafruit document and then hook up the one-wire sensor.

OneWireTempWithLCD
Title: OneWireTempWithLCD (571 clicks)
Caption:
Filename: onewiretempwithlcd.zip
Size: 2 MB

OneWireTempWithLCD
Title: OneWireTempWithLCD (571 clicks)
Caption:
Filename: onewiretempwithlcd.zip
Size: 2 MB

9Aug/091

Sound Detection With The Arduino

Sound Detection with the ArduinoI decided on Saturday that I'd try my hand at building a setup with the Arduino to detect sound. I found the perfect schematic online here from the guys over at SparkFun.com. They have a really nice breakout board for an Electret Microphone but it's ~$8.00 and I already had the stuff on hand to build my own. I think I'll still pick one of theirs up at some point, just to have around. It's quality built and tiny. I've attached the Schematic and the code with additional high-res pictures below for anyone more interested. I used an OpAmp to increase the voltage and had the code check for a threshold. Once the threshold had been exceeded, it would light up the red LED. The end result looks very similar to one of the old-school VU meters. You can adjust the gain on the amp by increasing the R5 resistor. This would make an excellent sound detector or even could be hooked up to a small speaker, it's a simplistic mono-amplifier after all...

ElectretMICProject
Title: ElectretMICProject (499 clicks)
Caption:
Filename: electretmicproject.zip
Size: 1 MB

ElectretMICProject
Title: ElectretMICProject (499 clicks)
Caption:
Filename: electretmicproject.zip
Size: 1 MB

Filed under: Arduino, Electronics 1 Comment
9Aug/090

Communicating With Ardunio Using Micrsoft .NET (C#)

Being a .Net developer, I figured I needed to know how to get my applications to talk to the Ardunio board via the USB serial port. Took a few hours to get the Ardunio code working, but here is the final results.

I setup a simple VS2008 C# project (you'll need to modify to compile with VS2005) to turn a LED on and off by clicking a button on the form. You'll need to change the hard-coded COM port to the correct one for your setup and hook up the LED (don't forget your resistor) to the digial PIN 12 on the Ardunio board.

  •  A few things to note: 
    • I'm using a fixed char command "INLENGTH" which will need to be updated if you wish to increase the command char length.
    • I've used # to pad the command when I don't have a 6 char command.
    • LED must be on digital PIN 12 (you can change this in the code of course).
    • COM port is hard-coded in the .Net code for my setup, change to correct COM port on our computer.

 

ArduinoSerialCommTest
Title: ArduinoSerialCommTest (460 clicks)
Caption:
Filename: arduinoserialcommtest.zip
Size: 43 KB

ArduinoSerialCommTest
Title: ArduinoSerialCommTest (460 clicks)
Caption:
Filename: arduinoserialcommtest.zip
Size: 43 KB

Tagged as: No Comments