0
\$\begingroup\$

I have a fairly successful attempt so far at driving an LED display with an Arduino Mega 2560. The Display sequences work well on their own and the Arduino seems to be doing its job sending the patterns. The part where I am struggling with is I am trying to control the intensity of the display with PWM. I am using an NE555P timer based mostly on the information here: 555 Oscillator Tutorial

The end goal is to replace POT1 with a rotary switch to select several pre-determined brightness settings via resistors as well as a location for a photocell to provide auto dimming to adjust to ambient light. I need an external oscillator as opposed to the PWM on the Arduino board because I am planning on using an Atmega chip by itself instead of the whole Arduino when more are made.

The problem I am having is that no matter how I attempt to regulate the PWM, it has no effect on the brightness of the LEDs. They stay lit with the same intensity regardless of the timer adjustments. I have a single indicator LED attached to the timer in front of R48 that dims as expected without any problem. It is the LED array that doesn't seem affected and it outputs with the same intensity regardless of the oscillator. It would seem to me, that being that the entire voltage in should be regulated by the pulses, that they would have to dim unless they are drawing power from somewhere else. Does that seem correct? I tried replacing Transistor 17 with an FET to see if maybe it was the switching speed of the 2N2222 not being quick enough but there was no change.

Would I be better off using a different timer or do I simply have something hooked up wrong? Is there a way to isolate the voltage in to the LED array better? I am fairly stumped as to why the LEDs are unaffected by the PWM. On the schematic the connection to the Arduino Mega2560 are represented by the "Digital" labels. Any input is appreciated, I have tried switching it around but haven't had any success.!! Update: I have made changes to the schematic based on some helpful suggestions. There are still no changes to the brightness of the display though. Update 3: controllerC

Having problems getting the images to insert...

\$\endgroup\$
  • \$\begingroup\$ "I need an external oscillator as opposed to the PWM on the Arduino board because I am planning on using an Atmega chip by itself instead of the whole Arduino when more are made." Huh? PWM is an integral part of the ATmega. I don't get your problem. Also with your 555 you are only changing its frequency, not its duty cycle. \$\endgroup\$ – jippie Apr 27 '15 at 20:34
  • \$\begingroup\$ No, changing that resistor will change both frequency and duty cycle. \$\endgroup\$ – WhatRoughBeast Apr 27 '15 at 20:57
  • \$\begingroup\$ LEDs in parallel = bad control of brightness on one of them usually \$\endgroup\$ – Andy aka Apr 27 '15 at 21:19
  • \$\begingroup\$ @jippie If I was to use an oscillation generated by the ATmega would I still use a transistor to drive the positive voltage? I did not know the mega had one on board already, which I suppose would make my life easier. I am trying to understand why the current setup isn't working if I was trying to do a similar setup without an arduino. \$\endgroup\$ – HiWay Apr 27 '15 at 21:42
  • \$\begingroup\$ @Andyaka I am trying to work with an existing setup. I might be able to recreate in a better way though. The LEDs that are tied together need to remain together to work with larger displays that are wired the same. \$\endgroup\$ – HiWay Apr 27 '15 at 21:49
0
\$\begingroup\$

There are, I think, a number of issues. Try this:

Reduce C2 to .01 uF, and increase R47 to 10k. You don't list your pot value, but I'm assuming 1k. Increase this to 100k, and put a 1k in series with it. As you've got it now, the pot value gets way too low for the circuit to operate properly.

Then, you need to do a major change on your transistor output. Try something like

schematic

simulate this circuit – Schematic created using CircuitLab

Note that there are 2 LED outputs. Divide your LEDs into 2 equal groups and drive each group with one output. This will keep the PNP current levels within spec (3906s are only rated for 100 mA).

Alternatively, get rid of the transistor and R48/49 completely. The output current for a 555 is rated at 200 mA, that's about what your LEDs will draw. R48 and R49 are so low that you're drawing near that anyways.

Finally, I'd suggest reducing your base resistors (R17 - R32) to about 1k to 2k, just to make sure the transistors are driven hard on.

\$\endgroup\$
  • \$\begingroup\$ Thank you for taking a look at the circuit. I made the changes to the circuit as per many of your suggestions. I did not have any 2N3906 transistors and instead used a Tip31 in place of Q1 and a TIP42 in place of Q2. They are rated at 3A and 10A respectably so I only used one instead of two. The display is still not changed by the oscillator and shines the same regardless of the changes. The inline resistor with POT1 did make it smoother, thank you for that. I will try to post the new schematic below. \$\endgroup\$ – HiWay Apr 28 '15 at 17:23
  • \$\begingroup\$ Please recheck my schematic. You can still use a 2N2222 for Q1, but R54 goes to the base, not the emitter, and the emitter goes to ground. \$\endgroup\$ – WhatRoughBeast Apr 28 '15 at 17:55
  • \$\begingroup\$ I rechecked, I updated my schematic incorrectly. Sorry about that. With either the Tip 31 or the 2N2222 there is no change. It still is shining on brightly. Do you think the transistor be better on the negative side of the LEDs to regulate ground instead? \$\endgroup\$ – HiWay Apr 28 '15 at 20:37
  • \$\begingroup\$ I tried to update the image... It keeps breaking the link... \$\endgroup\$ – HiWay Apr 28 '15 at 21:00
  • \$\begingroup\$ The first thing I'd do is look carefully at the TIP data sheets. Are you sure you've got the pin order right? If you think it's EBC, you've got it wrong - it's ECB. This would explain why the LEDs are on. Second, can you turn individual LEDs on and off? \$\endgroup\$ – WhatRoughBeast Apr 28 '15 at 21:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.