Go Down

Topic: Time-to-resistance value program? (Read 2147 times) previous topic - next topic

ryndeclark

Hi all.  I am interested in a device for my guitar pedal board that i'm hoping someone can help me with.  i'll do my best to explain, but i'm very much a programming novice:
I basically want to tap my foot on a switch, either opening or closing a circuit, and have the arduino calculate the time between the start of 2nd to last tap and the start of the last tap.  the arduino would then need to convert the time calculation to an output resistance (between 0 and 10k I believe) based on a table or other calculations- I haven't actually determined the relationship yet.  the physical taps would not be constant but the resistance would need to stay constant from the last 2 taps until  more taps were introduced.  I would also like for the board to provide a sync'd LED showing me the time between the last 2 taps.   There is no audio going through this signal, it is just an input on my device that receives a resistance value from a potentiometer for controlling values on a chip in the device.
this next part is me explaining it like a guitar player:
I have a Line6 FM4 pedal.  The pedal has an expression pedal output that can control the speed of the effects, but there is no "tap tempo" available, which is very difficult to acheive with an expression pedal.  some of these effects are very synchopated and sound great when pulsing in time with the music, but sound bad when out of time with the music.  since I play live and not to a click track, i have to be able to set adjust the tempo at any given time to correct it to the tempo we are playing a that particular moment.  the device i'm looking for will replace the expression pedal (basically a resistor that is adjusted with a footpedal) with calculated settings based on tapping a switch.
Any help would be greatly appreciated.  Thanks in advance!

Erdin

The Arduino is very good at detecting input, timing and turn on something.
The pedal board, http://line6.com/fm4/

The 'tap' detection needs some mathematical thinking programming. But you can always ask us for help.

Turning on leds is no problem.

Do you want to buy a foot switch or make one ?
A switch will bounce, so the code needs a debouncing function.

I wonder how that output resistance is connected.
Is one of the wires connected to ground ?
You can buy a digital programmable resistor, but the ground will be hard wired to the Arduino.

ryndeclark

Thank you for responding!
I would like the unit built for me, or at least the board ready for me to wire up switches and connections and put in an enclosure.  size is important as i would like this to fit in a standard stomp switch enclosure (2.5x4.375x1 approximately). the actual switch will be a purchased momentary on or off (whatever is needed, though I prefer an NO state) that i will get.  the resistance is connected with just 2 wires.  it is probably wired to ground since the pedal is using a TS 1/4" cable with the tip and sleeve carrying the wires (sleeves go to ground almost always I believe).

DVDdoug

The Button Example shows you haw to read a button-push.

The Pull-up Example example shows you how to simplify your hardware by using the internal pull-up resistor instead of an external pull-up or pull-down resistor.

oYu can use the millis() function to find the number of milliseconds since your program started.   By "grabbing" this time every time you hit the foot switch, you can subtract to get the time between beats.  You'll want to take and average of a few beats, and possibly throw-out any outliers to get a good tempo.

The Blink Without Delay Example will show you how to blink the LED at the rate you've calculated.   (It's good to avoid the delay() function because it makes your program stop and do nothing during the delay period.)

Here is an example of a digital potentiometer.  There are different protocols/methods of controlling the resistance of a digital pot, so you'll have to check the specs and design your hardware & software appropriately.

ryndeclark

I apologize to the forums i think i posted this in the wrong place originally.  I need a project built for me, I don't have the understanding to do it myself. Below is the description:

Hi all.  I am interested in a device for my guitar pedal board that i'm hoping someone can help me with.  i'll do my best to explain, but i'm very much a programming novice:
I basically want to tap my foot on a switch, either opening or closing a circuit, and have the arduino calculate the time between the start of 2nd to last tap and the start of the last tap.  the arduino would then need to convert the time calculation to an output resistance (between 0 and 10k I believe) based on a table or other calculations- I haven't actually determined the relationship yet.  the physical taps would not be constant but the resistance would need to stay constant from the last 2 taps until  more taps were introduced.  I would also like for the board to provide a sync'd LED showing me the time between the last 2 taps.   There is no audio going through this signal, it is just an input on my device that receives a resistance value from a potentiometer for controlling values on a chip in the device.
this next part is me explaining it like a guitar player:
I have a Line6 FM4 pedal.  The pedal has an expression pedal output that can control the speed of the effects, but there is no "tap tempo" available, which is very difficult to acheive with an expression pedal.  some of these effects are very synchopated and sound great when pulsing in time with the music, but sound bad when out of time with the music.  since I play live and not to a click track, i have to be able to set adjust the tempo at any given time to correct it to the tempo we are playing a that particular moment.  the device i'm looking for will replace the expression pedal (basically a resistor that is adjusted with a footpedal) with calculated settings based on tapping a switch.
Any help would be greatly appreciated.  Thanks in advance!

ryndeclark

Could anyone refer me to someone who does project work?

fkeel

Is this something more people than just you might need?

I like this project as its fairly straight forward and has a very clear application which makes sense to me. However if I would build one of these for you and charge you for it I would need to ask for more money than I am comfortable charging an individual with. (does that make sense?)

So - I would find this interesting if we could make say 100 or 1000 units and sell them at a profit. Maybe find interested people through Kickstarter once we have a working demo.

Do you think this is potentially possible?

Where are you located?
http://embodimentlabs.tumblr.com/
http://paulstrohmeier.info/

ryndeclark

I'm not sure there is a practical market for this unit.  Most manufactureres accomodate this gap found with the device I'm using.  I was looking for a quick, low cost solution, but may have hit a wall.  THanks for responding.

fkeel

#8
Apr 23, 2013, 01:35 pm Last Edit: Apr 23, 2013, 01:37 pm by fkeel Reason: 1
this is a very "doable" project. Everything you need is here. DVDdoug set you up with some good links to start working. I am sure you could find somebody or I also believe you could do it yourself even without prior knowledge (people in this forum are helpful) which of course requires you to be interested in learning this stuff.

I simply am quite loaded with projects I *should* be doing and I just am not motivated to put the amount of work into it if its not something more general. I am happy to assist with coding questions and other issues though.

again - where are you located? Maybe you can find people in a local hackerspace to help out?



*
"doable" as in: many people come here with unrealistic expectations of arduino or of project scope etc. This is *not* the case with your project
http://embodimentlabs.tumblr.com/
http://paulstrohmeier.info/

ryndeclark

Thank you for the responses. I am located near dallas, tx. I wish i could make the time to learn this stuff but what little free time i do have for myself will always go to music, it's just my thing. I've picked things like this up before, but starting from scratch and just trying to hunt and peck my way through it just seems daunting.

fkeel


I totally understand where you are coming from. There are only so many things you can do with your time and at some point you just need to pick and chose.

Anyway. I would see if these guys http://dallasmakerspace.org/blog/ or these guys https://www.facebook.com/cohabitat have a mailing list and I would post there. One of the problems with the Arduino forum is that its so international, which makes it a bit difficult to collaborate (i.e. I am located in Vienna, Austria) as sometimes its nice to just sit down and have a Beer to get a feel of how the other person 'works', you know?

Btw. Try contacting the forum user NI$HANT http://arduino.cc/forum/index.php?action=profile;u=34047 he is a dude from India who seems very eager to take on projects and who has in the past done work for other people through the forum.
http://embodimentlabs.tumblr.com/
http://paulstrohmeier.info/

Go Up