Virtual CPU Stays On Script

Some will see it as a great thing, and others as an example of how JavaScript is being abused daily, but [Francis Stokes] decided to design his own CPU architecture and implemented a virtual version of it using JavaScript. The CPU is a 16-bit affair and has a simplified assembly language. The code is on GitHub, but the real value is [Francis’] exposition of the design in the original post.

While discussing the design, [Francis] reveals his first pass at the instruction set, discussed what he found wrong about it, and then reveals the final set composed of real instructions and some macros to handle other common cases.

Continue reading “Virtual CPU Stays On Script”

Control The Volume

For anyone who has owned a boombox or an old(er) cassette player, the digital age volume controls feel incredibly awkward. Keep pressing buttons to get the volume just right can get tiresome real quick. The volume knob just makes sense and in a simple project, [Jeremy S Cook] brings us the Custom Computer Volume Control Knob.

The build employs an Adafruit Trinket board coupled with a rotary encoder and a push button as described by the designers themselves. We reached out to [Jeremy S Cook] to enquire about the build and it turns out his version uses an MDF enclosure as well as an MDF knob. A larger PCB has the encoder and button solder on with the Trinket board connecting to them via multi strand wires. An Acrylic sheet cut to the size serves as the top cover and completes the build.

The button serves as a play/pause button and can come in handy. Since the device enumerates as an HMI device, it should work with almost any OS. It could easily be extended to work with Android Tablets or even iPads. Check out the video below for a demonstration and if you like the idea of custom input devices, check out this DIY shortcut Keyboard. Continue reading “Control The Volume”

Hackaday Prize Entry: Open Source Patient Monitor

Vital sign monitors are usually found in developed countries; they just cost too much for less affluent communities to afford. The HealthyPi project aims to change that by developing an inexpensive but accurate monitor using a Raspberry Pi, a custom hat studded with sensors, and a touch screen. The resulting monitor could be used by medical professionals as well as students and private researchers.

[Ashwin K Whitchurch] and his team created HealthyPi, a Raspberry Pi hat that includes an AFE4490 chip serving as the pulse oximeter front end, an analog to digital converter that interprets the ECG and respiration data, and a MAX30205 body temperature sensor. The hat has its own microcontroller, a ATSAMD21 Cortex M0+ that can also be loaded with the Arduino Zero bootloader.

This project is capable of monitoring a patient’s pulse, respiration, body temperature, and all the other vital signs made measure d by other ‘medical-grade’ vital sign monitors at a fraction of the cost. It’s a democratizing technology, and [Ashwin] already has some working hardware available on Crowd Supply.

Learn more about HealthyPi at the project page or download the code from GitHub.

Continue reading “Hackaday Prize Entry: Open Source Patient Monitor”

UK To Register Multirotor Fliers

The British government has shown a surprisingly light touch towards drone fliers in the face of the strident media demands for them to be banned following a series of reports of near-misses with other aircraft. That is about to change with reports of the announcement of a registration scheme for craft weighing over 250 g (about 9 oz). Details are still a bit sketchy, but it is reported that there will be a written test and an element of geofencing around sensitive locations.

Our friendly professional multirotor flier’s reaction is that the existing laws are clear enough, and that this is likely to be no deterrent to any people who already use their drones illegally. It seems that the UK government is following the lead set by the USA in this matter, with the 250 g limit on that side of the Atlantic having already spawned an industry of smaller craft. Time will tell on whether the measures will be effective, we suspect that their success will depend on their not being overly stringent.

[Editor’s note: Following a lawsuit, the US FAA registration requirement was struck down for hobbyists because model aircraft are explicitly excluded from the FAA’s purview. The Brits are not likely to be so lucky.]

If there is a positive side to this announcement, it might be that the 250 g class of multirotor will inevitably become the focus of a lot of attention as manufacturers and engineers work to pack the most performance into the small platform. This small silver lining to the drone registration cloud might not be much, but we’ll take it.

