emonTx connecting to arduino IDE using programmer

Just the emonTx. I’ve had issues switching off the emonbase before!

The pi with the RFM69Pi attached. I’m currently powering it with a usb cable into a usb socket (something like this https://uk.rs-online.com/web/p/plug-sockets/1953564/?cm_mmc=UK-PLA-DS3A-_-google-_-PLA_UK_EN_Fuses_%26_Sockets_%26_Circuit_Breakers_Whoop-_-Plug+Sockets_Whoop-_-1953564&matchtype=&pla-301957763671&gclid=Cj0KCQjwyN-DBhCDARIsAFOELTk00TmmEMknuBN25RXVmOoJb5mZ6AJOWoayX2em5bE_uYk8Wq8EfIEaAlrjEALw_wcB&gclsrc=aw.ds)

I’m looking at getting a PiZero for the other locations in case this keeps happening. Would you recommend getting the WH version with the soldered Header?

Ouch. I don’t think I would trust one of those to power a Pi. They might be OK, and they are probably OK for charging phones overnight, but how clean the 5 V is would be a matter of concern.

However, if re-starting the emonTx only was enough to get it communicating again, then the problem has to be the emonTx end. And the only way I’ve succeeded in locking up an emonTx is with a dodgy power supply - if the power dips far enough to screw up the radio, but not far enough to cause it to reset even though the main sketch has, then it can lock up, because the hardware reset on the radio is not used. If that’s what is happening, then I suggest either powering it with a clean 5 V USB supply, or return to a variant of Plan A, i.e. direct serial connection to the Pi’s GPIO, and disable the radio in the sketch. I can’t vouch for the serial-USB connector. I would expect it to be OK, but I’ve never used one.

Neither am I a Pi Zero expert, @borpin is best placed to advise you on that.

It looks as though re-powering the emonTx hasn’t worked. I’m still not receiving anything through emoncms.org, so maybe it is the emonbase power supply. I have a plug socket available so i’ll try using that instead of the usb option.

I would like to try connecting via serial to the emonbase though as it sounds more robust (although i’ll still have rf connectivity for one of my emonTx’s on site). Can you confirm that the sketch you built doesn’t need any modifications (except switching off rf) when I connect via serial? I’m assuming I can connect per this wiki - EmonTx V3.4 - OpenEnergyMonitor Wiki. It would also be good to understand what I would need to do if i’m connecting to 2x emonTx with a single emonbase. Could I connect one via serial and one via rf or would it be better to do both via rf and have some delay in the signal?

@borpin - Rob, has suggested you might be the right person to speak to regarding PiZero connectivity?? I’m looking to connect a PiZero to an emonTx per this thread 4 CT emonBase using emonTx and Pi Zero W My question is do you know if there will be sufficient power for me to run the PiZero off the emonTx and also use a usb/Ethernet adapter to connectro to the LAN network? Thanks

I run a serially connected PiZero / EmonTX combo, where the PiZero is powered by the EmonTX which itself is just powered by an old Phone charger without issues (I do have an AC/AC PS as well). It is Wi-Fi but don’t see an ethernet dongle being an issue. Turn off Wi-Fi on the Pi to reduce consumption further.

There are several threads here about connecting up serially.

I’d do 2 PiZeros with one just running emonhub and sending data to the other (or a completely separate instance of EmonCMS).

Thanks for your help @borpin.

Unfortunately i only have one Ethernet connection across the two cupboards that the emonTxs are stored. So I think i’ll need at least 1x RF connection to the emonbase.

The other way to do it is use a USB TTL and plug both into the EmonTX - again there has been discussion about this method.

The drawback (IIRC) is that you need to bind a specific USB device to a specific port so after a reboot the inputs are not switched.

[edit]
Yes, look at this thread. Using 3 No. EmonTX with EmonBase - #24 by AntiGrav

sorry @borpin i wasn’t very clear. I have two cupboards on either side of a large room. One has an Ethernet connection and the other doesn’t. My current thinking is to use a single emonBase and connect via serial into one emonTx and RF into the other one in the other cupboard. They are only about 20m apart so RF signal shouldn’t be a problem.

1 Like

I had the following connected yesterday:

emonTx serial connected to PiZero
PiZero power connected to mains via USB
PiZero Ethernet connected via adapter dongle (a blue light comes on when plugged in)

I managed to get emonpi on the browser and was trying to get the serial communications to work when everything just shut down.

The adapter dongle no longer displays a blue light.

I’m wondering if I should have had power from the mains as well as from the emonTx going into the PiZero or if this is usually fine. It seems like I have blown the adapter??

Power only from the emonTx wasn’t sufficient to get it up and running. The green light by ‘ACT’ never came on.

At first sight, that appears to be a possibility.

Did you have the programmer and the PiZero both connected to the same Rx/Tx lines? If you did, there’s your problem - you must never connect together two ports that are both driving an output.

If you didn’t do that, then you need to know that there is a limit to the output current that the programmer can supply - 450m mA (it’s documented on the Programmer’s page in Learn). I would have expected it to shut down on overcurrent, but I can’t see a mention of how it is protected, or indeed if it is. So that too might have damaged the programmer.

I suggest you try the programmer on its own, looping Tx to Rx, and see if you get the same data back as you send.

Thanks @Robert.Wall I have sent the adapter back, fingers crossed they’ll send me a new one. The SD card seems to have been fried too. Can’t remember exactly what I did as I was trying all sorts out.

I’m set up on the Pi4 now and getting there (i’ve asked you a question on another thread about the sumPower you helped me with before)

I’ll be sure not to connect to the same lines next time!

Hi @Robert.Wall i’m looking to get these CT clamps mV Split Core Current Transformers | Hobut specifically the 120A and 250A. Do you know if these will work with the emonTX and will I have to make any changes to the calibration.

Those c.t’s (they are not “clamps” - that’s something I use when I glue pieces of wood together) are 0.333 V output, so the answer is, yes, they’ll work, but you’ll only use a third of the input voltage range of the emonTx, plus you’ll need to remove the burden resistor inside the emonTx, or you’ll get even less voltage out of it. What that means in practice is, the ability to measure at low currents is impaired. If you’re not interested in anything less than about 10% of rated current (i.e. 3% of the emonTx’s input range), you might get away with it. It’s probably worth an email or phone call to see what the accuracy and phase error curves look like. Otherwise, and sadly, because they’re a good local firm, they are definitely not recommended.

If you do go with them, the calibration constant is the primary current that would give 1 V at the emonTx’s CT input.So for the 250 A version: 750 with the emonTx’s burden resistor removed.

Thanks @Robert.Wall do you mean a call with Hobut or yourself? I’d love to be able to discuss this with you as to be honest i’m not sure what the best option would be. I’m struggling to find c.t’s with 250A input and 50mA output as you suggested. I tried getting ones from the ‘Use in N.America’ page, but they have the same output of 0.333V

I meant phone Hobut - they should know more than I do about their c.t’s. The question I’d ask would be, is it possible to remove the internal burden (I’d guess not because it looks moulded in, and no way to get inside other than destructively) and if it is, what’s the current ratio without the burden? Or, do they do / are they likely to do a 1 V version or a current output version?

I’ll put it to Glyn & Trystan that the 0.333 V output is a recognised standard, and a local firm that does that range - which, let’s face facts - is pretty useful for domestic monitoring as well as small industrial, is an additional argument for a 1 V or 1.1 V ADC input range, rather than the 3.3 V range we have at present.

What about this: Learn→Electricity Monitoring→AC Power Theory→Use in North America→YHDC 100A/200A/400A Split core current transformer SCT023R

That says the 200 A version is good to 300 A, and if you get the full data sheet, there’s a graph that shows, with a 100 Ω burden, it’s linear up to around 500 A, with a voltage output of about 22 V. So I think from that you should be OK with a burden of (ideally) 17.6 Ω, which means adding an 82 Ω resistor in parallel with the one on board the emonTx, to bring the voltage down a little below 1.1 V rms @ 250 A. I think it deserves a second look.

Note: The core is steel (not ferrite) so it’s even more important that the c.t. has a burden at all times it is on an energised conductor. (The 82 Ω should be enough to prevent damage or danger.)

Thanks again @Robert.Wall

@glyn.hudson & @TrystanLea do you have any experience working with >100A c.t’s with the emonTx? If so could you recommend a particular c.t?

I’d prefer not to have to start adding additional hardware like resistors if possible.

I don’t really understand your problem. This c.t. has flying leads, you need to get those into a 3.5 mm plug (which could be very tight), or you need a junction box to change the wire size, which is where you’d mount the parallel second burden.

The problem is, there’s a very limited choice of c.t’s that have the equivalent output to the “standard” YHDC SCT-013-000. Or put the other way round, the emonTx is designed for that one c.t. and so has a very particular input requirement and no easy way to get around that.

If you want zero hardware change, the only choice I know of is the 400 A version of the SCT0023R, and then you’re working it over only a little more than half it’s rated current - the effect of that will be to almost double the current below the accuracy falls away. You know your application, all I know is what you’ve written. If that won’t be a problem to you, then the SCT023R - 400 A version would be my recommendation.

Hi @Robert.Wall i don’t have experience of mounting burden resistors or connecting flying leads. I also want to reduce the risk of installing something that could be dangerous, which is why i would prefer an ‘off the shelf solution’ if it is available. If its not, and so far you and i haven’t found anything, then i may have to go down that route.

I presume you are aware that a c.t. is a current source, and know what happens if it doesn’t have a burden? That’s why I think the 200 A one worked up to 250 A and with a small external burden permanently connected to the c.t. (rather than via a plug and socket connection) will be safer than the 400 A c.t., because unlike the smaller SCT-013-000, the SCT023R does not have the voltage suppressor to hold the voltage down in the absence of a burden.

Is this for work, rather than a domestic installation? Whilst we prefer the information is shared, if there’s anything that I should know that will make it easier to advise you, but which mustn’t (for whatever reason) be made public here, feel free to PM me.

I don’t think its anything that cannot be shared. I’m happy for other people to learn from me, if I’m getting support from this group in the first place.

My knowledge of electrical systems is limited, although increasing significantly off the back of this forum and developing the meters that i have installed to date.

Would you be happy to provide some more information on how to connect the resistor to the junction box and then to the c.t. I will do some research for the components and how to connect them up in the meantime anyway.

As I wrote, a c.t. is a current source. That means it will attempt to generate whatever voltage is necessary to drive the current into its load, or burden as it’s called. If it is open-circuit, the voltage can rise to the point where the insulation breaks down and the c.t. is destroyed. Conversely, a c.t. can always be short-circuited and this is in fact when it is under minimum load. Many c.t’s have provision for a shorting link on the c.t., which allows the instrument to be safely disconnected. Small c.t’s, such as the SCT-013-000 have two zener diodes or equivalent to clamp the voltage at a safe value but above the normal voltage developed across the burden. “Voltage Output” c.t’s have their burden inside the casing, and must be connected to an instrument that has a negligible loading effect on the output. (This why the SCT-013-030 for example is unsuitable for use with the emonTx/emonPi.) The SCT023R has nothing to protect it, so ideally should not be connected by a plug and socket. When I was in industry, we always insisted on hook crimps and spring loaded terminals for c.t. and tacho connections, so that the possibility of the connection being broken was minimal.

This is how to connect it:

CT&2ndBurden