Open Theremin V3

2017-Feb-26, Sunday 06:24 pm
chebe: (OnTheVergeOfSomethingWonderful)
- active/powered speakers with a 3.5mm stereo audio jack (bonus points if the power plug is grounded)
- camera tripod
- Arduino Uno, from wherever it has been gathering dust (and USB/power cable)

- Open Theremin Arduino Shield
- 1m of aluminium round tube; 6mm external thickness, 1mm wall thickness, 4mm internal diameter, from your local hardware shop

- Cut tube in half, and bend (or get bent) each half into the shape described in the diagram
- Solder shield together. (The button and LEDs are surface mounted. I scorched a leg pad of the yellow LED, so no blinky yellow for me.)
- Program Uno
- Plug all the bits together. The whole lot should be grounded, but both my speakers, and the Arduino, are powered over USB, and I could not find an earthed USB-converter plug. So, at the moment, they are plugged into my laptop, which is plugged into the mains. (There is a ground pad on the shield that I should hook up in future.)
- Power up, leave to warm up, trigger auto-calibration

Photo by chebegeek

- Start band

4x4x4 LED Shield

2016-Aug-15, Monday 09:32 pm
chebe: (WalkSign)
You know the story; you go into Maplins for solder, and you walk out with an LED Cube Shield. (It can't be just me.) Anyway, building one of these yokes seems to have become a kind of rite of passage for the makery sort. So, I made one!

Couple of photos )

Not so straight LED Cube, completed
Photo by chebe

chebe: (AsciiC)
Further experiments with the LCD screen.

Install two libraries;

Uno pins;
- 13/SCLK to SCLK
- 12/MISO to MISO (not needed)
- 11/MOSI to MOSI
- 10/SS to CS
- 9 to DC
- 8 to RST

Arduino Uno breadboarded to 2.2inch LCD

Uno works smoothly
Photo by chebe

LilyPad Maincontroller pins;
- 13/SCLK to SCLK
- 12/MISO to MISO (not needed)
- 11/MOSI to MOSI
- 10 to CS
- 9 to DC
- 8 to RST

Arduino Lilypad Maincontroller breadboarded to 2.2inch LCD

Lilypad Maincontroller works as well!
Photo by chebe

chebe: (WalkSign)
The first GaelHack took place a couple of weeks ago, the weekend of Friday 7th to Sunday 9th of June. It was a nice way to start a new tradition, with about twenty people from all over Ireland attending. (I think all but two of the hackerspaces were represented.) It was held on a scorcher of a weekend, in a boarding-school-converted-into-Scouts-Centre, with the option of camping or boarding in the hostel like rooms.

We took over a large room with a bunch of tables and chairs, set up the projector, and got started. There were a few presentations, a couple of hands-on workshops, and a few excursions out-of-doors into the beautiful sunshine to play with aerials and satellites. And to get the occasional ice-cream. In some ways the location was ideal (sunshine, quiet, facilities), but it did lack in some respects (insufficient internet, barely any phone signal, children everywhere). It was definitely a good start though, and at the end there was a great discussion, with people from different hackerspaces volunteering to look around their own localities for alternatives. I'm looking forward to next years. (There's a very thorough write-up by another attendee on the way, I'll link to it here when it's live. *EDIT* link)

Throughout the activities, in spare cycles, we worked on our own projects. It struck me how awkward Ardunio can be when you don't have an awful lot of internet to go looking for, and downloading, documents, tutorials, and libraries. But I persevered, emboldened by fellow attendees reminding me that there is almost always a library out there already. I got started learning to use I2C, real-time-clocks, and seven-segment-displays. Obviously I built a clock. This is the first step towards something else, but let's not get ahead of ourselves.

