So I'm attempting to layout this circuit I found from
http://www.discovercircuits.com/H-Corner/Press-and-Hold-Latching-Circuit.htm into my PCB layout for a project of mine. I've been looking for a long press on AND off latch and this is the only circuit I've personally come across to do what I want. The following text is from the site:
"A Discover Circuits visitor needed a latch circuit which could operate using a power supply voltage ranging from 3v to 24v. He wanted to use a tiny pushbutton switch to turn on and off power to a load. However, he wanted a 2 second delay between the switch activation and the state change of the output. The delay would prevent accidental activation of the circuit from a quick push button switch closure. The circuit below performs this function. A dual Schmitt trigger inverter IC and a single flip/flop IC form the heart of the circuit. The A1A section performs the 2 second delay function.
The Q output of the flip/flop is inverted by the A1B inverter section and fed to the flip/flop’s data input. This configuration forms a data type flip/flop which changes state with each leading edge pulse from the A1A inverter. The transistor chosen should be able to handle about an Amp of current. I used a 3.3v shunt type voltage regulator, which draws about 15ua of current from the supply voltage to limit the voltage fed to the circuit to 3.3v but the circuit can operate fine from a 3v supply. In fact, the latch circuit will operate below 1v but at such a low voltage the Q1 transistor will not fully turn on. If the supply voltage is limited to 5v, the shunt regulator is not needed and the circuit will operate while drawing a very low current of about 1ua."Being new to PCB design and electronics in general, I have several questions. My project is powered from a single cell lipo that goes to this switch, and then to a boost converter which will boost the voltage up to 5 volts to run everything. It appears that in this original schematic they had a need for up to 24v, and as a result of that they've used a "shunt type voltage regulator", which is suppose to limit the current to the switch to 3.3V. It says you can remove this if the voltage is limited to 5V. So I believe I've made this change correctly but would like someone to confirm.
My second question is concerned with my PCB layout. In the schematic it has 3.3V going to each of the IC's but no decoupling caps. I've included those caps in my schematic, are they correct and am I feeding power to them properly on the PCB layout? B1 is the battery terminal so the lipo will be directly connected to those pads.
My other questions is the 4 wire junction of the schematic, In my schematic that would be the junction of D5, R5, and C3 leading to pin 1 of U4. These are always rather confusing to me and I'm unsure exactly how to lay this out, so I've used a via. Is this acceptable/will it work?
So basically I'm just hoping someone could take a look over my PCB layout and make sure I'm not making any obvious mistakes. I should mention that the green pads on the PCB layout image are the switch for the circuit which is located on the underside of the board. R5 IS connected to the switch, its just the trace is underneath another one on the top layer so its not visible.
Below is my list of components I'll be using, as far as I can tell they appear to match whats in the original schematic.
Gate/Inverter:
https://lcsc.com/product-detail/Gates-and-Inverters_Texas-Instruments_SN74LVC2G14DBVR_Texas-Instruments-Texas-Instruments-SN74LVC2G14DBVR_C12401.htmlFlip Flop:
https://lcsc.com/product-detail/Flip-Flops_Texas-Instruments_SN74LVC1G79DBVR_Texas-Instruments-Texas-Instruments-SN74LVC1G79DBVR_C42878.htmlDidoe:
https://lcsc.com/product-detail/Switching-Diode_1N4148W_C81598.html/?href=jlc-SMTMOSFET:
https://lcsc.com/product-detail/MOSFET_Shikues-FDN337N_C475694.html/?href=jlc-SMTBelow is my current schematic and PCB layout.