Hacker News new | past | comments | ask | show | jobs | submit login
STM32 Open Source Multimeter (embedblog.eu)
264 points by lelf 59 days ago | hide | past | web | favorite | 57 comments



Professional DMMs are nice because they've thought through all the failure cases.

This meter is nice, but the relay on the current range select (K2) is set up so that there will be a break in the current when it switches ranges. On inductive loads, this would cause arcing and can damage the relay. It could also shoot through D6 into the voltage rail, potentially frying the meter. On digital loads, this blip in power might be enough to reset the circuit you're trying to measure. A better way to put the relay is to always have the 10 ohm resistor in series, and switch in the 1 ohm in parallel when needed. Of course the resistance will now be 0.909 ohms instead instead of 1, but that can be calibrated for in software.


This would probably be good feedback to leave as a GitHub issue (or PR!).


Pull requests for open hardware projects, what a time to be alive!


This is wonderful!

The tricky part of a multimeter is not the digital part (which is a knob in many multimeters) but the analog part: calibration, stability, noise. (And, as martin points out, safety.) The three-to-five-digit output here suggests an accuracy of ±0.05% or better, which is not easy to achieve, and it turns out at the end that the accuracy is about ±5%. (Expensive multimeters can deliver 7 digits, and for real.) In theory the STM32's ADC can deliver ±0.1% error easily, and its internal bandgap reference ±2% (accuracy, not reproducibility), so it ought to be possible to do better. But I happily used analog multimeters with several percent error for many years. In fact, I still do sometimes!

If you like this multimeter, you'll probably like the M328 "DIY hobby Arduino voltmeter" or "AVR component tester", which you can buy prebuilt from a variety of places. It does component identification — it's a full RLC meter, with automatically triggered transistor and diode test modes — but is unfortunately built around the AVR, limiting it quite a bit. And it usually (always?) has pretty poor precision.

Is there an alternative repository to Thingiverse yet? They're run by notorious bad actor MakerBot, so depending on them to archive our manufacturing knowledge hardly seems prudent.


> Is there an alternative repository to Thingiverse yet? They're run by notorious bad actor MakerBot, so depending on them to archive our manufacturing knowledge hardly seems prudent.

This is something very close to my heart that I’ve been wanting for a long while now. Thingiverse is not only run by someone I don’t wish to support, but is also a measurably crap site. It’s slow, search barely works, etc etc. Bring up the name to anyone and you’ll instantly hear endless complaints.

But.. there’s nothing better.

The new Prusa site is Gcode only, and very limited in features. Grabcad is a mess of annoying UI and endless low quality models, but kinda works.

We seriously need a Github for 3D designs and electronics. Allow sharing of any filetypes, from STL and OBJ to raw CAD files, as well as wiring diagrams and PCB schematics, richtext assembly descriptions (like Githubs readme files), and a way to preview the model files visually like Thingiverse/Grabcad.

There’s huge demand for a service like this and there’s income to be made by allowing people to get parts printed or PCBs manufactured via referral to appropriate services.


Are you any good with Go?

I've been developing a GitHub/GitLab/Gitea style website for a while now, for storing and displaying binary objects. The current code is set up to handle SQLite, but it's entirely feasible to add support for other binary formats (such as 3D objects) to it:

https://dbhub.io

eg storage of them, display of them visually instead of the SQLite table view

When I was first thinking up the idea... it was actually for 3D objects. Was going to do it as a Collab platform for Blender, but well... I do more stuff with databases so the SQLite bit came first. :)

The backend storage doesn't use git, as it's lousy with larger files over time, but it does use the same principles for the versioning, branching, forking, tagging, etc.

https://github.com/sqlitebrowser/dbhub.io

Don't be faked out by what looks like no activity there since May. I'm working heavily on fixing some stuff in the Go WebAssembly ecosystem, so a decent data visualisation layer can be added to the current site. ;)


Oh nice! This is a great idea! And licensed under the AGPL, awesome!


> We seriously need a Github for 3D designs and electronics.

For what's worth, GitHub actually renders STL as a 3D representation, if you click on the file, e.g. here [1]. (Just a random example, I'm in no way affialiated with the project).

Of course, it's still lacking important features, e.g. search parameters, etc, but... it could work.

