Tag Archives: wallabag — all feed

PCB Friday: Coin Cell Battery Holder via Carefully Formed PCB

estimated reading time: 5 min

Coin cell battery power: how to hold it?

As hackers, we often consider the fun parts of a design first, then think about how to power it later. Maybe it’s natural to leave the boring, known-ish stuff until later, but if you don’t get this fundamental part settled, you don’t have a project.

For really low-power applications, a coin cell (CR2032 or CR2016) battery can be a great choice, but holding them means another component on your BOM, more soldering, and an additional point of failure. Or does it? As I’ll outline in this post, a properly formed PCB footprint can actually act as the holder itself, eliminating a component and its assembly. Whether or not this reduced the chance of failure is still an open question, since PCBs can break or simply bend over time.

Coin cell battery cutout options

So as not to bury the lede – or lead– below are links to several of my PCB coin cell holder designs:

Nominally, such designs use a 0.8mm thick PCB, though other thicknesses can also work. If you prefer to buy an example of this battery holding “tech,” several of my designs are available on Tindie.

The above files give you plenty to experiment with, but read on for a few more important points that can cut down on your development time. According to the LED-No-Solder GitHub page, I’ve been working on this “simplified” battery holder for at least two years.

Inspiration and early experiments

I’m not the first to try using deformed PCBs as coin cell holders, though I’m probably close to the top for number of attempts. This 2017 post by Brian McEvoy uses an (even thinner) 0.6mm PCB for a blinky business card battery holder, as does this somewhat more complicated LED matrix card by Dennis Kaandorp. Not to be left out, I eventually made my own light-up business card as linked above.

My first try at this no-components design came – as detailed here – in the form of the “creatively” named LED-No-Solder below. Its footprint lets you attach both an LED and a coin cell battery to the 0.8mm PCB without solder, making what amounts to a glorified throwie.

Contact problems = button and vibration sensor?

The middle “fork” in the LED-No-Solder contacts the negative CRxx pad, and its conductive surface extends around 6mm from the tip. This design ensures that this conductor can’t touch the vertical portion of the positive battery terminal. However, what often happens is that it touches the protruding negative edge where there is no conductive pad on the PCB. The middle of the fork is therefore angled so that there is a slight gap at the end and no connection is made – and it wouldn’t have touched the positive terminal anyway.

The upside to this situation is that the middle fork can be used as either a hair-trigger momentary button, or even as a vibration sensor. I took advantage of this property to make the LightStrum light-up pick below. While it looks very cool, its relatively large size makes it somewhat difficult to use.

If you want solid contact instead of a button/sensor, the middle fork simply needs to be extended to the outer diameter of the coin cell, as shown below. My paranoia about potentially connecting to the positive side appears to be unwarranted. With an elongated middle contact, my work-in-progress Transistor Night Light design produces a solid connection.

Although most quick-turn board houses will get you thinner 0.8mm PCBs without much of a hassle, they’re not as common as 1.6mm boards. This means that while the price might be the same, there’s a very good chance you’ll need to wait longer for the skinny version of your design.

Based on recent preliminary testing, my Transistor Night Light design in 1.6mm thickness can hold a CR2032 battery. The issue (and possible benefit) is that it is very hard to get the battery in place, and correspondingly difficult to get it out. This can keep things secure, but if you’re selling a product involving this attachment method, I say make sure the buyer is aware of the required force-in process!

Of course, if you really don’t want the battery getting loose, you can also add a zip-tie to keep it in place. Below is the latest version of my Transistor Night Light with zip-tie cutouts.

Technical aside: CR2032, CR2016 name and dimensions

The first two digits in CR2032 and CR2016 indicate the diameter in mm (20mm). The last two are the thickness in tenths of a mm (32 = 3.2mm, 16 = 1.6mm). Naturally, the -32 cell typically has (a lot) more capacity than its -16 counterpart.

The C in CR supposedly means that the battery uses a Lithium battery chemistry, while the R indicates it is round. I’ve also seen it stated that CR stands for “coin cell,” which… only sort of makes sense.

Is this the future of coin cell holding? [Maybe… not]

