Software Driving Hardware

We were talking about [Christopher Barnatt]’s very insightful analysis of what the future holds for the Raspberry Pi single board computers on the Podcast. On the one hand, they’re becoming such competent computers that they are beginning to compete with lightweight desktop machines, instead of just being a hacker curiosity.

On the other hand, especially given the shortage and the increase in price that has come with the Pi’s expanding memory endowments, a lot of people who would “just throw in a Raspberry Pi” are starting to think more carefully about their options. Five years ago, this would have meant looking into what you could whip together on an Arduino-based platform, either on actual Arduino hardware or on an ESP8266 or similar, but that’s a very different beast from a programmer’s perspective. Working with microcontrollers used to be very different from working with even the smallest Linux machines.

These days, there is no shortage of microcontrollers that have enough memory – both flash and RAM – to support a higher-level environment like MicroPython. And if you think about it, MicroPython brings to the microcontrollers a lot of what people were using a Raspberry Pi for in projects anyway: a friendly interactive programming environment that was free of the compile-here, flash-there debug cycle. If you’re happy coding Python on a single-board Linux computer, you’ll be more or less happy coding in MicroPython or Circuit Python on a microcontroller.

And what this leaves us with, as hackers, is a fantastic spectrum of choices. Where before there was a hard edge between programming C on an 8-bit PIC or an AVR and working with something that had a full Linux operating system like a Pi, it’s all blurry now. And as the Pis, the Jetson, and all the other Linux SBCs are blurring the boundary with more traditional computers as they all become more competent and gain more computer-like peripherals. Nowadays your choice is much freer, and the hardware landscape more fluid. You don’t have to let software development concerns drive your hardware choices, and we think that’s a great thing.

Zelda Guardian Sculpture Tracks Humans And Pets Via Camera

In The Legend of Zelda: Breath of the Wild Guardians are a primitive form of sentry turret that tracks the player with a watchful eye. Inspired by this, [npentrel] decided to whip up one of her own in the real world.

The build relies on a Raspberry Pi kitted out with its usual camera for machine vision purposes. It uses the Viam robot toolkit, which runs a machine learning model to detect pets and humans on the camera feed. The guardian then tracks any pets or humans that show up by turning its head, and thus the camera, with a servo controlled by a PWM signal via the Raspberry Pi’s GPIO pins. It’s all wrapped up in a nicely-decorated 3D printed model that really does look like something straight out of Breath of the Wild.

Sentry projects are a great way to learn about electronics, mechanics, and image processing techniques. It’s funny to see how advanced and complicated these projects were fifteen years ago, compared to how easy they are today with modern machine learning libraries. How times change!

A Fresnel Lens Without The Pain

Making a traditional glass lens requires a lot of experience, skill, and patience grinding a piece of glass to the required shape, and is not for the casual experimenter. Making a glass Fresnel lens with its concentric rings requires even more work, but as the ever-resourceful [Robert Murray-Smith] shows us, a Fresnel lens can be made from far more mundane materials. He shows us a working lens made from transparent plastic tube, and even successfully smoulders a piece of paper with it under the anaemic British sun.

His lens, with its circular profile tube filled with water, is not perhaps the most efficient lens in terms of light focused per unit area of lens. From dredging up our highschool physics lessons we are guessing that half the light is diffracted outwards rather than inwards by the cylindrical profile of the coil, but for the cost of the whole device we’re not sure that matters. Next time we’re shipwrecked on a desolate island with a handy supply of clear plastic tube and fresh water, we know we can always raise a fire.

If Fresnel lenses interest you, we’ve taken a look in the past at their history.

Continue reading “A Fresnel Lens Without The Pain”

C64 Gets ChatGPT Access Via BBS

ChatGPT, powered by GPT 3.5 and GPT 4, has become one of the most popular Large Language Models (LLM), due to its ability to hold passable conversations and generate large tracts of text. Now, that very tool is available on the Commodore 64 via the Internet.

Obviously, a 6502 CPU with just 64 kilobytes of RAM can barely remember a dictionary, let alone the work with something as complicated as a modern large language model. Nor is the world’s best-selling computer well-equipped to connect to modern online APIs. Instead, the C64 can access ChatGPT through the Retrocampus BBS, as demonstrated by [Retro Tech or Die].

