Archivi del mese: novembre 2018

Linux as a Library: Unikernels are Coming

Linux as a Library: Unikernels are Coming
By Al Williams

If you think about it, an operating system kernel is really just a very powerful shared library that offers services to many programs. Of course, it is a very powerful library, but still — its main purpose is to provide services to programs. Your program probably doesn’t use all of the myriad services the kernel provides. Even a typical system might not fully use all the things that are in a typical kernel. Red Hat has a new initiative to bring a technology called unikernels to the forefront. A unikernel is a single application linked with just enough of the kernel for it to execute. As you might expect, this can result in a smaller system and better security.

It can also lead to better performance. The unikernel doesn’t have to maintain devices and services that are not used. Also, the kernel and the application can run in the same privilege ring. That may seem like a security hole, but if you think about it, the only reason a regular kernel runs at a higher privilege is to protect itself from a malicious application modifying the kernel to do something bad to another application. In this case, there is no other application.

This isn’t a new idea. Embedded operating systems have long built the application in with the kernel. However, Red Hat wants to bring Linux and open community into the unikernel landscape. The idea is that unlike other projects, this one will be based on Linux that is actively developed and maintained. According to Red Hat, previous systems either didn’t use Linux or mutated Linux to the point that it no longer benefits from the Linux community’s development efforts.

Linux has wormed its way into many embedded systems and it is easy to see how a unikernel would be handy for that or for some network appliances. Of course, you could always use a classic RTOS. For some applications, you might even consider just a basic framework like Mongoose.

November 18, 2018 at 01:00PM
via Blog – Hackaday

A 1940s Gangster-Mobile Gets an Electric Makeover

A 1940s Gangster-Mobile Gets an Electric Makeover
By Dan Maloney

When referring to classic cars, there’s a good reason that “they don’t make ’em like that anymore.” Old cars represented the limits of what could be done in terms of materials and manufacturing methods coupled with the styles of the time and cheap fuel. The result was big, heavy cars that would cost a fortune in gas to keep on the road today.

Some people just don’t want to let those styles go, however, and send their beast off for some special modifications. This 1949 Mercury coupe with an electric drivetrain conversion is one way of keeping that retro look alive. Granted, the body of the car is not exactly showroom quality anymore, from the light patina of rust on its heavy steel body panels to the pimples cropping up under its abundant chrome. But that’s all part of the charm; this comes from conversion company Icon’s “Derelict” line, which takes old vehicles and guts them while leaving the outside largely untouched. This Mercury was given a fully electric, 298 kW drivetrain. The engine bay and trunk, together roomier than some Silicon Valley studio apartments, provided ample room for the 85 kWh Tesla battery pack and the dual electric motors, with room left over to craft enclosures for the battery controllers that look like a V8 engine. Custom electronic gauges and controls that look like originals adorn the chrome-bedazzled dash. The beast tops out at 120 mph (193 km/h) and has a 200 mile (322 km) range before it has to find a Tesla supercharger. Or a lemonade stand.

Say what you want about the old cars, but they had plenty of style. We appreciate the work that went into this conversion, which no doubt cost more than all the gas this thing has ever guzzled.

Thanks to [Qes] for the tip.

November 18, 2018 at 10:00AM
via Blog – Hackaday

CNC Embroidery Machine Punches Out Designs a Stitch at a Time

CNC Embroidery Machine Punches Out Designs a Stitch at a Time
By Dan Maloney

It’s doubtful that the early pioneers of CNC would have been able to imagine the range of the applications the technology would be used for. Once limited to cutting metal, CNC machines can now lance through materials using lasers and high-pressure jets of water, squirt molten plastic to build up 3D objects, and apparently even use needle and thread to create embroidered designs.

It may not seem like a typical CNC application, but [James Kolme]’s CNC embroidery machine sure looks familiar. Sitting in front of one of the prettiest sewing machines we’ve ever seen is a fairly typical X-Y gantry system. The stepper-controlled gantry moves an embroidery hoop under the needle of the sewing machine, which is actually the Z-axis of the machine. With the material properly positioned, a NEMA 23 stepper attached to the sewing machine through a sprocket and drive chain makes a stitch, slowly building up a design. Translating an embroidery pattern to G-code is done through Inkstitch, and extension to Inkscape. [James]’ write-up is great, and the video below shows it in action.

