Yearly Archives

14 Articles

My Arduino’s love spans 80 characters

Posted on

A good friend of mine is quite a bit like me in that he loves salvaging electronics. He works at a local cable provider that was throwing away a bunch of devices that had these nice 80 character (40 x 2) LCDs in them. He snagged them and generously gave three to me. This morning I decided to figure out if they used Hitachi HD44780 drivers as I suspected (16-pin interface). First I soldered up some pin header, snipped and wired the included ribbon cable and made this handy little breadboard adapter for easy prototyping. I had to make a few changes in my LiquidCrystal calls to make sure the library knew I was using a 40 x 2 LCD, and voila! Thanks again Yaffe for these awesome toys!

Bent SK-1

Bent SK-1

I wanted to share my nearly-completed SK-1 project. It still needs a back panel and some finishing touches, but it sounds amazing. I can easily get lost for a couple of hours just jamming on this little guy. It features an 18-point bend patch bay, 4 ground points, patchable potentiometer, joystick, and LFO, 8 additional hard-wired bend switches, drum kill mod, soft/hard reset, and a pitch bend (mounted on keyboard) with on/off switch. Now if only I could muster up some ambition to finish it…

SK1_6 SK1_1 SK1_2 SK1_3

Glitch LFO

Posted on
Glitch LFO

I’ve been wanting to get into circuit bending for a while now, but due to a jam-packed project notebook, it has taken the back seat…until now.

Music is my passion. I’ve played various instruments throughout my life and have always loved strange and exciting sounds and instruments. That being said, I’ve decided to focus my attention on music-making instruments / bends / circuits for a while. There’s something euphoric about mixing my love for music with my love for electronics…it’s hard to explain.

Seeing as I’m still a n00b at bending, I thought it proper to start with a staple bent instrument and see what I can do…enter garage sale find #1: Casio SK-1. As I started scouring the internet for ideas of bend points, and various different things people have done with the SK-1, I came across this really handy LFO circuit based on a LM555. I had all of the components in my parts bin, so I built it and started playing. The circuit itself is nice, but when applying it to any bend points, there was something missing. One of the changes I tried out was applying a PNP transistor to the trigger, so it acts as a switch that is being turned on and off to the speed of the timer. When I applied the bend points to either end of this switch, the results were very satisfying. I decided that for my bent SK-1 it would only be right to etch a PCB, so I made a quick change to the etch template and wanted to share that with everyone. I’ve also attached a few pics and a video of me playing with my SK-1 with this “glitch LFO”. I hope someone else gets some use out of it!

Download etchable circuit drawing here.

Hangmanduino

Posted on
Hangmanduino

Hangmanduino is complete! A word is selected at random from a list of 10 words. This could be set higher, but for demonstration purposes, it’s 10. The user scrolls through the alphabet to select a letter using the potentiometer on the front of the case. To select a letter, the user pushes down on the potentiometer. Schematics, pictures of the build and demo video can be found below…click here to download the source code, but keep in mind you will need to download the string library as well to compile this code.

hangmanduino_5 hangmanduino_4

DIY Push Potentiometer

Posted on

I’m working on a project that requires the use of two interface devices; a button and a potentiometer, but I wanted the look of the enclosure to be really clean. I was thinking about where to place the button and potentiometer, which is when I realized, it wouldn’t be too hard to make a potentiometer that could be pushed for the select function. Within an hour I had this little prototype put together. There are a few areas that need improvement, but overall, it works great! For materials, I used a spring, pot, tactile switch, and a couple of screws/bolts to hold it all together. It’s really simple to put together so I’ll let the pictures do the explaining. Feel free to post any questions in the comments section.

Oh, and thanks to Make Magazine for posting the pics from Flickr!

img_6091-large img_6098-large img_6100-large img_6101-large

Hangman prototype…

Posted on
Hangman prototype…

Hangman Prototype

A few months ago I was wrestling with getting my 16×2 parallel LCD to work with an Arduino for a few hours, until I decided it had to be broken. All I was getting was garbled characters and solid blocks. A few months later, I picked it back up and did some more playing, and eventually got it working. Now to learn how to print custom characters to it…I learn by doing, so I decided to make a hangman program. Below are pictures of the perf-board rendition of a shield for connecting the LCD, a few potentiometers, a tactile switch and a speaker for noise-making fun. At this point the code works well, but I’ve got some ideas for improvement and a box is in the making. Perhaps I’ll even submit it to Brico Geek “Let Arduino Play” contest : )

Arduino Web-based Live Gauges

Posted on
Arduino Web-based Live Gauges

I needed some web-based gauges for my ArduinOil project frontend and I wanted them to be driven from PHP if possible. I came across Flash Open Gauges (FOG) written by Charles Nichols, which looked really slick and gave plenty of options as to the style of gauge and the methods that you feed it data. I started playing around with the scripts to customize them for my purposes. As I was learning about the feature of dynamically feeding the gauges data via PHP, I started thinking about how easy it would be to make the gauges live. A little tinkering, and voila! This won’t be particularly helpful in any of the projects I have going on at the moment, but I thought it might help someone else, so here’s how you’d make it work:

  1. You will need and Arduino (duh!), Ethernet Sheild, and some type of analog input device (potentiometer, photoresistor, etc).
  2. Go get the FOG files here.
  3. Download the demo scripts and sketch files I’ve created here.
  4. Extract the FOG into a folder on your server (can be either Windows or Linux, but must have PHP installed).
  5. Extract the demo scripts into the same folder as the FOG code on your web server and change the configurable variables in arduino_fetch_data.php to reflect the IP of your Arduino.
  6. Change the sketch code to reflect the IP you’d like your Arduino to have, upload the sketch and connect something to analog pin 5.
  7. Open the index.html in a browser by navigating to your server’s address.
  8. Read the FOG documentation and hack the scripts to do what you want!

