Difference between revisions of "Component: Current Sensor (ACS7xx) (Electrical)"

From Flowcode Help
Jump to navigationJump to search
 
(11 intermediate revisions by 3 users not shown)
Line 14: Line 14:
 
==Current Sensor (ACS7xx) component==
 
==Current Sensor (ACS7xx) component==
 
ACS7XX range of +/- 5, 20, 30, 50, 100, 150 & 200A current sensors
 
ACS7XX range of +/- 5, 20, 30, 50, 100, 150 & 200A current sensors
 
==Component Source Code==
 
 
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Current_Sensor_ACS7xx.fcfx FC_Comp_Source_Current_Sensor_ACS7xx.fcfx]
 
  
 
==Detailed description==
 
==Detailed description==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 
''No detailed description exists yet for this component''
 
''No detailed description exists yet for this component''
Line 43: Line 21:
 
==Examples==
 
==Examples==
  
 +
A simple example shows how to use a ASC712 to measure current range of +/- 5A.
 +
The component type can be changed within its properties.
  
  
 
+
{{Fcfile|Current_measure_ACS7xx.fcfx|ACS712 example}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Simple example showing how to use the simulation dial components as a meter display for use in monitoring type applications.
 
{{Fcfile|Meters.fcfx|Meters}}
 
  
 
==Macro reference==
 
==Macro reference==
  
 +
===Current===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 80: Line 43:
  
  
 +
===VoltgeADC===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 91: Line 55:
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  
Line 116: Line 78:
 
| width="90%" | VDD
 
| width="90%" | VDD
 
|-
 
|-
| colspan="2" |  
+
| colspan="2" | For improved accuracy,  measure the voltage across the supply of the current sensor, then enter that as VDD voltage. 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
Line 132: Line 94:
 
|-
 
|-
 
| colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage. 
 
| colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage. 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | VRef voltage
 
|-
 
| colspan="2" | Used by the GetVoltage or GetString component macros to take an ADC reading and convert it into a Voltage. +VRef voltage x 10mV Default 500 = 5.0V  
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Line 147: Line 104:
 
|-
 
|-
 
| colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
 
| colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
|}==Macro reference==
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Current'''
+
| width="90%" | Average Loop (1 - 255)
 
|-
 
|-
| colspan="2" | Current reading in amps 
+
| colspan="2" | The more higher the value,  the more stable and accurate result would be. Results will take longer.  Try 200 
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 +
| width="90%" | Offset Voltage
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| colspan="2" | The voltage value when no cureent is flowing This is normally 2.5V for bidirectional and 0V for Unidirectional 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
 
|-
 
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''VoltgeADC'''
+
| width="90%" | Bit Depth
 
|-
 
|-
| colspan="2" | Reads the Voltage of the ADC pin for diagnostic purposes. With no current flowing through the sensor, the voltage reading should be 2.50V. If that is out, then enter precise VDD within properties   
+
| colspan="2" |  
 
|-
 
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Sensitivity
 
|-
 
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
+
| colspan="2" | Component sensitivity x10 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
 
|}
 
|}
  
 +
==Component Source Code==
  
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_Current_Sensor_ACS7xx.fcfx FC_Comp_Source_Current_Sensor_ACS7xx.fcfx]
  
 
+
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_Current_Sensor_ACS7xx.fcfx FC_Comp_Source_Current_Sensor_ACS7xx.fcfx]
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Device
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Type
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | VDD
 
|-
 
| colspan="2" |  
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | Offset current adjust (Amps)
 
|-
 
| colspan="2" | Offset current adjusts the curent output when comparing to a current monitor. For example current from the componet shows 2.0 Amps and curent monitor shows 1.5 Amps. For the current offset enter -0.5 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]]
 
| width="90%" | Channel
 
|-
 
| colspan="2" | Analogue Input Channel - Which pin is the analogue input connected to? 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | VRef option
 
|-
 
| colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | VRef voltage
 
|-
 
| colspan="2" | Used by the GetVoltage or GetString component macros to take an ADC reading and convert it into a Voltage. +VRef voltage x 10mV Default 500 = 5.0V  
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Conversion speed
 
|-
 
| colspan="2" | Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock. 
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
| width="90%" | Acquisition cycles
 
|-
 
| colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
 
|}
 

Latest revision as of 14:13, 22 October 2025

Author medelec35
Version 1.0
Category Electrical


Current Sensor (ACS7xx) component

ACS7XX range of +/- 5, 20, 30, 50, 100, 150 & 200A current sensors

Detailed description

No detailed description exists yet for this component

Examples

A simple example shows how to use a ASC712 to measure current range of +/- 5A. The component type can be changed within its properties.


FC6 Icon.png ACS712 example

Macro reference

Current

Fc9-comp-macro.png Current
Current reading in amps 
Fc9-f32-icon.png - FLOAT Return


VoltgeADC

Fc9-comp-macro.png VoltgeADC
Reads the Voltage of the ADC pin for diagnostic purposes. With no current flowing through the sensor, the voltage reading should be 2.50V. If that is out, then enter precise VDD within properties  
Fc9-f32-icon.png - FLOAT Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Device
 
Fc9-type-16-icon.png Type
 
Fc9-type-15-icon.png VDD
For improved accuracy, measure the voltage across the supply of the current sensor, then enter that as VDD voltage. 
Fc9-type-15-icon.png Offset current adjust (Amps)
Offset current adjusts the curent output when comparing to a current monitor. For example current from the componet shows 2.0 Amps and curent monitor shows 1.5 Amps. For the current offset enter -0.5 
Fc9-type-6-icon.png Channel
Analogue Input Channel - Which pin is the analogue input connected to? 
Fc9-type-16-icon.png VRef option
Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage. 
Fc9-type-16-icon.png Conversion speed
Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock. 
Fc9-type-14-icon.png Acquisition cycles
Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
Fc9-type-21-icon.png Average Loop (1 - 255)
The more higher the value, the more stable and accurate result would be. Results will take longer. Try 200 
Fc9-type-15-icon.png Offset Voltage
The voltage value when no cureent is flowing This is normally 2.5V for bidirectional and 0V for Unidirectional 
Fc9-type-21-icon.png Bit Depth
 
Fc9-type-21-icon.png Sensitivity
Component sensitivity x10 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_Current_Sensor_ACS7xx.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_Current_Sensor_ACS7xx.fcfx