Embed With Elliot: ARM Makefile Madness

To wrap up my quick tour through the wonderland of make and makefiles, we’re going to look at a pair of possible makefiles for building ARM projects. Although I’m specifically targeting the STM32F407, the chip on a dev board that I have on my desk, it’s reasonably straightforward to extend these to any of the ST ARM chips, and only a bit more work to extend it to any ARM processor.

If you followed along in the first two installments of this series, I demonstrated some basic usages of make that heavily leveraged the built-in rules. Then, we extended these rules to cross-compile for the AVR series of microcontrollers. Now we’re going to tackle a more complicated chip, and that’s going to mean compiling with support libraries. While not required, it’s a lot easier to get an LED blinking on the ARM platforms with some additional help.

One of the main contributions of an IDE like Arduino or mbed or similar is the ease of including external libraries through pull-down menus. If you’ve never built a makefile-based project before, you might be surprised how it’s not particularly more difficult to add libraries to your project.
Continue reading “Embed With Elliot: ARM Makefile Madness”

Ask Hackaday MRRF Edition: 3D Printers Can Catch Fire

[Jay] out of the River City Labs Hackerspace in Peoria, IL cleared out a jam in his printer. It’s an operation most of us who own a 3D printer have performed. He reassembled the nozzle, and in a moment forgot to tighten down the grub nut that holds the heater cartridge in place. He started a print, saw the first layer go down right, and left the house at 8:30 for work. When he came back from work at 10:30 he didn’t see the print he expected, but was instead greeted by acrid smoke and a burnt out printer.

The approximate start time of the fire can be guessed by the height of the print before failure.
The approximate start time of the fire can be guessed by the height of the print before failure.

As far as he can figure, some time at around the thirty minute mark the heater cartridge vibrated out of the block. The printer saw a drop in temperature and increased the power to the cartridge. Since the cartridge was now hanging in air and the thermistor that reads the temperature was still attached to the block, the printer kept sending power. Eventually the cartridge, without a place to dump the energy being fed to it, burst into flame. This resulted in the carnage pictured. Luckily the Zortrax is a solidly built full metal printer, so there wasn’t much fuel for the fire, but the damage is total and the fire could easily have spread.

Which brings us to the topics of discussion.

How much can we trust our own work? We all have our home-builds and once you’ve put a lot of work into a printer you want to see it print a lot of things. I regularly leave the house with a print running and have a few other home projects going 24/7. Am I being arrogant? Should I treat my home work with a lesser degree of trust than something built by a larger organization? Or is the chance about the same? Continue reading “Ask Hackaday MRRF Edition: 3D Printers Can Catch Fire”

Hackaday Links: March 20, 2016

Western Digital introduced their second revision of the PiDrive this week. This is a native USB hard drive – formatted to 314GB – based on the WD Blue drive. The earlier version of the WD PiDrive was 1TB, and cost about $70 USD. The new, 314GB version, sells for about $35. Does Western Digital manufacture 314GB hard drives? No, that would be stupid. Who’s taking bets on the actual capacity of these drives?

[SopaXorsTaker] has introduced us to a brand new way of removing BGA chips. PCBs are usually more flexible than chips, and a few whacks with a hammer is all that’s needed.

For the last few months, [quarterturn] has been upgrading a PowerBook 520. He’s trying to replace the CPU with a 68040 that has an FPU. His first attempt failed, and his second attempt – a new Freescale part that certainly has an FPU – also failed. It’s great experience in desoldering and reworking fine-pitch QFP parts, but [quarterturn] has no idea why the Apple System Profile reports an FPU-less CPU. It might be something in the ROM that tells the PowerBook not to use the FPU, in which case the obvious upgrade would be to replace the ROM with one from a PowerBook 550c or a Sonnet upgrade card. If you have either of those, I’m sure [quarterturn] would like to have a word with you.

LIDAR! We all know what the coolest use of LIDAR is, but it’s also useful for robots, drones, and other autonomous thingamadoos. Here’s a Kickstarter for a LIDAR module, 40 meter range, 360 degree range, 500 samples per second, and UART/USB connections.

[Bill] is trying to start a Makerspace in Fort Lauderdale. Here’s the indiegogo campaign.

We launched the 2016 Hackaday Prize this week. Why should you enter? Because last year, it seemed everyone who entered early won something. There’s $300,000 worth of prizes on the line. Need an idea? [Dave Darko] has just the thing for you. It’s the Hackaday Prize Buzzword Generator, the perfect thing for spitballing a few ideas and seeing what sticks.

stupid-ideas

Hacklet 100 – The 2016 Hackaday Prize

Welcome to the 100th Hacklet! This has been a huge week for Hackaday, as we launched The 2016 Hackaday Prize. We’ve invited you to change the world. Hackers, makers, and engineers have already answered the call, with nearly 200 entered projects! What better way to celebrate our 100th Hacklet than taking a look at a few of these early entrants?

rarmWe start with [Patrick Joyce] and Raimi’s Arm – Bionic Arm for Kids. Raimi was born with an arm which ends just below the elbow. She’s still a kid – and growing, which means she will quickly grow out of any prosthetic. This has placed bionic arms out of her reach. [Patrick] saw a plea from Raimi’s father for help. 3D printed arms for the disabled are a thing, but [Patrick] couldn’t find one which fit the bill for Raimi. So he’s set out to design one himself. This will be an open source project which anyone with the proper tools can replicate. [Patrick] has already created several test rigs, and is well on the way to building an arm for Raimi and others!

