IotaWatt 4.0

Tags: #<Tag:0x00007f1be5e6c578>

(Glyn Hudson) #21

Checkout the hardware folder of the IotaWatt Github repo for a schematic:

(Inactive) #22

Look for iotawatt on GitHub. There is a schematic there for the latest version 4 iotawatt that supports 2 ADCs and 15 channels. That should be enough for you to go on if you are contemplating using a different processor. The ADC circuitry scales pretty easily. At the end of the day the hardware is just an ADC shield that connects to your processor SPI.

I abandoned the feather design some time ago in favor of the current design that is simpler, less costly, and fits in a nice enclosure. The ESP8266 nodeMCU is a commodity board that sells for less than $5 free shipping. Shipping alone for a feather is more than twice that, so I gave up on that approach. Except for the battery charger, there is no functional difference between the feather ESP and a nodeMCU.

(jan) #23

My pcb from dirtypcb arrived yesterday. However, I seem to have made an error ordering the caps (i ordered 10nF in stead of 10uF…) . So i was wondering if C9 (10uF cap just after the power adapter) can be a polarised Electrolytic capacitor? And if so, how should it be orientated?
The same question for the C1 (10uF, next to the lm358). This one is connected to gnd, so orientation is obvious here…

(Inactive) #24

Not sure which schematic you have. The most recent has four 10uf caps. Three of them go to ground and handle D.C. So I would guess electrolytic would work. There is a capacitor in series with the AC reference voltage divider that is handling AC so that can’t be an electrolytic. You can just remove the capacitor and short the connection. It is only there as a D.C. Filter to guard against against someone accidentally plugging in a DC source.

If you don’t have the most recent schematic, take note of the RC circuit on the Vcc pin of the Real Time Clock. This is needed to fix a problem with intermittent failure to switch to battery backup.

(jan) #25

I am using the 4.1 schematic (modified) dated july 6th. (from github, seems to be the lastest?)

there i am seeing 2 caps marked 10uF (C9 and C1). The others are marked .1uF (C3, C4, C5, C6, C7)

(Inactive) #26

I just posted the 4.3 schematic.

4.2 adds using the spare lm358 op-amp to bias the channel 0 AC reference voltage.

4.3 fixes a problem with the RTC battery backup not always working.

(jan) #27

Thanks for the update.
I’ll give the 4.1version a try first…
Only stupid thing i didn’t check: my ebay supplyer for the nodemcu uses a wider board…(2 units wider, so it doesn’t fit, when looking at your pictures, the difference is visible).
Where do you get your (smaller) board from?
Another thing i came across: the log file could not be created on the sd card (so the program halts). But when i created the dir IotaWatt on my desktop and retried, it worked.

(Inactive) #28

Those wider nodemcu are the exception rather than the rule. Look for “amica” nodemcu.

The SD directory on GitHub does include an empty directory for the log file. Iotawatt does not create it.

(jan) #29

I have setup the nodemcu with 1 VT and 4 CT (all SCT-013-030, selected as such in the configure inputs tab, no burdon resistors on the pcb) on a 240V system. I calibrated the VT and it gives the correct volgta in input channels status. However the reading for the ct’s are way off: approx 250W where it should be approx 100W.
Am i doing something wrong?

(Inactive) #30


(Inactive) #31

Not a lot to go on here, but let me take a wild guess. I’m on the road so I don’t have access to all my stuff. The SCT013-030 if memory serves me, have 62 ohm burden resistors. The default burden is 24 ohms. That’s a ratio of 2.54:1 and just about the ratio of your reading to expected power. So…

When you say you selected SCT013-030 in the configuration, maybe you are assuming that you can select SCT013-000 because you removed the burdens from the board and used a variant of the same CT that has a built-in burden.

If that’s the case, you need to look at the wiki on GitHub. There is an option to specify the burden resistors in the configure device tab. There, you would specify zero for those channels that do not have on-board burden.

Once you do that, you will see that the input configuration for those channels list various models of voltage type CTs, among them, the SCT013-030. Select that and the power displayed should be more in line with your expectations.

(jan) #32