Arduino Uno, (you can ignore the MicroSD-shield, it's not doing anything here,) Sparkfun Real Time Clock Module, Adafruit 4-digit 7-segment display. The display requires you to install two libraries details here, and even though I'm using the Sparkfun RTC it uses the same chip as the Adafruit one, and Adafruit provide a library here.

The only gotcha that I ran into is that the RTC time is not set, and it is not running when you get it. (It also needs to be hooked up to 5V, otherwise when you query it you get a nonsense response.) To set the time to the time on your computer there's a section in the Adafruit example setup().
  if (! RTC.isrunning()) {
    Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
    RTC.adjust(DateTime(__DATE__, __TIME__));

By default it doesn't execute. I had to remove the not to get it to run, i.e.
  if (RTC.isrunning()) {

You only need dto do this whenever you want to change the time, so ideally just the once. After that I just played around with the display, and got the colon blinking like commercial digital clocks.

Photo and video )

One fixed Uno

2011-Apr-11, Monday 09:38 pm
chebe: (Voices (Firefly))
Just a quick follow up to my previous post with the links to fixing your Uno, otherwise known as updating the firmware. I ended up following the official doc, mostly because of the pretty pictures.

Firstly, I got two Unos in one order, and only one of them had this issue.

Secondly, they recommend soldering on a resistor, or some tricky juggling with wires. I selotaped my resistor in place for the procedure, then removed it. You think someone else would have thought of that.

Thirdly, you go get the file from github, but make sure you click the file to view it, then download from the 'raw' link, otherwise you'll end up trying to flash your Arduino with a html file. *whistles*

Fourthly, for once the program you need has the same name in the Fedora repo; yum install dfu-programmer

Fifthly, then it's a simple erase, flash, reset command combo.
# dfu-programmer at90usb82 erase
# dfu-programmer at90usb82 flash Arduino-usbserial-uno.hex
4058 bytes used (99.07%)
# dfu-programmer at90usb82 reset

Sixthly, then you unplug the usb cable and enjoy an almost properly functioning Uno. When I try to upload sketches to the Uno it still fails, unless I press the reset button after starting the upload (when the first line of output appears on the console is a good time). Still, an improvement.
chebe: (Daria_hate)
Because it took me too long to track this information down. Seems to only be a problem on Linux.

The problem is with the firmware. A compile flag got left out, and has resulted in all kinds of frustrations. More info from the forum:


I haven't tried it yet, as I spent so long trying to track the problem down. Will give it a go soon.

Don't you just hate it when your shiny new toys arrive broken?

Momentary button setup

2011-Feb-17, Thursday 03:34 pm
chebe: (Default)
More for myself than anyone else, I often have trouble remembering how to set-up my 4-leg momentary buttons, so I'm making this reminder.

The button has four legs, two pairs of two essentially. The pairs have the flat ends facing each other, like brackets; { }. These pairs are connected when the button is not pressed, and current can be measured across them. When the button is pressed it switches (no pun intended) to flow from one of each pair, to its opposite counterpart. So really, only need to use two of the legs (one of each pair).

Breadboard pics )
chebe: (Default)
I've had one of these for a while now. What is it? It's a microphone, with all the added bits necessary (opamp etc) to create a signal loud/strong enough to be read by microcontrollers, and other things. But, I've been having a hard time learning how to use it.

First there was the physical hurdle, is it even connected properly? I eventually grabbed a six-pin header (female on top, like on the Arduino itself) and used three of its pins. VCC goes to 5V, GND to GND, and AUD to Analog In pin 0.

Now I'm struggling with how to read the values. If I just print the readings as fast as the Arduino can handle (by default, meaning no delay()s), I get a range that approximates a nice sine or cosine wave, centered maybe (evaluating by eye) around 510. But what do I do with it?

Well, I've managed loud sudden noise detection, like a bang, a knock, or a loud clap. It's actually rather like an analog version of the push-button switch state from my LED-top.

//You set the previous value to be the sensor value.
previousReading = sensorReading;

//Then you update the sensor value with a new reading.
sensorReading = analogRead(mic);

//You take the difference between the two values.
readingDifference = sensorReading - previousReading;

//You set a desired sensitivity rating, in this case 100.
//If the difference exceeds the sensitivity threshold it's an event, do something.
if(readingDifference > 100)
    numBeats = numBeats + 1;
    Serial.print("Beat ");

So now I guess I could hook-up those lights that turn on and off with clapping, but there's not much else this would be good for. Maybe a more sensitive version for just pulsing lights with a strong bass-beat in songs? Ideas on a postcard. Have to study more about sound wave analysis to be able to use this sensor data to more advantage.


2009-Oct-08, Thursday 10:50 am
chebe: (South Park)
I admit it, I'm awful at updating, especially when I have nothing to update about. I got distracted from my gloves project, and am currently working on how to use audio signals. I got myself a tiny microphone, and hooked it up to my Arduino Duemilanove via breadboard. Only, I've realised that I know nothing about audio sampling or analysis! So, I'm trying to piece together a working knowledge, all the while hoping that the microphone is connected up properly (I have a sneaking suspicion that the contacts aren't being properly contacted). So this is likely to take my full attention until I either crack it, or get bored.

