Brightness control for HDSP 2133 DOT MATRIX DISPLAYS
naveedishtiaq
Posts: 7
Hi,
I am using HDSP 2133 Alpha numeric dot matrix displays . I have connected 04 displays in Parallel.
I need technical help regarding the Brightness control for these displays . I don't want to use internal brightness levels (8 levels) that is its built in feature.
I want to change the brightness levels using 10 KOhm Variable Resistor with PWM (Pulse width Modulation) technique to have a smooth effect of brightness changing levels.
I am not interested in Night Vision circuitry that is recommended circuit of PWM for Night vision applicability by Avago Technologies and is written in Application Note 1039.
I need intensity control for HDSP 2133 Alpha numeric dot matrix displays so that it can change Brightness levels 0% to 100% smoothly with sunlight readability. Earlier I tried with PWM (modified night vision circuit recommend by application note 1039 by avago technology) but couldnot 100% duty cycle.
May be some one can guide me some good techniques to do so.
Your urgent technical solution will highly be appreciated.
Thanks
Regards
Naveed
Show more
Comments
Welcome to the Parallax forums!
Which microcontroller are you using to drive the display?
If you have the Propeller 1 Microcontroller, maybe this link can help with software: http://forums.parallax.com/discussion/106877/programming-pulse-width-modulation-on-the-propeller-chip-also-programming-an
Bit difficult to talk about hardware without seeing what your doing. Could you post some sort of connection diagram or schematic for what you have so far?
It would be helpful to know the answer to VonSzarvas' question.
Since the display is controlled by PWM, I'd think you'd want to read the position of the 10K pot with an ADC and output the appropriate PWM signal.
As VonSzaras mentioned, it's hard to give advice without knowing the details of the hardware you're using.
Problem 1 :
I have attached 04 displays and there is also problem that they are not sync together some times.
Problem 02 :
Can't achieve duty cycle equals to 100% so cant get 100% brightness level
P.S : The details of this circuit can be found on internet by title "Dimming HDSP-213X Displays
To Meet Night Vision Lighting Levels"
This is the only external connector for LED brightness.
I am unsure using a resistor
or transistor in the linear region would work well
because that might change the drive characteristics.
Since a microcontroller is required to load the displays,
a PWM output from another microcontroller pin would be easy.
Use the 2 transistors from Application Note 1039
for the high current, unless you substitute a MOSFET.
My second question is that I am using a single clock oscillator ic 32.768khz and giving to all four displays . Some times it happens that all have some difference in terms of brightness level. Is there any good way to do so ?
The two pins can be loaded in parallel to maintain synchronization.
Actual Scenario : Oscilloscope tells the actual PWM is 3.9 KHz and HDSP-2133 are ruuning on 32.768 KHz. There edges are also not sync .
Problem : Interlacing issues and Sync Issues (Some dots are visible and some are not visible of same Alphabet)
My Requirement : I want to generate a clock pulse of 32.768KHz on some GPIO and want to run my PWM output on 32.768KHz in Atmega 128 on same clock edges inorder to solve my problem.
I have implemented following code for PWM and I am also achieving 0% to 100% duty cycle.
#include <avr/io.h>
#include <util/delay.h>
void InitPWM()
{
/*
TCCR0 - Timer Counter Control Register (TIMER0)
BITS DESCRIPTION
NO: NAME DESCRIPTION
BIT 7 : FOC0 Force Output Compare [Not used in this example]
BIT 6 : WGM00 Wave form generartion mode [SET to 1]
BIT 5 : COM01 Compare Output Mode [SET to 1]
BIT 4 : COM00 Compare Output Mode [SET to 0]
BIT 3 : WGM01 Wave form generation mode [SET to 1]
BIT 2 : CS02 Clock Select [SET to 0]
BIT 1 : CS01 Clock Select [SET to 0]
BIT 0 : CS00 Clock Select [SET to 1]
The above settings are for
Timer Clock = CPU Clock (No Prescalling)
Mode = Fast PWM
PWM Output = Non Inverted
*/
TCCR0|=(1<<WGM00)|(1<<WGM01)|(1<<COM01)|(1<<CS00);
//Set OC0 PIN as output. It is PB3 on ATmega16 ATmega32
DDRB|=(1<<PB3);
}
/******************************************************************
Sets the duty cycle of output.
Arguments
duty: Between 0 - 255
0= 0%
255= 100%
The Function sets the duty cycle of pwm output generated on OC0 PIN
The average voltage on this output pin will be
duty
Vout=
x 5v
255
This can be used to control the brightness of LED or Speed of Motor.
*********************************************************************/
void SetPWMOutput(uint8_t duty)
{
OCR0=duty;
}
/********************************************************************
Simple Wait Loop
*********************************************************************/
void Wait()
{
_delay_loop_2(3200);
}
void main()
{
uint8_t brightness=0;
//Initialize PWM Channel 0
InitPWM();
//Do this forever
while(1)
{
//Now Loop with increasing brightness
for(brightness=0;brightness<255;brightness++)
{
//Now Set The Brighness using PWM
SetPWMOutput(brightness);
//Now Wait For Some Time
Wait();
}
//Now Loop with decreasing brightness
for(brightness=255;brightness>0;brightness--)
{
//Now Set The Brighness using PWM
SetPWMOutput(brightness);
//Now Wait For Some Time
Wait();
}
}
}
I understand the limitations and the suggested circuit.
PWM dimming must be synchronized to the internal scanning,
thus the suggested circuit with the clock and reset to the display
and an external 74ls193 4 bit counter,
which triggers a one-shot timer during the middle of each scan
since the circuit was intended ONLY FOR DIMMING, never for full brightness.
POSSIBLE SIMPLE SOLUTION
- if the one-shot is leading edge triggered:
preset the 74ls193 external counter to 7 to trigger the one-shot to the start of each frame,
or preset to 8 to start one clock tick early.
- if the one-shot is trailing edge triggered:
preset the 74ls193 external counter to 15 to trigger the one-shot to the start of each frame,
or preset to 0 to start one clock tick early.
- use the 10K Ohm Variable Resistor to set the one-shot length
long enough for full on (15 clock ticks)
- follow the application note suggestion for asserting reset when possible
to synchronize the internal and external counters
The MASTER RESET signal resets the HDSP and loads 0100 into the ‘193 counter. This synchronizes the HDSP and the ‘193, which triggers the ‘221 monostable that in turn drives the dimming circuit.
At this point the EXTERNAL CLOCK signal drives the HDSP and the ‘193 counter. The ‘221 is triggered every 8 clock cycles, but is initially delayed by 4 cycles due to the 0100 that was loaded into the ‘193 counter by the MASTER RESET signal.
So all that is required are three signals from the micro to replace the dimmer circuit. EXTERNAL CLOCK, MASTER RESET, and the PWM for the brightness.
The hard part is that the PWM signal has to be synchronized to the clock signal. Not sure if a 1MHz single core cpu is up to that unless there is hardware on chip to help do that, and even then I am not sure it would have time to do anything else.
On the Propeller I would have a pasm program in a cog to do the equivalent of this:
I am sure you could do the same in C on your AVR, but you would not have much time for anything else.