Author Topic: Non-contact approach for measuring AC VAC/I and PF  (Read 1406 times)

0 Members and 1 Guest are viewing this topic.

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Non-contact approach for measuring AC VAC/I and PF
« on: May 15, 2024, 12:04:12 pm »
Any suggestions for the above? Galvanic isolation or non-contact with Current transformers.

Safety first as this will go into my main breaker box. I will be interfacing a custom STM32 solution and/or Raspberrpy Pi

Also power draw W / VA measurements will need to be processed.

Thanks so much.
Kind regards
Mike
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9084
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
And sorry for my English.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9084
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #3 on: May 15, 2024, 01:38:00 pm »
Do you trust Arduino firmware?  :)
Why not? None of the firmware is doing anything safety critical.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 
The following users thanked this post: tom66

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #4 on: May 15, 2024, 02:01:52 pm »
Do you trust Arduino firmware?  :)
Why not? None of the firmware is doing anything safety critical.

People who use Arduino are not a reliable source of code for me personally.
Professionals use other means.  :)
And sorry for my English.
 

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #5 on: May 15, 2024, 02:15:18 pm »
Oh gosh no. I’m doing bare metal Rust on STM32 H7. Riding mbed is toy code at best.
 

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #6 on: May 15, 2024, 02:17:22 pm »
Agreed. Try toggling an IO in arduino and measure the delay on a scope. You’d be shocked!

Imagine doing anything half decent. The latencies are ridiculous. And that’s the start of it.
With Embassy and Rust async building an RTOS from scratch is possible.
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 6737
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #7 on: May 15, 2024, 04:33:21 pm »
Do you trust Arduino firmware?  :)
Why not? None of the firmware is doing anything safety critical.

People who use Arduino are not a reliable source of code for me personally.
Professionals use other means.  :)

There's nothing fundamentally wrong with Arduino as a platform if it is used appropriately. 

Professionals evaluate the hardware platforms available to them and their customers and make a decision on that basis, rather than just ruling something out because "eww, Arduino".
 
The following users thanked this post: NiHaoMike

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9084
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #8 on: May 16, 2024, 01:41:02 am »
People who use Arduino are not a reliable source of code for me personally.
Professionals use other means.  :)
Until you have to put together a test setup that is easily maintained by others. Can you name any other platform that is as popular? The main advantages you might get going with some other platform - cost and performance - mean little for most test setups. Also see why test scripts are typically written in Python rather than C++, maintainability is more important than performance.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #9 on: May 16, 2024, 08:13:59 am »
Do you trust Arduino firmware?  :)
Why not? None of the firmware is doing anything safety critical.

People who use Arduino are not a reliable source of code for me personally.
Professionals use other means.  :)

There's nothing fundamentally wrong with Arduino as a platform if it is used appropriately. 

Professionals evaluate the hardware platforms available to them and their customers and make a decision on that basis, rather than just ruling something out because "eww, Arduino".

Yes, this is an ordinary MCU, an ordinary compiler, quite competent and professional built-in libraries.
But simplicity, no threshold for entry, attracted a huge number of people who are illiterate, do not have quality and reliability criteria, and are just happy with a random result.
And these people produce clumsy software that can work at time to time, and all the consequences are unpredictable.
The atmosphere in this environment is characterized by "somehow dazzled" almost always.
I think you wouldn't want to use an Arduino-powered car.  :)
And sorry for my English.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #10 on: May 16, 2024, 08:27:07 am »
People who use Arduino are not a reliable source of code for me personally.
Professionals use other means.  :)
Until you have to put together a test setup that is easily maintained by others. Can you name any other platform that is as popular? The main advantages you might get going with some other platform - cost and performance - mean little for most test setups. Also see why test scripts are typically written in Python rather than C++, maintainability is more important than performance.

Professionals can afford to create industrial test installations and mock-up products.
Professionals already have knowledge, experience and a sufficient set of tools in the trunk. 

Arduino is for children's study, for learning about the environment when it is necessary to practically try.
Moreover, this is a bad toy, it corrupts, does not form a stable base. She breeds amateurs.

If you are not aware of other means, I can suggest looking at https://www.mikroe.com.
By the way, I use a wonderful programmer with a WiFi connection.  :)

First, scientists use python for mathematical calculations (a stupid tool that basically does not have numbers and variables as such), and then they ask for a lot of money for super computers because they lack performance.  :)