Due to security reasons, the ChatGPT area of the BBS is only available to the board’s Patreon members. Once in, though, you’re granted a prompt with ChatGPT displayed in glorious PETSCII on the Commodore 64. It’s all handled via a computer running as a go-between for the BBS clients and OpenAI’s ChatGPT service, set up by board manager [Francesco Sblendorio]. It’s particularly great to see ChatGPT spitting out C64-compatible BASIC.

While this is a fun use of ChatGPT, be wary of using it for certain tasks in wider society. Video after the break.

Continue reading “C64 Gets ChatGPT Access Via BBS”

Overall design of retina-inspired NB perovskite PD for panchromatic imaging. (Credit: Yuchen Hou et al., 2023)

Perovskite Sensor Array Emulates Human Retina For Panchromatic Imaging

The mammalian retina is a complex system consisting out of cones (for color) and rods (for peripheral monochrome) that provide the raw image data which is then processed into successive layers of neurons before this preprocessed data is sent via the optical nerve to the brain’s visual cortex. In order to emulate this system as closely as possible, researchers at Penn State University have created a system that uses perovskite (methylammonium lead bromide, MAPbX3) RGB photodetectors and a neuromorphic processing algorithm that performs similar processing as the biological retina.

Panchromatic imaging is defined as being ‘sensitive to light of all colors in the visible spectrum’, which in imaging means enhancing the monochromatic (e.g. RGB) channels using panchromatic (intensity, not frequency) data. For the retina this means that the incoming light is not merely used to determine the separate colors, but also the intensity, which is what underlies the wide dynamic range of the Mark I eyeball. In this experiment, layers of these MAPbX3 (X being Cl, Br, I or combination thereof) perovskites formed stacked RGB sensors.

The output of these sensor layers was then processed in a pretrained convolutional neural network, to generate the final, panchromatic image which could then be used for a wide range of purposes. Some applications noted by the researchers include new types of digital cameras, as well as artificial retinas, limited mostly by how well the perovskite layers scale in resolution, and their longevity, which is a long-standing issue with perovskites. Another possibility raised is that of powering at least part of the system using the energy collected by the perovskite layers, akin to proposed perovskite-based solar panels.

(Heading: Overall design of retina-inspired NB perovskite PD for panchromatic imaging. (Credit: Yuchen Hou et al., 2023) )

SMA Connector Footprint Design For Open Source RF Projects

When you first start out in the PCB layout game and know just enough to be dangerous, you simply plop down a connector, run a trace or two, and call it a hack. As you learn more about the finer points of inconveniencing electrons, dipping toes into the waters of higher performance, little details like via size, count, ground plane cutouts, and all that jazz start to matter, and it’s very easy to get yourself in quite a pickle trying to decide what is needed to just exceed the specifications (or worse, how to make it ‘the best.’) Connector terminations are one of those things that get overlooked until the MHz become GHz. Luckily for us, [Rob Ruark] is on hand to give us a leg-up on how to get decent performance from edge-launch SMA connections for RF applications. These principles should also hold up for high-speed digital connections, so it’s not just an analog game.

Continue reading “SMA Connector Footprint Design For Open Source RF Projects”

What Makes Wedge Coils Better Than Round For PCB Motors?

PCB motors are useful things. With coils printed right on the board, you don’t need to worry about fussy winding jobs, and it’s possible to make very compact, self contained motors. [atomic14] has been doing some work in this area, and decided to explore why wedge coils perform better than round coils in PCB motor designs.

[atomic14]’s designs use four-layer PCBs which allow for more magnetic strength out of the coils made with traces. While they’ve tried a variety of designs, like most in this area, they used wedge-shaped coils to get the most torque out of their motors. As the video explains, the wedge layout allows a much greater packing efficiency, allowing the construction of coils with more turns in the same space. However, diving deeper, [atomic14] also uses Python code to simulate the field generated by the different-shaped coils. Most notably, it shows that the wedge design provides a significant increase in field strength in the relevant direction to make torque, which scales positively on motors with higher numbers of coils.

This kind of simulation and optimization is typical in industry. It’s great to see an explainer on real engineering methods on YouTube for everyone to enjoy. Video after the break.

Continue reading “What Makes Wedge Coils Better Than Round For PCB Motors?”