|
 |
|
02-04-2007, 09:35 PM
|
#16
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
|
You would need a circuit. Simple, but a circuit. You would need to measure the voltage output of that single wire when each button is pressed. If it is only 3 switches, then it would be easier to build a circuit for treating multiple buttons down at 1 time as a seperate button (measure its voltage) and then just tie it into the output of both lines at the end.
If you can program a PIC, then that would be your best bet with a code that is something like
if voltage is between 3.330 and 3.340, then activate output 1 because button 1 is pressed.
if voltage is between 3.340 and 3.5 then activate output 2 because button 2 is pressed.
and so on.
to get the values inbetween, just measure what you get a few times, and not the gap inbetween them. For example, if you measure 0v, 4v, 7v, 11v (You will not get anything with nearly this much variance. Yours will probably all be within the same volt and only vary with the tenths of volts) then you should choose something like between 0v and 1.5v for the 0v one, and then 2v to 5v for the second, and 6v to 9v fro the third, and anything above 10v for the last button. Gives you a better range.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
02-04-2007, 09:40 PM
|
#17
|
|
Variable Bitrate
Join Date: Jan 2005
Posts: 331
|
ok makes since guees i will have to learn how to program a pic
Thanks,
Yonu
|
|
|
02-04-2007, 10:45 PM
|
#18
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
|
Well a PIC would be the easiest way with the least amount of components and the smallest footprint.
If you want to do it oldschool, then I can give you some help with TTL/CMOS chips again. I like using them. I know which part goes where, and they are easy to solder. I use TTL in everything! And since 1 chip is like $0.03, I like it!
|
|
|
02-04-2007, 10:48 PM
|
#19
|
|
Variable Bitrate
Join Date: Jan 2005
Posts: 331
|
shoot i have no prob with old school will be more reliable anyway
Thanks,
Yonu
|
|
|
02-05-2007, 07:30 AM
|
#20
|
|
Variable Bitrate
Join Date: May 2005
Location: Elizabeth City, NC
Posts: 294
|
you should use grey code, its more entertaining .... jk, there is a usb rotary knob push button they sell (on ebay or here, cant remember) that works good
__________________
95 Mazda Protege LX
Worklog
Overall [Project Dead] 0%
2003 Nissan Altima
[ XXXXXXXX--] 80% Planning
[ XX--------] 20% FABRICATION/INSTALLATION
Worklog
|
|
|
02-05-2007, 10:48 AM
|
#21
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
|
Quote: Originally Posted by gameboy 
you should use grey code, its more entertaining .... jk, there is a usb rotary knob push button they sell (on ebay or here, cant remember) that works good
But where is the fun in that?
|
|
|
02-05-2007, 10:53 AM
|
#22
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
|
Quote: Originally Posted by yonu 
shoot i have no prob with old school will be more reliable anyway
Thanks,
Yonu
I was thinking 2 ways off the top of my head.
1st would be an ADC with ok resolution. Maybe 8 bits. Then just use a bunch of AND gates to get the right outcome for each, but this would involve mapping each of the values to their endoded binary form and working from there.
The second one I think is a lot simpler, and I am not even sure it would work. But my idea was just use a potentiometer on each of the input lines to a double not (basically just up the signal from some random number fluctuations to a solid 0 or 1). Then have a MUX where it would select the lowest voltage one first, but if there is another input, then that takes presedence and send out that signal, and if there is another higher voltage in, then it takes presedence and send that out. Hard to explain. I can try harder if needed.
|
|
|
02-05-2007, 12:09 PM
|
#23
|
|
Raw Wave
Join Date: Apr 2000
Location: Surrey, UK
Posts: 2,101
|
What about a bar graph driver, LM3914 or LM3915. Basically a bunch of comparators. Should get you most of the way there with a single chip.
|
|
|
02-05-2007, 01:09 PM
|
#24
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
|
bar graph driver would be good for the ADC part. But we still need a way of determining what the actual resistance (unknown at this point) equates to and go from there. Unless there is something I am overlooking.
|
|
|
02-05-2007, 01:17 PM
|
#25
|
|
Variable Bitrate
Join Date: Jan 2005
Posts: 331
|
I will attempt to check the resistance this evening if i get a chance after work
Thanks,
Yonu
|
|
|
02-05-2007, 01:25 PM
|
#26
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
|
Check the resistance, and the exact voltage you get out too. Try to be as precise as possible so we can see what sort of variation we are talking about. And just a test make sure it doesn't fluctuate with the engine. Meaning make sure it is the same at idle as it is at higher RPM. It should be, but you never know!
|
|
|
02-05-2007, 02:40 PM
|
#27
|
|
Raw Wave
Join Date: Apr 2000
Location: Surrey, UK
Posts: 2,101
|
Quote: Originally Posted by 2k1Toaster 
bar graph driver would be good for the ADC part. But we still need a way of determining what the actual resistance (unknown at this point) equates to and go from there. Unless there is something I am overlooking. 
Make the resistance one half of a potential divider. Your resistance is now a voltage.
This really doesn't seem like rocket science.
|
|
|
02-05-2007, 05:38 PM
|
#28
|
|
Variable Bitrate
Join Date: Jan 2005
Posts: 331
|
simple question on the resistance there is no positive voltage entering the system is all based on ground so would i simple measure the resistance based on the line between the wire and ground using a ohm meter. I assume this is the info you need?
|
|
|
02-05-2007, 06:14 PM
|
#29
|
|
Variable Bitrate
Join Date: Jan 2005
Posts: 331
|
ok if i did this right in this order connected between the single wire and the 12v ground
button1=nothing on meter
button2=980
button3=781
button4=768
button5=960
the only odd thing is if I hold the button down the resistance keep changing randomly
Thanks,
Yonu
|
|
|
02-05-2007, 06:28 PM
|
#30
|
|
Fusion Brain Creator
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
|
Quote: Originally Posted by yonu 
ok if i did this right in this order connected between the single wire and the 12v ground
button1=nothing on meter
button2=980
button3=781
button4=768
button5=960
the only odd thing is if I hold the button down the resistance keep changing randomly
Thanks,
Yonu
Well is one a fast forwards and a reverse button that can be used to either advance the song a bit or advance to the next song? Or does the volume go up at a faster acceleration the longer you hold the volume button?
And those are in ohms right? Not Megaohms or anything?
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:58 PM.
| |