You know, billions of flies, successfully and joyfully spending their lives, will not prove the taste of the shit they eat.  :)
And sorry for my English.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9084
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #11 on: May 16, 2024, 12:39:06 pm »
I think you wouldn't want to use an Arduino-powered car.  :)
Look into what actually goes on in the car modding scene and you'll see lots of sketchy stuff. All so that they can get up to the speed limit a fraction of a second faster and then waste a lot more time than that on more frequent stops at the gas station.
Professionals can afford to create industrial test installations and mock-up products.
Professionals already have knowledge, experience and a sufficient set of tools in the trunk. 

Arduino is for children's study, for learning about the environment when it is necessary to practically try.
Moreover, this is a bad toy, it corrupts, does not form a stable base. She breeds amateurs.

If you are not aware of other means, I can suggest looking at https://www.mikroe.com.
That doesn't solve the problem that much fewer engineers would be familiar with the platform. Guess why most office PCs run Windows even though Ubuntu would be far superior for most uses.

Have you ever imported a MPLABX project and found that you have to make changes for it to compile on the newer toolchain? It's not just Arduino that sometimes introduces breaking changes.
Quote
First, scientists use python for mathematical calculations (a stupid tool that basically does not have numbers and variables as such), and then they ask for a lot of money for super computers because they lack performance.  :)
For the most part, something like 5% of the code tends to run for 95% of the time. So accelerate that with Numba and Numpy or port just that part to C++. The rest of the code remains in plain Python where maintainability is most important. It's worth mentioning that most test scripts are I/O bound and so optimizations are more of carefully planning I/O operations (e.g. start the reading of all measurements in parallel) rather than making the code itself run faster.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #12 on: May 16, 2024, 01:26:01 pm »
I think you wouldn't want to use an Arduino-powered car.  :)
Look into what actually goes on in the car modding scene and you'll see lots of sketchy stuff. All so that they can get up to the speed limit a fraction of a second faster and then waste a lot more time than that on more frequent stops at the gas station.
I don't speak English very well and I didn't understand some of your phrases.

But it seems to me that you are expressing your opinion, it is certainly formed by your personal experience and has equal rights with others, ofcourse.
Yes, the software arise as "as is" and in many cases there are many errors.
But we can observe clots in some parts. And I'm talking about this - about exceeding the concentration of low quality.
This objectively arises when there is no responsibility.

You know, the musical and the ballet are fun. There are successes and failures both there.
And, it seems, it is possible to drag a dancer from the ballet into a musical.
But difficult hard work, training and training give ballet. To a musical you can just take good funny people who are a little capable of art.  :)

Arduino library products are filled with inexperienced young boys and girls.
If you like to look for the cause of other people's mistakes, then this is your entertainment.
If you are engaged in some kind of scientific work where immersion is not required, but a one-time option is needed, it is acceptable.
It doesn't bother anyone. There is no absolute black and absolutely white, but there are edges of the range.
But the "Arduino expert" in the resume, I think, will not attract.  :)

I'm a proponent of striving for the best, not going with the flow.  :)

And sorry for my English.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9084
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #13 on: May 16, 2024, 01:57:51 pm »
Arduino library products are filled with inexperienced young boys and girls.
If you like to look for the cause of other people's mistakes, then this is your entertainment.
If you are engaged in some kind of scientific work where immersion is not required, but a one-time option is needed, it is acceptable.
At least it's open source so that anyone can inspect what it's doing. With binary blobs, you just have to trust the one that made it.

The real value in Arduino, though, is not that it's a particularly performant embedded platform (the classic ones were rather outdated even for the time), but a popular one.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #14 on: May 16, 2024, 02:20:39 pm »
At least it's open source so that anyone can inspect what it's doing. With binary blobs, you just have to trust the one that made it.
The real value in Arduino, though, is not that it's a particularly performant embedded platform (the classic ones were rather outdated even for the time), but a popular one.

The choice to spend time searching for other people's mistakes (or tolerate them) or making your own depends on the conditions and tasks.
A commercial closed product has quality control tools from the manufacturer, not always, but it is prone to this.
Popularity doesn't mean anything. Moron bloggers showing naked asses are hugely popular, not comparable to scientific topics.  :)
And sorry for my English.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9084
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #15 on: May 16, 2024, 10:25:38 pm »
A commercial closed product has quality control tools from the manufacturer, not always, but it is prone to this.
You'll be surprised, quite a few not so cheap USB relay boards have a software package that hasn't been updated in years, rendering them incompatible with a newer version of Python or a newer OS. A similar pattern appears with all sorts of consumer products, for example smartphones and tablets continue getting updates on LineageOS for far longer than the stock firmware.

Basically, if some niche product has a good open source competitor, that niche product often won't get enough sales for the manufacturer to really continue investing resources in it.

