Using Current Sensor to Cut Off

Hello everyone,

Please help me for my first time project using current sensor.

I'm planning to make "auto stop power window" for my old car (rear window) when it goes all the way up. It's just for safety when my kids hit the button to close the window and his hand hold the window down. You know kids imagination.. ::).

I've tested the power window motor that the Ampere will rise constantly when I forced to stop its movement. That way, I was thinking that I can use current sensor to tell arduino when DPin 2 is HIGH become LOW in certain ampere received by Pin A0. So I've made the schema as I attached here. My concept is when the button pressed once, DPin 2 continuously HIGH until Pin A0 gets sense (between 3A - 5A) from current sensor to tell DPin 2 to LOW. That's all.

I really don't know how to create the sketch in arduino. Please help...

Thanks.

You need to state what current sensor you have (there are many) and what you have already tried.

On line, there are a number of Arduino tutorials for reading current sensors.

I haven't tried any kind of current sensor before. I search on web and I found current sensor on this link :
http://www.aliexpress.com/item/New-5Pcs-lot-AC-and-For-DC-30A-range-Current-Sensor-Module-ACS712-For-Arduino-ACS712ELCTR/1959448754.html

In Arduino tutorial, as far as I found, was just to read the current flows to display. What I need is to read the current flows and until reach the certain value of ampere (3A - 5A) then command the output to LOW from HIGH. In this case, the sensor is act as switch to cut off the DC flow (as the diagram on attachment).

As we do not have the current sensor data, we cannot know what the conversion is.

The current sensors usually have Vcc/2 when no current flowing. If for eg the conversion is 100mV per amp, at 5A there would be 0.5v away from the zero reading. Do your ADC read and if the reading is a certain distance from 512, you have the current so turn off the output.

Note that the sensors often read +& - current so make sure you connect the right way for your code.

Weedpharma

As we do not have the current sensor data, we cannot know what the conversion is.

The current sensors usually have Vcc/2 when no current flowing. If for eg the conversion is 100mV per amp, at 5A there would be 0.5v away from the zero reading. Do your ADC read and if the reading is a certain distance from 512, you have the current so turn off the output.

I see... I haven't measured the current data of 12V DC motor with arduino, but I've measured it with digital AV test meter came up 1,8A and if there is a heavy load become > 3A.

I haven't got the current sensor module yet, because I'm not sure which one is the most suitable for my project. Any suggestion?

Note that the sensors often read +& - current so make sure you connect the right way for your code.

As I rad the spec of the current sensor generally that the sensor read one of the + or - current flows. That's way I took only red one on my wiring diagram (+) to read.

There are many available. Look in eBay. Look for one rated up to 10A . This will give a reasonable range of ADC readings.

Weedpharma

hi;
i'm new here and my english is not good, sorry.
the current sensor in the figure you draw uses acs712 30 amp version. here is the datasheet;

http://www.allegromicro.com/~/media/Files/Datasheets/ACS712-Datasheet.ashx

You should view x30a performance characterictics. there written it has typically 66mV/A sensitivity.

A lower amp rating board will give better resolution. IE, 20A versions give 100mV per amp.

Weedpharma

Alright guys, thank you so much for the information. :slight_smile: