3 channel selector footswitch

Started by EATyourGuitar, December 30, 2011, 10:01:12 AM

Previous topic - Next topic

EATyourGuitar

I plan to make something that requires only one of 3 channels to be on at a time. the user has 3 momentary footswitches to select the effect directly without the tap dance. I figured out a way to do it with a small programmable microcontroller in a DIP8 package. the question I have for all of you is, has this been done before with only FET logic or transistors or schmidt triggers or whatever. my DIP8 design is limited to 3 inputs and 3 outputs. I might add different features that you can select on boot up by holding a button for a second. I can have as many channels as I want if I use a DIP14 microcontroller. I might also make these available for others. either as a tutorial + code or a IC you can buy.

has this been done before?
is this something you would need?
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

CurtisWCole

I've tried (with no avail) to come up with something like this for either amps or distortion pedals. I would be interested in learning about your idea.

Curtis
Composers shouldn't think too much - it interferes with their plagiarism.
Howard Dietz

EATyourGuitar

here is the arduino code

you can use an arduino and the arduino IDE to program a small AVR like the attiny45 or the attiny85 in DIP8. I have not tried this code yet but it compiles fine. I will report back when I make some progress. there is no timer is the code. it looks for a rising edge on each input with equal probability. debouncing is not needed.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

earthtonesaudio

There's this one from GEOFEX, but a programmed uC is much simpler.

EATyourGuitar

yeah a DIP8 package that does this is long overdue. lots of 74 series and 4000 series logic is DIP14 or larger. all the latches I found on mouser are DIP20. most of the supporting circuitry in the geofex example could probably be stripped down if you don't require filtering, debouncing, buffering, or invert. so far I have no problems on my arduino connecting a digital input to V+ of the arduino board however that is already a regulated 5v output. its made that way. if you use a attiny with buttons to some V+ supply, it would need to be current limited with resistors or a regulator. you can program them to respond to a falling edge if want. that is the best part about micro controllers. if you do that, the trick with the two 10k resists in the Geofex example will still work. you can simplify it even further to use just one resistor per button.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

anti-idiot

the code seems pretty interesting. Do you know a way you can do the same, but using 3 inputs (or maybe 4, 1 for solo boost) and just one output (PWM maybe?), so you can use a stereo cable, i don't know...
If I was God you'd sell your soul to...

PRR

> the question I have for all of you is, has this been done before with only FET logic or transistors or schmidt triggers or whatever

Sure, all of those, also relays.

It's tricky. The PIC is perhaps a better idea today.

> 3 inputs ..., so you can use a stereo cable

One way to put multiple signals on a single circuit, even used in car controls, is to wire 1K 2K 4K resistors. Read them with a resistor to power and a cheap ADC. If the circuit is open, do nothing. If the circuit is 1K, volume-up; if 2K, volume-down, 4K = scan, etc. If multiple buttons are pressed you get an intermediate reading, say 2K||4K= 1.3K, which you can uniquely sense and handle in some no-surprise way (do-nothing, or vol-down, probably not scan).
  • SUPPORTER

EATyourGuitar

yes and you can do it with resistor ladders as DAC. I bought murata resistor ladders on mouser for about $1.50 each. you can use resistor networks on the other end also. the 4049 has 4 inverters at about 1.4 or 1.8v to turn ON. there is also some histeresis so you are limited to 4 or maybe 8 buttons if you want it to be error free.

PRR I looked at using a PIC10 in DIP8. I learned enough assembler to do it. but the programmer is $20 and I already have an arduino. the PIC10F200 is $0.55 while the attiny45 is $1.65
yes the PIC is cheaper but what advantage is it now that I need to write the code again and buy a programmer? arduino C is just quick and easy. I might get AVR studio. that is a nice transistion to low level AVR and assembler.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

iccaros

FYI, I am not trying to steer you away from your chip
but in the decision processes, PIC do not need to be programmed in ASSEMBLY, and many of your c methods  would be transferable just use C to program the PIC. 
http://www.swarthmore.edu/NatSci/echeeve1/Ref/C%20for%20PIC/C_Intro.html
or here for a list http://www.piclist.com/techref/microchip/languages.htm
there is c
tinyc
java
basic
and python
even .net it you dare to program a PIC.
to build a programer cost less than $1


you can use any software that will program to a JDM programmer.
a good page is http://www.semis.demon.co.uk/uJDM/uJDMmain.htm

The Advantage of ardiuno is the standardized "Shields", so pre-made ad-dons are simple and easy to use others code. They work for a PIC also, but most people do not know enough about micro-controllers to know that the core is an amtel microprocessor. Ardiuno is really competing against the BASIC STAMP, which was a PIC on a standard board which used BASIC.

EATyourGuitar

thanks for that info on the free programmer. I will definitely try it for $1 :icon_cool:

I know you can program a pic in C. I just thought that a PIC10F200 has very limited RAM and stuff. its a simple program so I dont see why it would be very hard to program in assembler. if I actually I liked PIC24 them it might be worth it to learn PIC C.

Microstick II
looks interesting.

but I also want to try the 32bit arduino clones. after that I want to try embedded linux on the beaglebone. lots of fun stuff is happening now that I discovered embedded electronics.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

PRR

