# Electric skateaboard current acquiring

Hello I have to create an electric skateboard for my school project an I have an acquiring part (current/voltage/remaining battery charge) to do. I already did the voltage acquiring program but I can not do the current part. We have to display the current/voltage/remaining battery charge of the batteries.

We got those 3 batteries connected in series : https://hobbyking.com/fr_fr/turnigy-5000mah-3s-20c-lipo-pack-xt-90.html

We have these current sensor : https://fr.rs-online.com/web/p/transducteurs-de-courant/0650560/?sra=pmpn

The skate has an recharge function when we use the brakes so the current can be negative the sensor can detect : -100 to 100 amperes. (we supply the sensor with 9V, the captor has an precision of 29,7mA for 12V supplied so with 9V supplied the presicion is : 22,3mA.

It is easy for the voltage acquiring because the voltage must only calculate with a cross product to display it on the arduino nano card. But the current acquiring is more complexe (I don't if it is complexe but I never learned it :/). The current acquiring is made with an with a proportional voltage image but the tor sensor works with an offset.

Offset V = VCC / 2 for 0A the voltage will be (9/2) / 2 = 2,25 V (the current is divide by 2 an another time with an current divider bridge to be able to display the current image on the arduino board without having a voltage too close to 5V)
(diagram : https://image.noelshack.com/fichiers/2018/12/5/1521792869-current-sensor.png)

Voltage on Arduino = 1,13625V to 3,36375V = -100A to 100A

F (x) = 89.78675665x - 202.23344575
89.78675665 A / V = 89.78675665 A / 205
(for example between 2 and 3 volts on the arduino card the current difference will be 89.78675665 amperes)

• 202,23344575 = value of the current at point 0 of abscissa (even if this value will never be detected since the sensor detects currents only from -100 to 100 A)

And now I have to insert this function in my program to display the live current variation, and these variation will be displayed on a smartphone with our app. (created with appinventor.. our proffesor only wants to use it....).

The current pin on the arduino nano card is the analogic A5 pin.

Complete diagram (sorry I'm french there are things written in french) : https://image.noelshack.com/fichiers/2018/12/5/1521793538-current-sensor.png

I hope someone knows.