latheNext up is [castvee8] who has entered the 2016 Hackaday Prize with Building Simplified Machinery. Over the years, [Castvee8] has built a few 3D printers and CNC machines. These projects always start with buying the same parts over and over: ground rods, linear bearings, stepper motors, drivers, etc. [Castvee8] is trying to build 3D printed machines which use as few of these vitamins as possible, yet are still strong enough to work in wood, plastic, wax, foam, and other light maker-friendly materials. So far the simple, modular components and electronics have led to a mini mill, mini lathe, and a drill press for things like printed circuit boards. Keeping things low-cost will make these tools accessible to everyone.

turpump[Keegan Reilly] entered Everyman’s turbomolecular pump. Vacuum pumps are great, but everyone knows the real fun starts around 10^-7 Torr. Pulling things down this low requires a specialized pump. Two common designs are oil diffusion pumps and Turbomolecular pumps. Oil diffusion is cheap, but not everyone wants a hot vat of oil bubbling away in their vacuum chamber. Turbomolecular pumps are much cleaner, but very expensive. [Keegan] is attempting to design a low-cost version of a turbomolecular pump. He’s trying to use Tesla’s bladeless turbine design rather than the traditional bladed turbines used in commercial pumps. So far tests using a Dremel tool and paper discs have been promising – nothing has exploded yet!

commongroundFinally, we have [Samuel Bowman] with Seamless IoT Protocol Translation: Common Ground. Love it or hate it, the Internet of Things is going to be here for a while. Every device seems to speak a different language though . Z-wave, Zigbee, LoRa, WiFi, and a host of other protocols, all on different frequencies. Some are frequency hopping, some use mesh networks. [Samuel] is trying to design one device to translate between any of the emerging standards. Common Ground started as a science fair project connecting MQTT to Phillips Hue devices. Once [Samuel] achieved that goal, he realized how much potential there is in a universal translator box. We’re hoping [Samuel] achieves his goals quickly – it seems like new IoT standards are being introduced every day.

New projects are entering the 2016 Hackaday Prize every hour! You can see the full list right here. That’s it for the 100th Hacklet. As always, see you next week. Same hack time, same hack channel, bringing you the best of Hackaday.io!

Beyond Measure: Instrumentation Amplifiers

In the first article about measurement systems we looked at sensors as a way to bring data into a measurement system. I explained that a sensor measures physical quantities which are turned into a voltage with a variable conversion element such as a resistor bridge. There will always be noise in any system, and an operational amplifier (op-amp) can be used to remove some of that noise. The example we considered used an op-amp in a differential configuration that removes any disturbance signal that is common to both inputs of the op-amp.

But that single application of an op-amp is just skimming the surface of the process of bringing a real-world measurement of a physical quantity into a digital system. Often, you’ll need to do more work on the signal before it’s ready for sampling with a digital-to-analog converter. Signal conditioning with amplifiers is a deep and rich topic, so let me make it clear that that this article will not cover every aspect of designing and implementing a measurement system. Instead, I’m aiming to get you started without getting too technical and math-y. Let’s just relax and ponder amplifiers without getting lost in detail. Doesn’t that sound nice?

Continue reading “Beyond Measure: Instrumentation Amplifiers”

Crawl, Walk, Run: Planning Your First CPU Design

I’ve worked with a lot of students who want to program computers. In particular, a lot of them want to program games. However, when they find out that after a few weeks of work they won’t be able to create the next version of Skyrim or Halo, they often get disillusioned and move on to other things. When I was a kid, if you could get a text-based Hi-Lo game running, you were a wizard, but clearly the bar is a lot higher than it used to be. Think of the “Karate Kid”–he had to do “wax on, wax off” before he could get to the cool stuff. Same goes for a lot of technical projects, programming or otherwise.

I talk to a lot of people who are interested in CPU design, and I think there’s quite a bit of the same problem here, as well. Today’s commercial CPUs are huge beasts, with sophisticated memory subsystems, instruction interpreters, and superscalar execution. That’s the Skyrim of CPU design. Maybe you should start with something simpler. Sure, you probably want to start learning Verilog or VHDL with even simpler projects. But the gulf between an FPGA PWM generator and a full-blown CPU is pretty daunting.

Continue reading “Crawl, Walk, Run: Planning Your First CPU Design”

Embed With Elliot: Microcontroller Makefiles

Last time on Embed with Elliot, I began my celebration of the make command’s 40th birthday next month. We discussed using the default rules and how to augment them with your own variables defined in a makefile. Next, I’ll walk you through some makefiles that can be used for real-world microcontroller code development. This week, we’ll focus on one for the AVR platform, and later on, I’ll run through a slightly more complicated version for the ST32M series of ARM Cortex micros.

Along the way, we’ll pick up a couple of tricks, but the aim is to keep the makefiles minimal, readable, and easily extensible. Once you get a little taste of the power of writing your own makefiles, you probably won’t be able to stop adding bells and whistles — custom routines for flashing, checking the size of binaries, generating assembly listings, etc. I’ll leave the extras up to you, but you’ll eventually find that anything you do can be automated with a makefile.

Continue reading “Embed With Elliot: Microcontroller Makefiles”