Mp3car Home Page The mp3Car.com Forums The mp3Car.com Store The mp3Car.com Blog About mp3Car.com    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Input Devices

Notices

Reply
 
Share Thread Tools Display Modes
Old 02-04-2007, 09:35 PM   #16
Fusion Brain Creator
 
2k1Toaster's Avatar
 
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.
2k1Toaster is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 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
yonu is offline   Reply With Quote
Old 02-04-2007, 10:45 PM   #18
Fusion Brain Creator
 
2k1Toaster's Avatar
 
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!
2k1Toaster is offline   Reply With Quote
Old 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
yonu is offline   Reply With Quote
Old 02-05-2007, 07:30 AM   #20
Variable Bitrate
 
gameboy's Avatar
 
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
gameboy is offline   Reply With Quote
Old 02-05-2007, 10:48 AM   #21
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
Quote: Originally Posted by gameboy View Post
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?
2k1Toaster is offline   Reply With Quote
Old 02-05-2007, 10:53 AM   #22
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
Quote: Originally Posted by yonu View Post
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.
2k1Toaster is offline   Reply With Quote
Old 02-05-2007, 12:09 PM   #23
Raw Wave
 
Rob Withey's Avatar
 
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.
__________________
Systems retired due to new car
Rob Withey is offline   Reply With Quote
Old 02-05-2007, 01:09 PM   #24
Fusion Brain Creator
 
2k1Toaster's Avatar
 
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.
2k1Toaster is offline   Reply With Quote
Old 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
yonu is offline   Reply With Quote
Old 02-05-2007, 01:25 PM   #26
Fusion Brain Creator
 
2k1Toaster's Avatar
 
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!
2k1Toaster is offline   Reply With Quote
Old 02-05-2007, 02:40 PM   #27
Raw Wave
 
Rob Withey's Avatar
 
Join Date: Apr 2000
Location: Surrey, UK
Posts: 2,101
Quote: Originally Posted by 2k1Toaster View Post
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.
__________________
Systems retired due to new car
Rob Withey is offline   Reply With Quote
Old 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?
yonu is offline   Reply With Quote
Old 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
yonu is offline   Reply With Quote
Old 02-05-2007, 06:28 PM   #30
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,670
Quote: Originally Posted by yonu View Post
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?
2k1Toaster is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
MMI style rotary encoder install - details Tony G Input Devices 59 06-01-2008 02:41 PM
ccStick rotary encoder Cirion Input Devices 7 02-07-2007 04:46 PM
Ford Radio Rotary Encoder via PS/2 Mouse spudgunblunder Input Devices 18 01-27-2007 01:13 PM
Rotary encoder "OSK" - Request Maximus Centrafuse 8 09-23-2005 04:20 PM
7 way rotary knob monkeycat Input Devices 12 03-09-2005 07:30 AM


All times are GMT -5. The time now is 03:58 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics