I am using an Arduino Due with an AC-AC 9v adapter for the voltage sense, project is based on: Home Energy Monitoring System
except that I am not on 3 phase power, I am in the US. So I am using the official emonlib.
The first few minutes that it ran it was +/- 0.1volts with:
emon1.voltage(0, 161.9, 1.7);
I then walked away for about an hour, when I came back the voltage was fluctuating +/- 0.3 and I had to increase the 161.9 to 162.3 to have an accurate voltage.
I am not sure what this means, as far as I why did I lose some accuracy, and why did I have to increase the calibration number when it was very stable previously.
While I am Calibrating the Arduino Due I have it connected to my PCs USB port via micro usb cable, so this is also what is powering the Arduino Due.
Any help Dialing it in so that I lose as little accuracy as possible is appreciated. One thought I had was what if my computers 5v from the USB is not great? does the Arduino Due buffer it good? I know it has to reduce the 5v to 3.3v.
EDIT: just tried a different USB cable as well as a USB3 port instead of USB2, this had no effect, so I am going to guess that the difference in accuracy that I now have has to do with the AC-AC adapter, possibly it lost some accuracy once it warmed up?
My dso150 oscilloscope shows the Frequency hopping between 60Hz and ~63.76Hz ish
Does that mean this AC-AC adapter is misbehaving? A good AC-AC adapter should maintain 60Hz correct?
My P3 kill a watt shows that the frequency of the mains power is a rock solid 60Hz
EDIT: I changed the dso150 from 0.5v Div and 5ms to 1V and 10ms and now its jumping between 60Hz and 61Hz so maybe this oscilloscope just isnt that perfect. The more ms I set it to the more stable the Hz appears to be.
I get the impression that you might be expecting far better accuracy than the equipment youâre using is capable of. Have you carefully read the specification for your DSO - and read between the lines to infer the importance of the bits they leave out?
Also, look in âLearnâ and read about the factors that affect the accuracy of the measurement - the numbers are particular to the emonTx, but almost everything there will apply to your project too - thereâs little thatâs fundamentally different between the emonTx
and an Arduino with Boredomâs front end. And while youâre there, look at the article about meters and their accuracy.
I recommend using the 5VDC barrel jack power input with a linear i.e. not switching mode, power supply. That way, thereâll be no switching mode power supply noise getting injected into your Due.
You may be more correct than you realize.
Your computerâs SMPS may be âinjectingâ noise into your Due.
The kit is really little more than an instructional aid on what a 'scope is and how it works.
(I say âkitâ in the sense the item is available as a DIY kit)
(You ought to hear Dave at EEVBlog rant about them. Hedefinitely doesnât like them!)
Thanks guys, I was seeing the +/- 0.1 volts initially in the serial output of the sketch, which later jumped to +/- 0.3 volts, thats when i hooked up the oscilloscope to see if it showed any clues.
I am going to see if I have a linear 5vdc power supply. I wonder if I have a 5vd connected to the barrel jack power and a usb cable connected from the programming port to my computer, if the Due will use the 5vd for power while I am using the usb jack to calibrating with the serial monitor.
What I understand is that the Due is supposed to automatically select a source for power and im not sure how it goes about doing that.
Itâs not hard to come by a circuit diagram, thereâs an on-board regulator that feeds the 5 V, the input to it is the barrel jack. If they say a minimum of 7 V, thereâs probably a good reason for that. (Hint: the data sheet curves for the regulator show a minimum of 1.7 V between input and output.)
Thereâs a second regulator generating the 3.3.V from the 5 V.
Now if I can find a way to be certain if some of my power adapters are switching or linear. Some of the smaller ones are likely switching, and some of them even say so.
However on my larger power adapters I am not sure how to be certain if it is a linear or switching power adapter. Is there any way to know without breaking open the power adapter?
Edit: I have some spare ATX power supplies, however they only have 3.3, 5, and 12v. Not the ideal 7v for the barrel jack.
I was thinking maybe I could supply the 5v directly to the 5v pin bypassing the first regulator, however I am not sure that this is a good idea, also a full ATX power supply just to power the Due does not seem that great either.
Google?
Generally, a power supplyâs physical size is roughly proportional to the power rating, but linear are generally a few times larger and heavier than switched-mode for the same output power. Itâs not a hard and fast rule, more a general guide.
I have in my hand a 90 W switched-mode: itâs 3" Ă 6" à ž" thick. A linear one rated at 90 W would probably be about 4 times the volume. (Look at the size of a 90 VA transformer! - the first one I looked at is about 3½" Ă 3½" Ă 3½", and thatâs without any electronics and heat sink.)
The Arduino due will accept 7-12v so the above adapter should work, but if anyone knows where I could purchase a 7 or 7.5v Regulated linear power adapter then please let me know
Also the Arduino due takes a 2.1mm power jack so if I were to buy it I will have to cut the 2.5mm end off of the jameco and put a 2.1mm end on the adapter, which is no big deal.
Those are very likely to be switching mode PSUs too.
I wondered about that too, so I connected a 12VDC PSU to my Due.
After runing for about 20 minutes, I couldnât tell any difference in board temp bewtween
powering it via the Native/Programming ports and the barrel jack at 12 Volts.
Time to find the IR thermometer.
Awesome! let me know what you find out and is your 12v supply a regulated linear supply?
EDIT: in addition to my 11 CT clamps I am also running my w5500 ethernet shield off of the 3.3v rail which would create more heat on the Dueâs voltage regulators, i have read that the w5500 draws around 130ma at most but I need to test and measure its consumption for myself.
I am thinking a seperate 3.3v supply for the w5500 might be a good idea, and I found one in my box of power adapters, but if its not necessary then ide rather not.
edit2: found the info: W5500
typ. Power Consumption 132 mA
The 12 V PSU is of the SMPS type. The output is regulated. Capacity is 2.0 Amps.
I powered the Due via its Native USB port.
After 15 mins, the CPU measured 85° F, the regulator, 78° F.
Changed the power input from USB to the barrel jack. (disconnected the USB cable)
15 mins later, the results were similar. CPU 86° F, regulator 79° F.
Sketch is a test that makes one million ADC conversions,
then calculates the average time per conversion.
Awesome! appreciate that info, very useful. Think I will go ahead and purchase a power adapter then.
My Raspberry pi 4 (not part of this project) runs at about 49 degree after adding a small heatink, previously it was around 59-60, so it was about a 10c drop. i might do the same to the arduino due if I have any extra heatsinks laying around that are small enough.
Edit: Wait I just realized you gave me the temps in Fahrenheit, thats plenty cool