As noted above by Mike Szczys on Bsky, this technique is both appealing to hacking-minded people.. and a bit of an abuse of PCB designs. In my limited testing, FR4 tends to conform to the battery shape over time, and while it still makes contact, I’m not sure how well it will hold onto its captured battery in years to come.

Also, there’s the concern about kids eating these batteries (which – and this is just my uninformed guess – I suspect has been unfairly lumped in with smaller hearing aid batteries). This might make a larger entity hesitant to try something new. So no, I don’t see more serious firms subbing out purpose-built battery holders for the PCB equivalent any time soon.

At the same time, hackers eventually grow into business leaders… or at least design influencers. As this concept gets proven out over time, people might come to trust it. Early testing shows the 1.6mm thick PCB design holds a CR2032 battery REALLY tightly. So who knows?

So if you need a way to sneak a coin cell battery into your design without bothering with a new component and its assembly, why not give this PCB-only solution a shot? After quite a bit of testing and iteration, I’m a fan of this technique!

Thanks for reading!

Thanks for reading the first of my biweekly PCB Friday columns on Hackster. I’m looking forward to sharing more PCB-related knowledge and insight here, and I hope you’ll follow along. You can find my more semi-technical musings at TechAdjacent.io, or email me at hi@jeremyscook.com if you have any suggestions!

from wallabag — all feed https://ift.tt/1GiBcOY

Adding Armature Wire to TPU Prints Is Genius

estimated reading time: 2 min

Most 3D-printed objects are rigid plastic. But novel 3D printing techniques, like print-in-place hinges and joints, can produce more dynamic objects. And there are also flexible filament materials available, such as TPU (which is available in a wide range of “squishiness” levels). Clever designers can combine rigid and flexible material to great effect. And really clever designers can even embed other materials and objects into their 3D-prints. Redditor CanYouEvenPhoto posted about a genius way of adding armature wire to TPU prints in order to make flexible things that retain their position.

Embedding foreign objects in 3D prints isn’t a new idea, and we’ve seen people use that technique to encase magnets, weights, fasteners, and even electronic components in (usually rigid) plastic. But CanYouEvenPhoto’s use of wire in TPU is something we haven’t seen before and it has a lot of potential. The TPU is very flexible, but will immediately return to its original form when released. The addition of the wire creates resistance, so the object retains the form into which the user has contorted it.

One example use case is a flexible tripod. Those are popular for phones and small cameras (like GoPro action cams), because you can wrap the legs around things to secure them in place. CanYouEvenPhoto’s technique makes it possible for people to 3D-print tripods like that very easily.

There are two ways to accomplish that. The first is by embedding the wire during the printing process. Lots of wire types work, but CanYouEvenPhoto reported the best results with thick (4-5mm diameter) aluminum armature wire. Just design the 3D-printed part with a cavity for that wire, print in flexible TPU, pause the print when it reaches the top of the cavity, lay the wire into the cavity, and then resume the print. The new layers will seal the wire inside the cavity, almost like the TPU was molded around it.

The other way to do it is by leaving an opening into the cavity, so you can insert the armature wire after the print finishes — like sliding a TPU sleeve over the wire.

CanYouEvenPhoto says they prefer the second method, as the pausing technique can be tricky. If the wire isn’t completely below the current layer height, the printer’s nozzle will collide and that will cause problems.

Now you can add these techniques to your 3D printing toolbox for use in your own bendy projects!

from wallabag — all feed https://ift.tt/dRWlmSe

Commodore 64 On New FPGA

estimated reading time: 1 min

When it comes to getting retro hardware running again, there are many approaches. On one hand, the easiest path could be to emulate the hardware on something modern, using nothing but software to bring it back to life. On the other, many prefer to restore the original hardware itself and make sure everything is exactly as it was when it was new. A middle way exists, though, thanks to the widespread adoption of FPGAs which allow for programmable hardware emulation and [Jo] has come up with a new implementation of the Commodore 64 by taking this path.