We’ve seen a CNC embroidery machine or two before, but our conspicuously non-embroidered hat is off to [James] on this one for its build quality and documentation. And the embroidered Jolly Wrencher doesn’t hurt either.

Thanks, [baldpower]!

November 18, 2018 at 07:00AM
via Blog – Hackaday

Restoring An Apollo Guidance Computer

Restoring An Apollo Guidance Computer
By Richard Baguley

The Apollo Guidance Computer is a remarkably important piece of computing history. It’s the computer that guided the Apollo lander to land on the moon. We’ve seen a few replica builds over the years, but [CuriousMarc] got a closer look at one of the real things. In this video, [Marc] gets a look inside as his colleagues take apart one of the original AGCs and get a closer look at the insides of this piece of computer history. 

Thanks to collector [Jimmie Loocke], they got to take apart AGO#14, one of the original flight computers from a Lunar Excursion Module (LEM) that was used for flight testing. [Loocke] used to work at a NASA contractor and found the AGC in an electronics surplus store. He and [Mike Stewart] are working to restore the computer for the 50th anniversary of the Apollo 11 landing in 2019. The interesting thing about their AGC is that it is not potted: the chips aren’t coated in the epoxy resin or foam that protects them in flight. This means that they can take the system apart and examine the chips and the complicated wiring that connects them. And, hopefully, they can get it back up and running again. We will see: this is just the first video in a series, and this is an ongoing project. We got a look at the same computer in 2016 when [Carl Clanch] started working on it, doing things like building a replacement for the DSKY input and display panel, as the original is still in the LEM that this computer came from, which is on display in the Johnston Space Center in Houston.

November 18, 2018 at 04:00AM
via Blog – Hackaday

Generative Design Algorithms Prepare For Space

Generative Design Algorithms Prepare For Space
By Roger Cheng

NASA is famously risk-averse, taking cautious approaches because billions of taxpayer dollars are at stake and each failure receives far more political attention than their many successes. So while moving the final frontier outward requires adopting new ideas, those ideas must first prove themselves through a lengthy process of risk-reduction. Autodesk’s research into generative design algorithms has just taken a significant step on this long journey with a planetary lander concept.

It was built jointly with a research division of NASA’s Jet Propulsion Laboratory, the birthplace of many successful interplanetary space probes. This project got a foot in the door by promising 30% weight savings over conventional design techniques. Large reduction in launch mass is always a good way to get a space engineer’s attention! Mimicking mother nature’s evolutionary process, these algorithms output very organic looking shapes. This is a relatively new approach to design optimization under exploration by multiple engineering software vendors. Not just Autodesk’s “Generative Design” but also “Topology Optimization” in SolidWorks, plus others. Though these shapes appear ideally suited to 3D printing, Autodesk also had to prove their algorithm could work with more traditional fabrication techniques like 5-axis CNC mills.

This is leading-edge research technology though some less specialized, customer-ready versions are starting to trickle out of research labs. Starting with an exclusive circle: People with right tiers of SolidWorks license, the paid (not free) tier of Autodesk Fusion 360, etc. We’ve looked at another recent project with nontraditional organic shapes, and we’ve looked at generative designs used for their form as well as their function. This category of CAD tools hold a lot of promise, and we’re optimistic they’ll soon become widely accessible so we can all put them to good use in our earthbound projects.

Possibly even before they fly to another planet.

[via Engadget]

November 18, 2018 at 01:00AM
via Blog – Hackaday

Meat-Seeking Raspberry Pi Leads you to Flavortown

Meat-Seeking Raspberry Pi Leads you to Flavortown
By Tom Nardi

[Patrick McDavid] and his wife had a legitimate work-related reason for writing some Python code that would pull the exact latitude and longitude of the individual locations within a national retain chain from Google’s Geocoding API. But don’t worry about that part of the story. What’s important now is that this simple concept was then expanded into a pocket-sized device that will lead the holder to the nearest White Castle or Five Guys location.

