<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" >

<channel><title><![CDATA[My Stoopid Stuff - Lec\'tronics]]></title><link><![CDATA[https://www.mystoopidstuff.com/lectronics]]></link><description><![CDATA[Lec\'tronics]]></description><pubDate>Sun, 17 Aug 2025 01:03:20 -0700</pubDate><generator>Weebly</generator><item><title><![CDATA[Testing a USB Boost Converter board for the new Stanley Solder Fume Extractor]]></title><link><![CDATA[https://www.mystoopidstuff.com/lectronics/testing-a-usb-boost-converter-board-for-the-new-stanley-solder-fume-extractor]]></link><comments><![CDATA[https://www.mystoopidstuff.com/lectronics/testing-a-usb-boost-converter-board-for-the-new-stanley-solder-fume-extractor#comments]]></comments><pubDate>Sat, 13 Mar 2021 07:11:00 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.mystoopidstuff.com/lectronics/testing-a-usb-boost-converter-board-for-the-new-stanley-solder-fume-extractor</guid><description><![CDATA[I'm working on a re-design of my small Stanley solder fume extractor and it will use some new parts.&nbsp; The key component that made me decide to re-visit the original design was a board that integrates the USB Lipo charging and battery management, along with a boost circuit to raise the output to as much as 12v.&nbsp; In the prior design, much of the wire clutter in the case was due to the wires needed to connect two boards which handled this independently.&nbsp; Additionally the old design f [...] ]]></description><content:encoded><![CDATA[<div class="paragraph">I'm working on a re-design of my small Stanley solder fume extractor and it will use some new parts.&nbsp; The key component that made me decide to re-visit the <a href="http://www.mystoopidstuff.com/blog/solder-fume-extractor-for-the-stanley-case" target="_blank">original design</a> was a board that integrates the USB Lipo charging and battery management, along with a boost circuit to raise the output to as much as 12v.&nbsp; In the prior design, much of the wire clutter in the case was due to the wires needed to connect two boards which handled this independently.&nbsp; Additionally the old design failed so it was time for a change.&nbsp; I am also adding a larger fan which will help with the biggest problem with the old design, and the reason I never posted it - it was not powerful enough.<br /><br /><strong>Parts list:</strong><ul><li><a href="https://www.amazon.com/gp/product/B00Q7XB5AS/" target="_blank">60x25mm 12v fan</a></li><li><a href="https://www.amazon.com/gp/product/B07BTVS98X/" target="_blank">1000mAh Lipo 523050 Battery</a></li><li><a href="https://www.amazon.com/gp/product/B08GWTBD3T/" target="_blank">USB Lithium battery charging (TP4056) and boost module</a></li><li>1N4007 diode <strong>(I later found this is not needed since there was no voltage spike seen when shutting off my brushless fan)</strong><br /></li><li>USB power supply</li><li>small screwdriver for adjusting the output voltage on the board</li></ul><br />Testing:<br /><br />So the point of this is to see if the board can power the fan sufficiently or not.&nbsp; The problem is that the boost driver tops out around 12V so it will not be as efficient and it may not supply enough current.&nbsp; What I found was that although the voltage did drop to 10V when I had the fan on, it did seem to put out maybe 80% of the output of the fan when it was fully powered off my bench supply.&nbsp; It seems like it will work.&nbsp; I also had to adjust the board v out since by default it is set around 5v, this is done using a small potentiometer while the fan was running.&nbsp; I turned it up as high as I could get it to go when connected to a USB power supply (I will have to repeat this test with the battery and see if it will work.&nbsp; I found that I needed around 13.47V (without the fan) or 10.7V when it was loaded with the fan running.&nbsp; With the fan on, it pulled 0.126A (powered from the UBS).&nbsp; I also have a IN4007 diode connected across the V-out connections as shown, this acts as a flyback diode to help protect the board when the fan is turned off and the current reverses momentarily<strong> (note that I later found this was not needed by testing for a spike using a scope, I left this diode out in the final design)</strong>.&nbsp;<br /><br />One issue with this fan is that it squeals a bit when it starts up running from the USB board, though that does not happen when it starts using the bench supply.&nbsp; I didn't however notice this squeal when the final assembly was done, and the fan was turned on, not sure why that is but I will take it.<br /><br />Below are some pics of the testing setup:</div>  <div><div style="height: 20px; overflow: hidden;"></div> 				<div id='830015977508174705-gallery' class='imageGallery' style='line-height: 0px; padding: 0; margin: 0'><div id='830015977508174705-imageContainer0' style='float:left;width:33.28%;margin:0;'><div id='830015977508174705-insideImageContainer0' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board_orig.jpg' rel='lightbox[gallery830015977508174705]'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><div id='830015977508174705-imageContainer1' style='float:left;width:33.28%;margin:0;'><div id='830015977508174705-insideImageContainer1' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-3_orig.jpg' rel='lightbox[gallery830015977508174705]'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-3.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><div id='830015977508174705-imageContainer2' style='float:left;width:33.28%;margin:0;'><div id='830015977508174705-insideImageContainer2' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-4_orig.jpg' rel='lightbox[gallery830015977508174705]'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-4.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><div id='830015977508174705-imageContainer3' style='float:left;width:33.28%;margin:0;'><div id='830015977508174705-insideImageContainer3' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-2_orig.jpg' rel='lightbox[gallery830015977508174705]' title='Should clarify that I first adjusted the voltage as high as it could go with the fan on, and then removed it to see what the unloaded v-out would be, which is around 13.5v as seen here.'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-2.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><div id='830015977508174705-imageContainer4' style='float:left;width:33.28%;margin:0;'><div id='830015977508174705-insideImageContainer4' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-battery_orig.jpg' rel='lightbox[gallery830015977508174705]' title='I have not tested using the battery yet, but will run this test again with it instead of the USB power.'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-battery.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><div id='830015977508174705-imageContainer5' style='float:left;width:33.28%;margin:0;'><div id='830015977508174705-insideImageContainer5' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-diode-board_orig.jpg' rel='lightbox[gallery830015977508174705]' title='IN4007 diode used to protect the board from reverse current from the fan spinning down after it is powered off (the fan is an inductive load and it will still be spinning acting like a generator until it fully stops and the electric field in the coils can dissipate).  After testing however I found that this was not needed for my brushless fan (all PC fans should be brushless these days).  I left the diode out of the final design and would not recommend using one.'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-diode-board.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><span style='display: block; clear: both; height: 0px; overflow: hidden;'></span></div> 				<div style="height: 20px; overflow: hidden;"></div></div>  <div class="paragraph">For the sake of comparison, I also tested with my bench supply.&nbsp; I was interested in how well the fan worked when supplied as much current as it wanted, and noticed a difference but it was not huge.&nbsp; The fan pulled about 0.13A @ 12V.&nbsp; I also used the flyback diode in this set up (again note the diode is not needed and was removed from the final design).<br /></div>  <div><div style="height: 20px; overflow: hidden;"></div> 				<div id='836169831469518092-gallery' class='imageGallery' style='line-height: 0px; padding: 0; margin: 0'><div id='836169831469518092-imageContainer0' style='float:left;width:33.28%;margin:0;'><div id='836169831469518092-insideImageContainer0' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-8_orig.jpg' rel='lightbox[gallery836169831469518092]'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-8.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><div id='836169831469518092-imageContainer1' style='float:left;width:33.28%;margin:0;'><div id='836169831469518092-insideImageContainer1' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-6_orig.jpg' rel='lightbox[gallery836169831469518092]'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-6.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><div id='836169831469518092-imageContainer2' style='float:left;width:33.28%;margin:0;'><div id='836169831469518092-insideImageContainer2' style='position:relative;margin:5px;'><div class='galleryImageHolder' style='position:relative; width:100%; padding:0 0 75%;overflow:hidden;'><div class='galleryInnerImageHolder'><a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-7_orig.jpg' rel='lightbox[gallery836169831469518092]'><img src='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/stanley-fan-adj-board-7.jpg' class='galleryImage' _width='1200' _height='675' style='position:absolute;border:0;width:133.33%;top:0%;left:-16.67%' /></a></div></div></div></div><span style='display: block; clear: both; height: 0px; overflow: hidden;'></span></div> 				<div style="height: 20px; overflow: hidden;"></div></div>  <div class="paragraph">I tested this again using only the battery which was fully charged using the board shown above.&nbsp; I found that I had to turn the potentiometer down just a touch from where it was when running on the USB input, but it was still able to reliably deliver 10.1V (didn't check the amps this time but the fan seemed to have a good amount of suction).&nbsp; <br /><br />I tested the suction using a candle and a toothpick to generate some smoke and was able to hold it about 5" away and get the fumes drawn into the fan. It was usable for about 50 minutes off the fully charged battery (which by then measured 3.41V), and dropped out to being barely on at 53 minutes, at which point the battery was at 3.40V.&nbsp; I did the test with the carbon filter in place, and so I think this may be the answer to the problems I had previously (larger fan and larger battery).&nbsp; One issue is that when used upright at least, there seems to be a sweet spot where fumes get sucked through the fan, but outside that area which may be 2" wide, it will start to go around the fan (but still gets sucked away).&nbsp; I think adding some folding shutters to the sides may help keep more of the fumes going through the fan than around it.&nbsp; The problem however is that this fan is crammed full of stuff and there is no room to add that (update - the final design incorporates a simple duct to help with this issue).<br /><br />I also found a way to add a micro mini (low profile) fuse and fuse holder to this without changing much of the design.&nbsp; The fuse will be accessible from the front and shouldn't look too bad.<br /></div>]]></content:encoded></item><item><title><![CDATA[Smoke Detector Notes (DYP-ME0010-A)]]></title><link><![CDATA[https://www.mystoopidstuff.com/lectronics/smoke-detector-notes-dyp-me0010-a]]></link><comments><![CDATA[https://www.mystoopidstuff.com/lectronics/smoke-detector-notes-dyp-me0010-a#comments]]></comments><pubDate>Sat, 09 Jun 2018 20:46:40 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.mystoopidstuff.com/lectronics/smoke-detector-notes-dyp-me0010-a</guid><description><![CDATA[       The following is the product info for the DYP-ME0010-A smoke sensor relayOperating voltage: DC9VStandby current: 10UAInduced current: less than 30MAOutput: Relay normally open, normally closed, or the output high and lowSensitivity: AdjustableWorking temperature: -5 -50 &#8451;Smoke module wiring instructionsBlack: Power groundRed: positive power supply DC9VWhite: Relay normally openBlue: relay commonGreen: The relay normally closed terminalSimple test method:1. press the test button 3S,  [...] ]]></description><content:encoded><![CDATA[<div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/sdr-4_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph">The following is the product info for the DYP-ME0010-A smoke sensor relay<br /><br />Operating voltage: DC9V<br />Standby current: 10UA<br />Induced current: less than 30MA<br />Output: Relay normally open, normally closed, or the output high and low<br />Sensitivity: Adjustable<br />Working temperature: -5 -50 &#8451;<br /><br />Smoke module wiring instructions<br /><strong><font color="#2a2a2a">Black: Power ground</font><br /><font color="#a82e2e">Red: positive power supply DC9V</font><br />White: Relay normally open<br /><font color="#24678d">Blue: relay common</font><br /><font color="#508d24">Green: The relay normally closed terminal</font></strong><br /><br />Simple test method:<br />1. press the test button 3S, light starts flashing, the relay normally open relay with common terminal connected.<br />2. can also be smoking cigarettes, the smoke blowing in the maze, so 3S light starts flashing, the relay, the relay is turned often start with common<br /><br /><br /><strong>My Notes:</strong><br /><br />Adjusting the POT clockwise seems to increase sensitivity (I only went 1/2 turn since it may not have a stop).<br /><br />When it detects smoke, the LED will flash (prior to triggering), and then when it finally triggers, it will flash continuously for a bit and then slower, which I think is just indicating some threshold is met on the sensor.&nbsp; When triggered, the relay will switch, but will only stay latched for about 1min before switching back if the smoke is removed.&nbsp; When triggered there was 8.63v on the "out" line on the header to the right of the relay (that was with 9v input Vcc for the sensor), I suppose that could be used for an alarm or buzzer.<br /><br />If power is disconnected, the relay it will revert to the normally closed (green wire) terminal connected to common (blue wire).&nbsp; Interestingly I triggered it, and accidentally pulled the ground wire, which flipped the relay back to NC, but when I reconnected it, the relay went back to NO (alarm) for less than a minute before reverting to NC, possibly due to some residual smoke still in the sensor.<br /><br /><strong>This relay does not latch</strong> so it won't be good for keeping something turned off after smoke is detected which sucks.&nbsp; Will need to use some additional logic or circuit stuff to make that happen.<br /></div>]]></content:encoded></item><item><title><![CDATA[Initial Design for a Smoke Detector Relay with NodeMCU]]></title><link><![CDATA[https://www.mystoopidstuff.com/lectronics/initial-design-for-a-smoke-detector-relay-with-nodemcu]]></link><comments><![CDATA[https://www.mystoopidstuff.com/lectronics/initial-design-for-a-smoke-detector-relay-with-nodemcu#comments]]></comments><pubDate>Sat, 09 Jun 2018 04:40:15 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.mystoopidstuff.com/lectronics/initial-design-for-a-smoke-detector-relay-with-nodemcu</guid><description><![CDATA[       The circuit diagram is just an outline for what I am hoping to build.&nbsp; The quality of the pic above sux and I can't seem to fix that since the decent (readable) image I uploaded is getting optimized or something when it is posted.&nbsp; I have not used the NodeMCU and my Arduino skills are really rusty, but there are enough tutorials out there and libraries that should help with the hardest parts of making this happen.&nbsp; The following are the major components I plan to use:9V Smo [...] ]]></description><content:encoded><![CDATA[<div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0px;margin-right:0px;text-align:center"> <a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/smokedetector-relay-nodemcu-v9-schem-batt-bu-section-copy_orig.jpg' rel='lightbox' onclick='if (!lightboxLoaded) return false'> <img src="https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/smokedetector-relay-nodemcu-v9-schem-batt-bu-section-copy_orig.jpg" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph">The circuit diagram is just an outline for what I am hoping to build.&nbsp; The quality of the pic above sux and I can't seem to fix that since the decent (readable) image I uploaded is getting optimized or something when it is posted.&nbsp; I have not used the NodeMCU and my Arduino skills are really rusty, but there are enough tutorials out there and libraries that should help with the hardest parts of making this happen.&nbsp; The following are the major components I plan to use:<br /><br /><ul><li>9V Smoke Detector Relay (Ebay: Smoke Sensor Module Smoke Detector w/ Relay Output J6J4)</li><li>30A 12V Realy with logic level input (Ebay: 5V/12V/24V 30A Optocoupler Isolation Relay Board Module High/Low Trigger)</li><li><a href="https://www.youtube.com/watch?v=NEo1WsT5T7s" target="_blank">NodeMCU</a> (ESP8266)</li></ul></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/sdr1_orig.jpg" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph" style="text-align:left;">The first part of the project was to set up a battery backup circuit.&nbsp; I wanted to have it run from a 9v battery in the event that mains power was down.&nbsp; So I found some examples of exactly what I was looking for, and used them.&nbsp; The P-Channel MOSFET is apparently ideal for this task since it normally will conduct when the gate is at 0v (assuming that the Source voltage is positive).&nbsp; Below are the links to the info I used&nbsp; or found helpful for the battery backup part of the design so far:<br /><br />Good explainations of P-channel MOSFETS:<br /><a href="https://www.baldengineer.com/p-channel-mosfet-tutorial-with-only-positive-voltages.html" target="_blank">https://www.baldengineer.com/p-channel-mosfet-tutorial-with-only-positive-voltages.html</a><br /><a href="https://www.youtube.com/watch?v=14mYnsWK7QM" target="_blank">https://www.youtube.com/watch?v=14mYnsWK7QM</a><br /><br />Example battery backup circuit designs - the design below is duplicated from these:<br /><a href="https://electronics.stackexchange.com/questions/219353/battery-backup-supply-switch-over-design" target="_blank">https://electronics.stackexchange.com/questions/219353/battery-backup-supply-switch-over-design</a><br /><a href="https://www.disk91.com/2014/technology/internet-of-things-technology/make-an-usb-power-supply-with-backup-battery/" target="_blank">https://www.disk91.com/2014/technology/internet-of-things-technology/make-an-usb-power-supply-with-backup-battery/</a><br /><a href="https://www.eevblog.com/forum/chat/battery-backup-circuit/" target="_blank">https://www.eevblog.com/forum/chat/battery-backup-circuit/</a><br /><br />Since I have not used P-Channel MOSFETs in the past, the youtube videos saved my sanity when I thought I had screwed up (but hadn't).&nbsp; I had also read several things online that put me on a wild goose chase for a "depletion" mode P-Channel MOSFET - which are like hens teeth - and not necessary.&nbsp; For some reason, almost all of the P-Channel MOSFETs available are "enhancement" mode, so the depletion mode type are unavailable or very expensive (in that small quantities are not available).&nbsp; Anyway enhancement mode work just fine for this it seems, and so once I got back on track with that, I was able to order some and give it a test.&nbsp;<br /><br /><font size="5">P-Channel MOSFET notes...</font><br /><br />The pics further down show my test setup with the mains power (the voltage regulator on the left) turned on, and a backup 9v battery connected.&nbsp; The P-channel MOSFET is the "<a href="https://www.infineon.com/dgdl/irf5305pbf.pdf?fileId=5546d462533600a4015355e370101993" target="_blank">IRF5305PbF</a>" and the pinout is Gate / Drain / Source (looking at the labeled side of the part).&nbsp; This part has a "Gate Threshold Value" of -2 to -4 volts (that's right negative voltage).&nbsp; Specifically the Gate Threshold Voltage is the voltage difference between the Gate and Source.&nbsp; The link above for the <a href="http://baldengineer.com" target="_blank">baldengineer.com</a> site has a good explanation of what it takes to trigger a P-Channel MOSFET, which I understand (in this case) to be basically this:<br /><br /><font size="5">Gate Voltage - Source Voltage &gt; Gate Threshold Voltage = OFF<br /><br />Gate Voltage - Source Voltage &lt;= Gate Threshold Voltage = ON</font><br /><br />There may be more to it than that, but that's how I understand it now.&nbsp; So in my case, the Gate would be 12V and the Source would be connected to my 9V battery.&nbsp; The drain is connected to the Vcc going to the LED's in this test case.&nbsp; Therefore, when the mains is connected and there is 12V input to the device, the battery should be disconnected completely (12V - 9V = 3V &gt;&nbsp; -2V)&nbsp; where -2V is the higher end of the Gate Threshold Voltage from the datasheet. If mains power is lost then the 12V on the gate will drop to zero and the battery should be allowed to take over (0V - 9V = -9V &lt; -2 (to -4)V) so the P-channel MOSFET should be ON, connecting the 9V battery to the Vcc Supply line for the rest of the circuit.&nbsp; I tested this and it seems to work well, though I have left in the Schottky diodes to protect from reverse polarity on the battery (they may not be necessary but since I have volts to spare I am leaving them in).&nbsp; I probably could have used regular diodes for the reverse protection, I just wanted something to protect against an accidental, and brief flipping of the battery connector when installing it, I don't thing there is any point to the diode after the 9v regulator though and probably would remove that from the final design.<br /><br />So here are some pics showing the testing - first the scenario where mains is on, and I don't want the battery connected at all.&nbsp; The multimeter is testing current flow from the battery positive to the P-Channel MOSFET source pin (there is a diode in there also).&nbsp; There is no current because the MOSFET is not conducting.&nbsp; Note that there is a 9v regulator but the gate is connected to 12v.&nbsp; The 9v regulator is fed by the 12v supply on the left which is also where I get the 12v for the gate, and the regulator outputs 9v into the power rail that the LED's supply from.<br /><br />So here the test with the mains power on, supplying 12v to the circuit, and the LEDs (supplied from the 9v regulator) are also on.&nbsp; The battery is disconnected since the MOSFET is not conducting:<br /><br /><font size="5">Gate Voltage - Source Voltage &gt; Gate Threshold Voltage = OFF<br />12 volts&nbsp;&nbsp; -&nbsp; 9 volts &gt; -2 (to -4) volts&nbsp; =&nbsp; OFF</font><br /><br /></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0px;margin-right:0px;text-align:center"> <a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/smokedetector-relay-batt-bu_1_orig.png' rel='lightbox' onclick='if (!lightboxLoaded) return false'> <img src="https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/smokedetector-relay-batt-bu_1_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0px;margin-right:0px;text-align:center"> <a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/sdr2-batt-backup-ckt_orig.jpg' rel='lightbox' onclick='if (!lightboxLoaded) return false'> <img src="https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/sdr2-batt-backup-ckt_orig.jpg" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph">Next is the condition where mains power is down, and the battery must take over.&nbsp; It is the identical setup as above, I just turned off the 12v supply on the left.&nbsp; So now the gate voltage is dropped to zero, and the supply (where the 9v battery is connected is still at 9v). Note that the pics don't show the LEDs being on very well since these are color changing LEDs (what I had handy) and they transition so when I got the pic only one appears lit - but they were all on.<br /><br /><font size="5">Gate Voltage - Source Voltage &lt;= Gate Threshold Voltage = ON<br />0 volts &nbsp; -&nbsp;&nbsp; 9 volts&nbsp;&nbsp; &lt;&nbsp;&nbsp; -2 (to -4) volts&nbsp; =&nbsp; ON</font><br /></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0px;margin-right:0px;text-align:center"> <a href='https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/sdr2-batt-backup-ckt2_orig.jpg' rel='lightbox' onclick='if (!lightboxLoaded) return false'> <img src="https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/sdr2-batt-backup-ckt2_orig.jpg" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph">So that's pretty much that for the backup and power part of the circuit.&nbsp; The rest of it will be the hard part - programming the NodeMCU to do my bidding - and I am not sure if that will kill this project or not.&nbsp; <br /></div>]]></content:encoded></item><item><title><![CDATA[Arduino with HC-06 Bluetooth Module]]></title><link><![CDATA[https://www.mystoopidstuff.com/lectronics/arduino-with-hc-06-bluetooth-module]]></link><comments><![CDATA[https://www.mystoopidstuff.com/lectronics/arduino-with-hc-06-bluetooth-module#comments]]></comments><pubDate>Sat, 17 Jan 2015 08:09:29 GMT</pubDate><category><![CDATA[Arduino]]></category><category><![CDATA[Wireless]]></category><guid isPermaLink="false">https://www.mystoopidstuff.com/lectronics/arduino-with-hc-06-bluetooth-module</guid><description><![CDATA[ Arduino with HC-06 BlueTooth Module.&nbsp; Click here for more info.  [...] ]]></description><content:encoded><![CDATA[<span class='imgPusher' style='float:left;height:0px'></span><span style='display: table;width:314px;position:relative;float:left;max-width:100%;;clear:left;margin-top:0px;*margin-top:0px'><a href='https://www.mystoopidstuff.com/arduino-bluetooth-hc-06.html'><img src="https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/8803022.jpg?308" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 10px; border-width:0; max-width:100%" alt="Picture" class="galleryImageBorder wsite-image" /></a><span style="display: table-caption; caption-side: bottom; font-size: 90%; margin-top: -10px; margin-bottom: 10px; text-align: center;" class="wsite-caption"></span></span> <div class="paragraph" style="text-align:justify;display:block;"><span style="color:rgb(131, 114, 83); font-weight:400"><span style="color:rgb(131, 114, 83); font-weight:400"><span style="color:rgb(131, 114, 83); font-weight:400"><span style="color:rgb(131, 114, 83); font-weight:400"><span><span><span><span><span><span><span><span><span>Arduino with HC-06 BlueTooth Module.&nbsp; Click <a href="http://www.mystoopidstuff.com/arduino-bluetooth-hc-06.html" target="_blank">here</a> for more info.</span></span></span></span></span></span></span></span></span></span></span></span></span><br /></div> <hr style="width:100%;clear:both;visibility:hidden;"></hr>]]></content:encoded></item><item><title><![CDATA[Arduino 16x2 with I2C backpack]]></title><link><![CDATA[https://www.mystoopidstuff.com/lectronics/arduino-16x2-with-i2c-backpack]]></link><comments><![CDATA[https://www.mystoopidstuff.com/lectronics/arduino-16x2-with-i2c-backpack#comments]]></comments><pubDate>Sat, 17 Jan 2015 06:32:08 GMT</pubDate><category><![CDATA[Arduino]]></category><category><![CDATA[Display]]></category><guid isPermaLink="false">https://www.mystoopidstuff.com/lectronics/arduino-16x2-with-i2c-backpack</guid><description><![CDATA[ 	 		 			 				 					 						          					 								 					 						  Arduino 16x2 LCD with I2C backpack, click here for more.   					 							 		 	  [...] ]]></description><content:encoded><![CDATA[<div><div class="wsite-multicol"><div class="wsite-multicol-table-wrap" style="margin:0 -15px;"> 	<table class="wsite-multicol-table"> 		<tbody class="wsite-multicol-tbody"> 			<tr class="wsite-multicol-tr"> 				<td class="wsite-multicol-col" style="width:50%; padding:0 15px;"> 					 						  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a href='https://www.mystoopidstuff.com/arduino-16x2-lcd.html'> <img src="https://www.mystoopidstuff.com/uploads/1/2/9/4/12949353/9678527_orig.jpg" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>   					 				</td>				<td class="wsite-multicol-col" style="width:50%; padding:0 15px;"> 					 						  <div class="paragraph" style="text-align:left;"><span style='text-decoration:none; font-style:normal; font-weight:400; color:rgb(131, 114, 83); '><span style="text-decoration:none; font-style:normal; font-weight:400; color:rgb(131, 114, 83); "><span style="text-decoration:none; font-style:normal; font-weight:400; color:rgb(131, 114, 83); "><span style="text-decoration:none; font-style:normal; font-weight:400; color:rgb(131, 114, 83); "><span style="text-decoration:none; font-style:normal; font-weight:400; color:rgb(131, 114, 83); "><span style=""><span style=""><span style=""><span style="">Arduino 16x2 LCD with I2C backpack, <a href="https://www.mystoopidstuff.com/arduino-16x2-lcd.html">click here</a> for more.<br /></span></span></span></span></span></span></span></span></span></div>   					 				</td>			</tr> 		</tbody> 	</table> </div></div></div>]]></content:encoded></item></channel></rss>