Bare-metal Programming On The Teensy 3

Teensy

The Teensy 3.x series of boards are amazing pieces of work, with a tiny, breadboard-friendly  footprint, an improbable amount of IO pins, and a powerful processor, all for under $20. [Karl Lunt] loves nearly all the features of the Teensy 3, except for one: the Arduino IDE. Yes, the most terrible, most popular IDE in existence. To fix this problem, [Karl] set up a bare-metal development environment, and lucky us, he’s chosen to share it with us.

[Karl] is using CodeBench Lite for the compiler, linker, assembler, and all that other gcc fun, but the CodeSourcery suite doesn’t have an IDE. Visual Studio 2008 Express is [Karl]‘s environment of choice, but just about every other IDE out there will do the same job. Of course a make utility will be needed, and grabbing the docs for the Freescale K20 microcontroller wouldn’t be a bad idea, either.

The end result is [Karl] being able to develop for the Teensy 3.X with the IDE of his choice. He was able to quickly set up a ‘blink a LED’ program with the new toolchain, although uploading the files to the Teensy does require the Teensy Loader app.

 

[Bunnie] Launches the Novena Open Laptop

Novena Laptop

Today [Bunnie] is announcing the launch of the Novena Open Laptop. When we first heard he was developing an open source laptop as a hobby project, we hoped we’d see the day where we could have our own. Starting today, you can help crowdfund the project by pre-ordering a Novena.

The Novena is based on the i.MX6Q ARM processor from Freescale, coupled to a Xilinx Spartan 6 FPGA. Combined with the open nature of the project, this creates a lot of possibilities for using the laptop as a hacking tool. It has dual ethernet, for routing or sniffing purposes. USB OTG support lets the laptop act as a USB device, for USB fuzzing and spoofing. There’s even a high speed expansion bus to interface with whatever peripheral you’d like to design.

You can pre-order the Novena in four models. The $500 “just the board” release has no case, but includes all the hardware needed to get up and running. The $1,195 “All-in-One Desktop” model adds a case and screen, and hinges open to reveal the board for easy hacking. Next up is the $1,995 “Laptop” which includes a battery control board and a battery pack. Finally, there’s the $5000 “Heirloom Laptop” featuring a wood and aluminum case and a Thinkpad keyboard.

The hardware design files are already available, so you can drool over them. It will be interesting to see what people start doing with this powerful, open computer once it ships. After the break, check out the launch video.

[Read more...]

Boxing + Arduino + Geometry = Awesomeness

arduino-boxing-blocker

Imagine a machine that [Anderson Silva] could throw a punch at, that would locate his fist in real time and move a punching pad to meet his moving fist. How would you do it? Kinect? Super huge sensor array? Sticking charm? What if we told you it could be done with two electret microphones, an Arduino, and a Gumstix? Yeah, that’s right. You might want to turn your phone off and sit down for this one.

[Benjamin] and his fellow students developed this brilliant proof of concept design that blocks incoming punches for their final project. We’ve seen boxing robots here before, but this one takes the cake. The details are sparse, but we’ve dug into what was made available to us and have a relatively good idea on how they pulled off this awesome piece of electrical engineering.

[Read more...]

Designing a WakeUp Light

[Akhil] and his wife recently finished their WakeUp Light project. As the name suggests, this kind of morning alarm uses light to wake you up in the morning. The main constraints when starting this relationship-strengthening adventure were cost, ability to work with any table lamp, and having a simple but effective control interface, all while keeping all the design open. The created platform (put in the wooden box shown above) is built around a Stellaris Launchpad (ARM Cortex M4 based) and uses an AC dimmer circuit found in this instructable. For our readers interested in those, [Akhil] mentions two very interesting articles about their theory of operation here and here.

An Android application has been made to set up all the alarm parameters, which uses the phone’s Bluetooth to communicate with the (well-known) HC-05 Bluetooth transceiver connected to the Launchpad. For safety, the current design also includes an LM4876 based audio amplifier connected to the microcontroller’s PWM output. The next revision will integrate a Digital to Analog Converter and an SD-Card slot for better quality and music diversity. A presentation video is embedded after the break and you can find the official repository at GitHub.

[Read more...]

Embeded Sieve of Eratosthenes: Hunting Primes on ARM

Embeded Sieve of Eratosthenes

I ended up with just enough time over the weekend to pull together a quick project. I implemented the Sieve-of-Eratosthenes on an ARM chip.

If you haven’t heard of the Sieve of Eratosthenes then you really need to work your way through Project Euler. That’s where I first learned about this method of finding prime numbers. You begin with a list of all numbers, find a prime, then remove all multiples of that prime from the list. The real trick with doing it on a microcontroller is to figure out how to store a large list of numbers in a limited space. The gist of my method was to use a boolean array (I call it a bit-packed array but that may be the wrong way of saying it). The details are found in my project linked at the top.

‘Why?’ is almost always the wrong question to ask around here. But in this case, I did this because I wanted to try out the Bit Banding functionality of the ARM core. These chips have alias addresses that map to a single bit in the SRAM and also some of the peripheral registers. This allows read or write access for a single bit using a single instruction. Turns out that one side effect of 32-bit architecture is having addresses to burn.

Bitbanging USB On Low Power ARMs

M0

With the Adafruit Trinket, the Digispark, and some very clever work with the smallest microcontroller Atmel offers, it looks like the ‘in’ thing to do for embedded software developers is to bitbang the USB protocol on hardware that shouldn’t support it. There are a lot of very small ARM chips out there without USB support, so it was only a matter of time before someone was able to bitbang USB on the ARM Cortex M0+.

The board above is based on an Energy Micro EFM32ZG, a very small 24-pin QFN device with up to 32 kB of Flash and 17 GPIOs. As with all the bitbanged USB hacks, the differential data lines are attached directly to the microcontroller. A 24 MHz crystal is needed, but the team behind the project is working on using the internal RC oscillator instead.

The code is portable with minimal changes between other manufacturer’s Cortex M0+ chips, and with a little work, this could become a very, very cheap USB-programmable ARM dev board, something the community could certainly use.

GEVCU – an Open Generalized Electric Vehicle Control Unit

At Hackaday we’re very happy to see the increasing number of open hardware devices that appear everyday on the internet, and we’re also quite thrilled about open-source electric cars. Pictured above is the GEVCU, an open source electric vehicle control unit (or ECU). It is in charge of processing different inputs (throttle position, brake pressure, vehicle sensors) then send the appropriate control commands to electric motor controllers (aka inverters) via CAN bus messages or digital / PWM signals.

The project started back in December 2012 and was originally based on an Arduino Due. Since then, the GEVCU went through several revisions and ultimately a complete custom board was produced, while still keeping the Cortex M3 ATSAM3X8E from the Due. As you may have guessed, the board also includes a Wifi transceiver so users may adjust the ECU parameters via a web based platform. All resources may be downloaded from the official GitHub.

Follow

Get every new post delivered to your Inbox.

Join 94,528 other followers