Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
This application note shows the user how to implement a zero cross detector with a minimum
of external components. It should be noted that this solution will not give any
galvanic isolation for the microcontroller against the AC mains. The zero cross sense
resistor can be a way for electronic noise to get into the system.
Hi, my power supply is from a switching power supply (mobile phone usb charger) to keep things small and compact.Hi,
If you show your power supply circuit for the AVR we can come up with a better solution, which will also provide for two interrupts per cycle instead of just one.
I am not worried about isolation. It is directly connected to AC 220.If you connect direct to the AC supply you will get one interrupt very close to zero crossing. If you use a transformer then it will be further away. A 5V transformer will be almost 90 degrees out. If you connect direct to mains then treat the whole circuit as live.
Mike.
Thanks. I will post my results inshallah.See my edit above.
You should be within a few degrees of zero. I don't know the switching voltage of AVRs so can't calculate it.
Mike.
Hi take a look at the traditional fan regulator that we useYou should have specified 'ceiling fan' at the start... phase-control is not he way this is usually done.
Take a look: http://ww2.justanswer.com/uploads/EE/EENorm/2013-02-04_172912_fan_switch_diagram_3.gif
Can you please explain a bit more on how to do it.You can still control the fan with a triac and microprocessor.
I recall that fan-controls using triacs have a very non-linear relation of potentiometer position to speed.
You could attach the speed-demand pot to an ADC-input, and control triac-firing using a linearized timing table.