Current transducer. For the electronic measurement of currents: DC, AC, pulsed..., with galvanic separation between the primary circuit and the secondary circuit.

Revision:
1:3766b24dab80
Child:
2:c865023c4b20
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LEM_HAIS.h	Tue Sep 19 16:30:52 2017 +0000
@@ -0,0 +1,85 @@
+/**
+ * @brief       LEM_HAIS.h
+ * @details     Current transducer. For the electronic measurement of currents: 
+ *              DC, AC, pulsed..., with galvanic separation between the primary
+ *              circuit and the secondary circuit.
+ *              Header file.
+ *
+ *
+ * @return      NA
+ *
+ * @author      Manuel Caballero 
+ * @date        19/September/2017
+ * @version     19/September/2017    The ORIGIN
+ * @pre         NaN.
+ * @warning     NaN
+ * @pre         This code belongs to Nimbus Centre ( http://www.nimbus.cit.ie ).
+ */
+#ifndef LEM_HAIS_H
+#define LEM_HAIS_H
+
+#include "mbed.h"
+
+
+/**
+    Example:
+
+[todo]
+
+*/
+
+
+/*!
+ Library for the LEM_HAIS Current transducer.
+*/
+class LEM_HAIS
+{
+public:
+
+
+#ifndef VECTOR_STRUCT_H
+#define VECTOR_STRUCT_H
+    typedef struct {
+        float Current;
+    } Vector_LEM_HAIS_current_t;
+
+    typedef struct {
+        float OUTPUT_Voltage;
+        float VREF_Voltage;
+    } Vector_LEM_HAIS_voltage_t;
+#endif
+
+
+
+
+
+    /** Create an LEM_HAIS object connected to the specified pins.
+      *
+      * @param OUTPUT   Vout from the device
+      * @param VREF     Vref out from the device
+      */
+    LEM_HAIS ( PinName OUTPUT, PinName VREF  );
+
+    /** Delete LEM_HAIS object.
+     */
+    ~LEM_HAIS();
+
+    /** It gets the voltage.
+     */
+    Vector_LEM_HAIS_voltage_t  LEM_HAIS_GetVoltage          ( float VoltageDivider = 1.0, float ADC_Vref = 3.3 );
+
+    /** It calculates the current.
+     */
+    Vector_LEM_HAIS_current_t  LEM_HAIS_CalculateCurrent    ( Vector_LEM_HAIS_voltage_t myVoltages, uint32_t myIPN );
+
+
+
+
+
+private:
+    AnalogIn              _OUTPUT;
+    AnalogIn              _VREF;
+    float                 _LEM_HAIS_VREF;
+};
+
+#endif