Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

LED chaser, mosfet sequencer , advice

Status
Not open for further replies.

Salvador12

Full Member level 4
Full Member level 4
Joined
Jul 16, 2014
Messages
216
Helped
3
Reputation
6
Reaction score
7
Trophy points
1,298
Activity points
4,055
Hey folks.

I need a circuit that is very similar to a LED chaser, essentially a line of mosfets that get switched on/off in series such that the position of the "ON" mosfet changes in time from one side to the other.
Now unlike a LED chaser, I need several mosfets to be ON simultaneously instead of a single one.

Imagine a row of 30 mosfets and ideally I would need for most of them to be ON at any single moment while a few get switched OFF along the way so that the "OFF" position moves in space and time.
This is a test so I don't need high voltage or current switches. And I would need the "OFF" position to move along in a changeable speed and ideally very fast too.
I am not sure how that translates into switching frequency but the linear speed of the "OFF" position should be up to some 1000 km/h and more if possible.
Shouldn't be too fast for semicondcutors.

So guys , can anyone here help me out with ideas or IC's and part numbers , I'm sure there must be a circuit similar to what i need already out there.
 

1) How do you want to control speed ? Pot or USB or UART or....?

2) The pattern programmable or fixed, eg the number off, the number on ?

3) Max of 30 outputs to the MOSFETS all you need ?

4) Do you work with embedded micros ?


Regards, Dana.
 

Hey Dana, thanks for answering.

Well I would do just fine with a pot , yes I need about 30 mosfets to control. The pattern can be fixed no problem as long as the basic fundamental holds - that is , most mosfets are always ON and the ones that are OFF change their position couple mosfets at a time.

I haven't worked yet with embedded mcu's so I don't have any PC adapters or hardware.

For this application I'm looking towards a simple IC solution.

Do you have any suggestions?
 

Hi,

1,000kph... That's a novel way of describing frequency! ;)

Depends a lot on supply voltage available and LEDs' current draw (3mA or 300mA each?), both of which in turn will affect choice of MOSFETs...

Simple-ish, maybe, and I'd guess a lot of schematics and blog tutorials on this theme (555 +4017) on the Internet:

If precision microsecond timing and a bit of timing drift with supply voltage and or temperature shifts are not important, you could use a simple 555 astable as the clock signal.

Two CD4017s in series would get over 15 outputs. Put two P-channel MOSFETs on each CD4017 output.

At each clock pulse, two PMOS will be off and 28 will be on.

Not very exciting as it will just be a double blank between double lit-ups that goes around in a circle. Could experiment with mixture of NMOS and PMOS at random or chosen outputs to have more offs and ons along the chain.

Won't work for high-power LEDs as that would need a strong gate drive for the MOSFETs which a 4017 most certainly can't provide.

For changeable speed, maybe could add OA sine wave to modulate 555 control pin. Presumably even one of those nasty, simple OA sine wave generators would suffice as focus is a varying voltage.
 
Last edited:

It can be done in one chip or multiple. Here are 32 bit SIPO shift registers
that could be considered. You would need a simple processor to load
and clock it, so 2 chips. You could use block language to load and clock
it. An example of block coding here :


The block programming, 6'th graders are using it to program robots. I use it as well as C and
am a novice at Verilog. Block is used for very simple quick fast turnaround stuff, the C and Verilog in
more complex designs. This design fits nicely into block language, even for the A/D part.
Use an Arduino or an ATTINY85 to do it + the large shift register.


Here is a 64 bit version one chip version (Verilog code can be modified to turn
it into 30 bits) :

1666898318580.png


The coding here is done in C, maybe total of 30 - 50 lines would do it.

MOSFETS are external. Driven by SR pins. Depending on max toggle rate one might
need additional drivers for them. You can comment on max toggle rate needed.


Regards, Dana.
 
Last edited:
Among circuits included with Falstad's animated simulator is one named "Digital Sine Wave"...
Before I could post a link to it I saw a Youtube video already has it, showing schematic and animation.

Eight D flip-flops (shift register) arranged as a chaser.
The final Not-Q output goes to the first D input. This causes ff's to turn On left-to-right in sequence. Then Off from left-to-right in sequence.


The shift register is versatile, lending itself to experimentation. By trying different connection arrangements you can get various chaser patterns. Example, some led's on, some off, as you wish to make.
 

Thank you folks for commenting , in fact I'm not sure whether I was clear but I only called it a LED chaser because there were no better words how to describe what I am trying to do, in reality there will be no LED's there. I am just testing a commutator of sorts where I need to switch on/off various inputs in a sequential rotary manner.
So I don't need any power output from the sequencer controlling the mosfets, I just need for it to be able to supply the gate charge to control the mosfets.
 

