Timed Switched On Power - Page 1
Forum section: electronics / projects

author: dellsam34
author_rank: Regular Contributor
timestamp: March 03, 2022, 09:59:50 am
content: Hello, I need help with a timer switch circuit, From the diagram below, Basically when the laser beam is disrupted by an object a 12V DC current flows in the circuit and the load is energized, But I want the load to be powered ON for about 5 seconds only and then powered OFF for another 5 seconds regardless the status of the laser system, When the timer times out the cycle repeats, Meaning after 5 seconds of power and 5 seconds of no power the laser will be active again and any disruption will power up the load again, Any simple and easy circuit that can be integrated into the diagram below and powered from the same 12V source?Any help is appreciated, Thank you.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 04, 2022, 04:04:46 pm
content: Sounds like a job for an ATtinyhttps://www.electromaker.io/blog/article/introduction-to-the-attiny85-19Set the period to 5000. Use an io pin to control a power switch of your choice, a MOSFET with driver perhaps?What current do you want to switch and where in the circuit is the load, is it inductive?I made a sandwich just now- Am I now in the in-group of makers?

author: dellsam34
author_rank: Regular Contributor
timestamp: March 05, 2022, 06:59:35 am
content: I'm not into Arduino and scripting, But I found the web page below and one of those circuits should work for me:https://www.homemade-circuits.com/simple-delay-timer-circuits-explained/

author: Ian.M
author_rank: Super Contributor
timestamp: March 05, 2022, 08:35:45 am
content: That's a standard timer relay function. Look forrepeat cycle timerand select one that will operate with 12V supply.https://www.mcmaster.com/repeat-cycle-timersor, probably, at your favorite major component disty!You may also need a delay off relay set just short of the total cycle time to 'stretch' the beam break signal to allow the repeat cycle relay to complete its cycle, or the relay may be configurable so the control signal can trigger it but not reset it till the cycle end.

author: dellsam34
author_rank: Regular Contributor
timestamp: March 05, 2022, 11:17:25 pm
content: Thanks, those are overkill for my project and they are over $100 a piece, I'm working on using a roller lever switch to simplify my system down to only needing a 5 seconds power hold and no need to 5 seconds power off anymore, it will be taken care of by the release of the switch's lever until it's depressed again by the motor arm which I refered to as a load in my original post.

author: Ian.M
author_rank: Super Contributor
timestamp: March 06, 2022, 12:12:42 am
content: If you are doing industrial automation, $100 a piece for a UL Listed timing relay is cheap, as it means you wont be on the hook for out of warranty repairs - just document the supplier, part number and exact configuration. If you use some custom hand-built module, supporting it will haunt you possibly for the rest of your career, and possibly bankrupt you if it fails resulting in human death or injury.OTOH, I agree its a bit steep for a hobbyist or student budget. The simplest/cheapest option really is a low pin count MCU as Terry suggested. The particular page he links is for the Digispark ATtiny85 board, which has a MCU and voltage regulator on a little board that simply plugs into your PC to program it using the Arduino IDE. It will drive a SSR direct, or if you need it to drive a relay, a low cost MOSFET module as used in the 3D printing community will do the job (or even leave out the relay and drive quite high current 12V or 24V loads switched on the low side with the MOSFET module).However if your disinclination towards Arduinoish things is high enough, as learning how to design reliable repeatable timers using discrete components, without ICs, is *MUCH* harder than throwing an IC at the problem, you may be better served by a circuit based on one or more 555 timer ICs*. Time to build and test will be a lot higher, and learning how to design such circuits really isn't much if any easier than learning the basics of Arduino, but not everyone has an aptitude for procedural programming, and if you've previously put in the effort and it hasn't stuck, avoiding Arduino may be a reasonable choice.*DON'T* attempt any of the TRIAC circuits on the page you found - they are all dangerous unless constructed and mounted in a double-insulated enclosure by a qualified electrician with enough experience to know that Neutral should never be grounded other than as directed by your national electrical code, and correct the schematics accordingly. The other circuits may not work particularly well but at least aren't actively trying to kill you!* You could do a lot worse than reading Forrest M. Mims III's "555 Timer IC Circuits" in the Archer/Radio Shack "Engineer's Mini-Notebook" series. 'Dead Tree' copies are available second hand and PDFs of it are online at many sites. Google:forrest mims "555 timer IC Circuits"

author: dellsam34
author_rank: Regular Contributor
timestamp: March 07, 2022, 08:24:44 am
content: This is just a home DIY project, I do video editing with script type programs like QTGMC but Arduino is just not for the purpose I'm trying to achieve. As to the dangers, no this is just a 12V system, it is powered from a small 12V battery and has nothing to do with the regulations or codes, I don't see how I would kill myself from a low amp 12V circuit with no super capacitors or voltage multipliers. I appreciate your concern though.

author: Ian.M
author_rank: Super Contributor
timestamp: March 07, 2022, 08:48:00 am
content: As long as you avoid directly shorting the 12V battery, or getting body parts caught in any fast moving or highly geared mechanical mechanism, I agree you are right to dismiss my safety concerns, as you aren't switching (or even using) mains power.My advice to look at 555 timer IC based circuits still stands.

