PIC16F676 – Is it possible to add a dimmer circuit to the seven segment displays

dimmerled

I am attempting to build a PIC16F676 based voltmeter using 3 multiplexed common-anode seven segment displays. Is it possible to add a light activated dimmer to control brightness of the displays through the PIC or control the current externally against the displays them selves? It would result in a bright display in bright conditions and dimmer in dark conditions to not be blindingly bright or distracting. Most standard seven segment displays are not usually that bright but this is a large display using bright leds.

Edit: I am adding the schematic that I'm working off of. Guess I should have added in the beginning. Sorry folks.

Original site:
http://www.circuitvalley.com/2012/02/30-volts-panel-volt-meter-pic.html

enter image description here

In the display, each segment contains 5x leds in parallel. As a result, the BC557's will need to be changed to something larger as 5x parallel leds may draw >100ma. The problem of the leds is that I'm using 01005 SMD leds in a small form factor but I am only finding them in stoopid bright instead of standard bright. 🙁 When I thought of posing this question, I had difficulty figuring how to title it and I'm trying not to draw the question in that direction.

Best Answer

You need to do two separate things:

  1. Measure the light level. This should be done with a light dependent resistor and an analog input of the PIC.

  2. Adjust the brightness of the display. The simplest way I can think of is to reduce the duty cycle, the fraction of the time that the LEDs are on.
    You are already be switching quickly between the separate digits, so it should be a simple matter to turn them each on for an even shorter period of time. This will make them appear less bright.

Then you can link the two with a formula or algorithm, which you can develop by experiment.

A note on multiplexing:
You can generally get away with flickering an LED at perhaps 50 or 100 Hz, if it's for a normal range of brightness. But for very short duty cycles (and you will need to go very short to get a dim display, perhaps 1/256), even 100 Hz starts to look strange, the lights leave dotted streaks as you look around the room. So aim for something more like 1 kHz, to be sure it looks smooth even at low brightness.