How to use pwm to an output already being used as an output?

nick12ab

Senior Member
"Well, you can if you move the object being PWM'd or where your eyes are pointing at. "

How is that relevant to this discussion ?
Read the quoted bit from what you said - if you're doing it at 100Hz then if whatever is flashing at 100Hz is moving a lot then it is visibly flashing.
 

Dicky Mint

Senior Member
Hi Goeytex, I'm sorry I'm probably quite dumb but I can't follow you code on post #38 very well. Would it be possible to explain it a bit to a beginner? Its interesting to me that one can detect a light flashing at 100Hz by moving it fast!
 

nick12ab

Senior Member
When you keep the 100Hz light source still, your persistence of vision makes it look like it isn't flickering. As the persistence of vision is only for the bit of eye that light is exposed to, if you move the light then you will briefly see a pattern of on-off-on-off-on-off in a line across wherever you moved the light.
 

Dicky Mint

Senior Member
Thank you, very interesting. Is it a peculiarity of the eye/brain of humans/mammals? I suppose I should Google it!
 

Goeytex

Senior Member
Hi Goeytex, I'm sorry I'm probably quite dumb but I can't follow you code on post #38 very well. Would it be possible to explain it a bit to a beginner? Its interesting to me that one can detect a light flashing at 100Hz by moving it fast!
The best way to understand it is to load it up and run it, using a single LED connected to the Picaxe and then look at the
output with a scope. It will look like a pulse train.

< Pwmduty, pin, 0 > is a way to turn off the main PWM. In the loop, the main PWM is turned on/off at about 500 hz.
This on/off time ratio is controlled by the 2nd ADC/Pot.

And yes, if you can dart your eyes back and forth fast enough while bobbing your head up and down at the right speed you could
see each pixel change in slow motion on your TV set. How that is relevant to your project I haven't a clue ........
 
Last edited:

Dicky Mint

Senior Member
I suppose I find things interesting that I haven't heard of before. I know its not particularity relevant to my current project but who can say that increasing one's knowledge is irrelevant!
 

Dicky Mint

Senior Member
Hi I see bursts of signals. I guess that's what I ought to see. It's a bit difficult making meaningful measurements on my 'scope as its screen area is about 1 square inch! (literally!) I'm saving for a new one and I hear that Stewart of Reading is good. I don't know how to interpret this data (bursts of signals) in my context of "how to use pwm to an output already being used as an output. I want to pwm a pin which is carrying signals derived from ambient sound.
 

SAborn

Senior Member
Why cant you just PWM the supply and use the other pins as you presently are to switch each led array on as you require them, so the only thing that changes it 1 pin driving a mosfet to PWM the supply to all leds.
This might mean the PWM is on the high side of the leds and you will need a mosfet driver to do this effectively.
 

John West

Senior Member
When you keep the 100Hz light source still, your persistence of vision makes it look like it isn't flickering. As the persistence of vision is only for the bit of eye that light is exposed to, if you move the light then you will briefly see a pattern of on-off-on-off-on-off in a line across wherever you moved the light.
You'll get the same effect by moving your eyes rapidly past a pulsing LED. A series of "dashed lines" of light are clear in the after-image. Also, rapidly moving anything being lit by the LED will produce the same effect. I wave my fingers back and forth in front of PWM'd LED's to check their pulse rate to see if it's annoying.

But the LED's never seem to complain.
 
Last edited:

Goeytex

Senior Member
Why not use a CD4066 Quad Bilateral Switch and enable/disable it it at the rate you want ?

I have yet to see a proposed schematic so it makes things a bit more difficult .....
 
Last edited:
Top