The device, which [Patrick] lovingly referrers to as the “Cheeseburger Compass”, uses a Raspberry Pi 3, an Adafruit 16×2 LCD with keypad, a GPS module, and the requisite battery and charger circuit to make it mobile. With the coordinates for the various places one can obtain glorious artery clogging meat circles loaded up, the device will give the user the cardinal direction and current distance from the nearest location of the currently selected chain.

[Patrick] has published the source code for this meat-seeking gadget on GitHub, but notes that most of it is just piecing together existing libraries and tools. As with many Python projects, it turns out there’s already a popular library to do whatever it is you were trying to do manually, so his early attempts at calculating distances and bearings were ultimately replaced with turn-key solutions. Though he did come up with a quick piece of code that would convert a compass heading in degrees to a cardinal direction that he couldn’t find a better solution for. Maybe he should make it a library…

Sadly the original Cheeseburger Compass got destroyed from being carried around so much, but at least it died doing what it loved. [Patrick] says a second version of the device would likely switch over to a microcontroller rather than the full Raspberry Pi experience, as it would make the device much smaller and greatly improve on the roughly two hour battery life.

This project reminds us of the various geocache devices we’ve covered in the past, but with the notable addition of hot sizzling meat. Talk about approving on a good thing.

November 17, 2018 at 10:00PM
via Blog – Hackaday

Vintage Rotary Phone Turned Virtual Assistant

Vintage Rotary Phone Turned Virtual Assistant
By Tom Nardi

Like many of us, [Zoltan Toth-Czifra] has completely embraced 21st century living. His home is awash in smart gadgets and dodads, from color changing light bulbs to Internet-connected cameras. But he’s also got a soft spot for the look and feel of vintage hardware, like the rotary phone he keeps kicking around to remind him of the old days. He recently decided to bridge these two worlds by turning the rotary phone into a modern voice controlled assistant.

The first piece of the puzzle was getting the old school phone connected to something a bit more modern, namely a Raspberry Pi. He didn’t want to hack the vintage phone apart, so he picked up a Grandstream HT801, an adapter that’s used to convert analog telephones to VoIP. [Zoltan] says this model specifically fit the bill as it had a function that allows you to configure a number to dial as soon the phone is lifted off the hook. This allows the user to just pick up the phone and start talking without having to dial anything manually. If you’re looking to pull off a similar setup, you should check to make sure the adapter has this function before pulling the trigger.

With the rotary phone now talking a more modern protocol, [Zoltan] just needed to get the Raspberry Pi side sorted out. He installed a SIP server so it could communicate with the HT801 adapter, and then got to work putting together his virtual assistant. Rather than plug into an existing system, he rolled his own by combining open source packages for controlling his various smart devices with the aptly named SpeechRecognition library for Python.

Right now he’s only programmed a few commands that his system can respond to for controlling his lights and music, but mentions that the system is modular enough that he can add new functions easily. He’s put the source for his virtual assistant framework up on GitHub, which he notes was written in less than 200 lines of original code by virtue of utilizing existing libraries for a lot of the heavy lifting. Open source is a beautiful thing.

In the past we’ve seen rotary phones go mobile thanks to GSM upgrades and dragged kicking and screaming onto the modern phone network with a built-in Raspberry Pi. But we think there’s something especially appealing about the approach [Zoltan] took which preserves the phone’s original hardware.

November 17, 2018 at 07:00PM
via Blog – Hackaday

SNES Controller Has a Pi Zero in the Trunk

SNES Controller Has a Pi Zero in the Trunk
By Tom Nardi

We’re no stranger to seeing people jam a Raspberry Pi into an old gaming console to turn it into a RetroPie system. Frankly, at this point it seems like we’ve got to be getting close to seeing all possible permutations of the concept. According to the bingo card we keep here at Hackaday HQ we’re just waiting for somebody to put one into an Apple Bandai Pippin, creating the PiPi and achieving singularity. Get it done, people.

That being said, we’re still occasionally surprised by what people come up with. The Super GamePad Zero by [Zach Levine] is a fairly compelling take on the Pi-in-the-controller theme that we haven’t seen before, adding a 3D printed “caboose” to the stock Super Nintendo controller. The printed case extension, designed by Thingiverse user [Sigismond0], makes the controller about twice as thick, but that’s still not bad compared to modern game controllers.