[1] https://github.com/iliterobotics/3D/blob/master/Justin/Uncom...


It's cool, and there are open-source projects that can convert from STL to WebGL, so this kind of conversion is quite accessible, and e.g. GitLab could easily incorporate it as well (if they haven't already).

See e.g. https://threejs.org/examples/#webgl_loader_stl


While I know GitHub does that (see, e.g., https://github.com/kragen/stl3dpy/blob/master/showerring.stl) I think it's lacking a lot of things to be a reasonable Thingiverse replacement. It can render STL files, but not OpenSCAD or STEP/IGES, for example, and it has no way of associating different files (even files it can't render) to a single "thing" the way Thingiverse does. From GitHub's point of view, your example is a random file that belongs to a project named "3D", and mine is a random file that belongs to a project named "stl3dpy". This poses obvious problems for implementing search.


Oh wow. Not sure how I missed that, thanks.

Considering hardware projects are just software (CAD files, schematics, diagrams, documentation) I’d love to see Github or Gitlab or someone take this on.


https://prusaprinters.org is not gcode only. It supports all sorts of formats like STL.

Personally, I will only run gcode I've generated myself on my machine, but it's a fair experiment to run. I haven't run across any postings on prusaprinters that don't provide a proper STL or OBJ.


I’ve been out of the loop, why the makerbot no-love? Curious.


https://en.wikipedia.org/wiki/MakerBot#Closed_source_hardwar...

The 2nd item there was generally the main one. eg Going back on the Open Source nature of their work, patenting progressive ideas contributed by their Community members, etc.


This project is CC BY-NC-SA 4.0 licensed (NC = non-commercial). I don't think you would be allowed to make income from building products based on the design.


It could be opt-in like on other sites of this nature. Just like you can choose the license of your project on GitHub.


Thingiverse has that feature and it even displays a summary of what you are allowed to do:

https://www.thingiverse.com/thing:3660755

Open Source STM32 Multimeter case by embedblog is licensed under the Creative Commons - Attribution - Non-Commercial - Share Alike license.

What does this mean?

    Remixing or Changing this Thing is allowed.
    Commercial use is not allowed.


Yeah I'm not a fan of 'non-commercial'.

I am a staunch fan of GPL. If you want to reproduce my physical stuffs I've released, be my guest.

If you make changes, you had better make them available in accordance to the GPL. I'd like a PR on my repo, but that's a niceity- not a GPL requirement.

Some of my GPL3'd hardware:

RadioInstigator: https://hackaday.com/2019/06/05/mobile-sigint-hacking-on-a-c...

Repo: https://gitlab.com/crankylinuxuser/siginttablet

Closed Loop Controller for 3d printers (steppers): https://gitlab.com/crankylinuxuser/closed_loop_system


I agree, but it seems the copyright/editorial use comes up a lot more for 3d model platforms. It seems to differ from typical github usage. I feel it puts it closer to a stock photography type site, except more often the popular works are actual copies of copyrighted/trademarked products. Any thoughts on this?


An interesting legal issue here is that probably many 3-D designs are not copyrightable. Copying machine parts and similar functional designs is legal in the US, the UK, and most industrialized countries, except in the narrow cases covered by patents. Sculpture is copyrightable, but gears and bottlecaps are not. I'm not sure if there is explicit caselaw on this, but almost certainly parametric OpenSCAD designs are copyrightable, being textual works of creative expression in the same vein as Python programs or TrueType fonts; not sure about STEP/IGES parametric designs, although logically the same principles should apply.

So most Thingiverse designs that are copies of existing products are probably entirely legal, or legal except in a very few countries where they infringe Saudi laws about nudity depictions or patents or something, but by the same token, in many cases the licenses of the Thingiverse Things will not be usefully enforceable, because the STL (or perhaps a resampled version thereof) is statutorily not subject to copyright.


I see it as more a place for makers/hackers to post complete projects others can replicate. Be it a 3D printing project, or an electronics one with various components. Something like Thingiverse meets Instructables meets Github.

We’ve talked about it plenty at Hackerspaces I’ve been part of, and there’s various attempts at it but none seem to hit the spot the creators are after.

https://hackaday.io is probably the closest but the UI is a mess, there’s no previewing of the files, etc.

I’m literally picturing something like Github with file previewing and some other features added. Love the idea of having issue/bug reports, file versioning for iterations, forking, etc etc.

Of course you’d get content thieves posting stuff that’s not theirs, but you get that on all sites with UGC and it could be moderated/reported.


GNU MediaGoblin started as a photo-sharing system (a flickr alternative, I suppose) but has support for 3D models and a plugin system for other file types. It seems like adding support for STL and so on would be within the project's goals.


What's the reason behind the dislike of MakerBot, and who is that someone you don't wish to support?


They took some things private that had been open.


Their 'betrayal' of the maker community occured in the not too distant past.


Why doesn’t grabcad work? It seemed ok for 3D cad at least, but I haven’t worked a lot with it.


The safety! Safety is the most important part in my opinion.

I've bought a DSO138 DIY Oscilloscope Kit clone in eBay and I'm scared to connect it to 220V main line because I've not reliable information or safety warranties (It's a clone, not the DYE Tech certified one).

