First Arduino Project!
Jan 18, 2010 Arduino, Gear
Posted by
irfon
I completed my first-ever successful Arduino project today! It’s an exceedingly simple square wave synthesizer. It uses only a few components:
- Arduino Duemilanove microprocessor board
- Eight jumper wires (the diagram shows more for clarity)
- Ridiculously tiny breadboard (again, the diagram shows a larger one for clarity)
- Linear trim potentiometer
- Piezoelectric speaker
- Button
- 10k ohm resistor
- USB cable (for power, you could use a battery pack instead)
All of the parts above were part of the Sparkfun Arduino Starter Kit except for the 10k ohm resistor, which I bought at The Source by Circuit City (a.k.a. Radio Shack) in a 150-piece set of assorted resistors. (I used this key to identifying resistors to pick out the right one.) The Sparkfun kit actually comes with 10k ohm resistors now, but the version I bought, via Robotshop.ca, didn’t come with them. Anyway, they weren’t hard to get.
Since the book I bought on learning Arduino hasn’t arrived yet, I figured that I’d start by looking through the sample code and documentation, and in doing so I realized that there was enough there to pull together a simple square-wave synthesizer. And, well, who can resist that? So I did.
The cool thing about this project is that I actually understand most of it, despite not having begun reading up on anything. It’s all extremely comprehensible. The only thing I’m not clear on is the use of the 10k ohm resistor — I have a foggy idea of what that might be for, but I don’t have a clear concept of it and wouldn’t know when to use one and which one to use on my own. But since I was mostly Frankensteining other sample projects together, I didn’t mind. (I should note that in-progress versions of this used the serial communication and console over the USB cable for all kinds of testing, and that was both simple and really awesome.
)
Anyway, the rest pretty much speaks for itself:
Goofy demo video:
Code.
Breadboard diagram (created with Fritzing).
January 19th, 2010 at 12:07 am
Good job. Wanted to play with a piezo a bit too. I just got that same breadboard in from the sparkfun sale (not free
). It’s pretty small, I have some other things coming so I can work on two projects at once.
[Reply]
irfon Reply:
January 19th, 2010 at 7:58 am
Cool! What projects do you have in mind? The first thing I’d like to do is to hack my STG Soundlabs Time Buffer a bit. It takes DIN Sync input to drive the timing of all the connected modules. I thought I’d be coming in to some equipment that generated DIN Sync at the time that I bough it, but I decided not to go that route. What I want to do is to be able to generate DIN Sync based on the state of a button or switch (for run/stop) and a pot (for tempo), and to also have a switch for internal/external which, if switched to external, would make it read incoming MIDI clock messages and output DIN Sync. I think there’s enough room behind the Time Buffer and there’s certainly enough room on its front panel that I could toss all this behind it and keep the “UI”, so to speak, right on the Time Buffer’s panel.
[Reply]
January 19th, 2010 at 3:05 pm
Great starter project, If! Congrats on starting to play around with the electronics, I look forward to seeing your upcoming work.
[Reply]
irfon Reply:
January 19th, 2010 at 3:23 pm
Thanks! My time over the next short while might be limited, but I’m looking forward to hopefully making more progress soon.
[Reply]
January 19th, 2010 at 10:03 pm
I don’t know much about this stuff, but I really want to press the button.
[Reply]