CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

ACS758LCB-100U AC current.
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
georpo



Joined: 18 Nov 2008
Posts: 278
Location: Athens, Greece.

View user's profile Send private message

PostPosted: Fri Apr 02, 2021 7:37 am     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Apr 02, 2021 1:58 pm     Reply with quote

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: 9102
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Apr 02, 2021 4:11 pm     Reply with quote

re:
Quote:
the relay next to the ACS was a stupid mistake,
Confused
but it looked sooo good on paper ! Laughing

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......
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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