Not everybody cares about safety as they should.


Hmm? I don't get this.

If you're talking about the power adapter, you can buy a reputable one (it's external to the scope).

If you're talking about measurements on 220V equipment, just buy a genuine Digilent (or other brand) probe with 10x attenuation for about $20, then you can have complete faith in that the scope electronics will only see signals < 48V, which is completely safe.


My bad! I was a bit drunk when posted that. I was talking about viewing the sine AC wave in the scope. Didn't try yet but I expect a funny smelly 'poof' and mainline fuses pop up. Probably my curiosity will finish blowing everything up just for confirmation. lol

You talk like you trust quite much in Digilent. I'll keep it in mind when looking for some instrumentation. Thanks a lot!


Well, you do what I do with any electronics I create, place it on some ventilated area where fire can't spread, have long cables with switches far from the equipment, do any work with power off (after waiting for any capacitor discharge), and wait for the "tshhhhh" every so often.

After it is well tested (measuring temperatures is hard, but doable) and you are confident it works, you can use it normally.


No worries. Looking at the sine AC wave should be fine. If you get a "10X" probe or one that has a 1X/10X switch, what happens in 10X mode is that the voltage gets divided by 10 through a resistor, so your multimeter should see 22V RMS sine wave (peak value should be 31V).


We lived with quite safe electronics for quite a while so many don't even think about safety. If you experienced 230V AC through your body, you will think quite differently.


This is literally what currently prevents me from doing DIY IoT projects at home. I'm not proficient enough in hardware to build battery-powered items, and I'm scared of leaving unattended anything I built that's powered off a wall wart.


To loss the fear just experiment with some safety and take measurments. You can let plugged a new project during some hours to look if it makes nasty things or not.

Anyway, I really encourage you to doing DIY projects at home. Most of them work in low voltages between 5 and 3.3V, risks are close to nothing.


You start caring after a couple of good 120VAC jolts through your torso. You'll probably survive that if it isn't too hot that day, and you don't get unlucky and grab the line. 220VAC, though, better not learn the hard way

Che, no te importa si cuelgo de tu wifi, o sí?


