Ever wondered how much current your USB devices use and how stabile is your USB voltage? Now you can measure!

USB-POWER

Some USB devices like 3G modems, WiFi etc in active mode draw lot of current and cause problems, to monitor the current consumption and how stabile is your USB voltage you can use this USB-POWER-METER.

The consumption is measured and displayed with 10mA accuracy. Voltage with 10mV accuracy.

DuinoMite Project: Tank fluids level metering by capacitance measurement

Image

Using the capacitive measurement setup from here I will try to make project for measuring the fluid (water) level by measuring the capacitance.

I found on my desk the “TANK” – plastic empty candy box. Then put two stripes of self adhesive aluminum foil on the two sides of the box and measured with C-meter the tank empty and full with water.

The empty TANK capacitance was 12 pf:

Image

the full with water TANK had 79 pf capacitance:

Image

pretty good difference so using the same schematic with measurement of the charging time I set in the previous project I ran the same code:

10 PIN(1)=0 ‘sense pin will first pull the capacitor to GND and discharge
20 A=0 ‘accumulator
30 FOR I = 1 TO 1000 ‘measure 1000 times and average to remove noise
40 SETPIN 1,8 ‘discharge the capacitor
50 SETPIN 1,1 ‘start charging
60 A = A + PIN(1) ‘accumulate the readings
70 NEXT I
80 A = A / 1000 ‘now divide by 1000 to normalize the result
90 PRINT A ‘let’s see the result
100 GOTO 20

and got 3.14 value for empty and 2.34 value for full tank measurement.

we can scale these measurements for instance 0-100% by this formula

FULLPERCENTAGE = (3.14-A)/0.008

and as DM-BASIC arithmetic is with float points we will get easy the measurement in % from 0 to 100.

Now let’s make graphical presentation of the tank:

10 PIN(1)=0
20 A=0
30 FOR I = 1 TO 1000
40 SETPIN 1,8
50 SETPIN 1,1
60 A = A + PIN(1)
70 NEXT I
80 A = A / 1000
90 PRINT A
100 CLS
110 LINE (0,0)-(210,210),1,B
120 LINE (5,205)-(205,205-2*(3.14-A)/0.0078),1,BF
130 GOTO 20

With this code we display on the screen the TANK and the fluid level in it.

This is link to video which show the tank level metering in action -> LEVEL METERING

DuinoMite Project: Low cost Humidity measurement with SMTHS07 capacitive sensor

Image

SMTHS07 is low cost EUR 5.00 capacitive Humidity sensor from Smartec. The datasheet of this sensor is here.

The sensor change it’s capacitance linear in range 20-95% with 0.6 pf/RH.

Now the question is will DuinoMite be able to detect so small capacitive changes of 0.6 pf?

Let’s do some experimenting first. I made small schematic on breadboard-mini with two resistors and the sensor:

Image

then wrote small BASIC code:

10 PIN(1)=0 ‘sense pin will first pull the capacitor to GND and discharge
20 A=0 ‘accumulator
30 FOR I = 1 TO 1000 ‘measure 1000 times and average to remove noise
40 SETPIN 1,8 ‘discharge the capacitor
50 SETPIN 1,1 ‘start charging
60 A = A + PIN(1) ‘accumulate the readings
70 NEXT I
80 A = A / 1000 ‘now divide by 1000 to normalize the result
90 PRINT A ‘let’s see the result
100 GOTO 20

the result was steady:

> run
1.04212
1.04209
1.0416
1.04169
1.04169
1.04163

if I approach the sensor with wet fingers the reading go to
0.355777
0.347614
0.34956
0.355954

So the sensitivity is quite good! All I need is calibration of the sensor, but how to do this?

How to Preciese calibrate SMTHS07 is explained here .
Poor’s man calibration is to put the sensor it in refrigerator, the humidity in refrigerator is always 100%. As SMTHS07 is linear knowing the capacitance in just one point is enough to calibrate it.