Closed furlow closed 10 years ago
Should have a read of http://www.raspberrypi.org/phpBB3/viewtopic.php?f=44&t=31714 there should be a solution to this with no capacitors or external components added. We just need to use pin 18 instead of 13 as the pi has one hardware PWM on pin 18. I will send an email out to Sachin and the rest of the team and we can get this changed on the PCB before we make the next prototype.
Or we could get a better library https://github.com/sarfata/pi-blaster/.
I'll give that a go tomorrow see where I get.
pi-blaster has been implemented and whilst it's stable when used with a constant brightness over a long period of say 10seconds or greater it's generally stable. However it still flickers between changing to a different brightness level, which is unfortunate. We should probably have a look at using an ATtiny and include it as an optional component on the next PCB. A switch can be included to redirect the signal from either the output of the ATtiny or directly from the GPIO. This way we have a fall back to the previous method if we can't implement the ATtiny.
We have a slight problem with the PWM, it flickers quite often and doesn't give the most stable output. This is because the raspberry pi uses software PWM. This probably can't be fixed in the software.
A simple fix could be to just place a capacitor on the LED output pin, to smooth the output.
The other solution would be to get a small micro controller such as an a ATtiny, which would have at least one hardware PWM which would give us a stable output.
In the time frame we have a capacitor is probably the best solution.