In other news, there is talk of workshops in TOG. One on electro-clothing (essentially playing with EL wire) will be first, in the next two weeks. Also, there may be one on more traditional forms of sewing in the next few months. Keep an ear out if you're interested.
chebe: (Default)
How It All Began:

In this world there a great variety of people, with vastly different skills, interests, backgrounds, and futures. But for the sake of this post I will concern myself with only two kinds. Those who know cool electrical stuff, and those who don't. I fall into the latter category. But when a friend told me about these pre-assembled circuit boards, that are used to rapidly prototype gadgets and inventions, that are so simple to use that artists with no technical background are able to pick them up and realize their visions, well, my first thought was, 'that's kinda cool'. So idly I browsed the interwebs, for this strange thing called Arduino, and discovered it's sleeker, purple-ier, sibling, the Arduino Lilypad. It offers a subset of the range offered for the Arduino, but washable, and redesigned for use on clothing. My imagination immediately filled with visions of me dancing, trailing swirls of colours. *ahem* And other less girly things. And I just knew I had to get my teeth into it. Afterall, if it was so simple to use then I could hardly fail.
This is long, and has two photos, and two videos )

Things I Learned:

- The Lilypad is more expensive than the Arduino, so unless you want wearable tech specifically, stick to the Arduino.
- The Arduino works in a three-dimensional space. You can build flat circuits, or giant cubes. The Lilypad, although it has to shape and conform to the 3-D form of the body, works primarily in flat planes. You are fairly limited to above the fabric, and below it.
- If you don't know much about electronics the Lilypad is easier to use and understand. As you learn more you start seeing how your projects would translate to the Arduino, and just how neat and clever (both intentionally, and coincidentally) the Lilypad is.

- I have installed the Arduino IDE on both Fedora 11 and Windows XP. Both are similar and very easy. Windows does have the disadvantage of offering you many COM ports, and you just have to try them all to find the one that's connected to your Arduino. Whereas on my Fedora machine I have to launch it from the terminal, and as root.

- When using the Lilypad you may notice a complete lack of resistors. This is because the power sources readily available are about 3-5V, which is the range the Lilypad likes. But also, despite it's name, conductive thread, while being conductive relative to ordinary thread, is a quite poor conductor with regards more traditional electrical items like wire. So in essence the thread is your resistor. If you need a greater resistance, simply create a longer path of thread between the power source and your components. Adding other pieces, like clasps and such can also add a decorative touch of resistance if needed.

- Conductive thread is like unshielded/uninsulated wire. It is very important not to cross the positive and negative strands. And seeing how easily the thread frays you will need a way to seal away the knot-ends at the very least. I currently use fabric paint, and find it very good, despite a quite long drying time.
Page generated 2017-Mar-26, Sunday 01:38 am
Powered by Dreamwidth Studios