jmerrell Posted April 20, 2011 Report Share Posted April 20, 2011 I am designing a project where I would like to turn on a 12V bulb with a sensor, such as an opto-transistor or an LDR (or some other sensor). I would like the bulb to ramp up in brightness at the beginning of the presentation, and ramp down in brightness at the end of the presentation (10 minutes after turning on to full brightness). The ramping up and down time should be anywhere between 15-30 seconds. I have thought of using a 555 timer or RC circuit, but I don't know if I could achieve the desired ramping time. Can someone please help. Quote Link to comment Share on other sites More sharing options...
Hero999 Posted April 20, 2011 Report Share Posted April 20, 2011 Why torture yourself? Use a simple microcontroller such as the PIC12F508 or one which has a built-in PWM module such as the PIC12F683, if you want simpler code. Quote Link to comment Share on other sites More sharing options...
jmerrell Posted April 20, 2011 Author Report Share Posted April 20, 2011 Sounds like a good idea. I recently started learning PBasic and I'm not sure if I can write the code correctly, but I will try. Thanks for the information!!! Quote Link to comment Share on other sites More sharing options...
Hero999 Posted April 20, 2011 Report Share Posted April 20, 2011 Good decision, many people are scared of MCUs for some reason. It's possible to do this with a couple of 555 timers or some comparators but it won't be anywhere near as simple as with a MCU. The problem is the long 10 minute delay which isn't easy with a 555 timer because the RC values need to be high and large capacitors have poor tolerance and the leakage current becomes an issue.I've never used PBasic before. I've dabbled a bit in MCUs a bit though using assembler and the simple PIC509. It shouldn't be hard to do. The lamp can be switched with a MOSFET or BJT depending on its power requirements. Google for some tutorials on PWM with PIC microcontrollers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.