DMX Library errors


Does anyone know of a DMX library that actually works?
I have a Mega2560p, and both DMXSerial and DMXSerial2 libraries refuse to compile due to an error:

HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

(.text+0x0): multiple definition of `__vector_25'

libraries\DMXSerial\DMXSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here

c:/users/steve/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

HardwareSerial0.cpp.o (symbol from plugin): In function `Serial':

(.text+0x0): multiple definition of `__vector_26'

libraries\DMXSerial\DMXSerial.cpp.o (symbol from plugin):(.text+0x0): first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino Mega or Mega 2560.

I don’t seem to be able to get past this issue.

There is a library called DMXSimple or something, but it seems to be send only and too basic for my needs.

What does Detecting and measuring mains voltage and current have to do with the DMX library?
If your title matches your question you will likely get more views.

You are having a conflict between hardware serial and the DMX serial. I am not familiar with DMX, but can you use one of the other serial ports of the Mega for DMX?

Sorry… starting writing a question about mains monitoring, and then this issue popped up.

Well I need the library for the DMX to work. Don’t think its a serial port issue.

Had this before I seem to remember a few years back and had to abandon Arduino’s and jump over to a Teensy (that library works).
I am finding more and more libraries failing these days

Its a serial thing. You can’t use any of these libraries with any kind of serial (I had serial enabled for debugging).

Hi. I do need to monitor the amperage 0-16A and the 230v volts of my project.
Can’t see anywhere on that link how to achieve that?

I am assuming the current sensing can be done using a CT coil. Not sure I like these little pcb boards where you have to actually wire the load through the pcb terminals.

As for the voltage. I am thinking of small 230v - 12v transformers linked to analogue inputs via a voltage divider?
Ideally I would like to get isolated as well, but I think that is as good as I can hope for.

You evidently missed the large sections covering the topics in great detail.

Here they are: Learn | OpenEnergyMonitor

In the left menu select “CT sensors” “voltage sensing” etc. There are code and circuit diagrams for Arduino.

How did I miss that! Sorry.

OK, so they are working on the same idea I had.
I need to keep this as small as I can on a PCB. Do you think the 9v power adapter could be replaced with a small transformer? I can’t see why no (might need some passive components to smooth the output)

Yes, there are transformers suitable for PCB mounting.

However, a PCB intended for direct connection to the mains must be routed with special safety features, like mains areas isolated from the rest by open slots. And the PCB must be enclosed in an approved housing, otherwise lives are placed at risk.

The OpenEnergyMonitor folks strongly recommend using a wall mount transformer for exactly these safety considerations.

The monitoring is going inside a custom enclosure, and I am making a dedicated PCB
Maybe I go with a PCB just to house the mains voltage, transformers etc, and then break out of that with a link ribbon cable or similar to the low voltage Arduino pcb.

I am an electrical engineer, and work with mains kit all day every day. I am aware of the risks!
Thank you for the advice

To be honest, is it even worth messing around trying to make my own;

AliExpress Amp/volt module

Maybe I just buy one of these! Maybe I can hack it

I need to shrink this AC volts and Amperage detection down. It doesn't fit within my enclosure (which I cannot change).

Do you want me to start this in a new (correctly titled) thread?

You can get these combined amperage, voltage and frequency led displays from good old China for peanuts. I may take one apart this afternoon and see how they are achieving this in such a small package.
I imagine incorrectly!

I have searched Farnell, RS and Mouser and just cannot track down a small enough AV mains transformer to fit within my project. It needs to be 110v-265v range.