author: Decapitator
author_rank: Contributor
timestamp: March 07, 2022, 12:42:28 pm
content: If you want to keep it "old school" how about using a pair of 555's configured as one shots with both triggered by the same interrupted beam event? The first is set for 5 seconds and controls your load. The second is set for 10 seconds and is used to hold the trigger input high on both chips for the full lockout interval.The laser receiver could be a simple photo transistor feeding a resistor tied to ground. A regular transistor driven by the second timer also feeds the same resistor. The un-grounded end of the resistor is the source of the trigger for the timers. A trigger pulse will only occur when both transistors are off.

author: ledtester
author_rank: Super Contributor
timestamp: March 07, 2022, 01:01:34 pm
content: Search Amazon for a "timer relay", e.g. something like:https://www.amazon.com/6-30V-Programmable-Module-Display-Controller/dp/B085TL38NH/They have several operating modes - likely one will fit your application.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 07, 2022, 02:00:08 pm
content: OK. Keep way from FFF timers and use something a bit more useful like a CD or HC4060.Here's a complete circuit with 10Amp low voltage load switch- the parts come to less than $10 or less than $5 without the power switch.It will run at power up or you can control when it comes on from the start/stop input.

author: dellsam34
author_rank: Regular Contributor
timestamp: March 08, 2022, 01:12:44 am
content: Quote from: Ian.M on March 07, 2022, 08:48:00 amBeing a mechanical engineer doing this for years I think I should be okay, Shouldn't I?

author: dellsam34
author_rank: Regular Contributor
timestamp: March 08, 2022, 01:15:13 am
content: Quote from: Terry Bites on March 07, 2022, 02:00:08 pmThanks Terry, Is the potentiometer for adjusting the delay time?I designed my circuit around the generic timer I posted the link earlier (see attached), but I may use the above circuit the same way:

author: dellsam34
author_rank: Regular Contributor
timestamp: March 13, 2022, 09:37:26 am
content: There she is:

author: Ian.M
author_rank: Super Contributor
timestamp: March 13, 2022, 12:13:55 pm
content: Errrrr......(must try to be kind and helpful)Is this your first foray into designing discrete bipolar junction transistor circuits?Are you aware that you've got transistors T1 and T3 backwards on both your latest schematic and the board?ABC557is a PNP transistor and with the flat side towards you and the leads down, the pinout is C B E (left to right). As drawn, you've swapped their Collector and Emitter connections. As the gain of a reversed transistor is much much lower and the B-E junction will Zener when reverse biassed at at fairly low voltage, typically somewhere around 7 or 8 V, they are obviously unusable like that in a 12V switching circuit. They were correctly oriented in the 'MouseTrap' circuit attached to your previous post (#12), though that has other issues . . .What was your design process for this circuit, and have you breadboarded it successfully?What's the DC resistance of the motor solenoid?I'm concerned that T3 will have grossly excessive base current when RL1 contacts initially close. Also the on time is highly unpredictable due to the temperature sensitive leakage current of T3 and C2, the 1000uF timing capacitor. If one ignores leakage current, then a 1000uF capacitor discharged by a 2 Meg resistor, has a time constant of 2000 seconds, so you certainly wont get 5 seconds on time! If it functions at all, it will be on for far longer, most likely tens of minutes. There are also problems with how it switches off. It switches off veeeeeeery slooooooowly, so unless the solonoid DC resistance is over 60 ohms, T1 is likely to overheat. However the slow switchoff does mitigate the absence of a snubber diode for the solonoid!P.S. It is more usual to use 'Q' as the initial letter of transistor designators. 'T' is used for transformers. See:https://en.wikipedia.org/wiki/Reference_designator

author: dellsam34
author_rank: Regular Contributor
timestamp: March 13, 2022, 06:56:14 pm
content: I don't have any experience at all in designing PCB's, Very few I made. It's fun though.I initially used the right transistor orientation but the footprint was too small, I wanted the copper traces to be at least 1.5mm thick which I couldn't achieve with the original footprint, So changed to a wider footprint and I forgot to flip them vertically ...oops. I think I can flip the transistor around during soldering.As to to the schematic, The author said that the time is in the order of seconds not minutes, I guess I will have to try and see. I ordered 5 PCB's since they are cheap ($6 total shipped) I figured I do the testing on one of them, I have pleinty of electronic components.Thanks for the tips.It would have looked like this:

author: Ian.M
author_rank: Super Contributor
timestamp: March 13, 2022, 07:55:29 pm
content: Well, while you are waiting for boards, here's aLTspicesim of your circuit + a modified version that sims as working. I wouldn't freely choose to do it that way, but its possible to work with what you got. The mods aren't too drastic, and you've got spare boards, so you should be able to patch and bodge one into the other. e.g: mount R2 vertically in its hole near the top board edge, and solder its other leg to the top lead of R3 to put it in parallel with C1, drill a hole between the solenoid connector and T2 next to its emitter track to add a vertically mounted base pulldown resistor (my R5), other lead to the right end of R1, do the same between T1 and T2 next to T1 collector track for the feedback resistor (my R6), and cut the track to pin '87' of the relay to add a base resistor for T3 (my R4). You'll still *probably* need to patch in a diode somewhere across the solenoid coil terminals, though if you are lucky it already has one.Do follow up with your progressas the learning process is good forum content . . .

author: dellsam34
author_rank: Regular Contributor
timestamp: March 14, 2022, 11:47:28 pm
content: Quote from: Ian.M on March 13, 2022, 12:13:55 pmSorry for the late answer, I just measured the solenoid resistance and it was 9.4 ohms, Used a 4S Li-ion battery pack at about 16V fully charged I measured about 1.2 amps when the solenoid is energized and in hold.

author: Ian.M
author_rank: Super Contributor
timestamp: March 15, 2022, 12:21:52 am
content: You have a problem - the BC557 absolute maximum collector current is only 100mA continuous (200mA peak). It just isn't suitable for your solonoid.The discrepancy between the calculated max. current of 1.7A (16V/9.4 ohms) and your measured 1.2A is probably due to the burden voltage of your ammeter (or DMM amps range) + contact, test lead and other wiring resistance, + the battery voltage dropping under load. Q1 (your 'T1)' definitely needs to be at least a 2A rated transistor, and probably needs heatsinking. As the current through it is base current x hFElimited it will probably hold on just long enough for Q3 to blow due to excessive base current.Its also worth noting that power transistors tend to have much lower hFEthan small signal transistors, so you are probably going to have to find a PNP power Darlington to get enough gain to make it work without scrapping your board and starting over.