We’ve covered the UK drone story as reported in the media in detail in the past.

Palace of Westminster image: Diliff [CC BY-SA 2.5].

Soap bubble machine: animation to reality

How To Turn An Animation Into A Soap Bubble Machine

Post an animation on Reddit of a workable machine that looks neat and does something cool and the next day someone will have built it. That’s what happened when [The-Big-Ship] uploaded an animation of a clever bubble making machine — though we had to look twice to convince ourselves that it wasn’t real. The next day [Over_Engineered_2] posted a video of his working one.

We often hear that you need precision CAD software such as Solidworks and AutoCAD to design a functional machine but the animation was done using Cinema 4D, used for films such as Iron Man 3 and Tron: Legacy. This shows that you can at least get a reassurance that the basic mechanics will fit and move together without having to design precision parts.

That’s not to say that reality didn’t interfere with implementing it though. In [Over_Engineered_2]’s video below he points out that the bigger ring of the original animation didn’t work with his small motor and propeller, and had to switch to the smaller ring. Also, note that the ring needed guide rails on the sides to keep it from twisting, something a real world ignoring animation can get away without. Check out the videos below to see the two in action.

Continue reading “How To Turn An Animation Into A Soap Bubble Machine”

RoGeorge Attacks A Pulse Meter

The “Crivit Sports” is an inexpensive chest-strap monitor that displays your current pulse rate on a dedicated wristwatch. This would be much more useful, and presumably more expensive, if it had a logging option, or any way to export your pulse data to a more capable device. So [RoGeorge] got to work. Each post of the (so-far) three-part series is worth a read, not the least because of the cool techniques used.

In part one, [RoGeorge] starts out by intercepting the signals. His RF sniffer? An oscilloscope probe shorted out in a loop around the heart monitor. Being able to read the signals, it was time to decode them. Doing pushups and decoding on-off keyed RF signals sounds like the ideal hacker training regimen, but instead [RoGeorge] used a signal generator, clipped to the chest monitor, to generate nice steady “heartbeats” and then read the codes off the scope without breaking a sweat.

With the encoding in hand, and some help from the Internet, he tested out his hypothesis in part two. Using an Arduino to generate the pulses logged in part one, he pulsed a coil and managed to get the heart rates displayed on the watch.

Which brings us to part three. What if there were other secrets to be discovered? Brute-forcing every possible RF signal and looking at the watch to see the result would be useful, but doing so for 8,192 possible codes would drive anyone insane. So [RoGeorge] taught himself OpenCV in Python and pointed a webcam at the watch. He wrote a routine that detected the heart icon blinking, a sign that the watch received a valid code, and then transmitted all possible codes to see which ones were valid. Besides discovering a few redundant codes, he didn’t learn much new from this exercise, but it’s a great technique.

We’re not sure what’s left to do on the Crivit. [RoGeorge] has already figured out the heart-rate data protocol, and could easily make his own logger. We are sure that we liked his thorough and automated approach to testing it all, from signal-generator-as-heartbeat to OpenCV as feedback in a brute-force routine. We can’t wait to see what’s up next.

Using A Decade Counter To Make LEDs Flash

[Andrea De Napoli] created a LED display consisting of a half-dozen LEDs connected to the inverted signals of a CD4017 decade counter, giving the effect that a dark LED is running back and forth. The CD4017 works by activating 10 outputs, one at a time, as controlled by a clock signal sent to pin 14.

The first and last LEDs are lit by outputs 0 and 5 with the help of a PNP transistor and a 12K resistor. The middle four LEDs are switched by two outputs each and go dark when one of them goes high. [Andrea] really delves into the CD4017 and he shares a lot of detail in the project page.

Hackaday publishes a lot of posts about obscure ICs: Project 54/74 aims to create a database of die images of 5400 and 7400 series ICs. In a remix of a classic, the Baby 10 uses a 4017 to make a music sequencer. Continue reading “Using A Decade Counter To Make LEDs Flash”