I'm sure there are plenty of people on here with better electronics knowledge than me.
The title really says it all, I want to vary a voltage from 0-5v using 4 switches with the biggest voltage changes possible in that range, what's the easiest way? I'm thinking the switches could each bypass a resistor in a series, anyone have better ideas?
How much current will you be using?
You could do it with a LM317 and some resistors. This would give you about an amp per step.
Very little current, it's just producing a voltage signal to go to a sensor with 15.1kohm impedance.
I think this should do what I want with 5 switches. See what I'm doing now?
I haven't worked out resistor values but I marked the voltage drops I want them to produce. This will only give a signal to the analog sensor if either the left, right, or center switch is pressed, AND either the up or down switch is pressed.
1st: -3 = 2v
2nd: -1.5 = 3.5v
3rd: -2.5 = 2.5v
4th: -1 = 4v
5th: -3.5 = 1.5v
N: open circuit = 0v
R: -2 = 3v
Edit: Might be better to do this with voltage dividers in place of individual resistors.
Ok, that circuit makes sense. You could use Thevenin theorem to calculate the values or just stick pots in there and adjust it till it works.
I would use a straight-up voltage divider network with a 4 position rotary switch or berkeley all that and use a pot with detents on it.
Sounds just like the fan switch in my Escort! It has off and 1-4 on fan speed to a module of resistors. Might need to change the resistors for different values, but it seems like a good start if you need a good starting point.
Bruce
What makes this tricky is the mechanical interface. Anything other than optical switches interrupted by the gearshift lever or the levers on the transaxle could change the shift feel and will suffer wear. So I have to use a bunch of switches at some point.
An actual fan resistor pack couldn't work because of that, but I'm drawing up something now that uses a few more switches and resistors but gets around the design difficulties of the circuit above.
OK, so you are making a "what gear am i in" selector?
Opticals are good. Magnetic sensors are good too and less sensitive to position and dirt. You can harvest them for free (ABS wheel speed sensors). But... you could get fancy and use a microcontroller to calculate it from RPM signal and final output velocity. An Arduino is $19 and has 6 analog and a lot of digital i/o that would work for this application. Especially if you want to drive another control system with that information.
Giant Purple Snorklewacker wrote:
But... you could get fancy and use a microcontroller to calculate it from RPM signal and final output velocity. An Arduino is $19 and has 6 analog and a lot of digital i/o that would work for this application. Especially if you want to drive another control system with that information.
I actually have all the hardware to do this already, the Race Capture Pro with RPM and VSS inputs. But it won't be perfect under clutch slip or while shifting and if I do want to drive another control system with this, that could cause a problem.
Mag switches sound like a good idea, they still work when they get dirty.
No brainpower required for this design:
Just a fistful of resistors and switches. Those resistor values will create about a half-volt difference between gears. In retrospect I think my first design was too German
OK I adjusted the resistor values because my calculations were off and would have only given an 0.4v drop per gear:
Now has anyone had any experience with how reed switches work in a car? Does the vibration cause a problem? They're much cheaper than hall effect switches.
Magnetic Reed switches? They should be just fine.
RossD
PowerDork
8/8/13 11:14 a.m.
I'd use a switch similar to a brake pedal or clutch switch. Or something that looks like this:
10 pack, $7
http://www.ebay.com/itm/10pcs-HALL-EFFECT-SENSOR-SWITCHES-F-H-TEMP-3144-a3144-e44-/140967917662?pt=LH_DefaultDomain_0&hash=item20d257b85e
you can use this with a bit of fridge magnet and a microcontroller for prototyping if you have solder and shrink tubing handy. No resistor network required. just 6 inputs (when all are zero you are in neutral) and then enough outputs to drive whatever you want. LCD, led array, serial comm to other system...