Back to the original question, one could use the Arduino based design for relatively cheap or invest in a really expensive professional power meter. (The latter is likely to be massive overkill. Even on the off chance you find a cheap used one on Ebay, most hobbyists wouldn't exactly like the idea of adding a box using 50W or so 24/7 if the goal is to conserve power.) Or one could take elements of that open source design like the analog front end and replace the Arduino with a FPGA or whatever. (Again massive overkill, but at least it's not that hard to find lower end FPGAs for pretty cheap and they won't use that much more power than what an Arduino would.)
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #16 on: May 16, 2024, 10:47:21 pm »
A commercial closed product has quality control tools from the manufacturer, not always, but it is prone to this.
Basically, if some niche product has a good open source competitor, that niche product often won't get enough sales for the manufacturer to really continue investing resources in it.
I'm trying to understand you, but I'm surprised.
MS Office vs LibreOffice: MS is so stable and confident in sales that it enslaves you and requires you to pay it a lifetime subscription fee, it works. Altium vs KiCad, IOS vs Android and many, many examples.
Some people agree to walk in mud in boots, but others prefer a clean lawn.  :)

I see that you are a supporter of a kind life and wish freedom of creativity to everyone, without paying attention to the accompanying problems. Unfortunately, this path is difficult and still loses a lot.  :-//
And sorry for my English.
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9084
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #17 on: May 17, 2024, 12:51:45 am »
MS Office vs LibreOffice: MS is so stable and confident in sales that it enslaves you and requires you to pay it a lifetime subscription fee, it works. Altium vs KiCad, IOS vs Android and many, many examples.
None of those are niche products. A niche product is one with a rather small market.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6334
  • Country: ro
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #18 on: May 18, 2024, 09:09:09 am »
Arduino is for children's study

That was true maybe 10-20 years ago, not any more.

Meanwhile, Arduino got so popular that even professional EE and CS started to use it.  Most important, all these programmers and engineers started to contribute back.  And it shows:
- Arduino now supports many types of microcontrollers from various manufacturers
- has a bootloader included, you don't need a proprietary programming dongle
- Arduino libraries are doing what nobody else did so far, together they constitute a HAL (hardware abstraction layer) between the many types of microcontrollers from all the major MCU families, and from all the major MCU manufacturers
- even more, there is an online repository for libraries, from where one can search and install a library with a single click
- once installed, libraries came with code examples, code highlighting and code autocompletion
- the language is C/C++
- the compiler is GCC, certainly the best free compiler in existence
- the IDE, since version > 2.0, again, the best.  Has the same features and functionalities as MScode
- since v2.0, the Arduino IDE includes a hardware debugger, too, for the newer Arduino boards that support HW debugging
- it is all FOSS (Free Open Source Software)
- Arduino boards are dirt cheap, the classic Arduino nano I still like to use (with ATmega328 and CH340) is about $2/pcs, you plug it in the USB and start writing code
- plus, there are tons of examples online, so many that most often you don't even need to write your own code, only load an example and eventually change a few lines.

When using Arduino code, one does need the skill to recognize if somebody else's code is really bad, correct.  But that is not that hard.  Can be deduced by looking at the programming style.  If the most elementary programming practices are not present, then don't use that code at all, find another example that is properly written.

You may want to reconsider Arduino.  Don't lock yourself out from a very productive platform only because beginners are using it, too.

Nothing stops you to use Arduino in a professional manner.
« Last Edit: May 18, 2024, 09:35:52 am by RoGeorge »
 
The following users thanked this post: NiHaoMike

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #19 on: May 18, 2024, 09:56:49 am »
Arduino is for children's study
That was true maybe 10-20 years ago, not any more.

30 years ago, to perform music, we had to know the notes, have talent and training.
Now it's enough to roll the mouse on the table. And we can't tell the difference anymore.

When non-professionals start building bridges, flying airplanes, and control nuclear power plants simply because someone gave them a cookbook and a set of spices, you'll remember this post. We are close to it.  :)

We still do not give freedom to drug traffickers (although it is also changing), but we rejoice in the poisoning of all spheres by unprofessionalism. This is incorrect progress in my opinion.  :-//
And sorry for my English.
 

Offline tom66

  • Super Contributor
  • ***
  • Posts: 6737
  • Country: gb
  • Electronics Hobbyist & FPGA/Embedded Systems EE
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #20 on: May 18, 2024, 11:52:31 am »
Nonsense. Utter nonsense. Sorry, but that's what I think.

If anything engineering is more professional than it ever was. 

