Tuesday, September 25, 2012

PILED and the state of the Launchpad

A lot has happened since our last blog post...

  • The RCOS hackathon (which was a great success) resulted in two different fully functional PILED wireless bluetooth control apps. Thanks to Zachary Clapper, there is now a functional Android app for controlling lighting levels (RGB mixing). In addition, an application was created for Windows allowing the PILED board to be run as a strobe, RGB mixer, or sequenced light effects.
  • LIB3 and PILED demonstration materials for MakerFaire - LIB3 will be at MakerFaire this weekend! There will be several RGB LED fixtures, demo computers set up with the new control software, as well as some obligatory banners and such...
  • TI has started shipping their new launchpad development boards - 4.99 will get you a Cortex M4 based system, with an 80MHz CPU, 32Kb ram, 256Kb flash, and 43 GPIO (Among other things, like 12 bit ADCs operating at 1000 ksps)... This is a pretty cool system - I can't wait for my order to get here. This also goes to show that TI has found their 'Launchpad' experiment to be successful enough to continue it with new, much more powerful models; the MSP430 launchpads are still available, and their community is expanding.

Friday, August 3, 2012

Knock, Knock. Who's There? Launchpad!

Today we had a maybe not so common problem that is being solved with the Launchpad: our doorbell doesn't work... Yeah, not so common, but a problem nonetheless. So, after figuring out how the thing was supposed to be wired in the house, the work had to be done on the launchpad. Or so we thought. 

A while back some people wrote code for the older launchpad chip to make it output music to an external speaker. We got it working just fine, but there's no guarantee that it works on the newer g2553 model that all currently shipped launchpads have. So that is definitely the first step in getting this to work. I really like this program. If the code is readable, it would make a great little music editor you could play with. But, back to the problem at hand.

Getting the doorbell behavior is basically what interrupts were made for. You can put the Launchpad into the deepest sleep imaginable, and get all the functionality you would need: a simple button press. 

We'll get details up later, but this shaped up to be a really cool, but surprisingly simple bit of launchpadmanship to tackle a practical problem. Also, our doorbell is a song from Super Mario, how cool is that? See everybody at RCOS, I can't believe this is the penultimate meeting already.

Friday, July 27, 2012

Presentation # 3 (Plus, Video # 2)

Hey everybody, back again. We just wrapped up presentation #3 today, which went off with manageable hitches. There were a couple technical difficulties but they were able to be fixed on the fly luckily. Jorel has added bluetooth capabilities to the PILED board, and demonstrated its nifty serial console features. This also demonstrated how the relatively low amount of memory is not really a problem. This board has quite the large amount of code on it. More than you would expect in a lot of projects. But the msp430 can certainly handle it, even large arrays of data (see the rcos easter egg when we have the video). Just goes to show you that 16kb is quite a bit in microcontroller land.

Next, Energia is pretty cool. The code controlling the PILED board was written in it , and all around it has some slick features. There are still some kinks to be worked out, but wow, if you have windows Energia has quite the edge over CCS I believe (CCS code is valid code in Energia, but you also get the additional Arduino-esque code, a nice bonus). If it keeps shaping up like it has been, Energia will make the msp430 quite formidable as an open-source microcontroller solution.

Following the wall of text, we have the slides from presentation #3, and the video from presentation #2.
Thanks for watching, I hope you learn a little something. And now:

Presentation #3:



Video #2:

Tuesday, July 24, 2012

Charging up with Energia

We (mostly Jorel) did some cool things with Arduino's evil twin known as Energia. This program is much more powerful than I thought it would be, and it's getting better still. One of the main drawbacks I see in Energia is the fact that it is not really supported on linux (I tried many times in vain to install it). Well, look no further, there is in fact a self-contained beta version for Ubuntu. It does a lot of things perfectly, except one, which requires a major caveat. Wrestling a hippopotamus is easier than getting some of the serial programs to work. Other than that, Energia offers a whole new world to windows users, and a great deal of functionality and ease of use for linux users, sans serial. So check out the beta at the link, I hope there will be more to come (For Linux users only, Windows has a working build).

