Posts | Comments

Planet Arduino

Archive for the ‘softpot’ Category

[Gr4yhound] has been rocking out on his recently completed synth guitar. The guitar was built mostly from scratch using an Arduino, some harvested drum pads, and some ribbon potentiometers. The video below shows that not only does it sound good, but [Gr4yhound] obviously knows how to play it.

The physical portion of the build consists of two main components. The body of the guitar is made from a chunk of pine that was routed out by [Gr4yhound’s] own home-made CNC. Three circles were routed out to make room for the harvested Yamaha drum pads, some wiring, and a joystick shield. The other main component is the guitar neck. This was actually a Squire Affinity Strat neck with the frets removed.

For the electronics, [Gr4yhound] has released a series of schematics on Imgur. Three SoftPot membrane potentiometers were added to the neck to simulate strings. This setup allows [Gr4yhound] to adjust the finger position after the note has already been started. This results in a sliding sound that you can’t easily emulate on a keyboard. The three drum pads act as touch sensors for each of the three strings. [Gr4yhound] is able to play each string simultaneously, forming harmonies.

The joystick shield allows [Gr4yhound] to add additional effects to the overall sound. In one of his demo videos you can see him using the joystick to add an effect. An Arduino Micro acts as the primary controller and transmits the musical notes as MIDI commands. [Gr4yhound] is using a commercial MIDI to USB converter in order to play the music on a computer. The converter also allows him to power the Arduino via USB, eliminating the need for batteries.

[Thanks Wybren]


Filed under: Arduino Hacks, musical hacks
Nov
26

Touch Sliders With A Softpot + Arduino

arduino, softpot, Touch Comments Off on Touch Sliders With A Softpot + Arduino 

You all know the potentiometer, you turn it, and you can read on your arduino where it was turned to. Well 3M makes a product called the softpot that is a linear touch potentiometer. So instead of turning a knob, you touch it.

The really nice thing about these is that they are great for prototypes because you can tell where someone touched it. So if you place a piece of paper with some printed buttons over it, you can mock up surface touch buttons. Or if you need to prototype a rotary touch wheel like the old ipods, but don’t want to get involved with complex capitative sensors, you can do that too.

There are a million uses for these, and they come in a few sizes, shapes, and even offer high temperature versions.

Hooking it up

The softpot sensors change their resistance depending on where they are touched. And because they work just like potentiometers you don’t need any extra parts to use them with your arduino. We can just plug in the middle pin to an analog in pin on the arduino and we are ready to go.

The arduino analogRead will vary between 0 and 1023 depending on where you touch it, (1023 when not being touched) and is linear, so it will be about 512 if touched in the middle.

WARNING!!!!!

If you touch the softpot at the top and the bottom at the same time, it will get really hot, really quick, and if you leave it for more than a second, you may burn it up. I have no clue why. But beware!

This is especially an issue on the round version. If you press down dead center on the bottom (where the straight parts come off of), you will be pressing on both sides of the pot and it will again get super hot and melt. SO DONT PRESS IT IN THE MIDDLE BOTTOM

Code

The arduino code for this just could not be easier. We are adding some serial prints and delays to it just so you can easily see the readings, but they dont need to be there if you dont need them.

int softpotPin = A0; //analog pin 0

void setup(){
  digitalWrite(softpotPin, HIGH); //enable pullup resistor
  Serial.begin(9600);
}

void loop(){
  int softpotReading = analogRead(softpotPin); 

  Serial.println(softpotReading);
  delay(250); //just here to slow down the output for easier reading
}
Unless otherwise stated, this code is released under the MIT License – Please use, change and share it.


  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook