EmonTX Shield assembled now the questions

You need to read this section of Learn: Learn | OpenEnergyMonitor

The breadboard pictured in that link is replaced by your emonTx Shield

The second point in that section describes calibration. The rest of this post assumes you’ve read and understand that.

What @danbates was saying is that if you calibrate your EmonTx Shield using power from an FTDI connector so that it outputs correct voltage/current/power readings, and then choose a different method of powering it when you put it into use, the calibration you have already done will no longer be valid.
You need to calibrate it using the power supply you will end up installing with it.

1 Like

Thanks Greebo, that is what I was starting to think.
I need to actually be measuring current to get any readings.

I need to get the Huzzah working to see any output.

I will not have a computer available once I am setup to measure current so I need the WiFi.

Ralph

Aye that’s it :slight_smile: I was about to say getting things up and running is where you’re at, to forget what I’ve said for now and come back to this calibration point if needed, but Greebo puts it better, calibrate using the power supply you’re going to end up using it with.

Note that the Arduino+shield are running at 5v, whilst the Huzzah is 5v powered it is running at 3.3v so you will need some level adjustments for the serial lines (or at least the Arduino Tx to Huzzah Rx line at the very least). A simple voltage divider might do the trick, look at the shield schematics to see how this is already done for the rfm module as that too is 3.3v and not 5v safe.

Yes, although the ESP-MOD (Huzzah 8266 breakout) that’s in the shop has level shifting, no problem connecting to a shield setup.

@danbates & @Greebo
I think you both should look at emonLib and study in particular what happens when the line

#define emonTxV3

is not present in the sketch (as it won’t be for an emonTx Shield).

EmonLib was created for use with the battery-powered emonTx V2, which does not have a power supply regulator, and therefore the supply voltage, hence the analogue reference, was expected to and did change over the life of the batteries. However, by measuring the (known) internal reference against the (unknown) external reference, the value of that can be deduced.

#define emonTxV3 was created because, in my opinion, there was some confusion over the meaning of “accuracy”, that is, no distinction was made between the uncertainty in the initial value and changes in the value due to external influences, of the internal band-gap reference inside the Atmel 328P.


Atmel%20328PB%20Bandgap%20voltage%20vs%20temperature

(I don’t have a link to the source of these figures.)

Thanks everyone for the help (much much needed help).

I just got clarified and confused in one moment!!

I will be running the Arduino emonTX SHIELD from a battery.

I was going to power the HUZZAH (from the Shop) from the same battery with voltage regulator.

But does the Huzzah just gets powered from the FTDI connections (5 volt)?

Also the HUZZAH (from the Shop) does have level shifting for RX and TX correct?

Now re:“confusion over the meaning of “accuracy”

I still do not know what we are looking at? For accuracy of what?

Ralph

In a nutshell, the accuracy of the measurements made and reported by your emonTx Shield.

Here you go…

http://ww1.microchip.com/downloads/en/DeviceDoc/40001906A.pdf

1 Like

Thanks, @dBC.

Sure does, it can be safely connected to the ftdi to pick up the data over serial.

You’ll need a big battery if you’re powering an arduino and WiFi module for long term use. You’ll also need a way to guanatee a stable supply voltage from a battery for accurate measurements as the battery voltage drops.

Although see @Robert.Wall’s post above about that (which I take to mean you need worry less about stable battery voltage than you’d expect):

Gotcha, thanks.
Good to know.
I thought V2 and V3 were about the Tx hardware versions and pinout. Not defining #define emonTxV3 makes emonlib use the internal band gap reference.

https://learn.openenergymonitor.org/electricity-monitoring/ctac/calibration
https://github.com/openenergymonitor/EmonLib

Good spot, Sorry it took so long to respond I hadn’t had time to review since you posted. I could recall from past discussions that the Huzzah was not 5v safe despite being 5v powered. looking at the datasheet, you are right the 2 uart and one reset pins do apparently have level-shifting (I do not recall seeing that before nor it coming up in previous discussions), but it is worth noting that it doesn’t apply across the whole device, the other gpio pins are 3.3v only. I do not know if that info was always there, but I do think that is useful info that should be noted on the sales page since the shop sells the 5v shields, although it must say specifically “only the uart and reset pins have level shifting” to avoid confusion (or smoke).

Paul do yo have a link to the datasheet?

Thanks,

Ralph

On the shop’s ESP8266 WiFi Adapter for EmonTx page there is a " Useful links" section at the bottom which has a link to the Adafruit page for the Huzzah on that page or via links from there you can find pretty much everything.