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.

Designing, Simulating And Testing A Simple Radio Duty-Cycling Protocol For Contiki

A few days ago we featured [Marcus]’ Contiki port to the TI Launchpad, Contiki being an open source operating system dedicated to the Internet of Things created by [Adam Dunkels] at the SICS in Sweden. Part of [Marcus]’ work involved designing a simple radio duty-cycling protocol that achieves 3% idle listening duty cycle while allowing for an average 65ms latency with no prior contact or synchronization.

As a few readers may already know, it takes quite a lot of power for a wireless device to listen/send data. A platform therefore needs to have an algorithm that minimizes power consumption while allowing a (regular) planned data transfer. After creating his protocol named SimpleRDC, [Marcus] first simulated it using the Cooja simulator in order to check that it could perform as desired. He then implemented a real life test and checked the protocol’s performance by sniffing the SPI lines connecting his MSP430 to the wireless module and by monitoring the platform power consumption with his oscilloscope and a shunt resistor.

A Tiny Clock With A Retro Display

After having ported Contiki to his TI Launchpad platform, [Marcus] was eager to do something with it. He therefore built a simple clock with a vintage HPDL-1414 “smart four-character 16-segment alphanumeric display” and a msp430g2553.

The result that you can see above is powered over USB, includes a 3.3V LDO linear voltage regulator as well as a button, a LED, a crystal, and several passive components. Fortunately enough, the 5V-powered HPDL-1414 display accepts 3.3V logic at its inputs, avoiding the need for level translators.

The clock program is running on the ported Contiki 2.6 that you can find on his Github repository. [Marcus] is considering using a vibration motor to buzz every 20 minutes during work hours as a reminder for the 20-20-20 rule to battle eye fatigue: every 20 minutes, look at something 20 feet away for 20 seconds. A video of the system in action is embedded after the break.

Continue reading “A Tiny Clock With A Retro Display”

Porting Contiki To The TI MSP430 Launchpad

For many years Contiki has been one of the main choices when it came to choosing an IPv6 over Low power Wireless Personal Area Networks stack (aka 6LoWPAN). It is developed by a world-wide team of developers with contributions from Atmel, Cisco, ETH, etc… and is open source. As most platforms to which Contiki has been ported are quite expensive, [Marcus] decided to bring the operating system to the TI Launchpad. For our readers that don’t know, the latter is based on a msp430g2452/2553 microcontroller, which only have 256/512 bytes of RAM and 16kB of ROM. As a side note, Contiki typically requires 10k RAM and 30k ROM.

[Marcus] therefore had to remove several features from Contiki: queue-buffering, energy estimation and regrettably uIP. His test setup (shown above) uses the TI CC2500 radio that can be found for less than $2 on Aliexpress, for which he wrote radio drivers from scratch. He also coded his own radio duty-cicling layer, as the one included in Contiki was too big.

Stylish OLED Watch Uses Accelerometer Instead Of Buttons

A few days ago [Andrew] contacted us to offer his help for the design of the mooltipass project case. While introducing himself, he casually mentioned his OLED watch that you can see above.

The watch is based on the low-power MSP430F microcontroller from Texas Instruments. It can consume as little as 1.5uA while maintaining a real-time clock and monitoring interrupts. It also uses ferroelectric RAM, which doesn’t need any power to retain its memory contents. That means there’s no need to set the time again if you remove the CR2016 battery that powers the watch.

[Andrew] chose an 0.96″ OLED display that only consumes up to 7mA. He also included an accelerometer that allows him to interact with the watch through its single and double tap detecting feature. He modeled his PCB using EagleCAD and the whole assembly using Sketchup. Most of the components were soldered in his reflow (toaster) oven. The final result is a mere 8.8mm thick and looks very professional in our opinion.

Hackaday Links: November 10, 2013

hackaday-links-chain

[Henryk Gasperowicz], the wizard of electrons who makes LEDs glow for no apparent reason, has put up another one of his troll physics circuits. We have no idea how he does it (he does say he’s using wireless energy transmission) so a few solution videos would be cool, [Henryk].

Altoids tins make great electronic enclosures, but how about designing your PCBs to fit mint and gum containers? Here’s a Trident USBASP, a tiny Tic Tac ISP thingy, and a Mentos USB to JTAG interface.

By the end of this week, the PS4 will be out, along with the new PS4 camera. It’s a great camera – 1280×800 at 60Hz – but unless someone develops a driver for it, it shall forever remain tethered to a PS4. Luckily, there’s a project to develop a PS4 camera driver, so if you have some USB 3.0 experience, give it a shot.

Multimeter teardowns? [David]’s got multimeter teardowns. It’s an HP 3455A, a huge bench top unit from the 80s. This is, or was, pro equipment and strange esoteric components definitely make a showing. ±0.01% resistors? Yep. Part two has some pics of the guts and a whole ton of logic.

The US Air Force Academy just moved their embedded systems course over to the MSP430. Course director [Capt Todd Branchflower] just put all the course materials online, with the notes, datasheets, and labs available on Github.

Wireless Encryption Between Galileo And A MSP430

[Mark] recently finished his latest project, where he encrypts wireless communications between the new Intel Galileo and a Texas Instruments MSP430. The wireless interfaces used are the very common nRF24L01+ 2.4GHz transceivers, that had a direct line of sight 15 feet range during [Mark]’s tests. In his demonstration, the MSP430 sends an encrypted block of data representing the state of six of its pins configured as inputs. This message is then received by a sketch running on the Galileo and stored in shared memory. A python script then wakes up and is in charge of decrypting the message. The encryption is done using AES-128bits in Electronic Codebook mode (ECB) and semaphores are used to prevent simultaneous accesses to the received data. As it is the first project using an Intel Galileo we received, don’t hesitate to send us a tip if you found other ones.