0
\$\begingroup\$

I'm trying to drive a 12V LED with an arduino acting as an encoder: a PWM signal with 80% duty cycle ("1" symbol is +5v for the 80% of the time, 0v for 20% of the bit-time) . Testing the maximum frequency supported by the cricuit/driver/led, I get a bit-time of 1/1500 sec-1 with a cyclic message 101010... Above that frequency the led begins to blink. I wonder what should be improved to get a bit-time of 1/5000 = 200 nano sec. The circuit from Joost Damad is attached. Arduino LED Driver

\$\endgroup\$
  • \$\begingroup\$ I am missing something here. You are modulating an LED using data stream (101010). But this same LED is already being modulated by the Arduino's PWM feature at an 80% duty cycle? \$\endgroup\$ – st2000 Dec 29 '16 at 22:39
  • \$\begingroup\$ And now you are asking, when you modulate the LED that is already being modulated, why you start seeing it blink? \$\endgroup\$ – st2000 Dec 29 '16 at 22:40
  • \$\begingroup\$ a) go from 10% to 100% current. instead of 0 to 100% lowers ESR for "0" thus RC=T decay reduced. b) change LED to one with lower RC time constant R=ESR, C=Cjcn try a Class IIIA Laser Product or take out DVD/CD player or get a Vishay IR LED 150MHz vishay.com/docs/81090/81090.pdf and matching fast TIA. or Vishay TSFF5210 AlGaAs LED Pulse to 1A with 1% duty cycle >10kHz instead of 50% ...so 1A 200ns On , 10mA 100uS max OFF and go up to 15ns on/off @ 100mA with skill and luck. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Dec 29 '16 at 22:41
  • 1
    \$\begingroup\$ BTW White LEDs are slower \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Dec 29 '16 at 22:46
  • \$\begingroup\$ electronics.stackexchange.com/q/178349/76537 related \$\endgroup\$ – User323693 Dec 30 '16 at 3:52
1
\$\begingroup\$

I found two issues that were affecting the response of the circuit: - The CSHUNT (capacitor in parallel with the LED) that should act as ripple filter didn't allow to follow correctly the PWM. So I removed and now works as I was expecting:PWM vs LED voltage - While encoding with digitalWrite() and delayMicroseconds() I was printing the iteration Serial.println(): this was making extra delays that were also affecting the output PWM. - I tested now in the range of my requirements and it works fine: Bit_time= 166 usec, including a 95% duty cycle. That means 8 usec RTZ and the circuit responds fine

\$\endgroup\$
0
\$\begingroup\$

When using the Arduino analogWrite() method, the PWM signal generated by an Arduino Uno on pins 5 or 6, for example, has a period of a little more than a ms (1.02048ms).

This quote from here describes this in detail:

The frequency of the PWM signal on most pins is approximately 490 Hz. On the Uno and similar boards, pins 5 and 6 have a frequency of approximately 980 Hz. Pins 3 and 11 on the Leonardo also run at 980 Hz.

Changes in the PWM duty cycle by calling the Arduino's analogWrite() method near, at the same speed or exceeding the speed of the PWM signal will likely cause unexpected results.

\$\endgroup\$

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.