In fact after some thinking I realize the best way for me to arrange this would be to have say 30 switches where all are always "ON", but the "traveling " OFF position should ideally consist of one switch that is OFF while the next one is turned OFF and only after that the last one is switched back ON.
So at any given time at least one switch should be OFF while the next one also turns OFF and the last one then comes back ON.
But I guess one can't get such functionality with the 4017 IC,

Maybe I can arrange a circuit using the 4017 and P channel mosfets where I can delay the gate charge in such a way that the mosfet takes some time to switch back ON after the 4017 IC output pin is already pulled back to ground.
Let's say a two parallel opposite direction diodes where the one letting current back from gate has a larger resistor in series?
 

Hand draw a timing diagram.

Seems like a circular shift register should easily accomplish a traveling "0"
with only one MOSFET off at a time ? Eg. take this diagram and invert the
outputs as shown ?

1667036973389.png



Regards, Dana.
 

@danadakk thanks for answering , I guess I've misspoken , I meant to say I wish so that at least one mosfets stays OFF while the next one is switched OFF and the previous one before the middle OFF one turns ON.

But now that I think about it , I guess I can use the 4017 IC and simply take the P mosfets and couple two mosfets for each 4017 output.
The mosfets will be low voltage low current ones so very little gate charge, I hope the 4017 10mA output per pin should be enough to drive two fets simultaneously?

Then I could add a little delay in how fast the gate discharges and that should give me about 4 to 6 switches OFF at any given time as the position travels along.

Either way since I need to mount this on a small rotor my space is limited and I wish to have the simplest possible solution that still works with a minimal parts count
 

Another approach, single chip, 68 QFN package. Uses onchip library componet of 74HC195 shift
register.

Basically start by issuing a master reset for the 4 SR's. Then using Loadsel program each SR with its
pattern. Then read pot for rate and start the ShiftRateClock and you are in business. This happens to
be 32 bits, but simple logic addition could make it into 30 bits.

I am guessing 30 lines of code would do everything.

1667051105587.png


This could have also been done by wiring up onchip 30 D F-Fs, use a 30 bit demux to
initialize each D with pattern, then clock away....again 1 chip.


Regards, Dana.
 
Last edited:

There are many ways to make a LED Chaser with any pattern , direction and rate of change at reasonable speed but what's the big deal about "1000 km/h".


That is not going to be possible.

Consider 5mm LED with 5mm spacing to find out the pulse time for a distance, d, (1000 km = 1e9 mm) and velocity, v.

