filter and stabilize 12v motorcycle

Discussion in 'Digital Circuit Design' started by Tester71, Jun 27, 2016.

  1. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    Hello,
    I made a little circuit to convert a single push button to a switch, just using a 4017 IC, and a
    555 IC (monostable) to trigger and give some pulse to the 4017 clock.
    It worked fine in my protoboard, but after connecting it to my son's motorcycle (12v), I think something is wrong. It remained on after turning the engine ON.
    I saturate a pnp transistor ==> relay.
    Maybe I would have to filter the power supply (12v battery + alternator).
    Any help with some basic filter?
    Using a 78XX would help?
    Thank you.
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,006
    3,232
    I have no idea why you are using a decade counter and a 555 to do what you want. :confused:
    All you need is a flip-flop, such as a CD4013, along with the transistor to convert a PB switch to ON/OFF operation.
    Please elaborate on exactly what you want to do on the motorcycle.
    What transistor are you using?
     
  3. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    Hello...my mistake, a used a npn transistor, BC547.
    I just wanted to turn on and off some lights (led chaser) just pushing a button, not moving a switch.
    I only need a little circuit to make a switch with a simple button. I wanted to use a ground pulse from the handlebar, that is why I made that circuit.
    It is only to play on a little off road motorcycle....(not street).
    I will search for some circuit using what you have said, CD4013.
    Is it possible to trigger with a ground pulse, to change the state off==> on ==> off.....?
    Thanks!!!
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,797
    1,103
    The CD4013 needs a positive pulse to set/reset/toggle it. If you could tolerate toggle action when the button is released then you could trigger it capacitively on the trailing edge of a ground pulse.
     
    Last edited: Jun 27, 2016
  5. ian field

    Distinguished Member

    Oct 27, 2012
    4,415
    783
    Might help if you gave more info on what charging system the motorcycle has - they vary widely.

    Very small types with flywheel IGN/generator, more or less rely on the battery to regulate it and are half wave rectified - so big ripple.

    At the other end; most larger motorcycles have a charging system practically identical to car type.

    The permanent magnet type alternators are pretty much constant current, so the most common method of regulation is shorting the alternator with SCRs. Single phase alternators have a lot of ripple when the regulator cuts in - 3-phase types should be a lot better.
     
  6. crutschow

    Expert

    Mar 14, 2008
    13,006
    3,232
    If you want it to toggle when you press the button then you can add a CD4049 inverter in front of the clock input.
    Alternatel you could use a 74C112 FF, which has an inverting clock input so that it toggles when the button signal goes low.

    If you wanted to use a CD4013 then could add a CD4049 inverter in from of the clock input to still have it trigger on the signal going low.

    Below is an LTspice simulation using the 74C112.
    It triggers when the PB makes contact to ground (battery negative).
    R1 and C1 provide some filtering for the 12V.
    C3 and R4 reset the FF to the off state (Q low, NQ high) upon power up.
    The NQ output drives the base resistor of the PNP transistor high-side switch controlling the relay.

    upload_2016-6-27_12-42-29.png
     
  7. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    Thank you everybody!!!!
    I think my alternator is 3-phase. THANKS, I will try to make some project in my breadboard with a CD4013.
    Now that you've told me to use it, I found links like:
    http://forum.allaboutcircuits.com/threads/how-setup-4013-toggle-to-start-up-in-off-state.54276/
    I need the same, that it starts up in OFF mode :)

    @Alec_t : is this circuit something like you wrote?
    Could it work if I filter the supply?
    @crutschow: is that R1 filter = 5 ohms?

    Thank you very much for your answers, and sorry for my written English.
     
  8. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,539
    2,369
    A 3 ph alternator with 3ph full wave rectification usually requires very little smoothing due to the low percentage ripple.
    Max.
     
  9. crutschow

    Expert

    Mar 14, 2008
    13,006
    3,232
    That circuit triggers when you release the button since that FF is positive edge triggered.
    I have concerns that the input debounce capacitor C1 will cause a slow clock risetime when the button is released, which can be problematic for proper triggering of that FF.
    I would add a transistor inverter on the FF clock input so it triggers when the PB is pressed.
     
  10. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    Hello, and sorry for the delay.

    Thanks crutschow for your help, but I don't have that ic's.
    I have just received my IC's to test (4013). I was playing with it in my breadboard, at lunch time :-(
    The circuit I tested is definitely wrong, because I simulated it with Livewire and it doesn't change the state of PIN 1 of my 4013.
    I think my only problem know is, how to setup the clock pulse. Just to test, I am ligthing a little led with the output signal, saturating first a npn transistor BC547. It works fine if I use a positive pulse.

    Premise: I need to use a ground pulse.
    Alec_t wrote: ".....If you could tolerate toggle action when the button is released then you could trigger it capacitively on the trailing edge of a ground pulse."
    Would you be so kind, to tell me how to trigger it capacitively with a ground pulse? I will try to simulate it with livewire, and after that, with my kid's breadboard
    Thanks to all of you.
     
  11. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,797
    1,103
    Here's a circuit for toggling a 4013 on release of a grounding switch. U1a is used as a ~25mS monostable to debounce the switch and provide the clock input to U1b.
    GroundTriggeredDebouncedToggler.JPG
     
  12. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    Thank you very much Alec_t, I will test it in my breadboard, and I will tell you.
    Thanks for your time.
     
  13. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    What I am doing wrong?
    This is my test, see attachment. My switch doesn't change the output state...
    Any help?
    Thanks!
     
  14. crutschow

    Expert

    Mar 14, 2008
    13,006
    3,232
    I can't open .rar files.
    Can you post a different format?
     
  15. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    yessss!!!! here it goes.
     
  16. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,797
    1,103
    Oops. Sorry, I've just spotted a snag with the circuit I posted. U1b gets triggered by the first switch bounce as well as by the switch release. Back to the drawing board .....
     
  17. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    Ok, I would like to see your modification.
    I wish I could start it with off state....
    Thank you!
     
  18. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,797
    1,103
    Heres another circuit. I chickened out of using capacitive triggering and opted for the simpler solution of using a PNP to invert the switch pulse :) :-
    GroundTriggeredDebouncedToggler2.JPG
     
    Tester71 likes this.
  19. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    I will try it tomorrow, and write down the results here. Thank you very much!
     
  20. Tester71

    Thread Starter New Member

    Oct 29, 2014
    26
    0
    Hello Alec_t, the last circuit you uploaded works fine in my Livewire simulation.
    The only doubt, is about the startup state.
    I need to startup in off state (Q out = 0).
    I put a switch near the power supply to test startup condition (simulation), and it seems to change the status alternately. What should be added to ensure startup with Q out = 0 ?

    Thank you very much for your help.
     
Loading...