I recorded a quick demo this morning of the script in action which you can find below. Also, keep in mind that I just threw this together on a side trail to a larger project that I’m currently working on, so there may be some refining that should be done to the code. I just don’t want to spend the time on it now, but if you need this functionality, it might be worth your while to poke at the code and try to improve it. Have fun!

ArduinOil update…

Posted on

It has been a few months, and I’ve had a few other projects come and go in the meantime. However, I’ve always had this project in the back of my mind. Not too long ago, I had a much better design idea for detecting the amount of oil in the tank. At first, I was trying to read the meter that is already on the tank, but the results were less than perfect and the hardware was going to be a major PIA to mount and maintain. One day I caught a video of a guy that made an automatic water dispenser for his cat or something crazy like that. But the thing I noticed was he was using a Parallax PING sensor to detect the amount of water in the bowl…enter proverbial light bulb. So I ordered one (a PING sensor) and started playing around with it. The results were amazing…not only is it amazingly simple on the hardware end, but the responses were more accurate and the code implementation was simple too.

Now that we have the data, we have to find some place to store it. I signed up for a BETA account at www.pachube.com and had a lot of fun programming the Arduino to speak pachube. I even got fancy with some Asterisk code to report pachube information via the telephone. But at the end of the day, there was still something missing…history. I really wanted to be able to look back on my fuel usage and get some trending information for curiosity’s sake…and I could not get such functionality from Pachube. So I did what any self-respecting nerd would do…I wrote my own. Here is the way it works:

The Arduino is listening on port 23 (telnet) for traffic. A cron job runs a script on the hour from a server that connects to the Arduino and sends a “p” (for percentage…”i” would return inches), which prompts the Arduino to pulse the PING sensor 5 times, average and convert the value to a percent based on the total tank size. The Arduino returns this information to the script which records the value and a time/date stamp to a database. From here I have a script that checks the database once a day and alerts via email if the level gets too low…however, I can do any number of things with that information. I have yet to write a “front end” to the database to make the information viewable over HTTP, but that is definitely in the works as well.

My next order of business will be mounting the ArduinOil components in the tank / furnace room, and doing the final hardware prep. I’d post some pictures, but honestly, at this point it’s just a bunch of code and tanggled wires. Hang in there…more to come!

Using Asterisk to Control your Arduino

Posted on
Using Asterisk to Control your Arduino

Being an avid Asterisk admin and a novice AGI coder, I decided that it would be cool to try my hand at using Asterisk to control my Arduino over ethernet. Upon googling similar projects I came across Kate Hartman’s page on doing just that with an Arduino connected via an XPort module. Well, I have the Adafruit ethernet shield with a WIZnet module, but I decided to give it a try anyway. The first thing I noticed was the Arduino code appeared to be communicating with the XPort module via serial communication. This is a bit of a problem as the WIZnet module needs to make use of the ethernet library in Arduino IDE. So I threw together a little test environment with an LED connected to pin 4 and plugged in my ethernet shield to give the code a shot. Needless to say, it didn’t work straight out of the box…so I’ve made a few minor modifications which you can find attached to this post. I also found that Kate’s Asterisk AGI code was a bit dusty, being written perhaps for an older version of Asterisk than what I have (1.4.21.2), so I made a few modifications and was able to get it up and running. This should come in REALLY handy for some of the projects I’ve got waiting in the wings (ArduinOIL). Here’s how to get it up and running.

    1. Download source code
    2. Upload the attached sketch to your Arduino
    3. Copy the arduino_control.php file into your agi-bin (usually /var/lib/asterisk/agi-bin) and edit the configurable options to match your setup. Make sure you change the permissions on the file with “chown asterisk:asterisk arduino_control.php” and also make it executable with “chmod +x arduino_control.php”
    4. Edit your dial plan (I use freePBX so the file is /etc/asterisk/extensions_custom.conf, otherwise it would be /etc/asterisk/extensions.conf) to include the following lines (you can change the 999 to whatever extension you prefer to dial to get control of your arduino):

; Arduino Control
exten => 999,1,Answer
exten => 999,2,AGI(arduino_control.php)
exten => 999,3,Hangup

 

  1. Restart asterisk services with “amportal restart”
  2. Hack the code apart and make it do something awesome!

“It looks like a bomb”

Posted on
“It looks like a bomb”

A month ago, my younger brother-in-law asked me to help him with a science project that would get him some serious extra credit (over achievers!). The assignment was to create a working seismometer. Sounds like a job for the almighty Arduino, doesn’t it?! We asked the teacher and she answered with an enthusiastic “YES!” I thought it would be a good opportunity to introduce him into the world of electronics and maybe even peak his interest…so I ordered the parts and last night, we started to build.

We finally had the breadboard / sketch code worked out, and started the physical mount/build process last night. Below is what we came up with…we call it “Seismoduino”. At present, there are 2 “modes”, meter mode and graph mode. In meter mode it takes the readings from the ADXL322 accelorometer and feeds them to our little array of LEDs which display the readings as a meter. In graph mode, the information is sent to the COM port and graphed by some Processing 1.0 code. We’re still working out the kinks and features, but should be finished soon. Once we’re ready there will be some more (better) pictures and even some video…