Thanks for your reply.
I’ve been looking into what could be wrong, but didn’t find anything yet.
I had the default burden set to 0 in the config tab (was wondering why not all items in tables.txt were listed, so I looked through the code) , and selected the sct-013-030 from the dropdown list.
Strange thing is all 4 say the same wattage (connected to same lightbulb load - all say 247 to 251W, pf 1.00).
I found that the sct013-030 has an internal burden resistor of 62 ohms (your memory is still very good :wink: )

In the tables.txt I saw that the scr013-030 has cal: 30 and phase 3.8. I get where the 30 comes from (however On my ‘old’ system (diy emonTx with 7 CTs) i had to calibrate each CT manually (connect 2000W heater)), but where does the phase of 3.8 come from?

Just to be sure, I measured the CT itself: I am measuring about 0.011 to 0.015 V AC (measured where the burden would be). So in relation to 230V this gives about 90 to 100W, what is correct.

Just for the record: I didn’t put on any VTs and shorted the 10uF caps on the VT input. The 10uF cap next to the LM358 was changed to a polarised electrolytic one.

Another strange thing is: the output stays on 0 (for all of them)…

found something (maybe) strange: the signal labeled 2.5V on the diagram is only running 1.0V
I checked and the 3.3V is fine, the 1K resistor is 1K and the ADR510 is the one from this link:

Could it be solved by changing it to 1.0 in getConfig (under deviceVersion == 3)

(Inactive) #33

3.8 is the phase lead of the CT. That’s a ballpark number as it changes with the primary current.

Another source of possible 2.5 inaccuracy would be if you used a 1 volt reference shunt instead of a 2.5 volt.

What is the cal indicated for the VT and the CTs?

(jan) #34

seems that i installed a 1V shunt indeed…(didn’t know that there were more than 1 type of ADR510).
I’ll try to change the 2.5V to 1.0V in getConfig (under deviceVersion == 3)

Thanks for the help!

(Inactive) #35

You can just specify the value in software. I’m busy now, but I’ll follow up a little later. There’s no reason to change the shunt.

(Inactive) #36

Edit the config.txt file to add the Json object.

“Refvolts”: 1,

Place that right after the version number in the device section. Be careful that you end up with valid json or the iotawatt will not start.

You can edit the config file using the edit and file manager app button. Select config.txt in the left column file list. Edit the changes, the use ctrl-s to save and restart the iotawatt.

(Inactive) #37

That should be “refvolts”:1,
My iPad likes to capitalize.

(Inactive) #38

Just an afterthought - after you add the refvolts specification, you will need to recalibrate your voltage channel. I’m guessing you had to set cal to a value in the 50s. With a 240v supply it should be somewhere in low 20s.

(jan) #39

Thanks! I hadn’t found that you could simply change it in the config file (nice !) so i recompiled it from source. Now it’s working fine. I had to recalibrate the VT indead, but it had to be set higher. (used to be around 7, now around 18, using the “official” VT from the store).

Only thing not working right now is the output, somehow they all stay 0 (even the ones linked to just 1 input). I’ll have another look this evening.

(Inactive) #40

Glad it’s working. Yesterday I was on a road trip and fired off those responses during pit stops, using the email reply method. When I reviewed the thread last night I saw that I hadn’t read the bottom of a couple of your posts and that you were actually a step ahead of me. Two paths to the same end.

Don’t know which version of the software you cloned, but after version 2.02.03 it starts to auto update from the site. So if you make changes to a version after that, they will be gone when a new version loads. That’s why the config entry is a better way to deal with the different voltage reference shunt.

The output stuff has evolved, and I have a pretty significant change that will be merged soon. It looks the same outside, but keeps the script in a more compact form in the config file, and the calculator interface is reworked to edit the new format. as a result, the index.htm configuration app changes with the ESP firmware. You probably have a version mismatch now that is causing your problems. If you haven’t changed anything but the reference volts, you might consider cloning the latest Git, using the refvolts config parameter, and loading the latest SD card apps. Somewhere In there, the graph app was reworked to work much better on iotawatt as well. You can copy all but the config.txt file and iotawatt directory and it should work fine with your your config and logs intact.