Non-contact approach for measuring AC VAC/I and PF - Page 1
Forum section: electronics / general

author: bsodmike
author_rank: Regular Contributor
timestamp: May 15, 2024, 12:04:12 pm
content: 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 PiAlso power draw W / VA measurements will need to be processed.Thanks so much.Kind regardsMike

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 15, 2024, 12:25:42 pm
content: https://openenergymonitor.org

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 15, 2024, 12:33:35 pm
content: Quote from: NiHaoMike on May 15, 2024, 12:25:42 pmDo you trust Arduino firmware?

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 15, 2024, 01:38:00 pm
content: Quote from: S. Petrukhin on May 15, 2024, 12:33:35 pmWhy not? None of the firmware is doing anything safety critical.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 15, 2024, 02:01:52 pm
content: Quote from: NiHaoMike on May 15, 2024, 01:38:00 pmPeople who use Arduino are not a reliable source of code for me personally.Professionals use other means.

author: bsodmike
author_rank: Regular Contributor
timestamp: May 15, 2024, 02:15:18 pm
content: Oh gosh no. I’m doing bare metal Rust on STM32 H7. Riding mbed is toy code at best.

author: bsodmike
author_rank: Regular Contributor
timestamp: May 15, 2024, 02:17:22 pm
content: 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.

author: tom66
author_rank: Super Contributor
timestamp: May 15, 2024, 04:33:21 pm
content: Quote from: S. Petrukhin on May 15, 2024, 02:01:52 pmThere'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".

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 16, 2024, 01:41:02 am
content: Quote from: S. Petrukhin on May 15, 2024, 02:01:52 pmUntil 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.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 16, 2024, 08:13:59 am
content: Quote from: tom66 on May 15, 2024, 04:33:21 pmYes, 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.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 16, 2024, 08:27:07 am
content: Quote from: NiHaoMike on May 16, 2024, 01:41:02 amProfessionals 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 athttps://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.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 16, 2024, 12:39:06 pm
content: Quote from: S. Petrukhin on May 16, 2024, 08:13:59 amLook 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.Quote from: S. Petrukhin on May 16, 2024, 08:27:07 amThat 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.QuoteFor 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.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 16, 2024, 01:26:01 pm
content: Quote from: NiHaoMike on May 16, 2024, 12:39:06 pmI 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.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 16, 2024, 01:57:51 pm
content: Quote from: S. Petrukhin on May 16, 2024, 01:26:01 pmAt 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.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 16, 2024, 02:20:39 pm
content: Quote from: NiHaoMike on May 16, 2024, 01:57:51 pmThe 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.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 16, 2024, 10:25:38 pm
content: Quote from: S. Petrukhin on May 16, 2024, 02:20:39 pmYou'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.)

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 16, 2024, 10:47:21 pm
content: Quote from: NiHaoMike on May 16, 2024, 10:25:38 pmI'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.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 17, 2024, 12:51:45 am
content: Quote from: S. Petrukhin on May 16, 2024, 10:47:21 pmNone of those are niche products. A niche product is one with a rather small market.

author: RoGeorge
author_rank: Super Contributor
timestamp: May 18, 2024, 09:09:09 am
content: Quote from: S. Petrukhin on May 16, 2024, 08:27:07 amThat 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.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 18, 2024, 09:56:49 am
content: Quote from: RoGeorge on May 18, 2024, 09:09:09 am30 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.

author: tom66
author_rank: Super Contributor
timestamp: May 18, 2024, 11:52:31 am
content: 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.

author: RoGeorge
author_rank: Super Contributor
timestamp: May 18, 2024, 12:01:41 pm
content: Quote from: S. Petrukhin on May 18, 2024, 09:56:49 amWell, 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.

author: mendip_discovery
author_rank: Super Contributor
timestamp: May 18, 2024, 12:43:22 pm
content: 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,Quote from: NiHaoMike on May 15, 2024, 12:25:42 pmLooks to be actually a good option to try, or at least emulate.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: May 18, 2024, 01:22:21 pm
content: Quote from: tom66 on May 18, 2024, 11:52:31 amYour colleagues didn't have an Arduino, they had to go through science.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 writeincludefrom 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.

author: ifonlyeverything
author_rank: Regular Contributor
timestamp: May 18, 2024, 03:13:57 pm
content: AMC131M02 by TI?

author: Geoff-AU
author_rank: Frequent Contributor
timestamp: May 21, 2024, 03:50:14 am
content: Quote from: S. Petrukhin on May 15, 2024, 02:01:52 pmYep, if you don't grow your own silicon crystals you're just a hobbyist.We all stand on the shoulders of giants. It's what makes the complexity of 21st century life possible. There is a risk of forgetting first principles if EVERYBODY does it, for sure. But I have never written a compiler, nor do I have any desire to. I get more enjoyment out of using one than making one, I'm simply using the compiler as a tool to make other things that I do enjoy making. Other people make compilers and that's great. It's not easy to do it well.