Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 1st July 2008, 09:28 PM   #76
Default

Futz, your photos and videos still look much better than mine. As I look at them it seems you have much better (brighter) lighting in many of them. Perhaps I'll give that a try when I have more time.

Mike
Mike, K8LH is offline  
Old 1st July 2008, 09:38 PM   #77
Default

Quote:
Originally Posted by Mike, K8LH View Post
Futz, your photos and videos still look much better than mine. As I look at them it seems you have much better (brighter) lighting in many of them. Perhaps I'll give that a try when I have more time.
It's vitally important to have tons of light for macro photography. Here's a quote from an older post of mine
Quote:
How did that pic get to be so white? Did you use flash? If so, here's my tip of the day. In general, NEVER use flash on macros. If you have a fancy remote flash that you can bounce off the ceiling or something to diffuse it, then fine. If it's just a garden variety point-and-shoot camera, disable the flash while shooting macros. Use daylight or artificial, but lots of it, because these little cameras have little lenses. They don't gather much light. Your light should be diffused and non glarey and from all directions to prevent sharp shadows

Use the tightest aperture (biggest F number) you can (AV Priority), to get decent depth of field. This means you gather less light (smaller aperture) so you have to pour the light to it.

Depth of field means that nearer parts and farther away parts of your photo will both be in focus. Shallow DOF (large aperture = small F number) means that your focus range might be as narrow as 1/2". Everything else is out of focus. But you need less light because of the bigger aperture. Deep DOF (small aperture = large F number) means that your focus range will be much larger. But you need more light because of the smaller aperture. (Aperture is the size of hole the light goes thru inside the lens to get to the film (or sensor, in digi cams)).

Using a smaller aperture (bigger F number) to get good DOF also means that, unless you can provide a LOT of light, you need to use longer exposures. That means using a tripod and the timer (unless you have a remote shutter release) to prevent your finger pushing the button from shaking the camera.

Digital cameras sort of emulate film by providing you with a range of ISO's. Depending on your camera, you might get away with as high as 200 - 400 (I stay down at 50 - 100), but the higher you go, the more noise. The pics get more grainy and crappy. Keep the ISO as low as possible. If your camera has auto-ISO, disable it for technical shooting. It's fine for pics of the fam damily outdoors, but not for tech shoots. This again means you need more light. Higher ISO films are "faster" and need less light. But their photo quality is lower.

And last, but not least, THE MOST IMPORTANT THING YOU MUST KNOW ABOUT DIGITAL CAMERAS is how to manage White Balance. Before you shoot any photo, put a piece of pure white paper or card stock where your target is going to be, and at the same angle, and custom set your white balance. Don't rely on auto white balance (AWB). The presets are sort of ok sometimes, but not very accurate.

Different shots at different angles, different times of day, different kinds of artificial and natural light, etc., all can strongly affect where your white balance should be set. For fun, custom adjust it to crazy colors, effectively telling the camera that green is white or blue is white or whatever.

If you don't set white balance correctly you'll spend lots of time in Photoshop or Gimp color correcting your photos. I color correct probably 90% of my pics anyway, at least a little, even with good white balance. That's another article. It's real easy to color correct with those tools, but the technique isn't obvious if you haven't done it before. The auto-color-correct filters in those programs DO NOT WORK. They might do an acceptable job on 1 out of 1000 photos, if you're lucky. You must do it manually.

For macro shooting, a dirt cheap homebuilt light box (or light tent) is a perfect cure for a lot of the above problems. They're very simple to make. Here's some links:
Light Box / Light Tent Photo Gallery by Bill Huber at pbase.com
http://www.wikihow.com/Create-an-Ine...raphy-Lightbox
http://digital-photography-school.co...ve-light-tent/
http://www.strobist.blogspot.com/200...to-studio.html

End of lesson 1
__________________
=========================
Futz's Microcontrollers & Robotics
=========================
futz is offline  
Old 1st July 2008, 09:42 PM   #78
Default

Thank you... I'm going to practice (grin)...
Mike, K8LH is offline  
Old 10th July 2008, 03:41 AM   #79
Default

Mike please help me I have a problem.

I’m confused with the duty cycle & the refresh rate in a LED matrix system.

Are they are two different things or one?

In your schematic it says 20% duty cycle. Does it means each LED driving on 20% duty cycle? 20% means almost 1/5 from the brightness, which is too dim.

If I have a matrix of 5 columns & 8 rows is there any formula to calculate the best delay in between the columns? So I can display it nicely without flickering & with a decent brightness.
Attached Thumbnails
BoostC Charlieplexed PWM 32-fx7wsq2fhm8r2a6.medium.jpg  
Suraj143 is offline  
Old 10th July 2008, 04:21 AM   #80
Default

Quote:
Originally Posted by Suraj143 View Post
Mike please help me I have a problem.

I’m confused with the duty cycle & the refresh rate in a LED matrix system.

Are they are two different things or one?
They are two different things.

Duty cycle is the amount of time in a period that an LED is lighted. In that 5 column display each column is updated one at a time and so each LED in that matrix can be lighted for 20% or 1/5th of the time.

