Thread Tools
Old Dec 21, 2015, 07:51 AM
geekness is offline
Find More Posts by geekness
Quietly Scheming!!!
geekness's Avatar
Australia, WA, Port Hedland
Joined Jan 2013
469 Posts
Help!
Help needed on wiring up some switches

Im building a new transmitter and the switches have got me stumped.

With an input of 5V, I have a 3-pos switch where I need the output to read 0V, 2.5V, 5V for each of the different positions, but all coming out of the same output cable.
There won't be any current draw through the switch, it'll be just for the voltage reading for PWM.

The voltages are not so important, but I figure it's easy to get 0V and 5V for high and low as it's either not connected or just a straight pass through.

I can work out what size resistors to use, I just need to know where to put them, and where to wire up the inputs and outputs.

A schematic of the switch is attached.
Thanks in advance.
geekness is offline Find More Posts by geekness
Reply With Quote
Sign up now
to remove ads between posts
Old Dec 21, 2015, 11:19 AM
learningarduino is offline
Find More Posts by learningarduino
Registered User
Germany, NRW, Mettingen
Joined Oct 2014
229 Posts
Are you sure the input does not see 2.5V when the input wire is open?
If yes:
Wire plus and minus to the outer pins of the switch, center is out.
If no:
Do as above but add two resistors as a divider across the switch. I'd recommend 2.2k or 4.7k for both.

You need a single pole switch for both, with double throw and center off position.
learningarduino is offline Find More Posts by learningarduino
Reply With Quote
Old Dec 21, 2015, 12:56 PM
Dan Baldwin is offline
Find More Posts by Dan Baldwin
Registered User
Dan Baldwin's Avatar
United States, CA, Norwalk
Joined Apr 2004
2,771 Posts
Interesting switch. I've never seen one like that before. If you're sure that is the switch you want to use, I would jumper terminals 2 to 5 on the switch. Then I would put a 2.2K resistor from terminal 3 to 5 volts, and a 2.2K resistor from terminal 4 to 0 volts.

Dan
Dan Baldwin is offline Find More Posts by Dan Baldwin
Reply With Quote
Old Dec 21, 2015, 03:47 PM
learningarduino is offline
Find More Posts by learningarduino
Registered User
Germany, NRW, Mettingen
Joined Oct 2014
229 Posts
That's another way to do it.
Needs a double pole switch and lowers current consumption a few mA.
learningarduino is offline Find More Posts by learningarduino
Reply With Quote
Old Dec 21, 2015, 11:02 PM
geekness is offline
Find More Posts by geekness
Quietly Scheming!!!
geekness's Avatar
Australia, WA, Port Hedland
Joined Jan 2013
469 Posts
So I think I've got my question wrong. I need to wire it up like a potentiometer.
Having 3 cables, 1 for Voltage (5V), one for ground, and a wiper (or the signal).
The voltages are arbitrary, but all I need is low, mid, high as the 3 positions.

I hope your able to help......
geekness is offline Find More Posts by geekness
Reply With Quote
Old Dec 22, 2015, 12:11 AM
learningarduino is offline
Find More Posts by learningarduino
Registered User
Germany, NRW, Mettingen
Joined Oct 2014
229 Posts
Both my and Dans way will exactly do that.
You'll need a switch with center position and two resistors, and by soldering them either way you'll get a voltage divider for the center position that gets "modified" for each end when the switch is flipped.
learningarduino is offline Find More Posts by learningarduino
Reply With Quote
Old Dec 22, 2015, 07:22 AM
Rumcajs is offline
Find More Posts by Rumcajs
Registered User
Rumcajs's Avatar
Joined Jun 2012
66 Posts
Here you have some suggestions?..
Rumcajs is offline Find More Posts by Rumcajs
Reply With Quote
Old Dec 22, 2015, 09:22 AM
geekness is offline
Find More Posts by geekness
Quietly Scheming!!!
geekness's Avatar
Australia, WA, Port Hedland
Joined Jan 2013
469 Posts
Awesome, big help. Thanks folks.
geekness is offline Find More Posts by geekness
Reply With Quote
Old Dec 22, 2015, 10:44 AM
Dan Baldwin is offline
Find More Posts by Dan Baldwin
Registered User
Dan Baldwin's Avatar
United States, CA, Norwalk
Joined Apr 2004
2,771 Posts
One thing I left out of my explanation is that terminals 2 and 5 that are jumpered will be used as the wiper of the pot.

Dan
Dan Baldwin is offline Find More Posts by Dan Baldwin
Reply With Quote
Old Dec 22, 2015, 05:29 PM
geekness is offline
Find More Posts by geekness
Quietly Scheming!!!
geekness's Avatar
Australia, WA, Port Hedland
Joined Jan 2013
469 Posts
Quote:
Originally Posted by Dan Baldwin View Post
One thing I left out of my explanation is that terminals 2 and 5 that are jumpered will be used as the wiper of the pot.

Dan
i still don't fully understand.
5V coming in to pin 3 with a resistor.
jump pins 2 and 5. wire coming off 2 or 5 for the signal/wiper.
ground coming from pin 4 with a resistor.

