Scanning Receipts Proves Trickier Than Anticipated

It’s one of those things that certainly sounds simple enough: take a picture of a receipt, run it through optical character recognition (OCR), and send the resulting information to whatever expense-tracking website or software you wish. There are companies that offer such a service, so it can’t be too difficult to replicate on your own…right?

That’s what [Marcel Robitaille] thought when he set out to create his homebrew “Receipt Ingestion” system, anyway. But in reality it took so much time to troubleshoot and implement that he says it would have been faster to just enter in all his receipts by hand. We’re happy he stuck with it though, otherwise you wouldn’t be reading about it on Hackaday, and we wouldn’t be able to learn anything from the detailed account he’s provided.

It only took an evening to hack together a rough demo, and the initial results were very promising. The code could detect the edges of the receipt, rotate the captured image appropriately, and then pull out the critical information such as date, total amount, business name, etc. He was then able to decipher the API for Splitwise, an online service for splitting bills, by capturing the data sent by his browser while adding a new bill. With this information, writing up some Python code to push his captured data into the service was trivial. So far, so good.

Using a QR code as reference point.

But like so many horror films that begin with a happy family starting a new life in a beautiful home, there was a monster lurking in the shadows. It’s one thing to capture data from perfectly clean and flat receipts, but quite another to get any useful info out of one that spent half the day crumpled up in your back pocket. The promising proof of concept that worked a treat under controlled conditions failed completely in the real-world, with [Marcel] reporting that only 1 in 5 receipts he tried to scan actually went through.

In the end, [Marcel] realized that the best way to handle the unreliable condition of the receipts was to focus on a different object in the image. He came up with a QR code marker that he could put on the table with the receipt to be scanned, which his software can use as a known point of reference. This greatly improves the reliability of the image rotation and transformation, which in turn makes the OCR more reliable. It also makes it much easier to tell which images need to be scanned — if there’s no QR code found, the software just skips that shot and keeps looking.

The unique challenges of digitizing large amounts of printed content using OCR makes for some fascinating problem solving, and we’re glad [Marcel] shared this particular story with us. While there’s still some edge cases that need chasing down, he’s using the software on a nearly daily basis, and has posted it up on GitHub for anyone who might wish to build on his efforts.

2022 Sci-Fi Contest: A Star Wars Mouse Droid Of Your Very Own

The show-stealing droids of Star Wars, R2-D2 and C-3PO, are quite challenging to replicate at home, due to their size and complexity. [curiousmarc] had built the former, with much work going into drawing and design. The more humble Mouse Droid, as seen skittering about the halls of the Death Star, is a considerably easier build — especially with this somewhat improvised approach.

The build relies on reject parts from [curiousmarc]’s R2-D2 build, and other stuff laying around the house, like a toy eggbeater, a VFD, and other electronic bits and pieces. An RC car chassis was placed in the droid’s vacuum-formed shell in order to provide propulsion, with much of the rest of the work being decoration of the housing with various sci-fi ephemera. There’s also a pair of Arduinos inside, controlling the VFD, sound output, and the movable antenna dish on top.

It’s a build with a lot of personality. The sounds, flickering display, and moving antenna do a lot to imbue this droid with a soul, something Lucasfilm readily achieved with many of the robots in the series. It’s something we’ve also seen in robot companion builds from [Jorvon Moss], which are quite sci-fi in their own way, too. Video after the break.

Continue reading “2022 Sci-Fi Contest: A Star Wars Mouse Droid Of Your Very Own”

The Honda Takedown: How A Global Brand Failed To Read The Room

Perhaps the story of the moment in the world of 3D printing concerns a Japanese manufacturer of cars and motorcycles. Honda has sent a takedown notice requesting the removal of models starting with the word “Honda” to the popular 3D printing model repository site Printables. It’s left in its wake puzzlement, disappointment, and some anger, but what’s really going on? Perhaps it’s time to examine what has happened and to ponder what it means for those who put online printable parts and accessories for cars or any other item manufactured by a large corporation.

If You Make Something, What Rights Do You Have?

Soichiro Honda with his 1964 Formula 1 car
Soichiro Honda, famous for being an engineer rather than a serial litigator. Roderick Eime, CC BY 2.0.

The story is that as far as we can glean from reports online, the takedown notice was sent only to Printables by the European arm of Honda, and was pretty wide-ranging with any Honda-related model in its scope. Printables complied with it, but as this is being written there are plenty of such models available from Thingiverse and other model repository sites.

Anyone who makes a career in content creation has by necessity to have a working knowledge of copyright and intellectual property law as it’s easy for the unwary to end up the subject of a nasty letter, so here at Hackaday while we’re not lawyers this is a subject on which we have some professional experience. What follows then is our take based on that experience, our view on Honda’s motivation, and whether those of you who put up 3D models have anything to worry about. Continue reading “The Honda Takedown: How A Global Brand Failed To Read The Room”

Watch A Complete Reflector Telescope Machined From A Single Block Of Glass

If this is the easy part of making a complete reflector telescope from a single piece of glass, we can’t wait to get a load of the hard part!

A little backstory may be in order for those who don’t follow [Jeroen Vleggaar]’s Huygens Optics channel on YouTube. A few months ago, he released a video discussing monolithic telescopes, where all the reflective and refractive surfaces are ground into a single thick block of glass. Fellow optical engineer [Rik ter Horst] had built a few tiny monolithic Schmidt-Cassegrain reflectors for use in cube sats, so [Jeroen] decided to build a scaled-up version himself.