Refresh rate is how often you light each LED in the display over time. It's usually expressed in Hertz (cycles per second). In that 5 column display each column is lighted for 3.2 msecs and so it will take 16 msecs to update the entire 5 column display. The refresh rate is therefor 1 / 0.016 seconds = 62.5 Hertz.

Quote:
In your schematic it says 20% duty cycle. Does it means each LED driving on 20% duty cycle? 20% means almost 1/5 from the brightness, which is too dim.
Yes, each LED can be lighted 20% or 1/5th of the time. A 20% duty cycle is pretty good for a multiplexed LED display.

The duty cycle pretty much determines 'peak' current requirements to light an LED to full brightness. To get a brighter display you can increase the duty cycle and/or increase 'peak' current available to the display.

Quote:
If I have a matrix of 5 columns & 8 rows is there any formula to calculate the best delay in between the columns? So I can display it nicely without flickering & with a decent brightness.
My understanding is that a refresh rate of less than about 60% may cause an LED display to be perceived as flickering.

If you're updating your display one column at a time and you'd like a 60 Hz refresh rate, then;

1/"number of columns"/"refresh rate" = "update interval"
1/5/60 = 0.00333 seconds (3.33 msecs)

You can also use that formula to test different interval timing;

1/"number of columns"/"update interval" = "refresh rate"
1/5/0.002 = 100 Hertz (when using 2 msec update interval)

As I mentioned, to improve brightness you would increase duty cycle and/or increase 'peak' current available to the display.

Regards, Mike

Last edited by Mike, K8LH; 10th July 2008 at 04:25 AM.
Mike, K8LH is offline  
Old 10th July 2008, 04:46 AM   #81
Default

Quote:
Originally Posted by Mike, K8LH View Post

Duty cycle is the amount of time in a period that an LED is lighted. In that 5 column display each column is updated one at a time and so each LED in that matrix can be lighted for 20% or 1/5th of the time.

Refresh rate is how often you light each LED in the display over time. It's usually expressed in Hertz (cycles per second). In that 5 column display each column is lighted for 3.2 msecs and so it will take 16 msecs to update the entire 5 column display. The refresh rate is therefor 1 / 0.016 seconds = 62.5 Hertz.
Hi Mike I totally understood thanks for the well explanation.

In the above example I totally understood the refresh rate.But I like to know what is the duty cycle driving an LED?If I need a duty cycle of 50% what do I have to adjust in the software?

If I adjust the 3.2 msecs time it will change only refresh rate isn't it?How do I adjust the Duty cycle?
Suraj143 is offline  
Old 10th July 2008, 05:10 AM   #82
Default

The duty cycle is determined by your hardware design. If you're driving one column at a time in your 5 column 8 row matrix then you're not going to get more than a 20% duty cycle. A 50% duty cycle would require 20 LEDs on for half the time and the other 20 LEDs on for half the time.

Probably easier to increase 'peak' current to the display (or use high brightness low current LEDs?).

If 10 ma 'average' LED current provides good brightness then you would need 50 ma 'peak' current to get the same brightness when the LED is lighted 1/5th of the time.

You can increase 'peak' current by reducing the value of current limiting resistors on the rows or by using column and/or row driver transistors or driver ICs.

If you need help or recommendations from Forum members please post your schematic.

Regards, Mike

Last edited by Mike, K8LH; 10th July 2008 at 05:12 AM.
Mike, K8LH is offline  
Old 10th July 2008, 06:09 AM   #83
Default

Oh I see that's what I wondering the Duty Cycle is adjusting by the hardware.So the software side I need to concern only about refresh rate.

My circuit is like Nigels tutorial. Rows driving directly via a resistor.& the columns driving via transistors.

If I adjust the peak current by adjusting the resistor will it still 20% duty cycle for 5 columns even if I increase that refresh rate delay 3.2 msecs?Wont this delay acting like on time of the duty cycle period?

That is the place I got stucked.

"A 50% duty cycle would require 20 LEDs on for half the time and the other 20 LEDs on for half the time." How do you get 20 LEDs. A bit doubt here how did you get 20?

Sorry for asking questions

Last edited by Suraj143; 10th July 2008 at 06:39 AM.
Suraj143 is offline  
Old 10th July 2008, 06:28 AM   #84
Default

You can understand what is my point.

In that 5 column display each column is lighted for 3.2 msecs that's the delay cause to vary the refresh rate.

My problem is won't this delay acts like a duty cycles on time of an LED?

Last edited by Suraj143; 10th July 2008 at 06:38 AM.
Suraj143 is offline  
Old 10th July 2008, 09:23 AM   #85
Default

Quote:
Originally Posted by Suraj143 View Post
You can understand what is my point.

In that 5 column display each column is lighted for 3.2 msecs that's the delay cause to vary the refresh rate.

