Gas light flicker

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Gas light flicker

Postby RobH » Thu Nov 06, 2014 7:13 pm

Could someone help me with a small FC code to make an LED flicker with an adjustable rate?
These users thanked the author RobH for the post:
hawk44 (Thu Dec 18, 2014 10:36 am)
Rating: 5.26%
 

User avatar
Benj
Matrix Staff
Posts: 14567
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4598 times
Been thanked: 4239 times
Contact:

Re: Gas light flicker

Postby Benj » Fri Nov 07, 2014 12:59 pm

Hello Rob,

This article may help: http://www.matrixtsl.com/article.php?a=52
These users thanked the author Benj for the post (total 2):
RobH (Fri Nov 07, 2014 3:12 pm) • QMESAR (Fri Nov 07, 2014 3:25 pm)
Rating: 10.53%
 

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8536
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2456 times
Been thanked: 3525 times
Contact:

Re: Gas light flicker

Postby medelec35 » Fri Nov 07, 2014 1:04 pm

Hi Rob,
I created flame simulation software for a fire in a dolls house using a bright orange LED.
Looked affective when LED was behind light diffusing material.
Target was 12F1824 running at 4MHz to reduce power.
You will be able to use any target device at any clock speed, but make sure PWM is set at the correct period.
Flowchart combined with Ben's article should get you on your way.

Because I limited my current to less than maximum permitted current and only used one LED I did not use transistors to control LED.
Your setup may be different, so you may need to use a transistor?
Hope it helps

Martin
Attachments
Flame simulation.fcf
(6.5 KiB) Downloaded 94 times
These users thanked the author medelec35 for the post (total 4):
Benj (Fri Nov 07, 2014 1:31 pm) • RobH (Fri Nov 07, 2014 3:11 pm) • QMESAR (Fri Nov 07, 2014 3:25 pm) • jgu1 (Fri Nov 07, 2014 9:04 pm)
Rating: 21.05%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

User avatar
RobH
Posts: 95
Joined: Wed Sep 11, 2013 7:51 pm
Has thanked: 29 times
Been thanked: 17 times
Contact:

Re: Gas light flicker

Postby RobH » Fri Nov 07, 2014 3:12 pm

That's perfect guys. Thanks. I'll play with those files an see how bad I can break them. ;)