compwizalex, Sounds like what your did is what I am working on..
have a ZMPT101b and an arduino leonardo board. direcltly wired 5vdc power and ground. And output pin back to the arduino , without any additional components .. eg. resistors...
Just want to measure the AC voltage around 110-120V
Are you saying that the output of the ZMPT101b is VAC and it will give around 1.15v when the outlet is 120VAC?
Will the AC voltage being read by the arduino damage the sensor pin?
i'm having the same issue
using my ACS712 i also have the same issue instead of getting 512, i keep getting 15; i changed the polarity and i'm still getting 15. #define acs712 A1
void setup() {
// put your setup code here, to run once:
//pinMode(acs712, INPUT);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println(acs712);
}
void loop() {
// put your main code here, to run repeatedly:
static unsigned long tStart;
int tEnd = 500;
if(millis() - tStart > tEnd)
{
Serial.println(analogRead(acs712)); //<<<<<<<<<<<
tStart += tEnd;
}
}
Hi all.
With much interest i follow the diskussion about the ZMPT101b and try to reproduce it. However i fail to get a usable RMS line in the Serial Monitor. In my project i use a wind driven 3 Phase Generator able to produce 0-140 VAC at increase RPM,
I get this Diagram in attachment, where it shows the line jump all over the map. Reason for that is most probably that the interval (delay) which the sensor is measuring the AC Volts can never match the same angle of the sinuswave produced by the generator (due to wind speed change etc). It needs to measure for example the highest peaks in lets say 500 millisec multiply by .707 to get the true RMS from the max value in that period. It should repeat that then continuously. Than it would be possible to see how much VAC is produced at certain wind condition, which by the way is the whole reason for the experiment. Moreover the original sketch has a Ampmeter ACS721 also to monitor, i cut that one out for better overview. But the final sketch should draw 3 lines Amp and 3 line Volts (each phase Two sensor).
Idealy would be another line which shows the calculated WATT from the lines gathered,
Like: (Volt1 x Amp1) + (Volt2 x Amp2) + (Volt3x Amp3) = total VA / Watt.
Anyone could point me in the right direction?
Thanks a lot
Used follow sketch:
#define VOLT_PHASE_1 A4
#define DELIMITER '\t'
//#define DELIMITER ';'
void setup() {
Serial.begin(9600);
pinMode(VOLT_PHASE_1, INPUT);
}
unsigned long time;
int volt_phase_1 = 0;
void loop() {
//Zeitschiene in Millis seid Programm-Start, rotierend!!!
time = millis()/1000;
time = round(time);