Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Moon light pwm pic project

Status
Not open for further replies.

visiontech4x4

New Member
Has anyone done this yet? I have done a little with the 18F2520 following schematics created by Richard.c, here on this site. I can create the circuit and I can program the pic however will need to do a lot of research on how to create the source code. Wondering if anyone can save me some time and share with me your project. I am looking to create a 28 day lunar cycle that will auto dim/brighten 4 1w LED's incrimentaly up to 14 days and them back down to the 28th day. If no one has already done this which pic chip would any of you recomend for the project?
 
I don't think that it involves a "lot of research" in writing a source code. Well go through the tutorials by Nigel Goodwin. It will save you a "lot of research"
 
This sounds like another application thats ideal for the hobbyist with a microcontroller- you know what you want and nobody sells it.

I haven't encountered anything that's close enough to bend to your needs, so you'll probably have to start hammering your own code.

I have given some thought to a clock or calender that would include lunar phase, but no variable illumination.

That being said, don't be surprised if 90% of your program is in the human interface. As for the chip, go with what's familiar or handy. You won't need very many pins, more for setting it than everything else combined (1 pin for PWM output, 2 or 3 pins for the RTC if applicable, 3+ pins for buttons and 2-11 pins for the LCD if applicable, the buttons and LCD could be done away with if you will use a computer to set the clock in which case only two pins there as well).

The functions won't be arduous, so a midrange device will have plenty of muscle. Onboard PWM hardware will simplify your coding substantially. IIC or SPI will help slightly assuming you will be using an external real time clock. A USART will be necessary if a computer is involved.
 
This company makes and sells exactly what you are looking for. For the price I guess it's not bad considering it would probably cost you close to the same for parts and all the time you would need to roll your own.

**broken link removed**

ldanielrosa said:
This sounds like another application thats ideal for the hobbyist with a microcontroller- you know what you want and nobody sells it.
 
Thanks for the replies. I already know about the fishbowl moontube. To cover my 75gallon tank I would have to purchase 2 moontubes $120. A basic pic controller will not cost me $120 to build. The LED's are $12 for the 4 what I need. Anyhow I was able to locate a pic program to start from. It however is in txt format. How do I program this into a hex file? Here is the file. I will be going through Nigels pic tutorial page as soon as I get the components to build the project boards.

Thanks,
Dan
 

Attachments

  • moonlight_sim.txt
    1.2 KB · Views: 155
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top