Energia-Linux Beta Build (link is in pbrier's 2nd comment)
Installation requires a bit of finangling, I might write up a little tutorial on how to get this working, if anyone reads this and has trouble, feel free to drop  me a line.

  So, what are we doing with this? One word: Bluetooth. We are toying with working Bluetooth into the LED tile and other such things, so you can control and program them from a distance, as well as enable the LED tile send feedback, ask you how your day was, maybe get the kettle going for when you get back from work (just kidding about the last two, but the last one would be sweet, home automation fame here we come!). Expect tremendous and daring feats for our third presentation.

 Finally, on a project related-note, Energia is quickly growing in our hearts, and looks as though it may devour Code Composer Studio as defacto introductory programming platform for the msp430, at least for us. If Energia can get its act together on Linux then the battle is already won in my book (getting anything that combines the programmer and the compiler in one fell swoop is already ahead of the game compared to CCS. Throw in the fact that Energia is FOSS, and that turkey is basically cooked).This gives me a whole new perspective on programming the msp430, and makes the msp430 a more formidable tool in the eyes of the Arduinauts. Things like porting Arduino code effectively and efficiently are now possible with the progress made by Energia. Expect more Energia-based code from us soon.

Monday, July 23, 2012

Presentation Reloaded

Hello everybody, just letting you know what's brewing for this week;s presentation. We have presentation #3 coming up this Friday (the video for presentation 2 is currently being uploaded, your patience shall be rewarded). For presentation #3, we will have everything working, plus a little extra. We got in the bluetooth modules to hook up to the light boards, so we'd like to get them talking to the computer for the presentation. The lightboard has really come together very well, and the business logistics are shaping up very well. I'll see if I can put together a post on this facet, because the open source business model seems very confusing and people should know that it indeed can be successful. That's all for now, I'll continue keeping the readership up to date on all our developments.

Saturday, July 14, 2012

Bug in the System

Well, that was fun, for the most part. We've been making steady progress on our project, and we just had our second presentation. This one was interesting to say the least. First, I decided that it was a good idea to connect to RPI's internet for the first time 20 minutes before our presentation. Big mistake. We had to borrow a colleague's computer, which meant that my demos were unusable. While Jorel's PILED prototype is functioning perfectly, the makeshift power supply (there is no official one, as of yet) decided to take the day off and malfunction, and all he could do is show people what they looked like and what the features are. In true Friday the 13th we brought it home and the power supply has worked flawlessly ever since, perhaps some cosmic force is conspiring against us (wouldn't be the first time).

Other that that the presentation was very good. Jorel lectured on the topic of the sRGB color space, and how he implemented it in the code for the PILED board (a very interesting topic. When it comes to lighting, making a light that looks and feels 'right' while not being resource-heavy is extremely difficult). I also had a bit at the end discussing Energia, a port of the Arduino IDE for the msp430, a truly great step for hobbyists everywhere.

We've signed up for another presentation in 2 weeks. We will work out all the kinks so we can do a great presentation and make RCOS proud.

Finally, Jorel's brewing up a whole bunch of great things in relation to the PILED Development System, an msp430-based development board with a focus on driving RGB LEDs and being a fun, simple multimedia programming medium. The way this device is coming together is nothing short of breathtaking, so have a look, you won't be disappointed. As always, thank you for the support.

Slides after the text, youtube video will follow as soon as it's available.


Friday, July 6, 2012

Check this Fly PCB, Yo!!!

Bad title. I know. I took a direct hit to the dignity but I think I'll survive. The main point is the initial design for Jorel's board and a discussion of 5V logic and the msp430. First, pictures, and a breakdown of what this board has to offer. Also, marble makes a nice photo stage, just throwing that out there.

Look at those boards, you know you want one. It has nice binding posts for peripherals,
as well as shorting blocks for its pins, so you can choose what is connected.

Note the MOSFET drivers, the main application is for driving LEDs, but they are versatile for all your needs.

This is where the magic happens. It has a surface mount msp430-g2553, as well as an lm386 op-amp with microphone input. It can do some cool things like dealing with audio input e.g. flashing leds to music.

My personal favorite is the slide potentiometers. Originally proposed as light controls (RGB color mixer, color temperature, fading) they can be used for a myriad of interesting things. A general crowd-pleaser.

The final feature of note is the 3.3V and 5V regulators (bottom right corner), a proper step forward that makes the msp430 a real contender in the hobbyist market. I'd like to discuss this more.

I've been working to make traditional sensors and peripherals msp430 compatible with code. However, I ran into a significant problem: a lot of common stuff i.e. my ultrasonic range-finder, needs 5V for its VCC. But, the msp430 and the launchpad only do 3.3V logic because its better for power conservation. So, how do we solve this problem? Honestly, there really is no easy answer, you need the 5 Volts one way or another. I initially used a USB-Serial converter which has a 3.3V and 5V rail (Additionally, a chip or device like this is in the planning stage of being added to Jorel's board, but he does not know if it will be feasible to include it, leave some feedback on what you guys think. Additionally, another option is to use the launchpad as a plugin to this board for use of its bootloader). This worked great, but it also required additional parts, as I needed to make what were essentially BJT RTL inverters to interface the 3.3V to 5V logic as an output. It seems like the msp430 can take a 5V logic input just fine. It's not recommended, although I haven't had any serious malfunctions or broken pins/inputs yet. Jorel has solved that problem with by including both logic levels in his board, a swift solution to my problem. It's one step closer to making this an msp430-friendly world. That's all I've got for today, tune in next time for more interesting goodies.

Greetings from the World of Tomorrow !!!

Apologies for anyone reading as I haven't been as diligent as I'd like in updating the blog, but we have some relatively exciting updates. First, we have another presentation coming up next week, so stay tuned for that in a bit. Next, we have some cool project updates on the agenda I'd like to discuss.

First, we have Jorel's prototype experimenter board. They boast improved functionality and robust features not available to the normal msp430 board, and initial plans show it to be quite feasible financially. There will definitely be a lot of exciting developments brewing with this project, so keep your eyes peeled. Pictures and feature descriptions will follow forthwith in another post. Also, as a side note, Jorel is also the eponymous purveyor of lalicki.com, a journey through time, space, and electronics, with notes on some of his insane projects (check out his cnc machine and the stereo amp). The site is under construction, so mind the dust and bits, but once complete I'd like this blog to serve as a little gateway to lalicki-land.

Second, I'd like to talk about some developments and problems in working with the msp430 (one of which Jorel's board solves). As a successor to my software UART for educational purposes on the operation of serial communication, I have implemented a basic hardware UART on the msp430. I feel for practical projects, this is the best choice. Using this, instead of keeping track of your bits yourself, one can simply load a byte into the TX buffer, and it handles the timer and data behavior. All you need to do is set up the right conditions (which was slightly annoying, I should probably write a little something about that). I've gotten a gain of about 4x the data (9600 up from 2400 baud @ 1MHz. 19200 was spotty, I kept getting something like "hello wldr%". I think boosting the clock will allow me to boost the data rate cleanly). Anyway, the final product is a very modular code for implementing a reasonably fast hardware UART, a very good development in my book. The example python script I wrote for it can send and receive from the launchpad (currently all it does is echo "hello, world" very, very quickly, but it has more functionality. I am also putting the UART to use in my current applications, Arduino sensors.

