How To My LED increment or Decrement Speed using Pic with use of POT ?

Status
Not open for further replies.

nick703

Advanced Member level 1
Joined
Oct 17, 2011
Messages
422
Helped
21
Reputation
44
Reaction score
22
Trophy points
1,298
Location
surat
Visit site
Activity points
3,987
Hello friends ,

I have a simple LED and One 10K ohm POT and PIC32mx575f256h. Now below link show the every time frequency change that time LED on / off time increase or/ Decrease. https://www.youtube.com/watch?v=KPrSPqfVJhA

Now i want to create that types of task using my Pic device. please help me to do this task.

thanks
 

Better use rotary encoder. But anyway, generating random frequency directly by mcu is a difficult task. Better use some frequency synthesizer ic interfaced with mcu. You will also need a high speed led driver.
 

Create a timer interrupt of say 100 msec. Then use a counter in ISR. The counter holds the no. of interrupts occured before toggling the LED. There will be another variable which holds how many times the interrupt has to occur before toggle can happen and this holds the scaled ADC value.
 

OK thanks for your reply now i now suppose i have to do using NE555 and 10k Potentiometer Pot. now that time i have to test simple LED flasher . below is the Proteus file . and i getting more step by step accurate result how can i do this to change resistor or capacitor change value.

 

I would use a dual one shot with suitable buffer and current limiter R to a few Watts of white LEDs, over driven but not to exceed max I with < 20% duty cycle.

1st one shot in retriggerable multistable vibrator or oscillator mode adjusts f vs R over a very wide f range with suitable RC values and Rmin limit. Then output drives 2nd one shot in astable mode or single shot. Choose on time accordingly. Use programable divider or PLL for precision frequency control/measurements or count time interval or frequency in fixed time with PIC.

If you want an automated strobe RPM test set, use IR reflective pulse in short range and detect change in reflectance with IRDA pair or some other method to use the rotating stripe optical pulse to increase the PIC output frequency until the image is stationary. Like a Phase frequency PLL. Then you have a portable non-contact optical Tach.

For more sensitivity use many series Remote Control IR LED's for more power @>1A pulse or 1W White LEDs and then use PLL chip on reflected signal using type II mixer and measure clock with PIC for RPM. Note at 1A the duty cycle must be low and never exceed average power spec.

Just ask if you need more info. Dual shots give you benefit over 555 with independent 1 and pulse duration control. Or use dual 555's
 

Hello!

Better use rotary encoder. But anyway, generating random frequency directly by mcu is a difficult task.
Better use some frequency synthesizer ic interfaced with mcu. You will also need a high speed led driver.

I don't get it. Could you explain?
It's a LED, so the problem is generating an arbitrary square wave (arbitrary frequency and arbitrary duty cycle).
As long as you stay within reasonable limits (say, 25 Hz upper bound otherwise the human eye is not able to
see the LED on and off states), you can define the frequency and ratio by using a single timer in PWM.
And why a high speed LED driver? If the LED is switched on or off within 1/100 second, it's perfectly fine and
any MCU can do it.

Do you have any other difficult task in mind?

Dora.
 


Allow me to explain, if possible.

The reason an arc strobe lamp works well is it generates high power in microseconds, which is why a low duty cycle high speed pulse may have been suggested.

If the spindle rotates at say 1800 RPM or 30Hz or 33.3 ms per rotation , and you had a 100Hz square light pulse or 5ms duration, the thin reflector stripe would be dim and smeared for 1/6th of a rev and not the same as the demo.

Now consider the position sampling smear or time span and use a high slew rate LED driver at high current and low rep rates!! I would suggest 10W's of LEDs.

At 1% duty cycle at 100Hz would only be equivalent to two 100mW powered 5mm Leds at 50% with a dim smeared result. At 1% your pulse width is 100us with say a rise time of 20us. 10W LEDs could be a three series 3V 1W LEDs using 3.3W per LED or 1/3 OHm ESR per LED or 1 Ohm for three running off 12V with a series Rs of 12-9-1=2V... /1A or 2 Ohms, So your push pull driver or half bridge needs to be lower impedance or a 2 Ohm logic gate drive MOSFET or in parallel off 3.6V with a good LC filter.

Many other implementations possible.

Can a PIC drive this pulse and power directly?
Pulse yes, power NO
 

Hello!

OK, sorry, I didn't watch the video at first, and the original poster was talking about LEDS only, not strobe tubes.

Dora.
 

Yes Doraemon ,

I have use only LED and now without use of PIC . but only use 555 timer .
 

ok friends now i have a small question suppose My object (motor) running at 1440 RPM . then now i want to Freez this object using Stroboscope that time how many frequency take to freezing effect on running object . i want to how many time my Stroboscope light on / off time.
 

Hello!

i want to how many time my Stroboscope light on / off time.

What do you mean?
You want to know the duty ratio?
As for any stroboscope, the on time should be as short as possible.
I'm not sure whether you can do that with a 555, and on top of that, it will not be easy to actually measure
the frequency with a 555.
You should first state clearly how much blurr you can accept. For example, if the "on" time is 1 ms, then
if you draw a thin line on a disc, you will not see a line, but a disc sector which will be about 9 degree wide.
Is that OK?
If you want to reduce the blurr, you have to create a shorter "on" duration. at 100µs, you will have only 0.9
degree blurr. etc
Now you can (maybe) get a frozen image using a 555, but the problem is that you will not be able to measure
anything accurately, except if you can first calibrate your system with known rpm speeds (spin the motor
at a known speed, get the image frozen, write a marker on the potentiometer for that speed, repeat for
other speeds).
If you use a microcontroller, the advantage is that you can a crystal-tuned accyracy, you can report the result
on an LCD, etc, and you don't need markers on your potentiometer.

Dora.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…