Tinkerer Meter a Bluetooth Multimeter Made with Arduino by AVCU Elif

Tinkerer Meter a Bluetooth Multimeter Made with Arduino by AVCU Elif

Author:AVCU, Elif [AVCU, Elif]
Language: eng
Format: azw3, epub
Published: 2020-06-19T16:00:00+00:00


Figure 7. Schematics with the voltmeter block

I highly suggest to put a diode in parallel with the mosfet, this will protect from parasite currents or if you plug the circuit you want to analyze in the wrong direction. I must be honest, I didn't use one of those because I was out of that, but really, you want to use that, the burnt mosfet is lurking for us all!

And the Arduino code is straight forward (figure 8).

[...]

int D7 = 7;

[...]

int AnalogVolt = A1;

[...]

float raw = 0;

float Vout = 0;

float Vin = 0;

[...]

void loop() {

if(Serial.read()){

measure = Serial.read();

}

if (measure == 'V') {

pinMode(D2, INPUT);

pinMode(D3, INPUT);

pinMode(D4, INPUT);

pinMode(D5, INPUT);

pinMode(D6, INPUT);

pinMode(D7, OUTPUT);

pinMode(D8, INPUT);

pinMode(D9, INPUT);

pinMode(D10, INPUT);

digitalWrite(D2, LOW);

digitalWrite(D3, LOW);

digitalWrite(D4, LOW);

digitalWrite(D5, LOW);

digitalWrite(D6, LOW);

digitalWrite(D7, HIGH);

digitalWrite(D8, LOW);

digitalWrite(D9, LOW);

digitalWrite(D10, LOW);

raw = analogRead(AnalogVolt);

if(raw){

Vout = 5*raw/1024;

Vin = Vout * (R6 + R7)/R7;

Serial.print(Vin);

Serial.print(" V");

delay(1000);

}

Figure 8. Arduino code for the voltmeter block

Just as we did before we define all pins as INPUT in order to exclude those from the circuit, the pin D7 is used to activate the mosfet and activate the voltmeter circuit. Vout is measured through analog pin A1 and Vin in computed as Vin = Vout * (R6 + R7)/ R7.

On a breadboard will result something like that in figure 9.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.