The project is called the VIC64-T9K and is meant as a proof-of-concept that can run the Commodore 64’s VIC-II video chip alongside a 6502 CPU on the inexpensive Tang Nano 9k FPGA. Taking inspiration from the C64_MiSTer project, another FPGA implementation of the C64 based on the DE10-Nano FPGA, it doesn’t implement everything an original Commodore system would have had, but it does provide most of the core hardware needed to run a system. The project supports HDMI video with a custom kernel, and [Jo] has used it to get a few demos running including sprite animations.

Built with a mix of Verilog and VHDL, it was designed as a learning tool for [Jo] to experiment with the retro hardware, and also brings a more affordable FPGA board to the table for Commodore enthusiasts. If you’re in the market for something with more of the original look and feel of the Commodore 64, though, this project uses the original case and keyboard while still using an FPGA recreation for the core of the computer.

from wallabag — all feed https://ift.tt/PDUNxWa

Read QR Codes On The Cheap

estimated reading time: 1 min

Adding a camera to a project used to be a chore, but modern camera modules make it simple. But what if you want to read QR codes? [James Bowman] noticed a $7 module that claims to read QR codes so he decided to try one out.

The module seems well thought out. There’s a camera, of course. A Qwiic connector makes hooking up easy. An LED blinks blue when you have power and green when a QR code shows up.

Reading a QR code was simple in Python using the I2CDriver library. There are two possible problems: first, if the QR code contains a large amount of data, you may exceed the I2C limit of 254 bytes. Second, despite claiming a 110-degree field of view, [James’] testing showed the QR code has to be almost dead center of the camera for the system to work.

What really interested us, though, was the fact that the device is simply a camera with an RP2040 and little else. For $7, we might grab one to use as a platform for other imaging projects. Or maybe we will read some QR codes. We’d better pick up a few. Then again, maybe we can just do it by hand.

from wallabag — all feed https://ift.tt/AZ8w69r

Mini Car Racing Game Really Shows Off Multicolor Printing

estimated reading time: 1 min

Quality 3D printing is a common hobbyist tool nowadays, and [wontonnn]’s mini arcade car racing game really shows off how 3D printing can bring parts from functional to fantastic. There are quite a few details we like in [wontonn]’s design, so let’s take a closer look.

The mini mechanical game is one of those treadmill-based car racing games in which the player navigates a little car between an onslaught of belt-borne obstacles. A little DC motor spins things up in a modular side assembly, and a hand-cranked option is available. The player’s car attaches via a magnet to a steering arm; if the player’s car gets knocked off the magnet, game over.

Treadmill belt segments print as large pre-assembled pieces, with ends that snap together without connectors. Belts like this are sometimes tricky, so this is worth keeping in mind should one ever need a similar part. Since there are no external fasteners or hardware to depend on, one could resize it easily to suit their own project purposes.

The finishing touches on the whole assembly look great. It used to be that the sort of colors and lettering seen here would come from a sticker or label, but [wontonn] gets clean lines and colors by raising (or sinking) different parts of the design. The checkerboard pattern, for example, has the light squares raised for printing in a different color.

Electromechanical arcade games have an appeal all their own, being a fusion of both mechanical and electric design that comes together in a special way. Want to make your own? Get inspired by the classic Lunar Lander reimagined, or check out this LEGO treadmill racer that takes an entirely different approach to the concept.

from wallabag — all feed https://ift.tt/7riafX9

Deepnest – open source nesting software

estimated reading time: < 1 minDeepnest – open source nesting software

Automatic line merging

Deepnest packs your parts into a compact area to save material and time. It automatically merges common lines so the laser doesn’t cut the same path twice.

This not only saves time but improves part quality by avoiding heat warping from multiple laser passes.

A robust nesting engine

Deepnest employs a state of the art part layout engine with part-in-part placement and the ability to nest bitmap images for laser engraving

It can read

  • DXF files
  • SVG files
  • Corel CDR files

It can write

  • DXF files
  • SVG files
quickstart 1

1. Import your file

quickstart 2

2. Mark the largest part as your sheet, then hit start

quickstart 3

3. Deepnest will continue to search for better solutions until you hit stop

from wallabag — all feed https://ift.tt/r4IBxaW

PIC Burnout: Dumping Protected OTP Memory In Microchip PIC MCUs

estimated reading time: 1 min

