Using analog channels as digital

Hi

The number of digital pins on the  IND.I/O is not enough for my project. I would like to use the analog pins as digital ones (by reading the analog value and treat everything above 50 % of the voltage range as digital 1). But the analog section is only intended for up to 10 Volts. My system works on 12 V. Is it possible to connect 12 V to the analog inputs or will they get damage

I

Hiwa
Hiwa
44
| 0 0 1
Asked on 8/23/20, 11:56 PM
0
vote
1738 Views

Hi, you can use a voltage divider with resistors to reduce the 12V to e.g. 8V with a 20K/10K voltage divider.

12V  <10K resistor>  8V (connect to analog channel) <20K resistor> GND

One customer even wrote some code to multiplex several digital inputs to 1 analog channel, see https://github.com/DG2RDD/eControls-BMS-Dry-Contacts-Multiplexer-for-Industruino

Tom
Tom
5675
| 1 1 3
Answered on 8/24/20, 12:15 AM
0
vote

Thank you Tom. is it needed to calibrate the DAC/ADC even for digial usage?

Hiwa
on 8/29/20, 11:35 PM

Hi,

I guess I'm the customer refered to by Tom ... Just ask if you want some up-to-date code, we have been tinkering a bit with it lately.

Didier, DG2R

Didier DORGUIN
Didier DORGUIN
172
| 4 1 3
Answered on 8/24/20, 6:09 AM
0
vote

Thank you so much!! I am considering to update the hardware and will notify you when approved by my manager!

Hiwa
on 8/24/20, 9:29 PM

Hi

My goal is to avoid special Hardware hacks. Otherwise, a voltage divider is the best way to go. But I interpret your answer as that the analog channels will damage if voltages above 10 V are applied.

Hiwa
Hiwa
44
| 0 0 1
Answered on 8/24/20, 12:44 AM
0
vote

Your answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

62 follower(s)

Stats

Asked: 8/23/20, 11:56 PM
Seen: 1738 times
Last updated: 8/24/20, 6:09 AM