EveryCircuit
Contact
Reviews
Home
fluxicon
modified 6 years ago

DAC voltage reference resistor network

3
1
234
03:17:26
This is part of a LCD1602 menu project I am working on with Arduino. This concept can be applied to any program, adjust source and output values accordingly. Modelled using N.O. 5-position pushbutton switch by Parallax. 10k resistors on output of each signal line built into switch. All outputs are tied together and sent to analog input pin (represented by positive ground). N.C. pushbutton represents and unpressed state and reads 5V. It is labled as an N.C. button because it is held open any time a button is pressed, meaning the direct 5V line is interrupted by activating an output. Think of the N.C. as complimentary in this case, such that anytime a N.O. contact is closed, the N.C. contact on VCC opens. Output voltage will be converted into a respective digital value between 0-1023. The switch can be used in combined positions, for a total of 18 possibilities. This configuration of resistor values is not tested against combined outputs, it is tested in consideration of Up, Down, Left, Right, Ctr, and Null (Null being 5V = 1023 bits) and their operation as a static N.O. momentary pushbutton switch. Further testing could easily make this design useful for a well-paced, full range of 18 voltages, all of which can then be programmed using conditional operations of greater than, less than, equal to, greater than or equal to, and less than or equal to. For example, with a reference voltage of 5VDC, an output of 250mV equals 52 bits. If the output at signal line "UP" is equal to 52 then an operation of "if UP < 55 && UP !0" should always satisfy the condition. That is not a specific line of code just a generalization. A value can then be returned from this to further process the program, or it could simply be used to trigger a digital output. Each output reference voltage can be utilized for a separate function without the need for multiple inputs. One input, one source voltage, one output, multiple voltage taps. Analog switches are considerably slower but the impact on my overall program should be virtually none considering the usage factor of the circuit. The buttons should never be pressed more than 100 times within a minute. That in itself is an almost absurd exaggeration. There is a way to make an actual waited binary digital to analog converter using resistor network, however that does not specifically apply to this usage case. This is a stepped voltage divider network to convert a single digital output into multiple voltages which independently switched and served to a single analog input. I've included a switch on VCC for anyone who is particularly concerned with making sure it is disconnected before triggering any of the reference voltages in the network. You will see the impact is a virtually negligible increase of microamperes due to the parallel resistance of VCC pullup resistor and series equivalent voltage divider resistance.
published 6 years ago
hurz
6 years ago
An arduino port pin can be emulated within EC like this, you do not need two separated Push buttons you can do that all in one http://everycircuit.com/circuit/5807573799010304 for UNO its 5V which its ports can source/give and to low they can also sink/take. Hope this simplifies your ideas a little.

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2025 by MuseMaze, Inc.     Terms of use     Privacy policy