Normally you can’t read out the One Time Programming (OTP) memory in Microchip’s PIC MCUs that have code protection enabled, but an exploit has been found that gets around the copy protection in a range of PIC12, PIC14 and PIC16 MCUs.

This exploit is called PIC Burnout, and was developed by [Prehistoricman], with the cautious note that although this process is non-invasive, it does damage the memory contents. This means that you likely will only get one shot at dumping the OTP data before the memory is ‘burned out’.

The copy protection normally returns scrambled OTP data, with an example of PIC Burnout provided for the PIC16LC63A. After entering programming mode by setting the ICSP CLK pin high, excessively high programming voltage and duration is used repeatedly while checking that an area that normally reads as zero now reads back proper data. After this the OTP should be read out repeatedly to ensure that the scrambling has been circumvented.

The trick appears to be that while there’s over-voltage and similar protections on much of the Flash, this approach can still be used to affect the entire flash bit column. Suffice it to say that this method isn’t very kind to the Flash memory cells and can take hours to get a good dump. Even after this you need to know the exact scrambling method used, which is fortunately often documented by Microchip datasheets.

Thanks to [DjBiohazard] for the tip.

from wallabag — all feed https://ift.tt/xjz5GtN

Reliving VHS Memories With NFC And ESPHome

estimated reading time: 1 min

Like many of us of a certain vintage, [Dillan Stock] at The Stock Pot is nostalgic for VHS tapes. It’s not so much the fuzzy picture or the tracking issues we miss, but the physical experience the physical medium brought to movie night. To recreate that magic, [Dillan] made a Modern VHS with NFC and ESPHome.

NFC tags are contained in handsomely designed 3D printed cartridges. You can tell [Dillan] put quite a bit of thought into the industrial design of these: there’s something delightfully Atari-like about them, but they have the correct aspect ratio to hold a miniaturized movie poster as a label. They’re designed to print in two pieces (no plastic wasted on supports) and snap together without glue. The printed reader is equally well thought out, with print-in-place springs for that all important analog clunk.

Electronically, the reader is almost as simple as the cartridge: it holds the NFC reader board and an ESP32. This is very similar to NFC-based audio players we’ve featured before, but it differs in the programming. Here, the ESP32 does nothing related directly to playing media: it is simply programmed to forward the NFC tag id to ESPHome. Based on that tag ID, ESPHome can turn on the TV, cue the appropriate media from a Plex server (or elsewhere), or do… well, literally anything. It’s ESPHome; if you wanted to make this and have a cartridge to start your coffee maker, you could.

If this tickles your nostalgia bone, [Dillan] has links to all the code, 3D files and even the label templates on his site. If you’re not sold yet, check out the video below and you might just change your mind. We’ve seen hacks from The Stock Pot before, everything from a rebuilt lamp to an elegant downspout and a universal remote.

from wallabag — all feed https://ift.tt/8Bv14t3

Whack-A-Disk

estimated reading time: 1 min

By now most floppy disks have been relegated to the dustbin of history, with a few exceptions for obscure industrial applications using legacy hardware and, of course, much of the world’s nuclear weapons arsenals. In fact, they’re so rare to see in the world anymore that many below a certain age don’t recognize the “save” symbol commonly used in application user interfaces. Without a use case, and with plenty of old floppies still laying around, [Rob] took a pile of them and built this Whack-a-Mole-style game.

The game has a number of floppy-disk-specific features compared to the arcade classic, though. First, there’s no mallet, so the player must push the floppy disks into the drive manually. Second, [Rob] went to somewhat exceptional lengths to customize the drives to that sometimes the disks jump out of the drive, forcing the player to grab them and put them back in to score points in the game. He did this without needing to install high-powered solenoids in the drives too. As for the game software itself, it all runs on an Amiga 600 and even includes a custom-made soundtrack for the 30-second game.

Getting the drives just right did take a number of prototypes, but after a few versions [Rob] has a working game that looks fun to play and is a clever use of aging hardware, not to mention the fact that it runs on a retro computer as well. Of course, for the true retro feel, you’ll want to make sure you find a CRT for the display somewhere, even though they’re getting harder to find now than old floppy disk drives.

from wallabag — all feed https://ift.tt/s301pgW