View previous topic :: View next topic |
Author |
Message |
nuno12345
Joined: 16 Jul 2008 Posts: 50
|
One ADC, reading multiple PWM |
Posted: Wed Sep 16, 2009 9:50 pm |
|
|
Hello, my question is, I have one ADC (3 axis), how can I read all X Y and Z with one ADC?
I can only think on relays, but they are slow and noisy...
There must be a way probably using pins as the supplys and turning them into inputs, but I cant figure it out so I can draw a schematic :/
Thanks |
|
|
bungee-
Joined: 27 Jun 2007 Posts: 206
|
|
Posted: Thu Sep 17, 2009 3:57 am |
|
|
You could use analog multiplexer, so you could avoid relays. And they are quicker.
One of analog multiplexers is 74HCT4051 (8 way)... you can look at similar smaller one. |
|
|
nuno12345
Joined: 16 Jul 2008 Posts: 50
|
|
Posted: Wed Sep 23, 2009 7:52 pm |
|
|
thank you ;) |
|
|
bkamen
Joined: 07 Jan 2004 Posts: 1615 Location: Central Illinois, USA
|
|
Posted: Wed Sep 23, 2009 11:15 pm |
|
|
Which PIC are you using? Most PIC's have multiple input channels...
You can easily (in software) select which input you'd like to sample.
-Ben _________________ Dazed and confused? I don't think so. Just "plain lost" will do. :D |
|
|
nuno12345
Joined: 16 Jul 2008 Posts: 50
|
|
Posted: Thu Sep 24, 2009 1:37 pm |
|
|
ill use 16f88, just asking ;)
Is there a way to do it ourselves? I mean...without the need of an IC (hate to use IC's lol) |
|
|
barryg
Joined: 04 Dec 2006 Posts: 41
|
|
Posted: Thu Sep 24, 2009 6:09 pm |
|
|
Well, yes, if you also willing to accept an additional question:
Is it possible to do measurements without an A/D converter?
Because if you are measuring resistance (like the potentiometers in a joystick) there are methods that involve charging and discharging a capacitor on a port pin to do the measurement. With that, you can have as many channels as you have port pins! There's an app note that explains how to do this. So if you want the cheapest possible way, there's your way |
|
|
nuno12345
Joined: 16 Jul 2008 Posts: 50
|
|
Posted: Thu Sep 24, 2009 7:55 pm |
|
|
Yes I know that RC circuit, but I'm saying something like, using the same ADC pin to measure multiple "entrances" you can do it with relays, and there are circuits that replace relays, I think :P |
|
|
barryg
Joined: 04 Dec 2006 Posts: 41
|
|
Posted: Mon Sep 28, 2009 2:05 pm |
|
|
Yes, it can be done with relays, and with circuits that replace relays.
"bungee-" mentioned a 74HCT4051. That is an electronic switch, and it does just what you're asking. "nuno12345" mentioned the PIC16F88. What you may have missed, is that this PIC has an A/D plus all that switching circuitry built in! The majority of PIC's you might choose from have this as well. Which chip were you planning to use? |
|
|
|