t= d/v = 5 mm / 1000 kph = pulse time for 1 LED => 5 mm / 1e9 mm / 3600 s = 1.4 ps ( that's pico seconds about a million times to fast)


Using 25 ohm drivers with 3.6V logic @ Vdd < 2V, you do not need resistors but you do need to mind the power dissipation.

1667065064970.png


I won't give you a serious practical circuit until you give better design expectations "SPECS"

Why do you need this, what brightness, which LEDs, power, current , budget?

By inverting the LEDs you can invert the function of a Johnson Counter, but 74HV17 CMOS is high voltage and also high resistance meaning low current, so that won't work well. I made a ficticious 16 stage Johnson Counter.
 
Last edited:
But now that I think about it , I guess I can use the 4017 IC and simply take the P mosfets and couple two mosfets for each 4017 output.
The mosfets will be low voltage low current ones so very little gate charge, I hope the 4017 10mA output per pin should be enough to drive two fets simultaneously?

Then I could add a little delay in how fast the gate discharges and that should give me about 4 to 6 switches OFF at any given time as the position travels along.
Hi,

From memory, 4017 is not a 10mA sinking or sourcing device, by a long shot, sorry. Except for a low-power input, more poweful output, switch of some kind between a 4017 and the MOSFETs, or using 4017 + modern BJTs that have comparably low RDS(on) to MOSFETs to drive your inputs, no suitable part comes to mind right now.

For what you described about fast on&slowfade off, I'd possibly use a diode + current-limiting resistor in the MOSFET gate turn-on path and an RC network in the turn-off path (or vice versa, depending on what you end up using).
 

There are many ways to make a LED Chaser with any pattern , direction and rate of change at reasonable speed but what's the big deal about "1000 km/h".


That is not going to be possible.

Consider 5mm LED with 5mm spacing to find out the pulse time for a distance, d, (1000 km = 1e9 mm) and velocity, v.

t= d/v = 5 mm / 1000 kph = pulse time for 1 LED => 5 mm / 1e9 mm / 3600 s = 1.4 ps ( that's pico seconds about a million times to fast)


Using 25 ohm drivers with 3.6V logic @ Vdd < 2V, you do not need resistors but you do need to mind the power dissipation.

View attachment 179407

I won't give you a serious practical circuit until you give better design expectations "SPECS"

Why do you need this, what brightness, which LEDs, power, current , budget?

By inverting the LEDs you can invert the function of a Johnson Counter, but 74HV17 CMOS is high voltage and also high resistance meaning low current, so that won't work well. I made a ficticious 16 stage Johnson Counter.
Well I used the "LED chaser" as a reference in order to make myself clearer to folks.
Actually I don't even need mA current capability , I just need a row of switches that switch few milivolts for a hobby test that I'm doing.
The km/h thing was simply a way to express velocity which for me is rather in m/s because I am talking about angular speed, since these switches will be mounted on a rotor.
It is nothing more than angular velocity.

By the way it seems to me you made an error in your calculation, it seems to me this one is correct instead
Hi,

1000 km/h = 1000/3600 km/s = 0.278 km/s or 278m/s = 277,777 mm/s
v = s / t
or
t = s / v = 5mm / 277,777mm/s = 18us

Klaus

That sounds about right, 18us would translate to roughly 50kHz which is nothing big for modern semiconductors.
 

Let's say a two parallel opposite direction diodes where the one letting current back from gate has a larger resistor in series?

I have a simulation resembling this. 3 invert-gates arranged as a ring oscillator. Duty cycle is variable thanks to diodes in anti-parallel.
A potentiometer splits the share each diode gets. By dialing pots to a midway position you can get output pulses to overlap.

You can reference gate outputs to either supply rail. (Thus I have an upper row with one led On and a bottom row with only one led Off.)

When assembling multiple stages, they are prone to be in random states when starting up. Thus more effort is required to make the oscillator start up in an orderly fashion.

3 stage chaser invert-gates 6 led's 6 diodes 3 pots variable duty cycle.png
 

t= d/v = 5 mm / 1000 kph = pulse time for 1 LED => = 1.4 ps ( that's pico seconds
OOPs I forgot the brackets d=5 mm / v= (1e9 mm / 3600 s) = 18 us per 5mm which is one half of 55.55... kHz or about 1k faster than your eye can detect clearly.

I still have no idea what you want to do from your descriptions.

Try harder.

"just need a row of switches that switch few milivolts " ....
"Since these switches will be mounted on a rotor.
It (1000 kph) is nothing more than angular velocity."

I suspect you are talking about a POV display oops I mean a POV LED display.
 
Last edited:

Hi,

From memory, 4017 is not a 10mA sinking or sourcing device, by a long shot, sorry. Except for a low-power input, more poweful output, switch of some kind between a 4017 and the MOSFETs, or using 4017 + modern BJTs that have comparably low RDS(on) to MOSFETs to drive your inputs, no suitable part comes to mind right now.

For what you described about fast on&slowfade off, I'd possibly use a diode + current-limiting resistor in the MOSFET gate turn-on path and an RC network in the turn-off path (or vice versa, depending on what you end up using).
CD4017 drive currents :

1667081642958.png


Most definitely need a buffer for each 4017.

OR use I/O expanders and a small micro to feed it. 2 chips.....




Regards, Dana.
 
Last edited:

@danadakk Well I see youtube being full of 4017 IC LED chaser videos where 5mm dia LED's are run directly from the IC.

Either way , I randomly found a interesting video with a different IC and it's implementation.
74HC595 run by 555 timer.
The guy seems to connect 32 LED's but by pairs of 8, so that one IC with 8 outputs can run all of them.
What is also interesting it seems that he manages to get the effect of large number of diodes being lit at the same time by connecting alternating pairs of 8 to + and - therefore while one row is switched from ON to OFF, the next row is switched from OFF to On.

Either way see for yourself maybe I misunderstood something but this circuit seems like the closest to what i need.
The schematic for the circuit is displayed in 5:36


I guess for me as I will have mosfets instead of LED's I will need to put N mosfets in one row of 8 while P mosfets in the adjacent row to get the same effect of a continually moving bunch of "ON" switches.
 

OOPs I forgot the brackets d=5 mm / v= (1e9 mm / 3600 s) = 18 us per 5mm which is one half of 55.55... kHz or about 1k faster than your eye can detect clearly.

I still have no idea what you want to do from your descriptions.

Try harder.

"just need a row of switches that switch few milivolts " ....
"Since these switches will be mounted on a rotor.
It (1000 kph) is nothing more than angular velocity."

I suspect you are talking about a POV display oops I mean a POV LED display.
Ok, I've built this device, not like the one in the video but different, it works, if you or anyone else is still interested in why I've built it I will make a new thread explaining my experiment you could come and comment there if you wish to, thanks for your participation so far
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top