Researching Factorio…For Science

Science has affirmatively answered a lot of questions that, looking back, could be seen as bizarre to have asked in the first place. Questions like “can this moldy cheese cure disease” or “can this rock perform math if we give it some electricity.”  Among the more recent of this list is the question of whether or not the video game Factorio, in which the player constructs an elaborate factory, can be used as the basis for other academic work. As [Kenneth Reid] discusses in this talk, it most certainly can.

If you haven’t played the game, it’s a sort of real-time strategy (RTS) game where the player gathers materials to construct a factory while defending it from enemies. On the surface it might seem similar to Age of Empires or Starcraft, but its complexity is taken to extremes not found in other RTS games. The complexity hides nuance, and [Kenneth] points out that it’s an excellent simulator to study real-world problems such as vehicle routing problems, decision making, artificial intelligence, bin packing problems, and production planning, among a whole slew of other interesting areas of potential research.

[Kenneth] and his partners on this project also developed some software tools with interacting with a Factorio game without having to actually play it directly. The game includes an API which the team used to develop tools so that other researchers can use it as a basis for simulations and studies. There was a research paper published as well for more in-depth reading on the topic. We shouldn’t be too surprised that a game can be used in incredibly productive ways like this, either. Here’s another example of a toy being used to train engineers working in industrial automation.

Continue reading “Researching Factorio…For Science”

Giving Environmental Readouts Some Personality

Air Quality Index for one’s region can be a handy thing to know, but it’s such a dry and humorless number, isn’t it? Well, all that changes with [Andrew Kleindolph]’s AQI Funnies: a visual representation of live AQI data presented by a friendly ghost character in a comic panel presentation. The background, mood, and messaging are all generated to match the current conditions, providing some variety (and random adjectives) to spruce things up.

We love the attention paid to the super clean presentation, and the e-paper screen looks fantastic. Inside the unit is a Raspberry Pi using Python to talk to the AirNow.gov API to get local conditions and update every four hours (AirNow also has a number of useful-looking widgets, for those interested.)

The enclosure is 3D printed, and [Andrew] uses a Witty Pi for power management and battery conservation. The display is a color e-paper display that not only looks great, but has the advantage of not needing power unless the display is updating. The Pi can be woken up to update the screen with new info when needed, but otherwise can spend its time asleep.

[Andrew] has a knack for friendly presentations of information with an underlying seriousness, as we saw with his friendly reminders about nasty product recalls.

Deepdeck: Going Beyond The Macro Pad

We’re used to the idea of a macropad, a small extension keyboard for your computer whose keys can be programmed to the functions of your choice. They can be made in many ways, but they all follow a similar functionality. Deepdeck from [Nick Velasquez] is another matter, an attempt to make a macropad with functionality that goes way beyond simply pressing keys.

At its heart is an ESP32 module, and it makes full use of both Bluetooth and wireless networking capabilities. It can use Bluetooth when connecting to the host computer, and the wireless connection hosts both the configuration interface via a web server and an Internet connection from which it derives those special powers.  This is a macropad with programmable keys just like all the others, but it also has the ability to connect to online APIs programmed by the user. This allows it to automate complex queries involving other sources into a keypress, which gives it many more possibilities.

A tool such as this one is one of those things which requires a bit of thought as to exactly how it might be used. A normal API connected device might display the weather on a screen for instance, but how often does one need to type the weather forecast? However we can see that this extra online dimension will find as yet unseen applications, and we look forward to the idea being taken up with other macropads.

LED Heart Keeps Tabs On Your RuneScape Character

The MMORPG RuneScape holds a special place in the hearts of those who played it in the early 2000s. Sure it might seem exceptionally quaint by modern standards, but at the time it was groundbreaking stuff. Plus you could play it for free, which certainly helped get people onboard. While there’s a more modern build available, many who played the game from the early days prefer to stick with what they know, and continue to run a version of the game that has now become known as Old School RuneScape.

[Austin Blake] is one of those early adopters, and the work he put into this LED health indicator should tell you all you need to know about how dedicated he is to the classic game. The 3D printed heart holds an incredible 312 NeoPixel LEDs, which are controlled by a 5 volt compatible Arduino Nano Every located on the back side.  Both the color and “fill level” of the heart will change in real-time to correspond to the health of the player character.

Building the light itself was pretty straightforward, but getting the health value from the game was another story. As [Austin] explains in the video, his first attempt involved using Python and some image recognition routines to literally read the indicator off of the screen. The idea worked, and is frankly a fascinating hack worth keeping in mind on its own, but unfortunately it was too slow to provide the real-time feedback he was looking for.

Eventually he turned his attention to RuneLite, which is an open source client for Old School RuneScape. Thanks to its open source nature he could have hacked a routine to read the current health value and send it off to the Arduino, but thanks to a mature plug-in system, he didn’t have to.

The game’s API let him create a simple and reliable way of getting the data out of the game, similar to what we see in the flight simulator community for driving physical gauges and displays. RuneLite features a repository of community-developed plugins, and [Austin] says that he’d be happy to submit his for inclusion if others are interested in building similar indicators — a perfect match for this motion-sensing RuneScape axe.

Continue reading “LED Heart Keeps Tabs On Your RuneScape Character”

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.

Hackaday Links Column Banner

Hackaday Links: March 13, 2022

As Russia’s war on Ukraine drags on, its knock-on effects are being felt far beyond the eastern Europe theater. And perhaps nowhere is this more acutely felt than in the space launch industry, seeing that at least until recently, Russia was pretty much everyone’s go-to ride to orbit. All that has changed now, at least temporarily, and has expanded to include halting sales of rocket engines used in other nations’ launch vehicles. Specifically, Roscosmos has put an end to exports of the RD-180 engine used in the US Atlas V launch vehicle, along with the RD-181 thrusters found in the Antares rocket. The loss of these engines may be more symbolic than practical, at least for the RD-180 — United Launch Alliance stopped selling launches on Atlas V back last year, and had secured the engines it needed for the 29 flights it has booked by that April. Still, there’s some irony that the Atlas V, which started life as an ICBM aimed at the USSR in the 1950s, has lost its Russian-made engines.

Bad news for Jan Mrázek’s popular open-source parametric search utility which made JLCPCB’s component library easier to use. We wrote about it back in 2020, and things seemed to be going fine up until this week, when Jan got a take-down request for his service. When we first heard about this, we checked the application’s web page, which bore a big red banner that included what were apparently unpleasant accusations Jan had received, including the words “reptile” and “parasitic.” The banner is still there, but the text has changed to a more hopeful tone, noting that LCSC, the component supplier for JLC’s assembly service, objected to the way Jan was pulling component data, and that they are now working together on something that everyone can be happy with. Here’s hoping that the service is back in action again soon.

Good news, everyone: Epson is getting into the 3D printer business. Eager to add a dimension to the planar printing world they’ve mostly worked in, they’ve announced that they’ll be launching a direct-extrusion printer sometime soon. Aimed at the industrial market, the printer will use a “flat screw extruder,” which is supposed to be similar to what the company uses on its injection molding machines. We sure didn’t know Epson was in the injection molding market, so it’ll be interesting to see if expertise there results in innovation in 3D printing, especially if it trickles down to the consumer printing market. Just as long as they don’t try to DRM the pellets, of course.

You can’t judge a book by its cover, but it turns out that there’s a lot you can tell about a person’s genetics just by looking at their face. At least that’s according to an AI startup called FDNA, which makes an app called “Face2Gene” that the company claims can identify 300 genetic disorders by analyzing photos of someone’s face. Some genetic disorders, like Down Syndrome, leave easily recognizable facial features, but some changes are far more subtle and hard to recognize. We had heard of cases where photos of toddlers posted on social media were used to diagnose retinoblastoma, a rare cancer of the retina. But this is on another level entirely.

And finally, working in an Amazon warehouse has got to be a tough gig, and if some of the stories are to be believed, it borders on being a horror show. But one Amazonian recently shared a video that showed what it’s like to get trapped by his robotic coworkers. The warehouse employee somehow managed to get stuck in a maze created by Amazon’s pods, which are stacks of shelves that hold merchandise and are moved around the warehouse floor by what amounts to robotic pallet jacks. Apparently, the robots know enough to not collide with their meat-based colleagues, but not enough to not box them in. To be fair, the human eventually found a way out, but it was a long search and it seems like another pod could have moved into position to block the exit at any time. You could see it as a scary example of human-robot interaction gone awry, but we prefer to look at it as the robots giving their friend a little unscheduled break away from the prying eyes of his supervisor.

Filament Dry Box Design Goes Way Over The Top

There’s a fine line between simple feature creep and going over the top when it comes to project design. It’s hard to say exactly where that line is, but we’re pretty sure that this filament dry box has at least stepped over it, and might even have erased it entirely.

Sure, we all know the value of storing 3D printer filament under controlled conditions, to prevent the hygroscopic plastics from picking up atmospheric moisture. But [Sasa Karanovic] must really, REALLY hate the printing artifacts that result. Starting with a commercially available dry box that already had a built-in heating element, [Sasa] took it to the next level by replacing the controller and display with an ESP32. He added a fan to improve air circulation inside the enclosure and prevent stratification, as well as temperature and humidity sensors. Not satisfied with simply switching the heating element on and off at specific setpoints, he also implemented a PID loop to maintain a constant temperature. And of course, there’s a web UI and an API available for third-party control and monitoring.

The video below details [Sasa]’s design thoughts and goes into some detail on construction and performance. And while we may kid that this design is over-the-top, what really comes through is that this is a showcase for design ideas not only for one application, but for hardware projects in general. There are certainly simpler heated dry box designs, and zero-cost solutions as well, but sometimes going overboard has its own value too.

Continue reading “Filament Dry Box Design Goes Way Over The Top”