An MSP430 Clone Of The Canon RC-1 Remote

For reasons we both agree with and can’t comprehend, most ‘prosumer’ SLR cameras don’t have mechanical shutter releases. Instead, IR LEDs are brought into the mix, the Canon RC-1 remote trigger being the shutter release of choice for people who didn’t choose Nikon. [Vicente] cloned the Canon RC-1, but he didn’t do it to save money; there’s a lot to learn with this project, and making his own allows him to expand it with more features in the future.

Studying the function of the Canon RC-1, [Vicente] found that some compromises needed to be made. The total power emitted by an IR LED is usually a function of its beamwidth; a smaller beamwidth means more photons reaching the IR receiver in the camera. This also means the remote must be aimed at the camera more accurately. In the end, [Vicente] decided on a higher power LED with a tighter beamwidth that’s just slightly below the optimum wavelength for the receiver. It’s all an exercise in compromise, but other components could see similar performance.

With the LED selected, [Vicente] moved on to building the actual controller. He chose an MSP430 microcontroller for its low power consumption, driving the LED with a watch battery and a transistor. Put together on a piece of protoboard, it’s actually pretty close to a TV-B-Gone. With everything soldered up, it’s good enough to trigger his camera’s shutter from about 5 meters away. Future improvements include cleaning up the code, making the timing more accurate with a crystal, and implementing low power mode on the MSP430.

An MSP430 Flash Emulation Tool From An MSP430

It isn’t much trouble programming one of TI’s MSP430 chips, but outside of the official Flash Emulation Tool, TI doesn’t make programming one of these microcontrollers cheap. The most common way of programming an MSP430 is using a Launchpad Dev board, and [Vicente] has the best looking one yet.

The MSP430 series of chips can be programmed through JTAG or Spy-By-Wire, and the official, professional engineering tool from TI for these chips costs about $100. Those of us with more sense than money have another option – use one of the TI Launchpad dev boards as an MSP430 programmer.

[Vicente]’s project uses the MSP430G2 Launchpad, with just a few wires going to the proper connector found in the official programmer from TI. There are a few limitations; the programmer only works at 3.6V, so programming 1.8V devices might not be a good idea. Also, it only works with Spy-By-Wire and no JTAG support is available. Still, it’s a great looking project, and does exactly what it’s designed to.

 

MSP430 Scheduler

Multitasking On The MSP430F5529 LaunchPad

What exactly is multitasking, scheduling, and context switching? This is a great question for those interested in understanding how operating systems work, even small real-time operating systems (RTOS). [Jeffrey] had the same question, so he built a multitasking scheduler for the MSP430F5529 LaunchPad.

These topics are some of the most difficult to wrap your head around in the embedded world. Choosing a project that helps you understand tough topics is a great way to learn, plus it can be very rewarding. In his post, [Jeffrey] goes over the basics of how all of these things work, and how they can be implemented on the MSP430. Overall, it is a great read and very informative. For more information on RTOS, check out a few sections in the FreeRTOS book. Be sure to see his code in action after the break.

[Jeffery] was nice enough to release all of his code as open source, so be sure to check out his repository on GitHub. “Feel free to use it and learn more. I have made the code self explanatory. Enjoy!”

via [43oh.com]

Continue reading “Multitasking On The MSP430F5529 LaunchPad”

Low-Power Orientation Tracker And An Optimized Math Library For The MSP430

MSP430 Orientation Tracker

Orientation trackers can be used for a ton of different applications: tracking mishandled packages, theft notification of valuables, and navigation are just a few examples! A recent blog post from Texas Instruments discusses how to build a low-cost and low-power orientation tracker with the MSP430.

Based on the MSP430 LaunchPad and CircuitCo’s Educational BoosterPack, the orientation tracker is very simple to put together. It can also be made wireless using any of the wireless BoosterPacks with a Fuel Tank BoosterPack, or by using the BLE Booster Pack with a built in Lithium Battery circuitry. TI provides all the necessary code and design files in their reference application for getting your orientation tracker up and running. Be sure to see the device in action after the break! This project not only involves building a low-power orientation tracker, but also showcases IQmathLib, a library of optimized fixed point math functions on the MSP430. One of the more challenging aspects of using small MCUs such as the MSP430 or Arduino is how inefficient built in math libraries are. Check out the IQmathLib, it greatly improves upon the built in math functions for the MSP430.

It would be interesting to see this project modified to be a DIY pedometer or be used on a self-balancing robot. It would also be interesting to see the IQmathLib ported to other micros, such as the Arduino. Take a look and see how you can use this reference design in your own projects!

Continue reading “Low-Power Orientation Tracker And An Optimized Math Library For The MSP430”

MSP430-Based CTF Hardware Hacking Challenge

Hardware 'Flag'

Hacking conferences often feature a Capture the Flag, or CTF event. Typically, this is a software hacking challenge that involves breaking into targets which have been set up for the event, and capturing them. It’s good, legal, hacking fun.

However, some people are starting to build CTFs that involve hardware hacking as well. [Balda]’s most recent hardware hacking challenge was built for the Insomni’hack 2014 CTF. It uses an MSP430 as the target device, and users are allowed to enter commands to the device over UART via a Bus Pirate. Pull off the exploit, and the wheel rotates to display a flag.

For the first challenge, contestants had to decompile the firmware and find an obfuscated password. The second challenge was a bit more complicated. The password check function used memcpy, which made it vulnerable to a buffer overflow attack. By overwriting the program counter, it was possible to take over control of the program and make the flag turn.

The risk of memcpy reminds us of this set of posters. Only abstaining from memcpy can 100% protect you from overflows and memory disclosures!

 

Java Grinder Spits Out DsPIC And MSP430 Assembly Code

java-code-grinder

[Michael Kohn] sent in a link to the set of projects he’s been working on lately. The Java Grinder is a project that converts Java code for use on microcontrollers. This actually started back in 2009, when he mentioned that the project was worthless because there were already a ton of Java virtual machines out there. But if he had really thought that he’d never learn anything. We’re glad [Michael] picked this back up and made something out of it.

The image above shows the proof of concept. It’s a box bouncing around the Nokia 6100 screen. He wrote the animation in Java, and used his grinder to turn the code into dsPIC assembly, which was then compiled and flashed onto the microcontroller. That’s not all, he’s also coded a Mandelbrot set generator or the same hardware. As it stands he can also produce assembly code for use on MSP430 chips.

This kind of exploration is great for the brain. We see it as a natural extension of the learning you acquire from Nand2Tetris which walks through the essential text The Elements of Computing Systems. If you’re not familiar, that’s a trip from building your first logic gate, which you plunk together with others to build an ALU, then start coding all the way up to a virtual machine to run on your simulated hardware.

Video of the bouncing box and Mandelbrot set is below.

Continue reading “Java Grinder Spits Out DsPIC And MSP430 Assembly Code”

A Better USI I2C Library For The MSP430

USI

TI’s MSP430 chips are rather interesting – they’re low power, very capable, and available for under a dollar in most cases. Some of these chips, though, don’t have native SPI or I2C interfaces; instead, everything is done through a USI, or Universal Serial Interface module. [Jan] found the stock I2C USI module was a little rough around the edges, so he created his own.

[Jan] found the TI example code for using the USI as an I2C device overly complicated and something that an intern whipped up in a week and was never touched again. In response to this, he created a much, much simpler USI/I2C module that’s actually readable. It’s available over on the GitHub if you want to grab it for yourself.

Compared to the TI code, [Jan]’s library is dead simple. There are only two functions, one for initialization, and another for sending and receiving. Easy, small, and it works. Can’t do much better than that.