GameboyRMH
GameboyRMH GRM+ Memberand UltimaDork
8/3/13 5:58 a.m.

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?

fujioko
fujioko Reader
8/3/13 6:12 a.m.

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.

GameboyRMH
GameboyRMH GRM+ Memberand UltimaDork
8/3/13 6:30 a.m.

Very little current, it's just producing a voltage signal to go to a sensor with 15.1kohm impedance.

GameboyRMH
GameboyRMH GRM+ Memberand UltimaDork
8/3/13 7:25 a.m.

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.

fujioko
fujioko Reader
8/3/13 7:53 a.m.

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.

Giant Purple Snorklewacker
Giant Purple Snorklewacker MegaDork
8/3/13 8:31 a.m.

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.

egnorant
egnorant SuperDork
8/3/13 5:39 p.m.

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

GameboyRMH
GameboyRMH GRM+ Memberand UltimaDork
8/4/13 10:13 a.m.

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.

Giant Purple Snorklewacker
Giant Purple Snorklewacker MegaDork
8/4/13 10:40 a.m.

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.

GameboyRMH
GameboyRMH GRM+ Memberand UltimaDork
8/4/13 10:50 a.m.
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.

GameboyRMH
GameboyRMH GRM+ Memberand UltimaDork
8/4/13 10:56 a.m.

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

GameboyRMH
GameboyRMH GRM+ Memberand UltimaDork
8/8/13 10:12 a.m.

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.

Dr. Hess
Dr. Hess UltimaDork
8/8/13 10:15 a.m.

Magnetic Reed switches? They should be just fine.

RossD
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:

Giant Purple Snorklewacker
Giant Purple Snorklewacker MegaDork
8/8/13 11:21 a.m.

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...

You'll need to log in to post.

Our Preferred Partners
TigUcdzWF4cEUL0TSZsoOIlaKRhO14hpaUT2PZ5CeAvSWTkoNAwRgCPzN64U1JgS