Ask Hackaday: How Does This Air Particle Sensor Work?

The hardware coming out of [Dr. Peter Jansen]’s lab is the craziest stuff you can imagine. He’s built a CT scanner out of plywood, and an MRI machine out of many, many turns of enamel wire. Perhaps his best-known build is his Tricorder – a real, all-sensing device with permission from the estate of [Gene Roddenberry] to use the name. [Peter]’s tricorder was one of the finalists for the first Hackaday Prize, but that doesn’t mean he’s stopped working on it. Sensors are always getting better, and by sometime in the 23rd century, he’ll be able to fit a neutrino detector inside a tiny hand-held device.

One of the new sensors [Peter] is working with is the MAX30105 air particle sensor. The marketing materials for this chip say it’s designed for smoke detectors and fire alarms, but this is really one of the smallest dust and particle sensors on the market. If you want a handheld device that detects dust, this should be the chip you’re looking at.

Unfortunately, Maxim is being very, very tight-lipped about how this particle sensor works. There is a way to get access to raw particle counts and the underlying algorithms, and Maxim is more than willing to sell those algorithms through a third-party distributor. That’s simply not how we do things around here, so [Peter] is looking for someone with a fancy particle sensor to collect a few hours of data so he can build a driver for this chip.

Here’s what we know about the MAX30105 air particle sensor. There are three LEDs inside this chip (red, IR, and green), and an optical sensor underneath a piece of glass. The chip drives the LEDs, light reflects off smoke particles, and enters the optical sensor. From there, magic algorithms turn this into a number corresponding to a particle count. [Peter]’s hackaday.io log for this project has tons of data, math, and statistics on the data that comes out of this sensor. He’s also built a test rig to compare this sensor with other particle sensors (the DSM501A and Sharp sensors). The data from the Maxim sensor looks good, but it’s not good enough for a Tricorder. This is where you, o reader of Hackaday, come in.

[Peter] is looking for someone with access to a fancy particle sensor to collect a few hours worth of data with this Maxim sensor in a test rig. Once that’s done, a few statistical tests should be enough to verify the work done so far and build a driver for this sensor. Then, [Peter] will be able to play around with this sensor and hopefully make a very cheap but very accurate air particle sensor that should be hanging on the wall of your shop.

The $2 32-Bit Arduino (with Debugging)

I have a bit of a love/hate relationship with the Arduino. But if I had two serious gripes about the original offering it was the 8-bit CPU and the lack of proper debugging support. Now there’s plenty of 32-bit support in the Arduino IDE, so that takes care of the first big issue. Taking care of having a real debugger, though, is a bit trickier. I recently set out to use one of the cheap “blue pill” STM32 ARM boards. These are available for just a few bucks from the usual Chinese sources. I picked mine up for about $6 because I wanted it in a week instead of a month. That’s still pretty inexpensive. The chip has a lot of great debugging features. Can we unlock them? You can, if you have the right approach.

The Part

For a few bucks, you can’t complain about the hardware. The STM32F103C8T6 onboard is a Cortex-M3 processor that runs at 72 MHz. There’s 64K of flash and 20K of RAM. There’s a minimicro-USB that can act as a programming port (but not at first). There’s also many 5 V-tolerant pins, even though this a 3.3 V part.

You can find a lot more information on this wiki. The board is a clone–more or less–of a Maple Mini. In fact, that’s one way you can use these. You can use the serial or ST-Link port to program the Maple bootloader (all open source) and use it like a Maple. That is, you can program it via the USB cable.

From my point of view, though, I don’t want to try to debugging over the serial port and if I have the ST-Link port already set up, I don’t care about a bootloader. You can get hardware that acts as a USB to ST-Link device inexpensively, but I happen to have an STM32VLDISCOVER board hanging around. Most of the STM32 demo boards have an ST-Link programmer onboard that is made to use without the original target hardware. On some of the older boards, you had to cut traces, but most of the new ones just have two jumpers you remove when you want to use the programmer to drive another device.

