@mrbond007 Black wire is not a valid descriptor. The schematic and sketch you referred us to earlier has what is needed. I will try to explain.
The entire device is designed to send an SMS when the mains power fails. A 12V wall wart is plugged into the device. I did a screen grab of the 12V power front end.
The current flows from +12V to ground. In order to get to ground it flows thru R3 then R1 then R2. The values of the resistors will cause pin Digital 2 to 'see' 5VDC (basically R3 + R1 consume 7V while R2 is 5V). As long as it stays at 5VDC then all is well, as soon as it goes to 0 a powerfail has happened.
Got it?
You are a life saver @zander. You gave me a clear and precise explanation which I was searching all over internet since last few days.
@mrbond007 Make sure you see my edited response, basically No diode, move the wires on the 5V pin to VIN, DONE!
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@mrbond007 Make sure you see my edited response, basically No diode, move the wires on the 5V pin to VIN, DONE!
This seems perfect.
If by control cable you mean the 5V detection circuit then yes.
I'm sorry. I'm on mobile and it feels a complete disaster when using a forum through mobile. I meant to say signal cable instead of control. The signal cable is connected to pin 2. Correct?
@mrbond007 It's a wire from the Arduino Digital input pin D2 to the output of the 12V to 5V voltage divider. Language is critical.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@mrbond007 All the information I needed and had was your link to the create.arduino project hub. Mind you I worked in software for over 50yrs and was trained in electronics albeit old tube stuff but some parts like a voltage divider don't change.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@mrbond007 It's a wire from the Arduino Digital input pin D2 to the output of the 12V to 5V voltage divider. Language is critical.
Thanks a lot. Crystal clear explanation. This means that the pin 2 has input limit of 5V that's why we have used voltage divider to drop 5V. Correct?
@mrbond007 All the information I needed and had was your link to the create.arduino project hub. Mind you I worked in software for over 50yrs and was trained in electronics albeit old tube stuff but some parts like a voltage divider don't change.
Your experience speaks for itself plus you are humble person to take my annoying questions without getting annoyed.
@mrbond007 Not quite, the Arduino UNO is a 5V logic level MPU, the 5V is the equivalent of TRUE as in it's TRUE the power is still on. 0V is FALSE as in the mains have gone off therefore there is NO or 0 volts on pin 2 so do that thing you do so well and tell MrBond007 that his power is off.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@mrbond007 Not quite, the Arduino UNO is a 5V logic level MPU, the 5V is the equivalent of TRUE as in it's TRUE the power is still on. 0V is FALSE as in the mains have gone off therefore there is NO or 0 volts on pin 2 so do that thing you do so well and tell MrBond007 that his power is off.
Voila. Now I understand why the voltage is dropped only to 5V not to 6V or 4V. Its because the 5V represents "ON" That's a intresting thing I learned today.
@mrbond007 Not quite, the Arduino UNO is a 5V logic level MPU, the 5V is the equivalent of TRUE as in it's TRUE the power is still on. 0V is FALSE as in the mains have gone off therefore there is NO or 0 volts on pin 2 so do that thing you do so well and tell MrBond007 that his power is off.
I can't convince myself if I don't understand why something is happening. Same was happening in this case I know that voltage is being dropped but why, I was not getting that. I thought it was because of power input of pin 2 and many more confusions. You cleared all doubts related to it one single post.
@mrbond007 You should go back to your original post now and mark it as Solved.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander can you please suggest me a few resources like books, blogs, articles, courses and youtube channel or videos where I can learn more about electronics and Arduino?
@mrbond007 You should go back to your original post now and mark it as Solved.
Can I keep this post open for a few days please? I'll need help while putting on the components on the soldering board.
@mrbond007 Sorry, I am 80yo, don't use YT for much other than seeing what other travellers are up to and of course watching the antics of the dogs. All I can tell you is I was interested in electronics at about 9 or 10 so by the time I got to school I was fairly knowledgeable. 4 yrs of HS, couple years heavy industry then IBM where I took several internal courses that were 3 months in duration of all day intensity. When I had my company and I was bidding on a contract for some piece of software I was unfamiliar with I would go to the bookstore and get at least 3 books, one as almost always a Dummy book the others were either authors I knew, publishers I knew, or random chance.
I really have no idea what you should do because when I was hiring, we considered people with 10,000 hours to be newbies, 20,000 hrs to be qualified and I was mostly looking for guys with 40,000 hours.
Watching Bill's (DroneBotWorkshop) videos is a good start.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.