I tried and succeeded to some extent, I tried to copy samples from the internet but couldn’t understand why sometimes it falsely triggers when I first power on the circuit. Remember I’m not an engineer, so I get lost easily.
I don’t want to feel like I’m taking advantage, so if you don’t mind, I want to pay you for your time, in exchange for your help. If the NAND chip is a better choice I’m good with that. I just need a schematic so I can put it together! Please let me know what you think.
You don't have to try to contact me, and I don't do this for pay -- it's my hobby.
I prefer answering all questions on the forum so everyone can benefit from the answers.
Below is the circuit with an added NOR-gate latch to indicate that the power has been reset (green trace).
V3 resets the latch (purple trace).
(A NOR-gate latch turned out to be simpler than a NAND-gate latch for the given signal polarities.)
I was watching some videos (trying to learn all I could about NAND NOR etc...), now looking at your new schematic it begins to make sense! Well if you cannot accept not even donations, then I can only use my words: THANK YOU!! I will put the circuit together tonight, and will follow up with results.
Maybe you should try and fix the pi code. How often does it crash? Can you add a monitor of some kind that can print "entered x sub", "exited x" etc. Can you monitor free memory in case it's a memory leak?
You don't have to try to contact me, and I don't do this for pay -- it's my hobby.
I prefer answering all questions on the forum so everyone can benefit from the answers.
Below is the circuit with an added NOR-gate latch to indicate that the power has been reset (green trace).
V3 resets the latch (purple trace).
(A NOR-gate latch turned out to be simpler than a NAND-gate latch for given signal polarities.)
Maybe you should try and fix the pi code. How often does it crash? Can you add a monitor of some kind that can print "entered x sub", "exited x" etc. Can you monitor free memory in case it's a memory leak?
Yes that would be the correct way of doing things, if it crashes it means there's a bug somewhere. But the problem is very rare, it won't happen for 3 months, sometimes once a month... The code has been checked and my programmer couldn't find anything wrong. Maybe it was overlooked, or maybe it has to do with something that turns on in the building and causes some kind of interference or noise in the power supply line... or maybe the SD card could be acting up, or the RPI itself... it could be so many things, so I'm not even sure what's causing it. I have planned to begin swapping some parts, including the RPI, and I want to see if it helps. If the problem continues, then I'll dig deeper into the code.
Hello guys, I have a quick question. I wanted to use this same circuit on another device, but the new device runs on 12VDC, not 5VDC as before.
Before asking questions here, I was looking for a solution, so I installed a 5 volt regulator on the main power supply, thinking there would be no big changes to be made. Well the timer works great (always has). Then I modified the MOSFET wiring and connected with the main power supply, ...and now the MOSFET won't turn off. Obviously I'm doing something wrong, and it's not as simple as I though it would be. I believe the voltage on the base is wrong (in reference to the source). I tried another MOSFET with higher values (one that can handle more voltage and more current) but it acted the same way. How can I correct that, can someone please tell me what's missing?
(The schematic attached shows the MOSFET connection with the new power supply)
Yes, that won't work.
The MOSFET Gate signal has be raised to its source voltage to turn off (12Vto give Vgs=0), and you have it going to only 5V, which keeps the MOSFET on.
Why not just run everything on 12V?
Both the 555, the transistors, and the logic gates will operate fine from that voltage.
(not base, I meant to say gate, sorry).
I did connect everything on 12V and then it works fine, but I have things on this circuit that connects to the microcontroller, and all these things run on 5V, so I think it's easier to modify the gate signal to the mosfet, so it understands and works normally. Or, use a signal translator (level shifter) for all the microcontroller interaction with the timer. There are a few things in 5V, like the timer reset (555), or the event trigger and the event reset (4001), I also have a low vcc chip (I never mentioned this, but I installed to watch if the power supply goes low voltage at any time) and this also connects to the microcontroller vcc (which is 5V)...... so I'm not sure if my thought is pointing the right direction, but I believe using transistors I could boost the mosfet signal, correct? What I couldn't make much sense is the mosfet has to receive 0V (gnd) on its gate to work, and I thought that's what Q1 was doing. Please let me know how you thing I should apply the fix. Thanks my friend.
The P-MOSFET gate does need ground to turn on, but it needs to be at the 12V source voltage to turn off (Vgs=0v).
Below is the circuit modified for 12V on the load MOSFET and 5V for the rest of the circuit.
Since the CD4001 inputs can't tolerate more than its 5V supply voltage, isolation from the 12V Gate signal is provided by diode D1 and resistor R9 pullup at U2a's input ,
The P-MOSFET gate does need ground to turn on, but it needs to be at the 12V source voltage to turn off (Vgs=0v).
Below is the circuit modified for 12V on the load MOSFET and 5V for the rest of the circuit.
Since the CD4001 inputs can't tolerate more than its 5V supply voltage, isolation from the 12V Gate signal is provided by diode D1 and resistor R9 pullup at U2a's input ,
Is it...
- faster,
- cheaper,
- easier,
- meets the customer's goals,
- meets the customer's goals at a price they can afford,
- makes you feel a zen-like calmness because everything is "right"
As long as it works and it won't burn down a house, I'm usually ok with it. Microsoft has been around for 45-years and they completely disagree with your bandaid argument.
Hello people. I have updates! ...Remember I'm using this circuit to reset the RPI Power in case it freezes (happens once a month or so).
The circuit always worked great, until this week the RPI froze exactly when it was sending that ping (5v signal) to reset the countdown timer. As a result, the RPI and the signal was frozen high and therefore the problem was not corrected by the circuit (no power restart).
I added another timer (555) to the circuit, to cancel out the ping (5v signal) in case it remains frozen on. Works great now, and that is no longer a problem.
I'm back at electro-tech-online because I noticed I ended up with too many components on the PCB. Somebody had suggested back then to use a PIC, where it would be easier to achieve the same results with a lot less components. I thought I could give the PIC a try, but the problem is I'm not a software guy at all. The question: Is that something too hard to do (write code)? Can anybody assist on that? And also, if I do change the design for the PIC, will I be able to program the PIC onboard, or does it have to be placed on the programmer by itself?
Hello people. I have updates! ...Remember I'm using this circuit to reset the RPI Power in case it freezes (happens once a month or so).
The circuit always worked great, until this week the RPI froze exactly when it was sending that ping (5v signal) to reset the countdown timer. As a result, the RPI and the signal was frozen high and therefore the problem was not corrected by the circuit (no power restart).
I added another timer (555) to the circuit, to cancel out the ping (5v signal) in case it remains frozen on. Works great now, and that is no longer a problem.
I'm back at electro-tech-online because I noticed I ended up with too many components on the PCB. Somebody had suggested back then to use a PIC, where it would be easier to achieve the same results with a lot less components. I thought I could give the PIC a try, but the problem is I'm not a software guy at all. The question: Is that something too hard to do (write code)? Can anybody assist on that? And also, if I do change the design for the PIC, will I be able to program the PIC onboard, or does it have to be placed on the programmer by itself?
It is much easier use an Arduino. Arduino is already on a board with a usb connector andaccess to all the pins (kind of like RPi board for microcontroller. Also, software IDE is much easier to deal with than the PIC.
10F322 <- link to a eval board.
"Need help, 555, long time" There are many posts like this one. I should just make a 8 pin or 6 pin micro work like a 555 and solve the problem. But no time.
A 555 is $0.38usd quantity one. A pic10F322 is $0.56, pic10f200 is $0.43. Time is +/-1% with out a capacitor. The 10F322 has a NCO that can make frequencies. There are timers that can count days or years. Not going to do it so I need to keep quite. lol