I have some common Arduino-ish robotics sensors that I'd like to make msp-compatible, so 430-ites have access to common robotics sensors. Currently, I have an ultrasonic range-finder program working, msp430-style. It is heavily interrupt driven, and can spend quite a bit of time in Low-Power Mode 3, LPM3 (basically the point of the msp430, has a real-time clock and all interrupts active using an incredibly low amount of power). It intermittently sends out pulses until it "locks on" to an object or obstacle, then scans faster to get more accurate data. I'm planning on using it for a mouse control for our second presentation (same gimmick, I know, but I like it). I like the different coding style compared to Arduino, it gives the msp430 a distinct flavor and spiciness about it, even if power conservation is not totally necessary. However, it was a nightmare to get working initially, and that will be discussed with the details on Jorel's board in the post "Why  My Things Didn't Work, How Jorel's Board Fixed it, and Why I'm not Allowed in Estonia Anymore" (just kidding, its not called that, Estonia and I are still on speaking terms). Stay tuned for this and more.

Wednesday, June 20, 2012

Project Updates 6 / 20 /12

There have been several big developments in our projects that I would like to make our followers aware. First, Jorel has placed schematics and documentation on his LED board. Checkout the repo to see all the glorious ASCII Art in his documentation. Second, I have placed a basic tutorial for circuit theory, and a modified copy of Paul Falstad's Analog Circuit Simulator under the CIRCUITS_TUTORIAL folder in the repo. You can use these to test general circuits and learn some mathematical and conceptual theory about circuits.

Finally is some major development in general project direction. We are going to focus heavily on creating practical projects, both small and large, and teach the relevant theory within the scope of projects. This means we will largely be diverging from the format of a typical textbook for our circuit theory, which I am okay with. After this first basic tutorial was completed, no matter how good it is at instilling conceptual information, I did not feel it was adequate and I think that learning purely through practical examples is a better medium for learning, or certainly a viable alternative to a traditional text. This is all in line with our original set goals, but I feel this implementation is much better. After all, we are not going to introduce students to electronics better by making a traditional text, just because it's free. So, with that in mind, look forward to some cool projects and designs which we will be churning out.

