Would like to take the output from the uart and convert it to USB and send same data to 2 PC's

Hi I have been using a UART to USB from my emonTX for years now
I use a programmer to convert to USB which connects to my PC.
What I want to do is send identical data to two PC’s so that I can test one PC while the other one keeps collecting the DATA.
So Could I split the output of the uart and add two usb converters or is there a way I can split the data after it’s been converted to RS232.
Would appreciate any advice please.

Mike

Just had another thought!
Could I do UART to ethernet then I could receive the data anywhere on the LAN ?
I’ve just seen this which looks like a simple way?
Do you think that would be OK?

https://www.amazon.co.uk/gp/product/B09FZQ48FB/ref=ox_sc_act_title_1?smid=A3CMRZVKHXMDH4&psc=1

The other thought is probably the best.

The standard and documented way to send via WiFi to your router is with the ESP8266. I expect the module you have in mind will be equivalent, but there’s possibly better support here for the one we know. One potential gotcha is don’t connect the data line from the USB device into the emonTx, unless you have total control over what is sent. The ESP8266 sends unwanted characters that change the configuration/calibration of the emonTx.

You will need a 5 V power supply for the emonTx if you use the ESP8266, you are very likely to need a separate one too for an Ethernet adapter, as the current available from the a.c. adapter to the emonTx is strictly limited by design to avoid too much disturbance to the voltage its trying to measure.

The Ethernet adapter you mention appears to work off 3.3 V, so it’s most likely a two-wire connection to the emonTx, GND & Rx on the emonTx to GND and Rx on the adapter. (YES - the emonTx sends its data on the Rx pin.)

Thanks Robert
would it be easier to send data over wifi then I’ve never used the wifi chip.
Would the program in the EmonTX need to be altered to this ?

If you have a decent WiFi signal where the emonTx is and no nearby Ethernet, then WiFi will be easier.
You might need to edit the sketch to change the message protocol, but as you’re using the serial output now, it should be in the correct format already.

It actually sits next to the router !
I’m not sure I know what you mean Are you saying I Might not have to do anything ?
I assume If that was the case I’d be able to see the EmonTX on the network already??
If that is true what would I look for when I scan my network.

No that can’t be right. Its too easy lol

thanks again

Mike

Addendum.
I googled It and I definitely don’t have anything on my network named anythink like “espwifi…”
I knew it wouldn’t be that easy.
BTW my EmonTXV3 definitely has wifi on board. But I had forgotten all about it !!
Mike

Crystal ball failure - I’d never have guessed.

You might not have to do anything after you connect the ESP8266 (programmed with our software) in place of your programmer and its USB cable.
The emonTx definitely has neither Ethernet nor Wi-Fi capability natively, you need to add something for both. Later emonTx’s can have the ESP8266 inside the case, for earlier ones it must sit on the programmer port outside. For Ethernet, you always need an external adapter.
What you have natively is 433 MHz (or possibly 868 MHz) ISM band radio, which needs an emonPi or emonBase to receive the transmissions and send the data onwards via WiFi or Ethernet.

Ah! I new it had radio so thought that meant Wifi !
I think I’ll try the hardware ethernet adapter.
Si I’ll need to supply 5 volts to it :white_check_mark:
and Ill only want to Connect the GND obviously to GND.
you said rx is the transmiter so rx to rx is that correct? don’t want to blow it up…
and that is all I need to do yes?

Thanks again I’m getting a bit slow in my old age.

Read the data sheet - it looks to me as it it might run on 3.3 V as well. If it does run on 5 V, you must not send 5 V to the emonTx Tx input (yes, that one’s labelled wongly as well), or you risk destroying it.

That’s what I wrote. Look at the circuit diagrams yourself if you don’t believe me, or you could search the forum for the number of people who thought the emonTx was labelled the conventional way and it didn’t work.

Wasn’t saying I don’t believe you. I was just making sure I understood you.
I’m not very good at electronics, Used to be OK but am getting old and stupid so I like to make sure I understand.
So Now I don’t really know what you mean about not sending 5v to the emontx .
If I just wire the ground to ground and Tx to Tx is there any chance of that happening?

Sorry, I’ve got to go out. I’ll reply in full later.

The emonTx is supplied either by a programmer or USB lead at 5 V, or by the a.c. adapter. It runs on 3.3 V, and the data in and out on the FTDI programmer port is at 3.3 V logic levels.

The decision whether a particular voltage is a logic ‘0’ or a logic ‘1’ is such that a logic ‘1’ out at 3.3 V is recognised correctly by an input expecting 5 V logic, as is the voltage for a logic ‘0’. So it’s OK connecting a 3.3 V logic output to a 5 V logic input.

It’s not OK going in the other direction. The 5 V output (typically about 4.7 V) exceeds the allowable input voltage and the 3.3 V input is likely to be damaged. You need to divide the voltage down. That’s what is done for the radio (3.3 V) in the emonTx Shield (5 V).

If you supply both the emonTx and the Ethernet adapter from the same 5 V power supply, wired GND – GND and 5 V – 5 V, then it’s OK to connect Rx – Rx (i.e emonTx data out to Adaptor data in) directly, but it’s not OK to connect Adapter data out (Tx) to emonTx data in (Tx) without reducing the voltage.

It’s equally OK (but slightly pointless) powering the emonTx from the a.c. adapter and the Ethernet adapter from 5 V, you don’t connect 3.3 V to 5 V of course, all the rest is the same.

If the Ethernet adapter works on 3.3 V, you’d need to check how much current it requires, and whether the 3.3 V regulator in the emonTx can supply it. But you’re very likely to still need to supply the emonTx with 5 V, so again it doesn’t really help you.

One alternative is to use an old/cheap RPi with an ethernet port.

However, I am reasonably sure you can just plug a USB->Ethernet adapter into an RPi (Pi Zero) and it will just work.

If so, you could use 2x PiZ with USB ethernet adapters and connect serially to the EmonTX (several threads on how to do that. The Pi can be powered from the EmonTX as long as it has a good 5V supply. You just then need emonhub on each to send the data where you like.

Ok Thanks again That’s very good.info. So I power the EmonTX from the wall adapter and I have a small power supply that supplies either 3.3v or 5v or both ( YwRobot 545043 Breadboard Power Supply)
So If I can power the ethernet adapter with 3,3v I should be OK if I am understanding you correctly.

I’m rather ignorant with the Pi i did buy one a while ago but only used it with linux O/S
never did get round to tinkering with it. Mine is a V3 with in ethernet port. though

I think the emonTX should have enough juice, but nothing stopping you not connecting the power from the UART and powering it separately. The emonSD can be used as the OS. The emonhub config would need adjusting. Just search for Pi Z threads.