The “blue pill” designation is just a common nickname referring to the Matrix, not the pharmaceuticals you see on TV ads. The board has four pins at one edge to accommodate the ST-Link interface. The pin ordering didn’t match up with the four pins on the STM32VLDISCOVER, so you can’t just use a straight four-pin cable. You also need to bring power over to the board since it will have to power the programmer, too. I took the power from the STM32VLDISCOVER board (which is getting its power from USB) and jumpered it to my breadboard since that was handy.

Continue reading “The $2 32-Bit Arduino (with Debugging)”

Friday Hack Chat: Audio Amplifier Design

Join [Jørgen Kragh Jakobsen], Analog/digital Design Engineer at Merus-Audio, for this week’s Hack Chat.

Every week, we find a few interesting people making the things that make the things that make all the things, sit them down in front of a computer, and get them to spill the beans on how modern manufacturing and technology actually happens. This is the Hack Chat, and it’s happening this Friday, March 31, at noon PDT (20:00 UTC).

Jørgen’s company has developed a line of multi level Class D amplifiers that focus on power reduction to save battery life in mobile application without losing audio quality.

There are a lot of tricks to bring down power consumption, some on core technologies on transistor switching, others based on input level where modulation type and frequency is dynamically changed to fit everything from background audio level to party mode.

Here’s How To Take Part:

join-hack-chatOur Hack Chats are live community events on the Hackaday.io Hack Chat group messaging.

Log into Hackaday.io, visit that page, and look for the ‘Join this Project’ Button. Once you’re part of the project, the button will change to ‘Team Messaging’, which takes you directly to the Hack Chat.

You don’t have to wait until Friday; join whenever you want and you can see what the community is talking about.

Upcoming Hack Chats

We’ve got a lot on the table when it comes to our Hack Chats. On April 7th, our host will be [Samy Kamkar], hacker extraordinaire, to talk reverse engineering.

Sandwich Together A Raspberry Pi Laptop

Ever since the Raspberry Pi was released to an eager public just over five years ago there is one project that seems to have been tackled more frequently than any other using the small computer from Cambridge: that of making a laptop with Pi for brains. Perhaps you feel you have had your fill of Pi laptops both good and bad, but it’s still a project that can bring up some surprises.

Does [Eben] carry a silver marker with him, laptops for the signing of?
Does [Eben] carry a silver marker with him at all times, laptops for the signing of?
[Archie Roques] is a young maker from Norwich, UK, and at the Raspberry Pi birthday party in early March he had rather an unusual laptop. He’d done the usual thing of mating the official Pi screen, a bluetooth keyboard/touchpad, Pi, and battery, but as always it’s the detail that matters. His case is a carefully designed sandwich of laser-cut plastic that somehow manages the impossible task of containing all the laptop internals while not being too bulky.

For power he at first used a 4 AH LiPo cell from a dead tablet with a Pimoroni LiPo power board, but since he hit problems with the Pimoroni board supplying both screen and Pi he’s switched to an off-the-shelf power bank. Unusually this laptop also has built-in audio, using another Pimoroni product, their speaker pHAT.

Where this laptop has a flaw though is in the display hinges. He has plans for a beautifully made 3D printed hinge, but for now he’s using a piece of tape, which though functional does not add to the aesthetic. When we saw it in Cambridge the keyboard was fitting more snugly than it does in the photos on his write-up, so perhaps he’s fixed some of its issues. Despite the in-progress hinge it’s a very usable little Pi laptop, and though (Hint, [Archie]!) he hasn’t yet published the design files for it, we’re sure when he does we’ll see other people building the same machine. They won’t be quite as exclusive as [Archie]’s model though, while he was in Cambridge he managed to get it signed by [Eben Upton], founder of the Raspberry Pi Foundation and judge for the 2017 Hackaday Prize.

We recently showed you a Pi laptop build in a cigar box that was useful in its detailing of the various modules required, but in the past we’ve shown you another one using the official touch screen, a lovely one in the style of a Psion palmtop, and vertically bulky yet small-footprint one, and another that keeps its presence hidden.

