Anormal low current from JK flip flop ici at toggle mode

Discussion in 'Homework Help' started by BBruyne, May 29, 2015.

  1. BBruyne

    Thread Starter New Member

    May 29, 2015
    7
    0
    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. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    Can you post a schematic of the current setup?

    Bertus
     
  3. BBruyne

    Thread Starter New Member

    May 29, 2015
    7
    0
    Hello Bertus,

    Thank you very much for you answer. Here is a schematic that I have just made. Thanks for your help,
    Bbruyne Bbruyne_schem.jpg
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    Looking at the schematic, C1 is connected the wrong way around.
    Also it is not clear how you get 5 Volts for the leds and the arduino.
    There is only a 12 volts supply given.
    The arduino won't like the 12 volts coming from the flip-flop.

    Bertus
     
  5. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,796
    831
    12V is the maximum power for the Arduino Pro Mini (APM). More than that let's the magic smoke out. If it's a lead acid battery fully charged, you might get over 14V out. I'd power the LED strip from the 12volts and use a linear regulator to provide 9VDC to the Arduino.

    Secondly, I would not recommend powering the APM from the flip flop. What's the purpose of doing it this way? I'd have the flip flop drive a transistor to switch the power to the APM.

    And as a final note, remember to connect unused INPUTS on the second flip flop to Vcc or Gnd (as appropriate)
     
  6. BBruyne

    Thread Starter New Member

    May 29, 2015
    7
    0
    Hello,

    Thank you very much for your quick reply, it is a fantastic support for my project. I decided to add a voltage regulator from the battery. From 12V to 5V. My initial problem might come from the fact the !Q1 was not connected to the ground. I will try it on Tuesday.
    @ djsfantasi Why do you not recommend powering the APM from the flip flop ? Would you use a PNP transistor like here ?

    Thanks a lot,

    Bbruyne
    Bbruyne_schem2.jpg
     
  7. JoeJester

    AAC Fanatic!

    Apr 26, 2005
    3,373
    1,157
    Why do you have Set-1, Reset-1, and not Q-1 at ground?

    Edited to remove my error of including J1 and K1 as tied to ground.
     
    Last edited: May 29, 2015
  8. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,796
    831
    Hello,
    I mentioned connecting UNUSED INPUTS to Ground or Vcc as appropriate. Inputs should not be left floating or not connected to anything. UNUSED OUTPUTS however should not be connected to anything, else the magic smoke gets released. If the output were ever to become high and was connected to ground, you'd have a short and likely a dead chip.

    You have several outputs grounded in your last schematic. !Q1, Q2, !Q2 for example.

    As to your question, I am not sure the flip flop can provide enough power for the microprocessor. If the Arduino were to demand current in excess of the flip flop's specs, something is going to break.
     
  9. BBruyne

    Thread Starter New Member

    May 29, 2015
    7
    0
    Hello,

    Great! The magic smoke is not going to get released, cheers! So, would you recommend a NPN transistor on the low side or a PNP one on the high side ? Does it matter ?
    Thank you for your help, I am fairly new to electronics but you have to start somewhere. I love it.
    To Joejester : I want to use my flip flop as toggle mode so following the truth table : J&K high and set, reset on LOW.


    Thanks
     
  10. BBruyne

    Thread Starter New Member

    May 29, 2015
    7
    0
    Hello again,

    What about a PMOS power fet after my Q output to power the chips ? Which one do you recommend for my project ? Which resistance should I use ?

    Thanks,

    BBruyne
     
  11. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,796
    831
    I may not be able to directly answer your question, but can guide you to provide the information necessary to discover the answer. The flop flop you are using is a 4027. Do you want power when Q1 is high? How much current can the flip flop provide when in that state (datasheets are your friend)? What is the peak current the Arduino Pro Mini will draw? Those questions will assist in calculating the base resistor value. Also the type and specs for a transistor.
     
  12. BBruyne

    Thread Starter New Member

    May 29, 2015
    7
    0
    I don't mind if the power is on when Q1 is high or low. Right so, the I at low level output is minimum 0.44 and typical 0.88mA. The I high level output is minimum -0.44 and typical +0.88mA.
    The arduino consume about 25mA, the balance sensor 6mA and the leds max 960mA.

    Thanks for you help!
     
  13. BBruyne

    Thread Starter New Member

    May 29, 2015
    7
    0
    It is working! I used a MOSFET P type NDP6020P and it's great! Thanks
    Bbruyne
     
Loading...