if thats correct, then in pos-1, ground is not connected at all.
pos-2 seems ok as its got the wiper between the 2 resistors
pos-3 has the 5v not connected
geekness is offline Find More Posts by geekness
Reply With Quote
Old Dec 22, 2015, 08:13 PM
geekness is offline
Find More Posts by geekness
Quietly Scheming!!!
geekness's Avatar
Australia, WA, Port Hedland
Joined Jan 2013
469 Posts
10k between pin 1 and pin 3.
10k between pin 4 and pin 6.
Jumper between pin 2 and pin 5.

5v in to pin 6
Gnd from pin 1
Signal from the middle of the 2-5 jumper.

Pos-1 =5V
Pos-2 =2.5V
Pos-3 =0V

Is that right?
geekness is offline Find More Posts by geekness
Last edited by geekness; Dec 22, 2015 at 09:42 PM.
Reply With Quote
Old Dec 23, 2015, 06:24 AM
learningarduino is offline
Find More Posts by learningarduino
Registered User
Germany, NRW, Mettingen
Joined Oct 2014
229 Posts
Nope, Post 10 is right.
In Position 1, Pin 2/5 is connected to 3/6, 6 is open, 3 is 5V via resistor: A resistor from 5V to the input should read full scale.
In Position 2, 2/5 is connected to 3/4, 3 is 5V via resistor, 4 is ground via resistor: There's a divider on 2/5 that should give half scale.
In Position 3, 2/5 is connected to 1/4, 1 is open, 4 is ground via resistor. A resistor in series to ground should get the input to zero.

Personally, i think 10k is a bit high, but that depends on the input impedance.
Most ADCs from microcontrollers need a bit of current to charge their S/H cap and don't like more than 1k series resistance.

In my Version (Post #2) you need a simple single pole switch and short either end of the divider.
Simpler, cheaper, smaller, easier to obtain switch (i have never seen something like your pic shows and im in the business for more than 25 years), lower impedance.
learningarduino is offline Find More Posts by learningarduino
Reply With Quote
Old Dec 23, 2015, 08:33 PM
geekness is offline
Find More Posts by geekness
Quietly Scheming!!!
geekness's Avatar
Australia, WA, Port Hedland
Joined Jan 2013
469 Posts
Positions 1 and 3 don't give readings through the signal because in pos-1, ground is not in the circuit and in pos-3, 5V is not in the circuit.
I need to have all 3 wires in the circuit to get a reading out of the signal wire.

I've wired it up as I show in post 11 and it works. Its quite a simple method, only requiring 2 resistors at 10k each, and a jumper

This is the schematic at which I based my thinking on.


Quote:
Originally Posted by learningarduino View Post
Nope, Post 10 is right.
In Position 1, Pin 2/5 is connected to 3/6, 6 is open, 3 is 5V via resistor: A resistor from 5V to the input should read full scale.
In Position 2, 2/5 is connected to 3/4, 3 is 5V via resistor, 4 is ground via resistor: There's a divider on 2/5 that should give half scale.
In Position 3, 2/5 is connected to 1/4, 1 is open, 4 is ground via resistor. A resistor in series to ground should get the input to zero.

Personally, i think 10k is a bit high, but that depends on the input impedance.
Most ADCs from microcontrollers need a bit of current to charge their S/H cap and don't like more than 1k series resistance.

In my Version (Post #2) you need a simple single pole switch and short either end of the divider.
Simpler, cheaper, smaller, easier to obtain switch (i have never seen something like your pic shows and im in the business for more than 25 years), lower impedance.
geekness is offline Find More Posts by geekness
Reply With Quote
Old Dec 24, 2015, 01:24 AM
learningarduino is offline
Find More Posts by learningarduino
Registered User
Germany, NRW, Mettingen
Joined Oct 2014
229 Posts
When the switch is in Pos. 1 or 3, there is a resistor in series from either ground or 5V to the input in the circuit i described.
If there was (almost) no current flow like you stated in your OP this should give a high impedance, nonetheless full scale or zero reading.
Are you sure you connected ground/5V to one end of a resistor, and the other end of it to the switch on pin 3 and 4 respectively?

Also, my circuit in post 2 is also based on a simple divider (like post 11).
It just shorts out one end if the switch is set to pos. 1 or 3, and this needs a simpler switch and def. works. Graupner and the like do it like thos for 30 years or so...

Also, in each version you'll need a piece of wire and 2 resistors. In some versions you'll need a simple SPDT switch, not that weird DP3T.
learningarduino is offline Find More Posts by learningarduino
Reply With Quote


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Help! New to all this and need some help getting up and running rgrebby FPV Talk 3 Aug 03, 2015 06:22 AM
Discussion Need some help with cleaning my first quad up Virtika Multirotor Beginner 7 Jun 16, 2015 08:57 AM
Discussion Need some help wiring my gps module up. Novello FPV Talk 0 Jan 26, 2015 04:34 PM
Discussion Wiring in a shutter switch! need some help! BennettOZ84 Aerial Photography 6 Aug 10, 2008 01:53 PM
Need some help wiring up a twinmax... HobbyWatch Parkflyers 1 Oct 15, 2002 09:31 PM