i required to calculate current analog input in arduino

Please help me how to calculate the current value with arduino how to write logic in programming.

The input pins take what is technical known as bugger all. Calculate it from the input impedance found in the data sheet and the input voltage. But this is so small you don’t have to know this for any practical purpose.

how to write logic in programming.

You use the words HIGH or LOW to specify a logic level with digitalRead to read what is currently on a digital pin. Use analogRead to read a representation of the voltage on it.

How do i write the programme for measure the current value from analogread as in attachment and displaying.

Please help me how to convert analogreadpin into current value.

https://lmgtfy.com/?q=current+sensor+Ardiuno

Me thinks the "current value " is ? 'what is the value now' ?

AC or DC? the battery on picture indicates DC, but 30 A sensor for DC?

Check the datasheet of your current sensor, or calibrate for a few known currents. And indeed with AC it's a bit more complicated.

Juraj:
30 A sensor for DC?

Nothing unusual there... Batteries have low voltages, so high currents are needed to deliver a lot of power.

Which Arduino? What is your ADC result for 0 current? Have you written any code? If so, please post it.

@sivasrinivas90

TOPIC MERGED.

You may want to READ THIS for future reference.
It will help you get the best out of the forum.

Bob.

Grumpy_Mike:
The input pins take what is technical known as bugger all. Calculate it from the input impedance found in the data sheet and the input voltage. But this is so small you don’t have to know this for any practical purpose.

Different meaning of "current"! :grinning: