Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Negative Triggered JK Toggle Circuit - First (Working) Design, Review Appreiciated

Status
Not open for further replies.

Gareth Lowe

New Member
Gday from Australia Guys,

First a little background, as an early teen, I was quite keen on Electronics, and although I built a few kits, never got any working, as I never really could , or perhaps did not try to grasp the concepts behind them when it came time to troubleshoot. A decade on older and wiser, I came back to building some Guitar FX, and although I still had no electronics knowledge, due to the craftsmanship skills I had honed, they actually worked, and sparked a renewed passion for the hobby again. I'm at the point now that I am really trying to get a handle on some of the basics, as I am a little bit beyond just being proud of having a working circuit, and as I learn best by doing, I decided to solve a problem that has been bugging me for a while.

My car has a softlock feature, so if all the windows are down, and the sunroof is open etc, you can turn the key to a special position, and while you hold it there, it will wind everything / shut everything for you. A couple of years back with the help of my brother, we hooked this up so it could be operated by the remote, with a nasty hack at best that involves several off the shelf automotive relays, a cheap timer circuit, and a hell of a lot of crimps and black electrical tape. It works, but there is no reset pin to hit here, so if I ever lock the car, and then decide I have forgotten something, I just have to watch the windows wind up, and wait for the timer to time out at 30 secs. Believe me, I though I could get smart and grab my wallet while the window was going up just once, I ended up with my wrist trapped in the wound window for the full 30, much to the amusement of onlookers! I had no idea that those window motors were so powerful, I swear it nearly broke my wrist, and I ended up with some dark purple bruising for a good week.

Anyway, so to fix the above, I have designed my first circuit with a 4027 JK Flip Flop, a 555, and a small handful of passives. I have set it up and tested it on a breadboard, and it seems to work great, but something in the back of my mind just tells me that I am missing a few components here and there, and that somethings going to burn out early, or jump out of state or something, so I was hoping some of the older hands here could take a look and give me a bit of critique.

Heres the schematic

**broken link removed**

This is my first attempt at laying out a schematic in Eagle as well, so do your worst ;)

Now my rundown of operation is that I already have a tap to a negative trigger pulse coming from the remote immobilizer, which will trigger a state change in my 4027, giving my a toggle between lock and unlock. When Pin 1 is high it will provide VCC for the 555, and because Pin 2 is low, C1 can charge giving a short trigger pulse. When the trigger is again applied to the 4027, it reverses and sets Pin 2 High, which I will then use to trigger my Unlock relay, not shown, but in a similar transistor switch configuration to the one attached to the 555. This state switch also cancels the VCC to the 555, giving me that reset I have always wanted!

Some of my questions are.. What does everyone think of the above configuration? Should I be regulating my 12v line coming from the Auto? Its already fused at 7.5A and only for the door lock switches. Where else is it pertinent to be putting some protection circuitry in this schematic? And are there any obvious ways I can simplify this. Like I said it works, but Im a big fan of elegance.

Any input would be greatly appreciated guys, thanks all for your time in advance,

Best Regards,
Gareth Lowe
 
Quick look ...Not 100% sure about Q1 orientation for NPN also needs a resistor in the base if 555 pin 3 going positive ?
 
Welcome to ETO, Gareth Lowe!

Q1 is, indeed, "upside down" (that part of your test circuit would not have worked)- Emitter should go to Gnd, Collector to relay. Put a current limiter resistor (220Ω, for instance) in the Base circuit of the 2N5088. This will keep the Base current below the max allowed (100mA).

Also, don't know the current draw of the relay - max power dissipation for the 2N5088 listed as 1W but since it's a pretty short pulse, probably not a problem..
 
Last edited:
Shouldn't pin 8 of the 555 go to 12V (connection absent in schem)?
Unused input pins 10-13 of the 4027 shouldn't be left floating.
 
Last edited:
Minimal amount of power supply protection wouldn't hurt. an 18 V TVS,, a reverse biased diode on the power and a bypass cap (0.1 ceramic close to the body from Vcc to ground) wouldn't hurt. A bypass cap for the 555 as well.

Unused open inputs on the 4027 can cause the device to oscillate, generating heat and leading to failure.

For reduced power consumption, you might try the NE7555 which is a CMOS version of the 555.
 
Hey Guys,

Thanks for all your help so far, plenty of good tips coming in. I did definitely get Q1 around the wrong way, it was correct on my breadboard, and hence working, but I still get confused by orientation no matter how many transistors I place.. I think my brain has some sort of deficiency in this department, my mother has dyslexia pretty bad, perhaps.. ;)

I changed the transistor to a Bc546, as I have plenty on hand and added the current limiting resistor using a formula I nabbed from **broken link removed**, but Im a little concerned as to the result of the formulas. Cowboybob, you mentioned a 220Ω, but the formulas here suggest a 100K. Double and Triple checked, the result is the same. Can anyone confirm these formulas as correct? As for the relay current draw, the datasheet is **broken link removed**, if Im reading it correctly, the 'Rated Current' at 12V is 44mA, well within my 100mA allowance of the transistor. Is the 'Rated Current' my definitive answer here though, or do I have to do some other sums with the coil resistance and such?

I have modified my schematic to ground all unused pins, is this the correct method?

Finally, added the 18V TVS, Diode and the bleed caps. What function do the bleed caps have?

Thanks again, revised schematic below.

**broken link removed**
 
Pin #4 of the 555 still needs to be tied to Vcc (+12VDC) to avoid false triggering. With pin 4 tied to Gnd, the 555 will be disabled.

Since saturation of the 2n5088 occurs at 12.6fA, a 100k resistor (R7) is fine. I tend to over drive transistor switches.

If you're referring to C4, it's to help divert (bleed to Gnd) any "noise" that may be on the 12VDC line that might cause a false trigger on either chip.

The relay "Rated Current" is the optimum value for expected relay operation.

I am curious why you have such a long output pulse duration (70+ sec).
 
D2, D3 : Cathode to +12 and anode to ground. Like a zener diode regulator. This will clamp at ~18V and -0.7 V. Read: https://www.google.com/url?sa=t&rct...=xZQfnhZo9C1WCWtk-0b0jA&bvm=bv.85076809,d.eXY

The decoupling/bypass caps at the IC are missing. When the IC switches state it draws a "pulse" of current from the supply and "can" upset circuit operation. e.g. false triggering/

IC1: You missed pin 9 and 13 and 14 HAVE to be open. 13 & 14 are outputs.
 
Thanks again for all the advice guys, Im off to the lab for a bit to modify my breadboard. Looks like I may have to measure the exact current draw on my relay, the datasheet figures and what Im experiencing seem a little off.

Ill put some decoupling caps in on both ICs and make sure my diodes are oriented correctly. Output pins from IC1 float.

Cowboybob, dont actually have the delay time so high, in reality using a 150k Trimmer to give me an adjustable time. Aiming for 30secs on, this is the time it takes for the car to complete the softlock cycles when all the windows are down and the roof is open.

Ill report some more findings after I play with the board this afternoon.

Gareth
 
Done!

Final Schematic.
**broken link removed**
Corrected diode configuration on the +12V Rail input, added pullup resistor to Reset pin of 555, added decoupling caps to both ICs, corrected time delay resistor schem to represent trimmer, corrected pin grounding on 4027 and added unlock relay section of schematic.

Had it all on the breadboard and everything is working like a charm! Thanks again for all the pointers guys, time to put this thing on some vero and get it under the dash.

Gareth
 
I just wanted to add that it's wonderful to see a self confessed novice really putting the effort in. Well done on getting your circuit working, I hope you continue to experiment.
 
Gareth .. Good work It shows what persistence can do, I think we all have and will continue to learn by our mistakes.
 
Last edited:
Thanks again guys, it was fun, although its going to be more fun installing it under the dash.. My build is just incorrect for that contortionist work.

The only way to learn, is to do in my opinion, I think this forum is a good fit for me ;)

Now I just have to find the next circuit..

Gareth
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top