My problem is won't this delay acts like a duty cycles on time of an LED?
You're thinking too hard - it's really simple, you have five rows of LED's, each is on for 1/5th of the time - so in order to keep the same brightness you need to drive the LED's with 5 times the current. So if you're wanting the brightness of a single LED at 20mA, each row of LED's needs to be driven by 100mA - each LED gets an average of 1/5th of that, which is the same 20mA.

Refresh rate just needs to be high enough so you can't see them flickering - you don't want it too high though, or you're wasting cycles that your main program could be using.

My 7 segment LED tutorial included an example where it refreshed far too low, so you could see how it worked, with each digital being displayed in turn, slow enough to see. I would suggest you try doing the same, decrease the refresh rate until you can clearly see each row displayed individually - then gradually increase the refresh rate, you will reach a point where you can no longer see individual rows, but the display flickers, keep increasing until the flickering disappears, this is the minimum refreash rate for YOU - other people will be different, so increase it a fair bit further, to allow for different eyes.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 10th July 2008, 12:19 PM   #86
Default

Quote:
Originally Posted by Suraj143 View Post
....... My circuit is like Nigels tutorial. Rows driving directly via a resistor.& the columns driving via transistors. ....
If you have 5 rows with current limiting resistors and 8 columns with driver transistors then you must be scanning columns and have a 1/8th or 12.5% duty cycle. This is a big misunderstanding.

So is this a multiplexed 5 digit 7 segment display or a 5x8 matrix of 40 LEDs?

Post a schematic?

Mike

Last edited by Mike, K8LH; 10th July 2008 at 12:24 PM.
Mike, K8LH is offline  
Old 10th July 2008, 12:43 PM   #87
Default

Quote:
Originally Posted by Suraj143 View Post
You can understand what is my point.

In that 5 column display each column is lighted for 3.2 msecs that's the delay cause to vary the refresh rate.

My problem is won't this delay acts like a duty cycles on time of an LED?
Here's an exercise. How much time each second is an LED 'on' when each column is lighted for 3.2 msecs? ...for 2 msecs? ...for 1 msec?

(1) 1 second / 5 columns / 3.2 msecs per column = 62.5 Hertz
(1) 62.5 Hz * 3.2 msecs column time = 200 msecs column time per second

(2) 1 second / 5 columns / 2 msecs per column = 100 Hertz
(2) 100 Hz * 2 msecs column time = 200 msecs column time per second

(3) 1 second / 5 columns / 1 msec per column = 200 Hertz
(3) 200 Hz * 1 msec column time = 200 msecs column time per second

Column "on time" effects refresh rate. Refresh rate does not effect duty cycle...

Last edited by Mike, K8LH; 10th July 2008 at 12:44 PM.
Mike, K8LH is offline  
Old 11th July 2008, 05:05 AM   #88
Default

Hi for both of you Mike & Nigel now I understood well.

Quote:
Column "on time" effects refresh rate. Refresh rate does not effect duty cycle...
That is what I want to know thanks for that Mike.

Quote:
Originally Posted by Mike, K8LH View Post
Here's an exercise. How much time each second is an LED 'on' when each column is lighted for 3.2 msecs? ...for 2 msecs? ...for 1 msec?

(1) 1 second / 5 columns / 3.2 msecs per column = 62.5 Hertz
(1) 62.5 Hz * 3.2 msecs column time = 200 msecs column time per second

(2) 1 second / 5 columns / 2 msecs per column = 100 Hertz
(2) 100 Hz * 2 msecs column time = 200 msecs column time per second

(3) 1 second / 5 columns / 1 msec per column = 200 Hertz
(3) 200 Hz * 1 msec column time = 200 msecs column time per second
Who knows?

Duty cycle time is adjusting by the hardware.There is no way to find the LED on time through software.Sorry about that. If you know a way to calculate the LED on time for each second let me know
Suraj143 is offline  
Old 11th July 2008, 05:10 AM   #89
Default

But I can see one thing from your examples

The column time per second is same on all three examples.That is 200 msecs even if I change the update interval.
Suraj143 is offline  
Old 25th July 2008, 12:46 PM   #90
Default

Found this tread and think this project is really cool.<strike> But i cant seem to compile any of the code. I have tried SourceBoost IDE 6.87 as the compiler.
Is there another compiler i can use or is it a setting thing.
</strike>

Thank You,

Last edited by Flex; 25th July 2008 at 02:20 PM. Reason: Found the problem, it was a setting
Flex is offline  
Reply

Tags
boostc, charlieplexed, pwm

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
BoostC question.. AddressOf Mike, K8LH Micro Controllers 8 25th June 2008 12:20 AM
LCD degree symbol with sprintf (BoostC) futz Micro Controllers 29 5th June 2008 05:19 AM
math.h and lib for BoostC? futz Micro Controllers 3 31st March 2008 06:29 AM
Charlieplexed code segment for the Cricket Thermostat William At MyBlueRoom Micro Controllers 2 14th March 2006 05:12 PM
My PIC Projects Site NEW (includes 2 Charlieplexed Display) William At MyBlueRoom Electronic Projects Design/Ideas/Reviews 0 28th February 2006 02:31 PM



All times are GMT. The time now is 03:45 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker