News reports were everywhere that an autonomous taxi operated by a company called Cruise was driving through San Francisco with no headlights. The local constabulary tried to stop the vehicle and were a bit thrown that there was no driver. Then the car moved beyond an intersection and pulled over, further bemusing the officers.
The company says the headlights were due to human error and that the car had stopped at a light and then moved to a safe stop by design. This leads to the question of how people including police officers will interact with robot vehicles.
A spectrum visualizer is always a fun project, but we really liked [Yannick99]’s take on it since it uses seven IN-13 Nixie tubes for the display. The tubes, of course, need high voltage so part of the project is a high voltage power supply. The spectrum part is a little more ordinary using an op amp and an MSGEQ7 filter IC.
The chip feeds a microcontroller and the microcontroller, with a little help, drives the tubes. The results are great, as you can see in the video below. There are several other videos showing the testing and prototyping, too. The MSGEQ7 is a cute chip that offloads the usual FFT logic from the microcontroller. It does all the work and communicates in a very unusual way. You reset the device and then pulse the strobe input. This causes an analog voltage to appear on the output pin corresponding to the 63 Hz band level. Another strobe pulse selects the next band and you just repeat indefinitely, something the microcontroller is good at.
The only issue, of course, is locating IN-13 tubes. They are around if you look for them, but they may not be cheap. Expect to pay about $20 each for them, more or less. We wondered if you could make an LED look-alike replacement. If you are wondering about the lifespan of these tubes, someone’s already done the testing.
We see tons of projects with the infamous “Blue Pill” STM32 boards. They are cheap and plentiful and have a lot of great features, or at least they were before the chip shortage. I recently picked up a “Black Pill”, which is very similar but has an even more powerful processor. For a few bucks, you get an ARM CPU that can run at 100 MHz (but with USB, probably 96 MHz). There’s 512 kB of flash and 128 kB of RAM. There’s a USB type C port, and even a button and an LED onboard. The thing fits on a breadboard and you can program it with a cheap STLink dongle which costs about $10.
The Black Pill module on a breadboard.
Of course, you then have to consider the software. The STM32Cube stuff is a lot to set up and learn but it does let you do just about anything you can imagine. Then there is the STM32Duino plug-in that lets you use it as a beefy Arduino. That works and is easy enough to set up. However, there’s also Mbed. The only problem is that Mbed doesn’t work right out of the box. Turns out, though, it isn’t that hard to set up. I’ll show you how easy it is to get things going and, next time, I’ll show you a practical example of a USB peripheral that uses the mBed RTOS features.
First Steps
Obviously, you are going to need a Black Pill. There are at least two choices but for as cheap as they are there is little reason not to get the STM32F411 version that has more memory. The DIP form factor will fit in whatever breadboard you happen to have and a USB C cable will power the board so unless you are driving a lot of external circuitry, you probably don’t need an external supply.
If you have a motor and you’d like to know where the shaft position is, you are likely to turn to an optical encoder scheme. However, as [lingib] points out, you can also use a magnet and a magnetometer. You can see how it works in the video below.
The MLX90393 is a 3-axis hall effect device and, with a magnet on the shaft, the X and Y outputs of the spinning magnet will form a quadrature output that you can easily read.
We often write a post and then learn something new and cool from the comments. The same thing happened when [Andreas] posted a video about monitoring fluid levels. Commenters told him that the best fluid level sensor was a hacked blood pressure monitor. He didn’t know that, and we didn’t either, until we watched his video, below.
It is well-known that an air-tight tube in a tank that is closed at the top and open inside the tank will develop a pressure that corresponds to the liquid level in the tank. This is a common approach when you want the pressure sensor to be far away from the tank in, say, an enclosed building. So why use a blood pressure monitor? Because a common enhancement to the system is to use a pump to pressurize the measurement tube first so the system can tolerate small leaks. The blood pressure monitor has everything you need: a pump, a valve, and a pressure sensor.
Coin-operated machines have a longer history than you might think. Ancient temples used them to dispense, for example, holy water to the faithful in return for their coins. Old payphones rang a bell when you inserted a coin so the operator knew you paid. Old pinball machines had a wire to catch things with holes in the middle so you couldn’t play with washers. But like everything else, coin acceptors have advanced quite a bit. [Electronoobs] shows a unit that can accept coins from different countries and it is surprisingly complex inside. He used what he learned from the teardown to build his own Arduino-based version.
For scale, there is the obligatory banana. Inside the box there are several induction coils and some photo electronics. In particular, there are two optical sensors that watch the coin roll down a ramp. This produces two pulses. The width of the pulse indicates the diameter of the coin, and the time between the pulses tells its speed.
[Ross] has a 2008 Toyota Tacoma. Like many late model cars, each tire contains a direct tire pressure monitoring sensor or TPMS that wirelessly sends data about the tire status to the car. However, unlike some cars, the system has exactly one notification to the driver: one of your tires is low. It doesn’t tell you which one. Sure, you can check each tire, but [Ross] had a different problem. One sensor was bad and he had no way to know which one it was. He didn’t have any equipment to test the sensor, but he did have an RTL-SDR dongle and some know-how to figure out how to listen in on the sensors.
The key was to use some software called RTL-433 that is made to pick up these kinds of signals. It is available for Linux, Windows, or Mac, and supports hundreds of wireless sensors ranging from X10 RF to KlikAanKlikUit wireless switches.