I mean "PIC" generically: a LOT of logic power in a few pins for a few bucks, as opposed to stick-built with CMOS, relays, or thyratrons. Whatever chip makes _you_ happy (or least put-out).

Myself, I like stick-built, but I'm an old-school guy.
  • SUPPORTER

EATyourGuitar

#11

ignore all that other junk in the video. its really just 6 resistors total for all the inputs and outputs.
changed the > to a < so it responds to falling edge triggers. I wired my digital inputs on the arduino to V+ 3.3v through 10k pull up on each one. it also works at 5v. then I wired the buttons to ground the inputs when pressed. the buttons are common ground with Vdd (GND) of the arduino. the LED's are driven by 5V digital outs through 1k resistors. the LED's are wired for common ground with the arduino Vdd (GND). this code is ready to go on the attiny if you just change the pin numbers. I just need to figure out how to remove the reset that is reserved. I know it can be done but I have not tested it yet. I will order the chips and see what happens. the bad news is that you will need a resistor for each input. not a big deal.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

EATyourGuitar

fixed a bug in the code where no lights are on until you press a button once. now it boots up with LED 1 ON.

http://pastebin.com/xb5zqDwd
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

EATyourGuitar

ok so I was looking through datasheets for cheap attiny and I think I solved my problem with reset pin not being usable for input. the reset pin resets the device when it goes under 0.9v. the logic for that same pin switches at about 1.9v. the button resistors are setup to make a voltage divider when the button is pressed. thats why input 1 has 2 resistors and the other two inputs have 1 resistor each. the attiny13 is even cheaper than the attiny45. there is also a low power version. I might actually switch to SMD so I can plop all the resistors and a 5v regulator on board with header pins that line up with DIP8. so here is where I need your opinion. I'm thinking that if you are using this to control FET switching or relays, you might want resistors on the 3 logic outputs right on the attiny PCB. I could leave it blank with space for 3 through hole resistors. but if I do that it wont be SMD on DIP8 PCB. also, it does not even need to be SMD on DIP8. I could just program chips in the native DIP8 package with instructions on 5v regulators and the 4 resistors that are required on the input. you would need to do some kind of layout to integrate it into your own projects. if anyone has any interest in a programmable 7 channel or 20 channel or whatever master loop switcher, there are already boards available for $15 in a 1inch x 1inch SMD PCB. this 3 channel thing I'm making will be more like $5 for a very very small SMD PCB fully assembled.

so whats your preferred package?
SMD on DIP8, 4 resistors and 5v regulator, all SMD fully assembled
SMD on PCB, solder pads can also take 0.1inch breadboard friendly headers
DIP8 only, do your own thing
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

EATyourGuitar

people need to tell me if your interested, how many you think you might want, what package you prefer and what price your willing to pay. I can even sell programmers and distribute the code for attiny13. I dont understand why no one has bumped this yet. I need to guage interest so I know how many IC's to order and program. I need to know if I should order more than one programmer. I have done all the work for you, I make it easy to program an AVR with a ZIF socket for the DIP8 chip. or I could sell DIP8 IC's. the reset bug is mostly fixed but I can't test the new code till I have an attiny13 in my hands. there are only 3 resistors and a 5v regulator needed. the output sends 5v to your relays or LED's. you can figure that part out. I can help if you need example schematics. I may make some SMD style mini boards that have the IC, regulator and resistors in a very small PCB that should be easy to integrate into any pedal. I will not order PCB's unless I know I can sell 10. the DIP8 IC is < $2 USD my cost. sold as a an assembled PCB, it will be around $5.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

Andre

Here's a demo of my 3 channel loop or effect switcher
You can switch each of the channels on and off, but there can only be only 1 channel active at the time.
It uses a 12F675 PIC processor.

http://www.youtube.com/watch?v=YShWoNalfw4

EATyourGuitar

nice work! thats pretty much exactly how I imagined the boards would look. a transistor, and LED, and a relay on each output. can you tell me what the resistors and caps are for? are you more worried about switching noise affecting the operation PIC or are you worried that the PIC will bleed into your audio?

I found a way to use internal pull up resistors for the buttons with the attiny13. so now all you need is a regulator. you can cheat on the LED resistors. just regulate your attiny down to 4v and it should land  in the sweet spot to not kill an LED. no idea if the LED's will be blindingly bright though. you could even just divide your 9.5v DC down to 4.75V and its already current limited at the Vcc of the attiny13. that should limit that max current an LED can pull also. this would eliminate the need for a regulator and make the LED brightness adjustable by the user. although anything less than 1k across your +9v and 0v rails is probably bad for the rest of the pedal.

so far I see lots of people using PIC. I started learning it a little. the PIC10F200 would be great for a production run if I want 100 units. but it needs to be programmed in ASM.
WWW.EATYOURGUITAR.COM <---- MY DIY STUFF

Andre

The 2 caps are part of the 5V powersupply circuit for the PIC.
Furthermore there are 3 resistors between the PIC outputs and the transistor bases, and 3 resistors in series with the LED's.
I think I also used pull-up resistors on the input but I'm not sure.
Will check when I'm at home.
I'm not worried about switching noise because I've kept the relay contacts, input- and output signal- and groundconnections separated from the rest of the circuit.

B.T.W. I use JAL for programming PIC processors.