|
Post by papa on Jun 11, 2016 20:20:06 GMT
Simplify End Node Builds with Arduino's Internal Pullup Resistors
Since greginkansas turned me on to Arduino's internal pullup resistors, I've applied them to more node locations to reduce soldering & free some Arduino real estate. When a schematic calls for an external resistor connected "up" to 3.3 volts (a pull up resistor), we can omit that external resistor & do the pull up in the sketch. For example, a computourist-style DHT end node schematic could look like this: (Click on the pic for a larger view. I put red stars by the pullup resistors that can be achieved in sketch software.) In the DHT end node sketch is a line #define DHTPIN 4 // DHT data connection To this, we can add the following line in the setup() section: (One must put it in that setup() location) pinMode(DHTPIN, INPUT_PULLUP); ^^ If we add that sketch line in setup(), we can omit soldering in the 4.7 kilo ohm resistor. That line makes it as if we did solder in the external resistor. An end node simplified this way seems to work much the same as before.
Also in the DHT End Node, this substitution can also be done for the push button's pull up so we can omit soldering in its 10 kilo ohm resistor. PS as far as I know, a similar substitution is not possible for pull down resistors (resistors connecting a location "down" to Arduino GND). However, a sketch depending on a pulldown resistor can often be rewritten to use a pullup resistor so one can use the pullup in sketch software technique.
|
|