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.

How to practically build a LED counter out of 120+ components?

Status
Not open for further replies.

TriggerHappy

Junior Member level 3
Junior Member level 3
Joined
Sep 7, 2011
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,706
I want to measure two timing properties of my smartphone camera:
1) How long does it take for its rollings shutter to read an image top to bottom?
2) Exact how long time is there between the shutter openings of two specific consecutive photos?

For this purpose I thought I would build a binary counter with two rows LED's. One in the top of the field of view, the other simultaneous row of LED in the bottom of the field of view. I can then see on any image the time difference between its top and its bottom. And of course the time lapsed between two consecutive photos.

Since two photos could be taken a few seconds inbetween, I'd need about a 10 seconds interval of the slowest LED. And for the fastest LED I think 10 microseconds would be frequent enough. 10 s to ~9.5 us needs 21 LED:s. Times two for the second row. So I figure that I would need: 42 LED's, 42 wires, 42 resistors and two breadboards, and binary counters with 21 pinouts.

I imagine it would be a mess to put together practically! I'd need several counters cascading each other, and it is unlikely that none of the ~250 legs of the resistors and wires would come loose at any one time. Even if I scale down to the range 5s to 0.1ms, things only get moderately better.

How would you who are more experienced build such a temporary binary LED clock practically?
Even if I program an IC with 21 pinouts, it's still a mess.
 

Temporarily? .. without a doubt: breadboard.

While it sounds daunting, what you describe is moderately tame compared to what I've seen constructed on breadboard! You'll also be surprised at how quickly you can put it all together (which is why it's so useful). You'll easily knock it over in an (uninterrupted) day :)
It sounds like a really interesting project too - post what you learn back here so we can all see!

P.S. A google search on "breadboards" tuns up some entertaining images such as https://www.birthofasynth.com/Scott_Stites/Images/multiphase_main/multiphase_bb.jpg...
 

I've got a record of ending up in an escalating mess, and I don't like it. This time I realised the problem beforehand, I will take advantage of it. Just found stuff like this to simplify it quite a bit:
https://www.electrokit.com/ledx8-gemensam-katod.46116

I suppose it's straight forward to connect multiple binary counters to each other. No trap to think about there, like one could loose a tick for each counter?
 

Just a thought,

If available, you could use an O-scope to do the measurement, you might save yourself lots of trouble. Also, that would provide a route to validate your circuit once it is built, if you'd still want to do that when you are done. In any case, I'd want to do that first just to make sure I'm getting the correct signals from the camera and that the signals are behaving like I'd expect.

It would be a shame to build a big complicated circuit to find out that one of your assumptions was wrong.
 

Just found stuff like this to simplify it quite a bit:
https://www.electrokit.com/ledx8-gemensam-katod.46116

This looks like an led sequencer. If that is what you are looking for, then you might be interested in the 4017 decade counter. This IC is popular and easy to use.

It lights 10 led's one at a time, in sequence as the input pin receives clock pulses. It can operate at several MHz, which is within your specs.

The scope traces show that it rotates the led flashes, without any skips.

 

See point 7 in the datasheet for ripple counter 4060:
**broken link removed**

It skips the first three cycles. So if I cascade two of those counters, there will be three blind spots between them, right? What an utterly stupid design!!! Is there a way to connect them to avoid that?

Can anyone recommend a useful binary counter? One that actually counts. ALL bits... Does any such item exist in the world?

This looks like an led sequencer.
No, it's just separate LED's with each a resistor of 470 ohm. It just a convenient package. But I've figured out that I don't need that now.
 

Yes, the 4060 (and 4020) do not output the first 3 bits.

To cascade binary counters, you would add on a 4040 or 4024. See the following link, 70% of the way down the page.

https://electronicsclub.info/cmos.htm

You are taking on a lot of work to make a 10 second timer with a resolution to 10 uSec.

If I needed to count time between shutter openings, I would photograph a stopwatch with resolution of 1/100 sec. An inexpensive digital watch has this function.

As for how to count time in 10 uSec intervals...

A cheap way would be to examine the binary pattern of led's attached to outputs of a 4060 IC (or rather two rows of led's, one at the top of the picture, another at the bottom).

Or if I wanted an easy-to-read numeric display, I would use an IC which drives a 3-digit counter (such as the 14553).

https://www.electroniq.net/other-projects/three-digit-counter-electronic-project.html

You would feed it a 100 kHz clock. Hence an increment of 1 on the display would be 10 uSec. It will take .01 sec to count to 999. Then it wraps around to 0 again.

You can cascade two 14553 to get more digits, or, there are 4-digit counter IC's.
 

An additional comment to your initial question, electronic camaeras usually don't have rolling shutters. They are "gating" the sensor array as a whole for exposure control.
 

An additional comment to your initial question, electronic camaeras usually don't have rolling shutters. They are "gating" the sensor array as a whole for exposure control.
Most pones and webcams have rolling shutters, but we'll see!
https://www.youtube.com/watch?feature=player_embedded&v=TKF6nFzpHBU

- - - Updated - - -

Yes, the 4060 (and 4020) do not output the first 3 bits.

To cascade binary counters, you would add on a 4040 or 4024. See the following link, 70% of the way down the page.

https://electronicsclub.info/cmos.htm
Using the 3rd last output as the input of the next one, yes I figured that out as soon as I shut down the computer yesterday night. The electronics industry isn't usually stupid, I knew I wasn't seeing straight.

The output which drives the next counter also needs to be connected to a LED. So on the bransch to the other counter I need a Kohm resistor to the base of a transistor which collects 5V.

If I needed to count time between shutter openings, I would photograph a stopwatch with resolution of 1/100 sec. An inexpensive digital watch has this function.
LCD:s get blurry because yhey have so slow "rise and fall times", the last digits always look like 8:s. And 1/100th is certainly too slow.

A cheap way would be to examine the binary pattern of led's attached to outputs of a 4060 IC (or rather two rows of led's, one at the top of the picture, another at the bottom).
Exactly what I descripe in my first post that I intend to do!

Or if I wanted an easy-to-read numeric display, I would use an IC which drives a 3-digit counter (such as the 14553).
Yes, I have done some AVR programming, but a friend has borrowed that stuff.
 

"A cheap way would be to examine the binary pattern of led's attached to outputs of a 4060 IC (or rather two rows of led's, one at the top of the picture, another at the bottom)."

Exactly what I descripe in my first post that I intend to do!

Then progress can go full steam... I guess I needed this clarification, after seeing you talk about 120 components.

You're in business with a combination of 4060 and 4040 IC's.

Notice you must use the 4040 for the most significant bits. That IC gives you all the outputs from Q1 to Q12.
(Reason: Notice with the 4060 you only get Q4 to Q10 outputs. With the 4020 you only get Q4 onward. You can work around this and fill in the missing bits by adding external divide-by-2 flip flops, although it will get cumbersome.)

You can use the 4060 to obtain the 7 least significant bits. However since it does not give you Q1 to Q3, this means your oscillator must run 16 times faster than your desired time increment. Suppose you wish Q4 to change every 10 uS. Then the oscillator must be 1.6 MHz.
 

Does the 74HCT4060 tick without any external crystal or resistor/capcitor conencted to it? Mine seems to do so...

The 4060 is worhtless, because it lacks count number ten. It is a mad chip, a bug.
I'll get the 4020 tomorrow, it has 11 counting pins in a row. Then I'll finally build my little clock. However, it seems the 4020 can only give 10 mA on each pin (or what is "clamping" current?), so I must use low ampere LED's or use a shit load of transistors.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top