A tip of the hat to Norwich Hackspace.

CP/M 8266

Hands up if you’ve ever used a machine running CP/M. That’s likely these days to only produce an answer from owners of retrocomputers. What was once one of the premier microcomputer operating systems is now an esoteric OS, a piece of abandonware released as open source by the successor company of its developer.

In the 1970s you’d have seen CP/M on a high-end office wordprocessor, and in the 1980s some of the better-specified home computers could run it. And now? Aside from those retrocomputers, how about running CP/M on an ESP8266? From multi-thousand-dollar business system to two-dollar module in four decades, that’s technological progress.

[Matseng] has CP/M 2.2 running in a Z80 emulator on an ESP8266. It gives CP/M 64K of RAM, a generous collection of fifteen 250K floppy drives, and a serial port for communication. Unfortunately it doesn’t have space for the ESP’s party piece: wireless networking, but he’s working on that one too. If you don’t mind only 36K of RAM and one less floppy, that is. All the code can be found on a GitHub repository, so if you fancy a 1970s business desktop computer the size of a postage stamp, you can have a go too.

There’s something gloriously barmy about running a 1970s OS on a two-dollar microcontroller, but if you have to ask why then maybe you just don’t understand. You don’t have to have an ESP8266 though, if you want you can run a bare-metal CP/M on a Raspberry Pi.

Shut Up And Say Something: Amateur Radio Digital Modes

In a recent article, I lamented my distaste for carrying on the classic amateur radio conversation — calling CQ, having someone from far away or around the block call back, exchange call signs and signal reports and perhaps a few pleasantries. I think the idle chit-chat is a big turn-off to a lot of folks who would otherwise be interested in the World’s Greatest Hobby™, but thankfully there are plenty of ways for the mic-shy to get on the air. So as a public service I’d like to go over some of the many digital modes amateur radio offers as a way to avoid talking while still communicating.

Continue reading “Shut Up And Say Something: Amateur Radio Digital Modes”

Keysight’s New 1000-X Scopes Get Double Hertz

It’s not every day that we have the pleasure of being excited about a new oscilloscope in the market; not only is it affordable but also produced by one of the industry’s big players. To top it all off,  all the marketing is carefully crafted towards students and hackers.

Keysight recently released a new line of oscilloscopes called the 1000X series that starts at $448. It’s an entry level, two-channel scope having (officially) 50 MHz, 70 MHz and 100 MHz versions to choose from. It hosts their standard technology such as Megazoom, but also some interesting, albeit optional extra quirks such as an in-built signal generator and a simple network analyser with gain and phase plot capability.

The release of this scope and the marketing strategy employed by Keysight feels like they’re late to this entry-level party but still want to get in on the fun. In the words of Keysight we should all immediately “Scrap the toys, get a real oscilloscope” . The persuasion has gone a step further; Keysight has kindly facilitated many giveaways and generated hype from our favorite EE YouTuber’sIf anything, this certainly heats up the entry level scope market, so we at Hackaday welcome it with open arms.

All this fuss about affordable yet capable entry level scopes started with Rigol. Here was a company that actually bothered to genuinely market a scope to the masses at a reasonable price. At the time, the norm for such scopes was to be marketed solely to schools and universities by large teams of suits. Winning the hearts (and money) of any hackers along the way was merely collateral damage.  The scope that considerably changed this was the Rigol DS1052e, the predecessor of the DS1054z which is now considered the benchmark for all entry level scopes. If Keysight is to entice us to scrap the toys, the 1000X series must spar with the community’s current sweetheart.

It is still early days for this scope, but [Dave Jones] already received one and successfully unlocked the shipped bandwidth lock. He has even unearthed an undocumented 200 MHz bandwidth mode by hacking the main processor board! Unsurprisingly, the analog front end is consistent across all the models with the sampling rate and bandwidth being set, rather old-fashionedly, by a few resistors on the main processor board.

Continue reading “Keysight’s New 1000-X Scopes Get Double Hertz”