Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 24th September 2007, 05:39 AM   (permalink)
Default Help designing analogue switch sytem

Hi guys,

I am fairly new to electronics and circuits and could really use some help with a circuit I have been trying to design for my Thesis. What I have is a joystick with an 8 way hat. I need to convert the signals from the hat onto one channel to send through to an external A/D card. My problem is the 8-way hat uses four buttons that when pressed determine what position the hat is in. eg: up, button 1 is pressed, Bottom right, buttons 2 and 3 are pressed at the same time.

Top Hat Schematic

I am trying to design a circuit similar to the one linked above, however I need each combination to have a distinct voltage drop so it can be interpreted by the computer running the system. I can not manage to get the parrallel loops to produce a distinct voltage drop from the single loops, ie when only one switch is closed. I know I have to alter the resistors but have had no luck finding a combination that works. Any help or advice would be greatly appreciated. Hope this makes sense. LOL.

Cheers
Danger
danger_85 is offline  
Old 24th September 2007, 09:53 AM   (permalink)
Default

Fairly obviously you need to provide the greatest voltage swing you can.

So for a start one button should short it completely to ground. This gives you two reference points, 5V (no button) 0V (the lowest button), this leaves three buttons in between those two points - so calculate the values to spread then evenly.

You can do a LOT more than 4 buttons like this, but by spreading them out it makes it as easy as possible.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 24th September 2007, 11:40 AM   (permalink)
Default

Hi Nigel,

I understand about when only one switch is closed at any one time, however my problem lies in that when the hat is pushed diagonally two buttons are pressed. So it is no longer a simple series calculation but, there end up being two resistors in parallel. This results in voltage drops for the parallel circuit being too close to the voltage drops for the single switch series case. ie for the circuit linked in my first post the voltage drops are as follows:

switch 1 – 3.979
switch 2 – 2.9545
switch 3 – 1.93
switch 4 – 0.9798
switch 1&2 – 4.211
switch 1&4 – 4.0279
switch 2&3 – 3.3737
switch 3&4 – 2.33

As you can see there is a distinct voltage drop of about 1 volt for the single switches, but when a combination is closed, say 1 & 4 the difference is too small compared to the switch 1 case.

I need a distinct voltage drop across all individual switchs and two switch combinations. Is this possible?

Cheers
Danger
danger_85 is offline  
Old 24th September 2007, 11:46 AM   (permalink)
Default

You might try wiring the switches differently, so diagonals have a greater effect - bear in mind there are only specific combinations that are possible.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 24th September 2007, 06:16 PM   (permalink)
Default

This simple 4-bit D/A may not give you optimum separation, since it has 16 possible output levels and you only need 8 of them, but it should give adequate separation.
For maximum separation, you could encode the 8 used output states into 3 bits, and drive a 3-bit DAC.
Attached Images
File Type: png 4 bit DAC.PNG (15.1 KB, 10 views)
__________________
Ron (aka Rube)

Roff is offline  
Old 25th September 2007, 01:51 AM   (permalink)
Default

Hi Roff,

What I am unsure as to what the triangle symbols are. Are they a hex inverter. What does that do to the signal? and how can I check the voltage drops over it? Also I don't need to convert the digital signals from the stick as I am hijacking them before they get to the joysticks A/D, then sending them on to an Advantech PCL812PG board.

Sorry if this is all really basic, but I really have no idea.

Thanks
danger_85 is offline  
Old 25th September 2007, 02:28 AM   (permalink)
Default

Quote:
Originally Posted by danger_85
Hi Roff,

What I am unsure as to what the triangle symbols are. Are they a hex inverter. What does that do to the signal? and how can I check the voltage drops over it? Also I don't need to convert the digital signals from the stick as I am hijacking them before they get to the joysticks A/D, then sending them on to an Advantech PCL812PG board.

Sorry if this is all really basic, but I really have no idea.

Thanks
What kind of thesis is this, that you don't know what an inverter is?
__________________
Ron (aka Rube)

Roff is offline  
Old 25th September 2007, 02:33 AM   (permalink)
Default

I'm doing aeronautical engineering, which doesn't involve any electronics throughout the course, and thus the only electronics I have done is abit of basic stuff in high school physics. The bulk of the thesis is aircraft simulation development for a variable stability flight simulator, and this bit of electronics has come up.
danger_85 is offline  
Old 25th September 2007, 04:02 AM   (permalink)
Default

Quote:
Originally Posted by danger_85
I'm doing aeronautical engineering, which doesn't involve any electronics throughout the course, and thus the only electronics I have done is abit of basic stuff in high school physics. The bulk of the thesis is aircraft simulation development for a variable stability flight simulator, and this bit of electronics has come up.
OK, I apologize for sounding like I was belittling you. I truly was curious.
The circuit I drew is just another way of getting a unique voltage for each combination of switches. With the scheme you posted, the smallest step was less than 50 mV. With the scheme I drew, the smallest step is over 300mV. This is easy to discern with a data acquisition system.
EDIT: I previously stated that there were 8 possible states, which you could encode into 3 bits and then generate a unique voltage for each state using a 3-bit D/A (digital to analog converter, which is what the circuit you referenced is also). I was wrong. There are 9 possible states, including when all switches are off (joystick centered).
__________________
Ron (aka Rube)


Last edited by Roff; 25th September 2007 at 04:05 AM.
Roff is offline  
Old 25th September 2007, 04:11 AM   (permalink)
Default

No worries mate. Cheers for that.
danger_85 is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Touch Sensitive Switch (Take 2) MonkeyMera Electronic Projects Design/Ideas/Reviews 7 2nd October 2007 11:05 PM
Button Debounce Coding help Suraj143 Micro Controllers 25 4th August 2007 10:49 AM
Please help me in writing code abdosat2000 Micro Controllers 9 5th June 2007 02:41 PM
MAX4564 (SPDT analogue switch) TronicBrain Datasheet/Parts Requests 6 8th February 2007 12:33 PM
PIC Switch Management Techniques Mike, K8LH Micro Controllers 2 28th September 2006 01:33 PM



All times are GMT. The time now is 01:42 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker