Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

current sensor output

Status
Not open for further replies.

isqeel

Newbie level 3
Newbie level 3
Joined
Feb 1, 2013
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,306
Hi everyone,
i am new to this forum however my post is on current sensor. i have a project that involves measuring the AC current so i decided to use ASC 758 current sensor. but the output resemble sinusoidal wave form. pls i need to know if anybody has used this type of sensor and if yes how do i get my output thanks.
 

The sensor shows the actual current flow and does not do any calculation. What output do you want?

Enjoy your design work!
 

The sensor shows the actual current flow and does not do any calculation. What output do you want?

Enjoy your design work!
thanks. The output of the sensor is voltage [dc 5v] which i need to convert to current. according to the spec. at zero input current, and Vcc=5v the output supposet to be 2.5v which i got using labview acqusition system, but as the input current increases i thought the votalge output shoud equally increase. However, the voltage output was fluctuating and when i plotted the output, the shape was sinusoidal this is where am confused.
 

sample code from https://www.robotshop.com

Code:
/*
50A Current Sensor(AC/DC)(SKU:SEN0098) Sample Code
This code shows you how to get raw datas from the sensor through Arduino and convert the raw datas to the value of the current according to the datasheet;
Smoothing algorithm (http://www.arduino.cc/en/Tutorial/Smoothing) is used to make the outputting current value more reliable;
Created 27 December 2011
By Barry Machine 
www.dfrobot.com
Version:0.2
*/


const int numReadings = 30;
float readings[numReadings];      // the readings from the analog input
int index = 0;                  // the index of the current reading
float total = 0;                  // the running total
float average = 0;                // the average

float currentValue = 0;

void setup()
{
  Serial.begin(57600);
  for (int thisReading = 0; thisReading < numReadings; thisReading++)
    readings[thisReading] = 0;       
}
void loop()
{   
    total= total - readings[index];          
    readings[index] = analogRead(0); //Raw data reading
    readings[index] = (readings[index]-510)*5/1024/0.04-0.04;//Data processing:510-raw data from analogRead when the input is 0; 5-5v; the first 0.04-0.04V/A(sensitivity); the second 0.04-offset val;
    total= total + readings[index];       
    index = index + 1;                    
    if (index >= numReadings)              
      index = 0;                           
    average = total/numReadings;   //Smoothing algorithm (http://www.arduino.cc/en/Tutorial/Smoothing)    
    currentValue= average;
    Serial.println(currentValue);
    delay(30);
}
 

Attachments

  • datasheet.pdf
    280.4 KB · Views: 65

If you have a zero current output bias of 2.5v you have the bidirectional version (ACS758LCB-050B) which gives you instanteous AC current around the bias point of 2.5vdc. You would need to rectify this for an DC value proportional to AC current.
 
Last edited:

If you have a zero current output bias of 2.5v you have the bidirectional version (ACS758LCB-050B) which gives you instanteous AC current around the bias point of 2.5vdc. You would need to rectify this for an DC value proportional to AC current.

ok i have thought of that but since i wasn't sure i did not go further but with your suggestion i do that i get back to you
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top