Didn't feel 120V, but 220V is a weird experience. It's not the spiky puncture of a car's spark plug, it's like a scary wave flowing through you. As cool as deadly. (Kids, don't try at home!)

Oiga! Yo le subo wifi, usted baje unas chelas fresquitas! :p


I’ve been buzzed by 120 quite a few times. Never 220 though. I also got shocked by about 800 volts from a tube radio once, which lit me up pretty good. Fortunately that was pretty low amperage I think.


This looks like a fun project but I would hesitate to use it on a regular basis. There are actual "DMM" chips[1][2] which have the correct filter network on the inputs to avoid common pitfalls (like reading the noise level as a DC offset) and while they typically are designed to drive an LCD display it is easier to hook up a microcontroller to demux what they are driving then it is to design analog circuitry that does what their front end does. So its a trade off of where your expertise lies.

Back in the way back times Steve Ciarcia wrote an article on doing this with a BASIC program talking to a board with a DMM chip called "Try an 8 channel DVM Cocktail." It used the MC14433 which Microchip manufactured as the TC14433 (http://ww1.microchip.com/downloads/en/devicedoc/21394d.pdf)

[1] 3 3/4 digit -- https://www.digikey.com/product-detail/en/maxim-integrated/M...

[2] 4 1/2 digit -- http://ww1.microchip.com/downloads/en/DeviceDoc/21459E.pdf


There's also this: https://store.digilentinc.com/dmm-shield-7-function-digital-... from Digilent. Haven't tried it, but it looks interesting.


That is pretty cool, it uses the HY3131 chip (http://www.hycontek.com/wp-content/uploads/DS-HY3131_EN.pdf) and is another example of an entity that has the resources to design a robust analog front end just using one in a chip.

FWIW I ordered one to see if I can get it working on one of my many ST Micro Nucleo boards.


FWIW, the Ciarcia article is in the December 77 issue of BYTE magazine and can be read here: https://archive.org/details/byte-magazine-1977-12/page/n77


For anyone interested in the analog front end design, there's a great chapter in the Art of Electronics 3rd edition that goes over the design of the analog front-end of an autoranging Fluke meter.

Pretty sure it's chapter 5.


This epitomizes the difference between open source and commercial:

- looks like crap

- missing a ton of regular expected features

- has a couple features that you'll find nowhere else

- you'll spend more time getting it working than using it

But damn is it awesome.


This probably the most trivial part of this whole project, but choosing a nice font for that LCD just makes the whole package look that much more professional. Beautiful work.


If this project actually pulled it off properly (haven't dug deep enough to be sure), I really like the ability to measure current and voltage simultaneously: this is the one thing I wish a fluke-level DMM could do.


The measurement methods for current and voltage are different. Current is usually measured by inserting a small resitor in the circuit and measure the voltage over the resitor. You would need at least three cables to measure both current and voltage simultaneously. And the SMT32 would need to do (alternating) measurements on two voltage channels.


> And the SMT32 would need to do (alternating) measurements on two voltage channels.

The STM32 part used in this project has two ADCs that can be triggered simultaneously, so you can actually do two readings at once.


I am missing a hefty fuse on those inputs. The thing is a deathtrap :(


What this thing lacks is overload protection, not fuse (it even has fuse on the current input).

Placing fuses on voltage and resistance inputs does not make much sense as the input impedance should be high enough that any sane voltage will not cause any damage (MCP6072's datsheet does not explicitly state the safe maximum current through internal clamping diodes, but it is probably safe to assume that it will be at least 1mA, which works out to 1kV on input), excluding high voltage transient surges, which is what the Cat ratings are really about and should be handled by some kind TVS network across the inputs or after the first attenuator (in which case the series resistor of the attenuator might in fact behave like a fuse).

The current circuit is somewhat more complex for overload protection. Common solution involves placing two antiparallel accross the sense resistor such that the fuse will reliably blow before the sense resistor and following frontend (neat trick in many HP designs is using shorted diode bridge with the DC-side short being actively driven by voltage follower. This causes the diodes to be mostly fully closed outside of failure conditions and thus minimizes any non-linearities inherent in large power diode).


I love seeing STM32s in these roles. Such fun and versatile parts.


I love this project!

It's great to read about design judgment that takes off in terribly useful directions the market can't seem to follow.


What a nice project.


While this is a wonderful project, it shall be pointed out that this is "open source" in the stricter meaning of the term.


No autoranging -> won't survive a week. I know because I have in the past burned up a few analog multimeters which did not have autoranging.


What? Autoranging has absolutely no impact on whether you will damage a digital multimeter or not. If you select too low of a range it will simply display overload but not cause any damage on a meter worth it's salt.

Now, if you connected it to something above the specification of the meter or perhaps tried reading a voltage in ammeter mode, that's user error and completely your own fault and wouldn't have been prevented by autoranging.


Set the range to 0.1v and try measuring 500v. Then get back to me. Disclaimer: I'm not responsible for your burned out multimeter.


Wow. Analog ultimeters are hard rocks if you take some cautions when handling it. Starting from the highest range and going to a lower one if it's too big must be enough.

Mine one is a cheap 35 euros analog multimeter and it's working fine since the last 12 years.

Just be careful and pay special attention when handling electricity.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: