Measuring capacitor discharge curve issue
hi there,
i need measure few points on discharge curve of capacitor using arduino. how looks code:
i try measure voltage, , if voltage falls below example 9 volts need record time.
if print these 3 times on lcd show 0.00 v.
i need measure few points on discharge curve of capacitor using arduino. how looks code:
code: [select]
if(state == 2)
{
digitalwrite(rele1, low);
if(u0 == 0)
{
u0 = (5.0/1023.0*(double)analogread(a13))*3.0;
lcd.setcursor(6,0);
lcd.print(u0);
}
if(akt == 0)
{
akt = millis();
}
//time 1
u1 = (5/1023*analogread(a13))*3;
lcd.print(u1);
if(u1 <= 9.0 && t1 == 0)
{
t1 = ((double)millis()-(double)akt)/1000.0;
lcd.setcursor(-4,2);
lcd.print(t1);
}
//time 2
u2 = (5/1023*analogread(a13))*3;
if(u2 <= 6.0 && t2 == 0)
{
t2 = (millis()-akt)/1000.0;
lcd.setcursor(1,2);
lcd.print(t2);
}
// time 3
u3 = (5/1023*analogread(a13))*3;
if(u3 <= 3.0 && t3 == 0)
{
t3 = (millis()-akt)/1000.0;
lcd.setcursor(6,2);
lcd.print(t3);
}
i try measure voltage, , if voltage falls below example 9 volts need record time.
if print these 3 times on lcd show 0.00 v.
quote
i try measure voltage, , if voltage falls below example 9 volts need record time.
if voltage doesn't fall below 5.0v, you'll fry arduino.
quote
if print these 3 times on lcd show 0.00 v.
since values time, it's unusual see time expressed in volts. part of world that?
post of code.
Arduino Forum > Using Arduino > Project Guidance > Measuring capacitor discharge curve issue
arduino
Comments
Post a Comment