Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Abnormal low current from JK flip flop IC at toggle mode

  1. May 29, 2015 #1
    Hello,

    I am building a prototype of a balance indicator to prevent farm quadbike to roll on steep hills. I am using an arduino pro mini and 2 sets of assignable strips of 8 leds (https://www.adafruit.com/products/1426) and a gyro-accelerometer sensor. To power it, I am using the farm motor bike battery (12V). To switch the arduino on and off, I am using a momentary push button switch (NO, NC, C pins) and a JK flip flop ic (4027 dual jk flip flop cmos ic zc 4027). I have my 12V from the battery connected to the flip flop on vcc, j,k and the ground to vss,set and reset. My momentary switch give normally close ground to the clock pin and 12v when I press it. I use the flip flop as toggle mode with my switch as a clock. Next, from the ic, between the output Q and the ground, I have linked a 1F capacitor, my set of leds and the arduino in parallel. The capacitor is to prevent a damaging pike for the leds strip. I have tested it, I have the expected 12V after pressing once the switch and 0V after pressing it again. But when it is on 12V and the arduino and the leds should be running, the current is very low, too low to run the arduino and the leds. Could someone please help me ? I am lost. I am a student at high school very dedicated to my project. I have tried the device on the 12V battery without the switch and jk flip flop, it works fine.

    Thank you very much,

    Bbruyne
     
  2. jcsd
  3. May 29, 2015 #2

    Svein

    User Avatar
    Science Advisor

    If both J and K is at 0V, the F/F is told "do not change the output".

    Another issue: A push-button will usually give a series of pulses when pressed. Therefore, you cannot use it on a clock input. Use it on the "set" input will work OK.
     
  4. May 29, 2015 #3

    rbelli1

    User Avatar
    Gold Member

    Have you checked the output current specification for your flip-flop and the input requirements for your loads? You might find your answer there.

    BoB
     
  5. May 29, 2015 #4

    meBigGuy

    User Avatar
    Gold Member

    I can't really visualize your design and issue from your words (sorry). Posting a schematic always makes this easier.

    What has been said previously all apply.

    I will say that you need to first debug the flip-flop/switch operation. Connect an LED (through appropriate buffer) or an oscilloscope (or a meter) to the flop flop and verify that it toggles reliably on every button press. I am sure t won't, because of switch bounce. Look at hardware debouncing solutions on google and get the flop to work reliably.

    My favorite has always been figure 1 in http://www.eng.utah.edu/~cs5780/debouncing.pdf (but it requires 2 pole switch)

    You also need to verify that the JK flop can drive the circuit it is connected to. The meter/oscilloscope can help with that.
    You can safely short the JK output to its power pins or ground to see if it is connected properly. It may be that it does no have enough drive for what you are connected to. and some stuff works and some doesn't. When you short the output, things will work. (I've never had a logic gate fail because of shorting to the supply or ground. But, if you short to something higher than the supply it will fry the chip.)
     
  6. May 29, 2015 #5
    Hello,

    Thank you very much for your support, it is fantastic.
    I have tried my ic with a led and my momentary push button as a clock and it toggles as expected. I have a schematic here. I decided to add a voltage regulator.

    Thanks for your help,

    Bbruyne Bbruyne3_schem.jpg
     
  7. May 29, 2015 #6

    meBigGuy

    User Avatar
    Gold Member

    I can't see what you are doing. (its too small to read any print). Is it possible you are connecting the flip flop output to the power pin of those chips?

    There is no way it can drive much more than some more gates. If you want to switch power with the FF, you need to use a small p-channel power fet.

    But, I'm still just guessing at this point.
     
  8. May 30, 2015 #7
    Yes you are right, I didn't know that the flip flop output could not drive the chips. Thanks for this! I am new... Is a p-channel power fet similar to a transistor ? What is it exactly ? Thank you very much for your help.

    Bbruyne
     
  9. May 30, 2015 #8

    meBigGuy

    User Avatar
    Gold Member

    a PMOS power FET is a "field effect transistor". It can be controlled by the FF to switch power on and off. The FET requires no drive current other than what is needed to charge/discharge its considerable gate capacitance. You can add a buffer for faster switching

    upload_2015-5-30_21-2-53.jpeg

    When ON-OFF is LOW, the PMOS transistor will conduct. When it is High, (equal to V+) it will stop conducting.

    You will need to select a proper FET with low enough threshold voltage and on resistance. The AO6407 is RDS(ON) < 85mΩ (VGS = -1.8V). It may be a bit overkill.

    If you google "pmos power switch" you will find a lot of images with examples.
     
  10. May 31, 2015 #9
    Hello,

    Thank you for your help,

    What do you mean by low on resistance ? I haven't found any good tutorials on power mosftets, do you recommend any ? What are the resistance on your schem for ? I have drawn a full schem of my project with the PMOS, I used the same resistance as you did without any knowledge ? Which pmos should I use ?

    Thank you very much,
     

    Attached Files:

  11. May 31, 2015 #10

    rbelli1

    User Avatar
    Gold Member

    The 1K in meBigGuy's schematic is the load. It is equivalent to the Arduino and led's in your schematic. You don't need anything in series. You will probably want a small capacitor (0.1uF or so) in parallel with the output of the FET if the wire from the FET to the load is long. Long being more 100mm or so. Pick a FET specified for a logic level gate and at least double your input voltage https://www.fairchildsemi.com/products/discretes/fets/mosfets/NDP6020P.html will work. The LED's should be powered from RAW not 5V as the Arduino has only 150mA total current capability.

    BoB
     
  12. May 31, 2015 #11

    meBigGuy

    User Avatar
    Gold Member

    http://electronics.stackexchange.com/questions/42030/p-channel-mosfet-high-side-switch

    Let's dissect this statement:

    The AO6407 is RDS(ON) < 85mΩ (VGS = -1.8V).

    That basically says that the AO6407 PMOS MOSFET has less than .085 ohms on-resistance (RDS = resistance drain to source) when the gate is at least 1.8V less than the source. So, if you connect the gate to the FF, when the FF is low, the gate will be at ground and the source will be at whatever supply you are running at (5V? 3.3V?). That means the FET will be ON when the FF output is LOW. The link above tries to explain it also.

    You can use a buffer or transistor to drive the gate.
     
  13. May 31, 2015 #12
    Thank you both, you are fantastic, I am learning so much. So, rbelli1, the PMOS that you recommended me will work with the signal coming from the Q1 output of my FF because the PMOS is specific for logic level gate, is that right ? No need for any transistor or buffer ? I won't need any capacitor, the distance is not long. On MeBigGuy schem, what is R1 for ? Do I need to add it to my circuit ?


    Thank you,

    BBruyne
     
  14. May 31, 2015 #13

    meBigGuy

    User Avatar
    Gold Member

    You may not need R1 since the FF output will drive high. It's purpose is to turn off the FET if the ON-OFF becomes an open circuit. Otherwise gate-source leakage would cause it to turn on.
     
  15. May 31, 2015 #14

    rbelli1

    User Avatar
    Gold Member

    I suggested NPD6020P because that particular device is designed to be controlled by 5V logic level signals and is through hole. It will be easier to work with than a surface mount device. If you ever change to 3.3V or lower logic you will need to change to a different device such as the one meBigGuy suggested. That one is surface mount so it is a bit more difficult to work with.

    Through hole alternatives might also be available for lower voltages. However I have found that when looking for 3.3V (Well 2.7V in my case) devices you will find few parts that are suitable and through hole. The good news is that there are adapter boards available to use them on 0.1 inch (2.54mm) bread boards and perf boards.

    BoB
     
  16. Jun 1, 2015 #15

    meBigGuy

    User Avatar
    Gold Member

    I showed a picture with AO6407 because that's what popped up on google. I have not looked at any selection guides. if I get a chance, I'll try to find something on mouser or digikey.
     
  17. Jun 1, 2015 #16

    meBigGuy

    User Avatar
    Gold Member

    Last edited by a moderator: May 7, 2017
  18. Jun 1, 2015 #17

    meBigGuy

    User Avatar
    Gold Member

  19. Jun 1, 2015 #18

    Attached Files:

  20. Jun 1, 2015 #19

    rbelli1

    User Avatar
    Gold Member

    The IRF6218PBF has a MAX threshold voltage of -5V. This part under some circumstances will not turn on with your 5V supply. I would not use that part.

    The LED in the push-button does not have to be wired to the end of the pixels. Wiring it to the beginning might make it easier to route the LED strings.

    If you notice that sometimes the push-button does not work then you probably have too much switch bounce. Wiring the flip flop up with some hysteresis will be necessary to overcome that problem.

    BoB
     
  21. Jun 1, 2015 #20
    Hello,
    On the NDP6020P, I am reading the datasheet and it is saying that the max gate threshold voltage is -1V. Does that mean the the voltage Gate-Source can't be higher than -1V or that it has to be more that -1V to put the PMOS on ? The min max value are confusing me. Thank you very much! Bbruyne
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Abnormal low current from JK flip flop IC at toggle mode
  1. JK flip flop question. (Replies: 2)

  2. D and JK Flip Flops (Replies: 5)

Loading...