In the 1980s, electronics was not regularly taught as a degree subject.  People either had a physics or science background, or they had a regular engineering background, and picked up the subject from experience, from mentorship by others or just by breaking things until they worked. 

Nowadays, if you were to do a survey of my colleagues, I would only find one person there who doesn't have a degree in engineering, and that's the managing director.  Everyone else there has a relevant degree to their subject area.  Engineering is practiced as both an empirical subject (from experience) and also as a body of knowledge to refer back to.  It is a highly professional subject area.

This is why things like cars and electronics and the like have never been more reliable.
 
The following users thanked this post: NiHaoMike

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6334
  • Country: ro
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #21 on: May 18, 2024, 12:01:41 pm »
Arduino is for children's study
That was true maybe 10-20 years ago, not any more.

30 years ago, to perform music, we had to know the notes, have talent and training.
Now it's enough to roll the mouse on the table. And we can't tell the difference anymore.

When non-professionals start building bridges, flying airplanes, and control nuclear power plants simply because someone gave them a cookbook and a set of spices, you'll remember this post. We are close to it.  :)

We still do not give freedom to drug traffickers (although it is also changing), but we rejoice in the poisoning of all spheres by unprofessionalism. This is incorrect progress in my opinion.  :-//

Well, this time was the other way around, that's why I was enumerating the specs/features Arduino has today.  It all started as a project for kids, then things changed, and now Arduino is developed mostly by professional programmers.

Music, drug dealers and personal feelings are valid arguments for a rant, not for technical evaluation.  I understand such arguments as "I'm still very attached to my own biases and opinions, and not willing to reconsider".

OK, won't argue with somebody else's feelings, but please don't bash at Arduino, only because you think it is still like it was 30 years ago.  Arduino has changed.  Now it has libraries with better code quality, and portable across many MCUs, so you won't get locked to a single vendor.  Arduino today is almost like Linux, but for microcontrollers.
 
The following users thanked this post: NiHaoMike, tom66

Offline mendip_discovery

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: gb
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #22 on: May 18, 2024, 12:43:22 pm »
For a Proof of Concept option, the Arduino is great. You could have a solution running in days if not hours. If you then want to invest the time and money into making a proper bit of hardware you can.

The places I visit I get to see lots of this. I have seen some systems where it was decided for the ease of repair etc. that using a standard off-the-shelf unit was better than a custom project. This is common for the Pi and the Arduino units. They are not perfect but there is a large network of people to ask about issues you come across.

So,
https://openenergymonitor.org

Looks to be actually a good option to try, or at least emulate.
Motorcyclist, Nerd, and I work in a Calibration Lab :-)
--
So everyone is clear, Calibration = Taking Measurement against a known source, Verification = Checking Calibration against Specification, Adjustment = Adjusting the unit to be within specifications.
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1269
  • Country: ru
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #23 on: May 18, 2024, 01:22:21 pm »
Nonsense. Utter nonsense. Sorry, but that's what I think.

If anything engineering is more professional than it ever was. 

In the 1980s, electronics was not regularly taught as a degree subject.  People either had a physics or science background, or they had a regular engineering background, and picked up the subject from experience, from mentorship by others or just by breaking things until they worked. 

Nowadays, if you were to do a survey of my colleagues, I would only find one person there who doesn't have a degree in engineering, and that's the managing director.  Everyone else there has a relevant degree to their subject area.  Engineering is practiced as both an empirical subject (from experience) and also as a body of knowledge to refer back to.  It is a highly professional subject area.

This is why things like cars and electronics and the like have never been more reliable.

Your colleagues didn't have an Arduino, they had to go through science.  ;D

I'm trying to explain something else, you didn't quite understand.
When a future engineer breaks something, studies subjects that seem unnecessary, he does not get a universal hammer, he gets skills.
But when a programmer doesn't have to break anything himself, he can just write include from the very beginning of becoming a person, this is a bad way. But this is already happening in the modern world.

After all, you will not make a forecast of the development of the food industry by looking into your refrigerator.
Iin the 80s would not have believed that a child could do facial recognition at home.  :)
So you don't believe that engineers will forget the basics in other industries.
Maybe later, but vector is like that - business and money prevail, engineering beauty recedes.

Programming has very low capital investments and is as mobile as possible. Therefore, we can see a trend in it faster than in other areas.
And sorry for my English.
 

Offline ifonlyeverything

  • Regular Contributor
  • *
  • Posts: 91
  • Country: us
Re: Non-contact approach for measuring AC VAC/I and PF
« Reply #24 on: May 18, 2024, 03:13:57 pm »
AMC131M02 by TI?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf