PDA

View Full Version : Need some advice.



madeofparts
12-13-2011, 01:00 AM
I am working on a simple project here. Although it is simple, I am new to all this, so need some expert advice.

I am making a musical device using a sensor: http://www.robotshop.com/interlink-24-long-fsr.html

I want to play a sound effect when a small spring-loaded wheel (To keep a constant pressure) rolls up and down the sensor.

1) What else do I need to make this work? I will have 8 sensors doing this at he same time, all with different sound effects.

2) Is it possible to make the sound effect play only when there is movement detected? Not pressure - as the pressure is not important,only movement.

Please help me as I know this may seem easy to you people here, but I have no idea where to even start!

Thanks in advance!

iBot
12-13-2011, 09:51 AM
It is not clear to me how this will work. Force sensitive sensors detect pressure, not movement.

I guess you could mount the sensitive element at a slight angle to where the sprung wheel is mounted, so pressure increases as you move.

The 8 sensors can be connected to analog inputs on a micro such as Arduino.

tician
12-13-2011, 03:39 PM
Unfortunately, the FSR that you are linking is not a potentiometer. It is unable to differentiate between a fingerpress at either end of the sensor or anywhere in-between. What you are looking for is a SoftPot (http://www.sparkfun.com/products/8681) or HotPot (http://www.sparkfun.com/products/9092) linear potentiometer (both come in shorter lengths if needed, but cannot be cut to length like the FSR you linked) (sparkfun also sells spring loaded wipers (http://www.sparkfun.com/products/9075) intended for use with the SoftPots/HotPots). With either of these linear potentiometers, you would just make a simple voltage divider circuit using the SoftPot and another resistor of known value (properly sized for the range of resistance of the SoftPot). The output voltage would vary depending on the resistance of the SoftPot, which is related to the position of contact caused by the fingerpress.

madeofparts
12-13-2011, 05:08 PM
Oh wow!

Thanks so much for the info! You're a superstar mate. You have sent me down the correct path already!

Could I do this with a midi device?

Also, will the programming be difficult? I hope not >___<

Thanks so much! This is very helpful my friend! ^^

tician
12-13-2011, 09:20 PM
I have absolutely no experience with MIDI, other than thinking it is a media related specification (electrical interface and probably protocol as well).

Programming for it should be easy enough. All you would need is a fixed resistor (properly sized) and an ADC port on a microcontroller. The code would read the value of the ADC pin for each voltage divider circuit's output and use it to estimate the position of the slider/actuator. It might require some initial calibration by recording ADC values when the actuator is at known positions and fitting these data point to a linear equation (input ADC values and get out the actuator's position within some accuracy).

There are probably several MIDI related projects on the forums and elsewhere (forums for robosavvy, sparkfun, arduino, etc.). If you are using only 6 potentiometers, an Arduino (Uno or Duemilanove) would be sufficient. If you must have 8, an Arduino Mega (or any of the Seeeduino?) should work, but the Mega might be a bit overkill. There are many other manufacturers of microcontrollers and assorted development boards, but I am quite fond of the AVR architecture (Arduino uses AVR microcontrollers).