filter and stabilize 12v motorcycle

Thread Starter

Tester71

Joined Oct 29, 2014
26
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.
 

crutschow

Joined Mar 14, 2008
34,282
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?
 

Thread Starter

Tester71

Joined Oct 29, 2014
26
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!!!
 

Alec_t

Joined Sep 17, 2013
14,280
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:

ian field

Joined Oct 27, 2012
6,536
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.
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.
 

crutschow

Joined Mar 14, 2008
34,282
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
 

Thread Starter

Tester71

Joined Oct 29, 2014
26
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.
 

crutschow

Joined Mar 14, 2008
34,282
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?
...............
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.
 

Thread Starter

Tester71

Joined Oct 29, 2014
26
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.
 

Alec_t

Joined Sep 17, 2013
14,280
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
 

Alec_t

Joined Sep 17, 2013
14,280
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 .....
 

Alec_t

Joined Sep 17, 2013
14,280
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
 

Thread Starter

Tester71

Joined Oct 29, 2014
26
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.
 
Top