My name is Marco, and i'm new here!
I'm making an old doorbel work again. The plunjer is missing, so i decided to make it work again with Arduino. I'm using the original push button as a 5V switch.
When the doorbell is pushed, 2 solenoids are hitting the gong's.
The arduino does not read 0 without a resistor, so i did use an analogRead.
When over 1000 it turns on. I don't want to leave it that way.
It does work, but, i want to use "digitalWrite". Should i use a pull down, or a pull up resistor to make the arduino read the button is not pushed?
Does the resistor get hot inside the box of the old doorbell?
Hello marcovabu
Post your current sketch, well formated, with comments and in so called code tags "</>" and a schematic, not a Fritzy diagram, to see how we can help.
Have a nice day and enjoy coding in C++.
Дайте миру шанс
No. Since the Arduino has nearly-infinite input resistance, essentially no current flows when the switch is open. When the button is pushed the pull-up or pull-down is "overpowered" by the button/switch and current flows through the resistor. But with a 1k resistor only 5mA flows. 5mA X 5V is 25 milliwatts so not much heat and most resistors are rated are 1/8 or 1/4 Watt. With a 10K resistor it's 2.5mW.
As i would like to use it on battery's, does the difference between pull up and pull down makes a diffference?
How long will it last anyway?
And if, someone wants to hold the button of the doorbell, i want it to cut the power, just to prevent damage. Unless it is harmless to hold the button for a while?