Taking a paper list to the grocery store seems like a good idea, at least until you get there and try to use it. Did you remember to bring a pen? Great. How about a clipboard so you don’t punch through the paper when crossing something off? Apps are easier to use for this, especially the ones with checkboxes, but you’ll still have to enter everything manually. Wouldn’t it be easier (and way more fun) to just scan the barcodes of stuff you need into a list before you chuck the packaging?
That’s exactly the idea behind [DavidE281]’s barcode scanner, which is designed to work with the Bring! app. All he has to do is scan a barcode, and the product ends up in a tidy list on his phone. It’s a simple build that’s based around the M5StickC, which is an ESP32 dev kit that has a small display and a 6-axis IMU along with some other goodies. [David] combined it with a 2D barcode scanner that has a serial port and designed a printed case that joins them together.
Here’s how it works: the M5Stick sends the barcode over MQTT to an external Raspberry Pi that’s running Home Assistant. The Pi does a lookup in a spreadsheet and sends the data to the Bring! app over a community-built API. At the same time, it sends the product name back to the M5Stick’s display to confirm that it was added to the list. Check out bite-sized demo video after the break.
Scanning barcodes is super fun. So why not use an IoT barcode scanner to keep track of everything you own?
Continue reading “Tiny Barcode Scanner Beeps Your Shopping List Together”
Star Trek had really smart computers, that you could simply tell what you wanted to do and they did it. The [Rzeppa] family has started a plain English compiler. It runs under Windows and appears to be fairly capable.
Plain language programming isn’t exactly a new idea. COBOL was supposed to mimic natural language with statements like:
MULTIPLY HOURS BY RATE GIVING PAYAMOUNT
You could argue this didn’t go over very well, but there is still a whole lot of COBOL doing a whole lot of things in the business world. Today computers have more memory and speed, so programmers have been getting more and more verbose for decades. No more variable names such as
fprdx. Maybe this will catch on.
Continue reading “Programming In Plain English”
What is this world coming to when you spend seven bucks on a digital scale and you have to completely rebuild it to get the functionality you need? Is nothing sacred anymore?
Such were the straits [Jan Henrik] found himself in with his AliExpress special, a portable digital scale that certainly looks like it’s capable of its basic task. Sadly, though, [Jan] was looking for a few more digits of resolution and a lot more in the way of hackability. And so literally almost every original component was ripped out of the scale, replaced by a custom PCB carrying an STM32 microcontroller and OLED display. The PCB has a complicated shape that allows the original lid to attach to it, as well as the stainless steel pan and load cell. [Jan] developed new firmware that fixes some annoying traits, for example powering down after 30 seconds, and adds new functionality, such as piece-counting by weight. The video below shows some of the new features in action.
Alas, [Jan ] reports that even the original load cell must go, as it lacks the accuracy his application requires. So he’ll essentially end up building the scale from scratch, which we respect, of course. At this rate, he might even try to build his own load cell from SMD resistors too.
Continue reading “Cheap Lab Balance Needs Upgrades, Gets Gutted Instead”
For years, [Michael Davis] has been using a large lead-acid battery to power the electronic components of his custom Dobsonian telescope; but that doesn’t mean he particularly enjoyed it. The battery was heavy, and you always had to be mindful of the wires connecting it to the scope. Looking to improve on the situation somewhat, he decided to build an adapter for Ryobi cordless tool batteries.
[Michael] had already seen similar 3D printed adapters, but decided to make his the traditional way. Well, sort of. He used a CNC router to cut out the distinctive shape required to accept the 18 V lithium-ion battery pack, but the rest was assembled from hardware store parts.
Bent mending plates with nuts and bolts were used to create adjustable contacts, and a spring added to the top ensures that there’s always a bit of tension in the system so it makes a good electrical contact. This setup makes for a very robust connector, and as [Michael] points out, the bolts make a convenient place to attach your wires.
With the logistics of physically connecting to the Ryobi batteries sorted out, the next step was turning that into useful power for the telescope. A stable 12 V is produced by way of a compact DC-DC converter, and a toggle switch and fuse connect it to a pair of automotive-style power sockets. Everything is held inside of a wooden box that’s far smaller and lighter than the lead-acid monster it replaced, meaning it can get mounted directly to the telescope rather than laying on the ground.
If you want to build a similar adapter, the 3D printing route will potentially save you some time and effort. But we have to admit that the heavy-duty connection [Michael] has rigged up here looks quite stout. If you’ve got an application where the battery could be knocked around or vibrated lose, this may be the way to go.
We’re suckers for some retro electronics here at Hackaday, so we were fascinated when Daniel Valuch wrote to us with some pictures of his findings in his CERN lab’s archive. He works on Linear Accelerator 3, which has had an extended downtime after many decades of continuous operation, for major upgrades and overhauls. Part of the upgrade involves the removal of electronic assemblies dating back as far as the 1970s, and he’s shared his fascination with them as he trawls through dusty filing cabinets in the lab basement.
What it reveals is a world before the CAD and microcontrollers we know, instead here are circuits using the electronic building blocks of logic gates, discretes, and op-amps. PCBs are laid out not with the KiCad that CERN are famous in our community for today, but on acetate, with transfers and tape. A ground plane is even hand-carved from a red sheet. Oddly though it isn’t a world without CNC, because in the pouch with a design from 1974 is a roll of punched paper tape. If you have ever pondered the “Numerical” in “Computer Numerical Control”, here are the numbers in physical form.
For those of us who were trained in this type of electronic design, the convenience of a PCB CAD package and a professionally-made PCB at the click of a mouse is nothing short of miraculous. But seeing personally laid boards of this quality reminds us that seeing the hand of the designer in them is something few engineers today (with the possible exception of Boldport) manage to recreate.
Intel announced CrossTalk, a new side-channel attack that can leak data from CPU buffers. It’s the same story we’ve heard before. Bits of internal CPU state can be inferred by other processes. This attack is a bit different, in that it can leak data across CPU cores. Only a few CPU instructions are vulnerable, like RDRAND, RDSEEED, and EGETKEY. Those particular instructions matter, because they’re used in Intel’s Secure Enclave and OpenSSL, to name a couple of important examples.
Continue reading “This Week In Security: Crosstalk, TLS Resumption, And Brave Shenanigans”
On small CPUs, you often don’t have a multiply or divide instruction. Of course, good programmers know that shifting right and left will multiply or divide by a power of two. But there are always cases where you need to use something that isn’t a power of two. Sometimes you can work it out for multiplication.
For example, multiplying by 10 is common when dealing with conversion between binary and decimal. But since
10n is equal to
8n+2n, you can express that as a bunch of left shift three times to multiply by eight, adding that value to your original value shifted left once to multiply by two.
But division is a different problem.
n/10 does not equal
n/8-n/2 or anything else simple like that. The other day a friend showed me a very convoluted snippet of code on Stack Overflow by user [realtime] that divides a number by 10 and wanted to know how it worked. It is pretty straightforward if you just stick with the math and I’ll show you what I mean in this post. Turns out the post referenced the venerable Hacker’s Delight book, which has a wealth of little tricks like this.
Continue reading “Binary Math Tricks: Shifting To Divide By Ten Ain’t Easy”