|
|
View previous topic :: View next topic |
Author |
Message |
georpo
Joined: 18 Nov 2008 Posts: 278 Location: Athens, Greece.
|
|
Posted: Fri Apr 02, 2021 7:37 am |
|
|
The yellow trace above is the output of the ACS.
The circuit already has ZC detection to sync with the phases and fire the triacs.
In your example, if I wait 5mS after zero crossing and then take a reading I will probably read '0' if triggering is done beyond 90 degrees which is 5mS.
I do not understand how this could work. _________________ George. |
|
|
Woody
Joined: 11 Sep 2003 Posts: 75 Location: Warmenhuizen - NL
|
|
Posted: Fri Apr 02, 2021 1:58 pm |
|
|
It was a while ago, and it was a bit of a 'let's see if I can do it this way' project, but from the top of my head:
- When the ACS712 is in an AC powerline shunting current it gives off a voltage between 0 and 5V, a 50Hz sine around the 2.5V mark. 2.5V is 0A.
- Period @ 50Hz is 20 msec. I made a 0-crossing detector, connected to an external interrupt. When that fired it started a 5ms timer.
- When the timer rolled over an interrupt was generated that started an AD conversion. This conversion was then more or less done at a top of the sine.
- At zero cross you don't know if you hit a 'mountain' or a 'valley' in the sine, but that can easily be established by testing the ADC value: bigger than 2.5V = mountain, less that 2.5V = valley. In the first instance you subtract 2.5V from the AD value and then have a ratiometric value for the current that was flowing. In the second instance you subtract the AD value from 2.5V and also get that value.
I remember noise was a bit of a problem, the relay next to the ACS was a stupid mistake, but on the whole it did what I wanted: to know if there was AC and to see if current actually flowed and if that flow increased or decreased when somewhere else something got connected / adjusted.
(edited for language)
Last edited by Woody on Sat Apr 03, 2021 1:47 am; edited 1 time in total |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9125 Location: Greensville,Ontario
|
|
Posted: Fri Apr 02, 2021 4:11 pm |
|
|
re: Quote: | the relay next to the ACS was a stupid mistake, |
but it looked sooo good on paper !
Some thing are learned BEST while 'on the bench'.....
NO amount of fancy computer 'simulation' program will have EMI or varying VDD or other 'random noise' makers...... |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|