analog curent sensor

JimS said:
I would add a resistor across the capacitor and maybe make the cap smaller.   That capacitor will hold a charge for a LONG time unless something provides some load.  Take a reading and then turn off the power and see how long it takes for the reading to drop.
 
The inputs have a 10K pulldown, so the right choice of cap is probably the main consideration.
I agree with you that 100uF is far too big. I'd probably be looking for something more like 1uF tag tantalum.
 
I tried 4.7uf and 1uf even 200uf but the best result is with a 100uf cap 
 
 
I mean by best result a stable and no boucing value
 
CAI_Support said:
Efried,
 
What kind of floating point function are you looking for and what precision?  Please be precise on your need. We want to see some real use need, so that we can see what to implement  can help our customers. 
 
Currently, WC8/32 PLC logic support SIN, COS, TANG functions, as well as divide and mod.  In the original question, 552 divide by 504 is 1, 552 mod by 504 is 48.  We believe most needs can be resolved through those functions.
 
The CPU we use and most controller board CPUs do not have floating point core. Any floating point calculation can only be done in software and very slow, in addition, it requires a lot of RAM.  If the precision is one digit, that is similar to times 10; if the precision is two digit, that is similar to times 100,  then use math function. That is the case for analog and temperature reading inside WebControl PLC already.
I was targeting model based control. It is cumbersome controlling boundaries when using integer math, and also when using byte shifting. Cortex-M4 has a FPU, may be for the next upgrade in some years... For web enabled control, there are no number crunching requirements, also none for most HVAC devices having high damping rates. My fences I'm running against is lacking in code comments and lack of variables, and no IDE whe you could map VAR1n to a resonable name... Also IF THEN ELSE structures would be fine. But I'm against mimicking BASIC,
 
Back
Top