'Filtering' 60hz flash

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
Slide
Posts: 3
Joined: Mon Dec 20, 2004 1:01 am
Location: Winnipeg, Canada
Contact:

'Filtering' 60hz flash

Post by Slide »

I have a project I made to control 'the moon' for my brother-in-law's saltwater aquarium. It flashed blue led's to simulate the phases of the moon.<p>I am using a photoresister to tell when the main aquarium lights are on - this tells my circuit that a day has passed.<p>The problem is, the 60hz flashing is sometimes triggering three or four days at a time.<p>Does anyone have anything that I could use to filter out the 60hz flashing. When the resistor is low resistance, it is grounding the input pin of the MCU (weak pull-ups enabled) to tell me the lights are on.<p>I was thinking along the lines of the missing pulse detector that the guy used in the garage door circuit in the last issue.<p>Any ideas anyone?<p>Ciao!<p>Andy
B2 Spirit, radar contact.......
User avatar
jwax
Posts: 2234
Joined: Mon Feb 09, 2004 1:01 am
Location: NY
Contact:

Re: 'Filtering' 60hz flash

Post by jwax »

Maybe a couple of microfarads cap to ground at the input to "smooth out" that pesky 60 HZ?
WA2RBA
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: 'Filtering' 60hz flash

Post by philba »

I agree with jwax, a cap should work if the photoresistor is seeing multiple flashes.<p>However, I wonder if this is your problem. Have you put a scope on the signal to see if its the source of the fluctuations? Is it possible that you are seeing electrical noise from some where else? The reason I'm suspicious is your statement that "sometimes" it sees multiple events. If it was 60 hz doing it, why wouldn't it happen all the time? <p>Also, what are you using for the sensor? some are more sensitive than others.
dyarker
Posts: 1919
Joined: Fri Aug 22, 2003 1:01 am
Location: Izmir, Turkiye; from Rochester, NY
Contact:

Re: 'Filtering' 60hz flash

Post by dyarker »

Florescent lights that flash/flicker a few times when starting? Agree with philba, a 60Hz problem would give 60 days per second continuously.
Dale Y
Slide
Posts: 3
Joined: Mon Dec 20, 2004 1:01 am
Location: Winnipeg, Canada
Contact:

Re: 'Filtering' 60hz flash

Post by Slide »

<blockquote><font size="1" face="Verdana, Helvetica, sans-serif">quote:</font><hr>Originally posted by philba:
I agree with jwax, a cap should work if the photoresistor is seeing multiple flashes.<p>However, I wonder if this is your problem. Have you put a scope on the signal to see if its the source of the fluctuations? Is it possible that you are seeing electrical noise from some where else? The reason I'm suspicious is your statement that "sometimes" it sees multiple events. If it was 60 hz doing it, why wouldn't it happen all the time? <p>Also, what are you using for the sensor? some are more sensitive than others.<hr></blockquote><p>
Yeah, I had that thought too. I am using a Cds photocell that varies from 200 ohms to 16k - the wierd thing is, I had no delay built in when the lights were turning off - I added a delay and it cured the problem, for a week. <p>Now my brother-in-law says its tripping 3 or 4 days every night when the main lights turn off (thats when I turn on the led's).<p>I don't know - anyone have any ideas on something else I can try to sense these lights? Photo transistor perhaps??<p>[ January 03, 2005: Message edited by: Slide ]</p>
B2 Spirit, radar contact.......
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: 'Filtering' 60hz flash

Post by philba »

CDS cells are really really slow so I'd be surpised if its the lights flashing (even flourescent flickering). CDS is what you want. I'd bet its noise when the light shuts off. What kind of filtering do you have on your power supply. Big enough cap? Is it possible that turning the LEDs on pulls your voltage down and triggers the situation?<p>Photo transistors are much faster and you will have to add something to slow them down. A cap as jwax suggested would probably do the trick but you'll have to experiment a bit. I'd stick with the CDS.<p>Phil
Slide
Posts: 3
Joined: Mon Dec 20, 2004 1:01 am
Location: Winnipeg, Canada
Contact:

Re: 'Filtering' 60hz flash

Post by Slide »

I've decided that I am going about this the wrong way - I'm just going to use a real time clock (RTC) module (Maxim), an MCU with a PWM output and a math coprocessor (Micromegacorp) and just make a full-blown reef computer.<p>I'll take the time from the RTC and use the coprocessor to calculate sunrise, sunset, moonrise, moonset based on latitude and longitude input by the user with a small LCD for feedback.<p>I'll use the PWM module to control the moon lights and have an AC outlet to control the main lights.<p>You may have guessed that I subscribe to the 'go big or go home' theory of design.<p>Thanks for the ideas everyone!<p>Ciao!<p>Andy
B2 Spirit, radar contact.......
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 173 guests