author: dellsam34
author_rank: Regular Contributor
timestamp: March 15, 2022, 02:44:16 am
content: What transistor do you recommend that works with the rest of the components? or maybe put a resistore between the Q3 base and the relay contactor to limit the base current.The 16V given is an open circuit voltage.

author: Ian.M
author_rank: Super Contributor
timestamp: March 15, 2022, 02:53:32 am
content: I dont, as I wouldn't use this circuit or a Darlington for such a high current load. However if you go to your favorite distributor, search for "PNP Darlington" then refine the results with a parametric search for Ic between 2A and 5A, Thru-hole and In Stock, you may find one you can work with. The main problem is most will be TO-220 package which wont fit the holes for 'T1' in your board, because it has legs that are too wide.220 ohms would be a good bet to limit 'T3' base current. Too big and the timing capacitor doesn't charge properly, too small and 'T3' blows!The other option would be to add a relay between your timer and the solenoid. I would suggest one rated for at least 5A DC and with a 200 ohm or higher coil resistance, which will remove the need to replace 'T1' as the relay will need much less current to drive it. You'll probably need a 3A diode across the solenoid, cathode positive to suppress its back-EMF so the relay contacts don't arc and burn.

author: dellsam34
author_rank: Regular Contributor
timestamp: March 15, 2022, 03:49:12 am
content: So if I use a relay to power up the motor solenoid as shown below instead of directly powering it from the transistors I can get away with changing components?

author: Ian.M
author_rank: Super Contributor
timestamp: March 15, 2022, 05:32:51 am
content: Yes, if you add the resistor I suggested in series with T3 base.

author: dellsam34
author_rank: Regular Contributor
timestamp: March 15, 2022, 06:28:59 am
content: Didn't you say either add a resistor to the T3 base or use a 200 ohm or higher coil resistance relay?

author: Ian.M
author_rank: Super Contributor
timestamp: March 15, 2022, 10:45:06 am
content: I'd recommend *both*. I hadn't fully read the BC557 datasheet and its wimpier than I thought it was.My usual choice for a 'jellybean' PNP transistor isPN2907A,which is a 600mA part, and I vaguely remembered the BC557 as being good for 200mA, therefore I initially said the solenoid must be over 60 ohms (12V/60 ohms = 200mA). It isn't - 200mA transient pulse rating but only 100mA continuous collector current.I must comment: If you'd built a prototype on stripboard or solderless breadboard, *BEFORE* jumping in to PCB design and ordering, you'd have let the magic smoke out of a few parts and found the deficiencies of this circuit for yourself. One only goes straight to PCB design if following a appnote or other well tested and verified circuit, or with SMD parts that are either too high frequency or with too many pins to prototype successfully. Oh, well, at least you are having a learning experience . . .

author: dellsam34
author_rank: Regular Contributor
timestamp: March 16, 2022, 03:19:27 pm
content: The author said I can replace the 2M resistor with a 2M pot and a 1K resistor in series to adjust the timer. Also the BC557 can be replaced with TIP127 or any similar transistor. What do you think?

author: Ian.M
author_rank: Super Contributor
timestamp: March 16, 2022, 03:29:01 pm
content: Yes, a TIP127 for the output transistor looks possible. Its a beefy enough PNP power Darlington to do the job.Before even considering putting a pot in there you should get the timing 'in the ballpark' by choosing an appropriate timing capacitor and resistor experimentally. Then choose a preset + resistor that gives you the adjustment range you need. Apart from 2Meg pots being fairly uncommon nowadays, if you do put one in I expect you'll find most of its range covers time periods that aren't at all useful.