MCP3008 analogue digital converter… how can I use it for the complete opposite of what it was made for?
up vote
2
down vote
favorite
I have set up an mcp3008 chip and a slide pot on my pi because I wanted a nice old fashioned volume control, and all of that seems to working fine and I am quite happy with it.
Now I have 7 redundant analogue channels, which I would quite like to repurpose as simple on/off buttons, because the chip just happens to be there and it would save a bunch of gpio pins which I could use for more interesting stuff.
My problem is, they seem to float wildly all over the place when there is no voltage running through them, so while I can add a switch to one and read 3.3v reliably enough, when the switch is off they just read a bunch of noise. This doesn't happen with the slide pot, presumably since one end is grounded.
Can anyone suggest a simple solution ?
Shall I just live with the noise , or is there something really obvious I am missing?
Bear in mind I am asking because I am a complete moron as far as electronics are concerened, so no answer can be too patronising :)
gpio analog-to-digital
New contributor
add a comment |
up vote
2
down vote
favorite
I have set up an mcp3008 chip and a slide pot on my pi because I wanted a nice old fashioned volume control, and all of that seems to working fine and I am quite happy with it.
Now I have 7 redundant analogue channels, which I would quite like to repurpose as simple on/off buttons, because the chip just happens to be there and it would save a bunch of gpio pins which I could use for more interesting stuff.
My problem is, they seem to float wildly all over the place when there is no voltage running through them, so while I can add a switch to one and read 3.3v reliably enough, when the switch is off they just read a bunch of noise. This doesn't happen with the slide pot, presumably since one end is grounded.
Can anyone suggest a simple solution ?
Shall I just live with the noise , or is there something really obvious I am missing?
Bear in mind I am asking because I am a complete moron as far as electronics are concerened, so no answer can be too patronising :)
gpio analog-to-digital
New contributor
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I have set up an mcp3008 chip and a slide pot on my pi because I wanted a nice old fashioned volume control, and all of that seems to working fine and I am quite happy with it.
Now I have 7 redundant analogue channels, which I would quite like to repurpose as simple on/off buttons, because the chip just happens to be there and it would save a bunch of gpio pins which I could use for more interesting stuff.
My problem is, they seem to float wildly all over the place when there is no voltage running through them, so while I can add a switch to one and read 3.3v reliably enough, when the switch is off they just read a bunch of noise. This doesn't happen with the slide pot, presumably since one end is grounded.
Can anyone suggest a simple solution ?
Shall I just live with the noise , or is there something really obvious I am missing?
Bear in mind I am asking because I am a complete moron as far as electronics are concerened, so no answer can be too patronising :)
gpio analog-to-digital
New contributor
I have set up an mcp3008 chip and a slide pot on my pi because I wanted a nice old fashioned volume control, and all of that seems to working fine and I am quite happy with it.
Now I have 7 redundant analogue channels, which I would quite like to repurpose as simple on/off buttons, because the chip just happens to be there and it would save a bunch of gpio pins which I could use for more interesting stuff.
My problem is, they seem to float wildly all over the place when there is no voltage running through them, so while I can add a switch to one and read 3.3v reliably enough, when the switch is off they just read a bunch of noise. This doesn't happen with the slide pot, presumably since one end is grounded.
Can anyone suggest a simple solution ?
Shall I just live with the noise , or is there something really obvious I am missing?
Bear in mind I am asking because I am a complete moron as far as electronics are concerened, so no answer can be too patronising :)
gpio analog-to-digital
gpio analog-to-digital
New contributor
New contributor
edited 3 hours ago
akasoggybunz
537
537
New contributor
asked 6 hours ago
Laurie Chilvers
111
111
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
6
down vote
You will have to use a Pull-Up resistor to get clean difference between the two desired states.
This way you will have no floating input but either VCC (3.3V) or GND (0.0V) at the input of your MCP3008.
(You can ignore the logic gate in the image).
(Alternatively a Pull-Down resistor will work just as well).
2
Something which confused me when I first heard of it: "pull-up" is not a special kind of resistor, it is a particular use for one ;)
– goldilocks♦
6 hours ago
2
I would try a 10k resistor per channel. That would not draw a great deal of current, would easily be defeated by a button, but would also resist random interference on the channel.
– joan
5 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
You will have to use a Pull-Up resistor to get clean difference between the two desired states.
This way you will have no floating input but either VCC (3.3V) or GND (0.0V) at the input of your MCP3008.
(You can ignore the logic gate in the image).
(Alternatively a Pull-Down resistor will work just as well).
2
Something which confused me when I first heard of it: "pull-up" is not a special kind of resistor, it is a particular use for one ;)
– goldilocks♦
6 hours ago
2
I would try a 10k resistor per channel. That would not draw a great deal of current, would easily be defeated by a button, but would also resist random interference on the channel.
– joan
5 hours ago
add a comment |
up vote
6
down vote
You will have to use a Pull-Up resistor to get clean difference between the two desired states.
This way you will have no floating input but either VCC (3.3V) or GND (0.0V) at the input of your MCP3008.
(You can ignore the logic gate in the image).
(Alternatively a Pull-Down resistor will work just as well).
2
Something which confused me when I first heard of it: "pull-up" is not a special kind of resistor, it is a particular use for one ;)
– goldilocks♦
6 hours ago
2
I would try a 10k resistor per channel. That would not draw a great deal of current, would easily be defeated by a button, but would also resist random interference on the channel.
– joan
5 hours ago
add a comment |
up vote
6
down vote
up vote
6
down vote
You will have to use a Pull-Up resistor to get clean difference between the two desired states.
This way you will have no floating input but either VCC (3.3V) or GND (0.0V) at the input of your MCP3008.
(You can ignore the logic gate in the image).
(Alternatively a Pull-Down resistor will work just as well).
You will have to use a Pull-Up resistor to get clean difference between the two desired states.
This way you will have no floating input but either VCC (3.3V) or GND (0.0V) at the input of your MCP3008.
(You can ignore the logic gate in the image).
(Alternatively a Pull-Down resistor will work just as well).
answered 6 hours ago
kwasmich
1,609718
1,609718
2
Something which confused me when I first heard of it: "pull-up" is not a special kind of resistor, it is a particular use for one ;)
– goldilocks♦
6 hours ago
2
I would try a 10k resistor per channel. That would not draw a great deal of current, would easily be defeated by a button, but would also resist random interference on the channel.
– joan
5 hours ago
add a comment |
2
Something which confused me when I first heard of it: "pull-up" is not a special kind of resistor, it is a particular use for one ;)
– goldilocks♦
6 hours ago
2
I would try a 10k resistor per channel. That would not draw a great deal of current, would easily be defeated by a button, but would also resist random interference on the channel.
– joan
5 hours ago
2
2
Something which confused me when I first heard of it: "pull-up" is not a special kind of resistor, it is a particular use for one ;)
– goldilocks♦
6 hours ago
Something which confused me when I first heard of it: "pull-up" is not a special kind of resistor, it is a particular use for one ;)
– goldilocks♦
6 hours ago
2
2
I would try a 10k resistor per channel. That would not draw a great deal of current, would easily be defeated by a button, but would also resist random interference on the channel.
– joan
5 hours ago
I would try a 10k resistor per channel. That would not draw a great deal of current, would easily be defeated by a button, but would also resist random interference on the channel.
– joan
5 hours ago
add a comment |
Laurie Chilvers is a new contributor. Be nice, and check out our Code of Conduct.
Laurie Chilvers is a new contributor. Be nice, and check out our Code of Conduct.
Laurie Chilvers is a new contributor. Be nice, and check out our Code of Conduct.
Laurie Chilvers is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Raspberry Pi Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f91870%2fmcp3008-analogue-digital-converter-how-can-i-use-it-for-the-complete-opposite%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown