MoreRSS

site iconHackaday

Hackaday serves up Fresh Hacks Every Day from around the Internet. Our playful posts are the gold-standard in entertainment for engineers and engineering enthusiasts.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of Hackaday

激光、加尔沃斯、行动 精通激光的探索

2024-11-23 08:00:59

Custom built RGB laser firing beam

If you’re into hacking hardware and bending light to your will, [Shoaib Mustafa]’s latest project is bound to spike your curiosity. Combining lasers to project multi-colored beams onto a screen is ambitious enough, but doing it with a galvanomirror, STM32 microcontroller, and mostly scratch-built components? That’s next-level tinkering. This project isn’t just a feast for the eyes—it’s a adventure of control algorithms, hardware hacks, and the occasional ‘oops, that didn’t work.’ You can follow [Shoaib]’s build log and join the journey here.

The nitty-gritty is where it gets fascinating. Shoaib digs into STM32 Timers, explaining how modes like Timer, Counter, and PWM are leveraged for precise control. From adjusting laser intensity to syncing galvos for projection, every component is tuned for maximum flexibility. Need lasers aligned? Enter spectrometry and optical diffusers for precision wavelength management. Want real-time tweaks? A Python-controlled GUI handles the instruments while keeping the setup minimalist. This isn’t just a DIY build—it’s a work of art in problem-solving, with successes like a working simulation and implemented algorithms along the way.

If laser projection or STM32 wizardry excites you, this build will inspire. We featured a similar project by [Ben] back in September, and if you dig deep into our archives, you can eat your heart out on decades of laser projector projects. Explore Shoaib’s complete log on Hackaday.io. It is—literally—hacking at its most brilliant.

自制一个有用的电阻器十年盒

2024-11-23 05:00:46

If you’ve ever worked with guitar pedals or analog audio gear, you’ve probably realized the value of a resistor decade box. They substitute for a resistor in a circuit and let you quickly flick through a few different values at the twist of a knob. You can still buy them if you know where to look, but [M Caldeira] decided to build his own.

At its core, the decade box relies on a number of 11-position rotary switches. Seven are used in this case—covering each “decade” of resistances, from 1 ohm to 10 ohm and all the way up to 1 megaohm. The 11 positions on each switch allows the selection of a given resistance. For example, position 7 on the 100 ohm switch selects 700 ohms, and adds it to the total resistance of the box.

[M Caldeira] did a good job of building the basic circuit, as well as assembling it in an attractive, easy-to-use way. It should serve him well on his future audio projects and many others besides. It’s a simple thing, but sometimes there’s nothing more satisfying than building your own tools.

We’ve seen other neat designs like this in the past, including an SMD version and this neat digital decade box. Video after the break.

无痛安装 OLED 屏幕

2024-11-23 03:30:35

There was a time when no self-respecting electronics engineer would build a big project without at least one panel meter. They may be a rare part here in 2024, but we find ourselves reminded of them by [24Eng]’s project. It’s a 3D printed housing for one of those common small OLED displays, designed to be mounted on a panel with just a single round hole. Having had exactly this problem in the past trying to create a rectangular hole, we can immediately see the value in this.

It solves the problem by encasing the display in a printed shell, and passing a coarsely threaded hollow cylinder behind it for attachment to the panel and routing wires. This is where we are reminded of panel meters, many of which would have a similar sized protrusion on their rear housing their mechanism.

The result is a neatly made OLED display mounting, with a hole that’s ease itself to create. Perhaps now you’ll not be afraid to make your own panels.

自我黑客:解除碰撞警报

2024-11-23 02:00:17

Ever get home, tired after work, sit down on a couch, and spend an hour or two sitting down without even managing to change into your home clothes? It’s a seriously unpleasant in-between state – almost comfortable, but you know you’re not really at rest, likely hungry, and even your phone battery is likely about to die. This kind of tiredness can get self-reinforcing real quick – especially if you’re too tired to cook food, or you’re stuck in an uncomfortable position. It’s like the inverse of the marshmallow test – instead of a desire, you’re dealing with lack thereof.

I’ve been dealing with this problem a lot within the last two years’ time. Day to day, I could lose hours to this kind of tiredness. It gets worse when I’m sick, and, it’s gotten worse on average after a few bouts of COVID. It’s not just tiredness, either – distractability and tiredness go hand in hand, and they play into each other, too.

My conclusion, so far, was pretty simple. When I’m tired, delayed but proper rest is way better than “resting” in a half-alert state, even if that takes effort I might not have yet. So, it’s important that I can get up, even if I’m already in a “crashed” position. Sure, I could use tricks like “do not sit down until I’m ready to rest”, but that only works sometimes – other times, the tiredness is too much to handle.

Audio files and sound playback library in hand, negative reinforcement methods fresh in my mind, I went and cooked together a very simple solution.

Anti-Crash Script

When I noticed myself being tired and in a “crash” state, I would think “oh, no worries, I’m going to get up any minute now”. Of course, it was never just a minute, and I decided to hook into that realization, subsurface but close enough that I could justify some intervention to myself.

Would you be surprised if I told you the solution was to ring a siren into my headphones? The algorithm is simple – every time I’m “crashed” and planning to get up “real soon”, I press a button that starts a five-minute timer, programmed to ring a siren into my headphones. When the seconds stop ticking and the siren triggers, I have a choice – get up and then re-trigger the alarm for five more minutes. There is no second choice, really – I don’t give myself one. The part where I get up before turning the siren off is crucial, of course – though, in case of missing willpower, an accelerometer measuring activity could do as well.

Not that much of my willpower would be required – turned out, it typically would be enough of a shock to realize just how quickly five minutes have passed. Consistently, every time I got tired, time would pass much quicker than I could feel it, and the “oh damn it’s been five minutes already” thought made for a surprisingly powerful reality check.

Initially, the script was a tiny local webserver – I had some Flask examples fresh in my mental toolbox, so I took those and wrote two tiny HTML pages, crash and uncrash. The crash page received a seconds argument, indicating how many seconds to wait before ringing the alarm, and the uncrash page stopped the alarm. Keep the two webpages open, and hit Ctrl+R on the page I need – simple enough.

Resistance Is Counterproductive

Later on, I beautified the pages a little – adding background colours, so that it’d be easy for me to find the pages in my laptop’s window switcher and not get confused between them. That was my first attempt to make the crash/uncrash “hooks” more accessible – since, unsurprisingly, having to Alt-Tab a couple times before finding the right page required some mental energy, so I would often forget about them altogether, and developing a habit of using these pages was significantly harder. Thinking back to the very first article and principles I outlined in it – reducing resistance to use was a must.

So, the “crash” webpages got turned into keybinds accessible on my laptop globally. Surprisingly, despite the crash endpoint’s arbitrary integer delay, I didn’t need much granularity. Right now, I only use three buttons , “uncrash”, “crash in 300 seconds” (5 minutes), and “crash in 1 second” (immediate). The “immediate crash” button was a surprisingly helpful one, too. See, the “oh, five minutes truly can pass quicker than expected” lesson has stuck with me – so, when I’d notice myself crashing, I knew better than to waste time trusting in the “just a few minutes” notice.

The keybinds got me to use the script more often – which has helped me find more usecases, and use it even when I’m not sick or super tired. Really, most of the trouble nowadays is noticing when I need to press the button – which, generally, is in the mornings, when I am still groggy and a scheduled appointment might not feel as important as it actually is.

One important aspect turned out to be retriggering the alarm instead of turning it off after five minutes. I get up either way, but usually, the crash doesn’t – I might “crash” immediately afterwards, or a minute-two later. Stopping the alarm ended up being a very intentional “crash is over” decision – so, the “stop” button never got into my muscle memory. I’ve indeed had muscle-memory cycle restarts, giving myself five more minutes without realizing – but I’ve never had muscle-memory stops, which is nice, because stopping the script without even realizing it would be a critical failure condition.

Retrospective: It’s Great, Somehow

Anything missing? Definitely! For one, there are some good keybinds I could add, even if maybe they wouldn’t fundamentally impact how the script is functioning. Say I’ve woken up, and I have to get somewhere early – so I use the “crash” script to get up and get with the gravity of my current situation. As I run around the house doing morning chores, five minutes pass and the alarm rings again, even though I’m currently actively doing something around the house.

Now, running back to the laptop and pressing a keybind isn’t a problem. The problem is that I could be pressing the “reset alarm” button in two different states – either I’m doing well, or I’m not, but it’s the same button. Making two different buttons, one “doing good” and one “still crashed”, would help me collect metadata I could use for a good purpose – and, quite likely, add a trigger for some sort of positive reinforcement.

Other than that? This script has eliminated yet another common failure mode from my life – and, once again, helped improve focus. It’s as simple as simple goes, and, it’s gotten me to a more comfortable point – often, making a difference between an evening lost to tiredness, and an evening of recuperation.

One thing you might notice – to actually work properly, this script requires always-on, wireless headphones. In the next article, I’ll talk about the wireless headphone device I’ve built, why I had to build one instead of buying one, and how that device has helped me solved a bunch of other problems I didn’t realize I had.

Enhiker 帮您判断今天是否适合远足

2024-11-23 00:30:00

Many of us check the weather before heading out for the day — we want to know if we’re dressed (or equipped) properly to handle what Mother Nature has planned for us. This is even more important if you’re going out hiking, because you’re going to be out in a more rugged environment. To aid in this regard, [Mukesh Sankhla] built a tool called Enhiker.

The concept is simple; it’s intended to tell you everything you need to know about current and pending conditions before heading out on a hike. It’s based around Unihiker, a single-board computer which also conveniently features a 2.8-inch touch screen. It’s a quad-core ARM device that runs Debian and has WiFi and Bluetooth built in, too. The device is able to query its GPS/GNSS receiver for location information, and then uses this to get accurate weather data online from OpenWeatherMap. It makes some basic analysis, too. For example, it can tell you if it’s a good time to go out, or if there’s a storm likely rolling in, or if the conditions are hot enough to make heat stroke a concern.

It’s a nifty little gadget, and it’s neat to have all the relevant information displayed on one compact device. We’d love to see it upgraded further with cellular connectivity in addition to WiFi; this would make it more capable when out and about.

We’ve seen some other neat hiking hacks before, too, like this antenna built with a hiking pole. Meanwhile, if you’ve got your own neat hacks for when you’re out on the trail, don’t hesitate to let us know!