Saturday, June 16, 2012

Our First Presentation

I felt our first presentation was very informative and very cool. Usually those two things don't go hand in hand. I laid out the goals of our project, and Jorel dazzled RCOS with his RGB tile prototype, totally controlled by the launchpad. I also used a Launchpad to navigate my slides using a Python script to read serial and translate it into computer actions. The slides are posted here, but for the grand tour I would recommend the video, you get a better idea of what we have in mind and you get to see the cool things we demonstrated with the launchpad. Although, at ~30 mins, I cannot call our presentation brief, so if you want to skim through the slides and skip to exciting part of the presentation, start at the 20:00 mark (Jorel's RGB light tile is not to be missed !!!). Preceding this is very cool information about timers and PWM, so the student in me wants you to watch that too. So, let's start watching.

The slides:

Embedded controls


The video ( 33:44 ):

Sunday, June 10, 2012

A note on running CCS under Linux


The main point of this post is the problem of running Code Composer Studio under Linux. I think CCS is a fantastic IDE, open source or not, and it is our default platform for our code, but running it under anything but Windows is quite problematic. But, for Linux users, there's usually always a workaround, and for programming the microcontroller, this comes in the form of alternate output files.

CCS has predefined steps that allow you to create an Intel hex file or TI txt file, which can then be loaded onto the microcontroller using mspdebug like so:

> mspdebug rf2500
> prog file.hex

so, how do we accomplish this? Simply open up a project in CCS, then follow these commands:

1. Click the "Project" dropdown in the toolbar near the top of the window.

2. Click "Properties" (should be all the way at the bottom)

3. A new window will pop up. In the directory tree on the left, Click "Build"

4. Now you should see a screen with several tabs. click the one which says "Steps"

5. Now In the window at the bottom there is an option "Apply Predefined Step"

6. Now you can pick between an Intel Hex or TI txt image. The choice is yours, there's no difference is size or speed.

7. Now clean and build the project, and you will have a flash image to program.

8.your image is in the Debug folder of your project. Navigate to this folder, and use the mspdebug commands at the beginning of the post.

9. (Optional) Buy and consume hot fries, rosemary and olive oil triscuits or other snackitudinal accoutrements, because you're done.

And that's it for programming. I'm currently working on a reliable way to actively debug the microcontroller (look at the contents of the registers). That's another major hurdle.

Expect a more code-related post this week, I pretty much have my environment set up for Linux (Ubuntu definitely works, and I am working my way through getting it to work on openSUSE (which rocks, and you all should get it)). That's it for now, tune in next time.

Sunday, June 3, 2012

43oh-my !

Wow, we caught 43oh.com's eye when we are barely off the ground. Truly, we are grateful, but we hope we aren't being misrepresented. While our intentions were properly stated, I feel our officiousness was overstated. I want to make it clear that while as a member of RCOS (Rensselaer Center for Open-Source Software) we hope to make a top-notch comprehensive lab-based curriculum fit for an official course, we are not affiliated with any official RPI course at this time. That being said, we are beginning full-time work on the project, so make sure to follow the repository at

web address:
http://code.google.com/p/embedded-electronics/source/browse/

clone:
svn co http://embedded-electronics.googlecode.com/svn/

And again,thank you so much, having 43oh's support means so much. we hope we can teach this thriving community a thing or two through our work.

Tuesday, May 22, 2012

3...2...1...Liftoff

Hello, and Welcome to the start of the In-depth Intro to Electronics and Embedded Controls using the MSP430 Launchpad, undertaken as part of RCOS at RPI. It is our goal to bring an open-source collection of beginner-friendly educational resources and software libraries to those uninitiated in programming, electronics, or both. Our microcontroller of choice is the TI MSP430 series, specifically using the ridiculously affordable Launchpad Development Board. Arduino is the dominant force in the hobbyist electronics community, so we thought it would be refreshing to introduce people to embedded electronics with these nifty little controllers. The MSP offers quite a different skill set compared to the AVR chips in the Arduino, skills that we hope to highlight through traditional electronics projects as well as projects that let the MSP shine. Finally, the other part of our project which this writer is stoked for is an introduction to general circuit and electronics theory. I am always stunned when I see people able to build robots and helicopters with what seems like only basic conceptual knowledge of how their circuits are operating. Our goal is to help instill this conceptual knowledge, and extend this to theoretical knowledge to show people the wonderful world of electrical engineering. We will discuss all these things and more, through this blog, through the RCOS website, as well as a wiki that we have in the works, so stay tuned for this and more.