In his guide [Zach] walks the reader through installing the Raspberry Pi running RetroPie in the expanded case. This includes putting a power LED where the controller’s cable used to go, and connecting the stock controller PCB to the Pi’s GPIO pins. This is an especially nice touch that not only saves you time and effort, but retains the original feel of the D-Pad and buttons. Just make sure the buttons on your donor controller aren’t shot before you start the build.

Adding a little more breathing room for your wiring isn’t the only reason to use the 3D printed bottom, either. It implements a very clever “shelf” design that exposes the Pi’s USB and HDMI ports on the rear of the controller. This allows you to easily connect power and video to the device without spoiling the overall look. With integrated labels for the connectors and a suitably matching filament color, the overall effect really does look like it could be a commercial product.

The SNES controller is an especially popular target for hacks and modifications. From commercially available kits to the wide array of homebrew builds, it there’s plenty of people who want to keep this legendary piece of gaming gear going strong into the 21st century

November 17, 2018 at 04:00PM
via Blog – Hackaday

High Voltage Measurement is Shockingly Safe

High Voltage Measurement is Shockingly Safe
By Bryan Cockfield

With the right equipment and training, it’s possible to safely work on energized power lines in the 500 kV range with bare hands. Most of us, though, don’t have the right equipment or training, and should take great care when working with any appreciable amount of voltage. If you want to safely measure even the voltages of the wiring in your house there’s still substantial danger, and you’ll want to take some precautions like using isolated amplifiers.

While there are other safe methods for measuring line voltage or protecting your oscilloscope, [Jason]’s isolated amplifier method uses high voltage capacitors to achieve isolation. The input is then digitized, sent across the capacitors, and then converted back to an analog signal on the other side. This project makes use of a chip from TI to provide the isolation, and [Jason] was able to build it on a perfboard while making many design considerations to ensure it’s as safe as possible, like encasing high voltage sections in epoxy and properly fusing the circuit.

[Jason] also discusses the limitations of this method of isolation on his site, and goes into a lot of technical details about the circuit as well. It probably wouldn’t get a UL certification, but the circuit performs well and even caught a local voltage sag while he was measuring the local power grid. If this method doesn’t meet all of your isolation needs, though, there are a lot of other ways to go about solving the problem.

November 17, 2018 at 01:00PM
via Blog – Hackaday

A Sneak Peek at Anechoic Chamber Testing

A Sneak Peek at Anechoic Chamber Testing
By Tom Nardi

[Mathieu Stephan] has something new in the works, and while he isn’t ready to take the wraps off of it yet, he was kind enough to document his experience putting the mysterious new gadget through its paces inside an anechoic chamber. Considering the majority of us will never get inside of one of these rooms, much less have the opportunity to test our own hardware in one, he figured it was the least he could do.

If you’re not familiar with an anechoic chamber, don’t feel bad. It’s not exactly the sort of thing you’ll have at the local makerspace. Put simply it’s a room designed to not only to remove echos on the inside, but also be completely isolated from the outside. But we aren’t just talking about sound deadening, the principle can also be adapted to work for electromagnetic waves. So not only is in the inside of the anechoic chamber audibly silent, it can also be radio silent.

This is important if you want to test the performance of things like antennas, as it allows you to remove outside interference. As [Mathieu] explains, both the receiver and transmitter can be placed in the chamber and connected to a vector network analyzer (VNA). The device is able to quantify how much energy is being transferred between the two devices, but the results will only be accurate if that’s the only thing the VNA sees on its input port.

[Mathieu] can’t reveal images of the hardware or the results of the analysis because that would give too much away at this point, but he does provide the cleverly edited video after the break as well as some generic information on antenna analysis and the type of results one receives from this sort of testing. Our very own [Jenny List] has a bit more information on the subject if you’d like to continue to live vicariously through the accounts of others. For the rest of us, we’ll just have to settle for some chicken wire and a wooden crate.

November 17, 2018 at 10:00AM
via Blog – Hackaday