The build starts with a 45 mm thick block of crown glass, from which a 50 mm cylinder is bored with a diamond hole saw. The faces of the blank are then ground into complex curves to reflect incoming light, first off the parabolic rear surface and then onto the hyperbolic secondary mirror ground into the center of the front face. A final passage through a refracting surface in the center of the rear face completes the photons’ journey through the block of glass, squeezing a 275 mm focal length into a compact package.

All this, of course, vastly understates the work required to pull it off. Between the calculations needed to figure out the surface shapes in the first place to the steps taken to machine a famously unforgiving material like glass, every step is fraught with peril. And because the design is monolithic, any mistakes mean starting all over again. Check out the video below and marvel at the skills needed to get results like this.

What strikes us most about [Jeroen]’s videos is the mix of high-tech and age-old methods and materials used in making optics, which we’ve seen him put to use to make everything from tiny Tesla valves to variable-surface mirrors.

Continue reading “Watch A Complete Reflector Telescope Machined From A Single Block Of Glass”

Linux Fu: An Odd Use For Fork()

If you are a Star Trek fan, you’ll probably remember the phrase “You have to learn why things work on a starship.” The truth is, in most episodes, knowing how to override another ship’s console or make gunpowder didn’t come in very handy, but boy when it did, it really saved the day. Linux is a lot like that. There are a few things you probably don’t need to know very often, but when you do need to know, it makes a huge difference. In this particular post, I want to look at an odd use of the fork system call. For many purposes, you’ll never need to know this particular irregular use. But when you need it, you are really going to need it.

This is actually based on an old client of mine who used Unix to run a massive and very critical report every day.  The report had a lot of math since they were trying to optimize something and then generate a lot of reports. In those days, the output of the report was on old green-bar paper on a line printer. The problem was that the report took something like 14 hours to run including the printouts. If someone discovered something wrong, there was no time to run the report again because the next day’s report would have to start before the second run would finish.

The client had a bunch of Windows programmers and — at that time — there wasn’t anything really analogous to a real fork call in Windows. I looked at the code and realized that probably most of the code was spending time waiting to print the output. The computer had multiple CPUs and there were multiple printers, but that one program was hanging on the one printer. There was a lot of data, so writing it to a database and then running different reports against it wasn’t a great option. The answer was to use the power of fork. With a change in the code that took less than 30 minutes, the report ran in five hours. They were very pleased.

So how did I do it? The answer lies in how fork works. Just about every time you see a fork, you see some sort of exec call to start a new program. So if you think about fork at all, you probably think it is part of how you start a new program and, most of the time, that’s true. Continue reading “Linux Fu: An Odd Use For Fork()”

Modular Laptop Maker Provides Mainboard Documentation For Non-Laptop Projects

If you’ve been following the latest advancements in computing for a while, you already know that there’s a big problem with laptops: When they’re no longer useful as a daily driver, it can be a struggle to find a good use for all its parts. Everything is proprietary, and serious amounts of reverse engineering are required if you decide to forge ahead. This is where Framework, a laptop company building modular laptops comes in. They’ve made it clear that when you upgrade your Framework laptop with a new mainboard they want you to be able to continue to use the old mainboard outside of the laptop.

When it's done powering your laptop, use it for a cyberdeck?
When it’s done powering your laptop, use it for a cyberdeck?

To that end, Framework have provided 2D mechanical drawings of their mainboard and 3D printable cases that can of course be modified as needed. “But what about peripherals?” you might ask. Framework has provided pinouts for all of the connectors on the board along with information on which connectors to use to interface with them. No reverse engineering needed!

While it’s possible to buy a mainboard now and use it, their stated goal is to help people make use of used mainboards leftover from upgrades down the line. With just a stick of memory and a USB-C power adapter, the board will spring to life and even has i2c and USB immediately available.

What would you do with a powerful Intel i5-1135G7 mainboard? Framework wants to know, and to that end, they are actually giving away 100 mainboards to makers and developers. Mind you this is a program created and ran by Framework — and is not associated in any way Hackaday or our overlords at Supplyframe.

If you’ve read this far and still don’t know what the Framework laptop is, go check out this introduction by our own [Jenny List].

Hoverbike Turns Hoverboard Into Ebike

Hoverboards were a popular trend with the youths and in-crowd a few years ago, and now that the fad has largely died out there are plenty of them sitting unused in closets and basements around the world. That only means opportunities to put the parts from these unique transportation devices into other builds. A more practical method of transportation is a bicycle, and this build scavenges most of the parts from a hoverboard to turn a regular bicycle into a zippy ebike.

This bike build starts with a mountain bike frame and the parts from the hoverboard are added to it piece by piece. The two motors are mounted to the frame and drive the front chain ring of the bike, allowing it to still take advantage of the bike’s geared drivetrain. Battery packs from two hoverboards were combined into a single battery which give the bike a modest 6-10 km of range depending on use. But the real gem of this build is taking the gyroscopic controller board from the hoverboards and converting it, with the help of an Arduino Due, to an ebike controller.

Eventually a battery pack will be added to give the bike a more comfortable range, but for now we appreciate the ingenuity that it took to adapt the controller from the hoverboard into an ebike controller complete with throttle and pedal assist. For other household objects turned into ebikes, be sure to check out one of our favorites based on a washing machine motor: the Spin Cycle.