Jump to content


  • Content Count

  • Joined

  • Last visited

Posts posted by CodilX

  1. The currents are maximum ratings and in A (ampere). So no, that's not the problem.


    The problem with these transistors is, that they can amplify current which flows coming from the MCU into the base of the transistor only by about 10-50 (hfe parameter in the datasheet). The current provided by the MCU is limited by the resistor, and typically is in the 10-20 mA range (if you tell us, what resistors you use, we can do the math). The LED strip might require 1 A or more, which would need a transistor with 50-100 gain.

    Honestly I have little to no idea what I'm doing :) I used these TIP51C for a lighting effect from an audio source. I had them laying around and just tried wiring them up the same way I found in that tutorial, I'm not using any resistors.


    My LED strip is less than 1M long, I've just cut off some to try out.


    I'll try and figure out what transistors would be best for this

  2. It definitely is possible, with the exact same setup as the example at Adafruit - as long as the chosen MOSFET turns on at 3.3V or less (it's 5V or less for Arduino), and the pins do support analogWrite() in Energia (color violet, all MSP430 LaunchPads have more than 3).

    I'm checking the TIP31C data sheet (https://www.fairchildsemi.com/datasheets/TI/TIP31A.pdf) and it shows Collector Current (DC) at 3V. But the Collector Current (Pulse) shows 5V. So I'm guessing that's the reason why it didn't work correct? This transistors requires 5V?

  3. I found some TIP31C's laying around. The board itself not 100% sure at the moment.


    I called my buddy who's into electronics and project such as this, he told me that the MSP430 only has 1 PWM output pin, so it seems this can be done easily only on the Arduino :(

  4. Yes, I was going to direct you to such a strip, but you could consider an RGB strip instead: http://dx.com/p/12v-54-led-rgb-light-strip-50cm-11304 (they have longer ones also at not much higher price). RGB is even cooler since you can change colour. 


    If you want to drive just a simple LED, you can do it straight from the port of the MSP, as long as you put a 150 ohm resistor in series. But for these strips and anything bright, you need to have a driver circuit. The simplest driver circuit is a mosfet, but you have to make sure you can drive it with the 3.6V from the launchpad.


    You also need some regulators etc, since your MSP430 needs 3.6V (or 5V via the USB), but the LED strip needs 12V. 


    If you are ok with soldering, then you could simply buy some MOSFETs and a prototype-board and connect up stuff. You could also look at some products like this: https://www.sparkfun.com/products/10256 (check that it can be used with a logic voltage as low as 3.6V)

    Does seedstudio sell the components I need? And what are those regulators?....

  5. If you just want a sound-level thing, only need a microphone board like this: https://www.sparkfun.com/products/9868 or http://www.seeedstudio.com/depot/grove-sound-sensor-p-752.html?cPath=25_27


    Connect the microphone board to an analog input of the MSP430 and use for example Energia to read the sound level. Go in a loop and read the sound level, then use the digital output of your MSP430s. Set more LEDs if the sound level is high. Then connect an LED (and a series resistor to ground) to each digital output. If you have large LEDs and want  lots of light, you need transistors or other driving circuits to give more current to your LEDs. 


    If the above is what you're looking for, I can draw a diagram for you. 


    If you want an equalizer, you could use this: https://www.sparkfun.com/products/10468 (you need to connect it to a mike board). It's quite a cool chip, and it would give you a more advanced effect. But it's slightly more tricky to use. 

    Wow! I already gave up on this idea, but this is awesome!! Thank you!! What I wanted is more of an automated solution - not having to hook up a direct input into the board, with a mic it's just far better.


    So I think the mic part is easy - just hook it up and read the level. The LEDs are another story, I just .. don't know how to do it..


    Edit: I'm thinking of also ordering this led strip http://www.seeedstudio.com/depot/blue-led-flexistrip-60-led1m-p-1120.html?cPath=81 do I need to order anything else in order to have all the parts needed to connect it to the MSP430?

  6. Adding a mic is easy- it'll connect to one of your ADC capable pins.

    There are several 'spectrum' analyzer projects on 43oh.

    Lighting up external LEDs will require some processing on the MCU based upon some criteria no one has defined.


    It's highly probable that someone here has done something relative to what you want.



    I'm sorry for all the newbie questions.. It's because I am one :( So I can just take apart a mic and "plug" in the wires to the headers and it will work??

  7. I've thought of making it software based, and sending the value of led brightness to the msp430 via serial, I guess that would be easy and doable for me. But then I thought I'd rather like a standalone system. So my first question would be, how do I add a microphone to the MSP430? Is it actually possible with Energia to use it, find some values and blink the onboard LED (first step) in regards to the music level or frequency or something I just haven't figured out how this should be done... Does Energia and/or the MSP430 have support for realtime audio analysis?

  8. Hi there,


    I've stumbled across a video (

    ) and I really want to make something similar, but small scale for now with a handful of LEDs. I have no experience in electronics, but have played around with my MSP430 with a 16x2 LCD display.


    Right now I have like 10 or so LEDs, and I want to know how to connect them to the board?.. I've seen articles how to connect 3 or so LEDs so that they could be controlled individualy, but how do I connect them so I can control them as one? Do I need resistors or any other electronic component apart from a breadboard that has a 3.3v or 5v supply? In terms of connecting them, and having them work (electricaly) to me is unknown. I hope someone could help me out..

    In terms of having the LEDs blink/fade with the music, how would you suggest doing that? Thanks.

  9. Hello there,
    I'm trying to output serial data received to the MSP430 and display it on the LCD. I do know that there is an example for it, but that way doesn't really work for me, the way I've planed my data to be received and outputed differs from the example.
    Here is what I'm tinkering with right now:

    #include <LiquidCrystal.h>
    LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
    String Input;
    void setup() {  
      lcd.begin(16, 2);
    void loop() {
      while(Serial.available() > 0) {
        Input += (char)Serial.read();

    However it breaks on the lcd.write(Input); line, it won't accept my string! The full error:


    sketch_apr14b.cpp: In function 'void loop()':
    sketch_apr14b.cpp:18:18: error: no matching function for call to 'LiquidCrystal::write(String&)'
    sketch_apr14b.cpp:18:18: note: candidates are:
    C:\LPad\energia-0101E0008\hardware\msp430\libraries\LiquidCrystal/LiquidCrystal.h:82:18: note: virtual size_t LiquidCrystal::write(uint8_t)
    C:\LPad\energia-0101E0008\hardware\msp430\libraries\LiquidCrystal/LiquidCrystal.h:82:18: note:   no known conversion for argument 1 from 'String' to 'uint8_t {aka unsigned char}'
    C:\LPad\energia-0101E0008\hardware\msp430\cores\msp430/Print.h:57:20: note: virtual size_t Print::write(const uint8_t*, size_t)
    C:\LPad\energia-0101E0008\hardware\msp430\cores\msp430/Print.h:57:20: note:   candidate expects 2 arguments, 1 provided
    C:\LPad\energia-0101E0008\hardware\msp430\cores\msp430/Print.h:56:12: note: size_t Print::write(const char*)
    C:\LPad\energia-0101E0008\hardware\msp430\cores\msp430/Print.h:56:12: note:   no known conversion for argument 1 from 'String' to 'const char*'


    Is there any way I can write a string to the LCD?..



  10. Thanks for the links.


    So as I understand, my best option would be to use shift registers. Of course I have more questions about them, I hope someone here is patient enough to guide me through this :)


    I found a video showing that it is possible to successfully control a large-ish number of LEDs with the MSP430



    My question is.. or are


    a) Am I limited to a set number of shift registers in terms of connecting them, or is it limited to the processing power the MSP430 can handle? Or both?

    B) Controlling. As I understand, I could connect the shift registers (don't get it if directly to the MSP430 or via another control interface). How would I be able to interface with specific shift registers, to power on/off the required LED(s)?

    c) Wiring. Kinda combines both questions. Is it possible to connect one shifter and then forward information to the next with on of the pins, or .. Just .. How to wire everything up?

    d) Does Energia support interfacing with registers? And is it "plug&play"?

  11. My goal is to create something like this:



    Only without having such an input :) I'd do the actual reading of required text/animations from my PC via serial, or hard coded into the MSP430, but I believe there isn't enough RAM to handle that, so I guess serial communication is the best option. It's just that I want to figure out how to wire up and control those LEDs individually with the MSP430.

  12. Thanks for your response :)


    I want to keep it DIY, I'm not interested in buying a final product :) What I do want fo find out is how to control a large number of devices, in this case multiple LEDs individualy with one main device (LaunchPad). Later on I'd like to create a 3D LED cube, but getting a 2D display is a start :)

  13. Hi there,


    I'm new to electronics as well as micro controllers, so please be gentle :)


    I really want to create a net of LEDs to hang on my window during Christmas, and use the LaunchPad to control it (I'll be writing the code in Energia). The problem is, I don't know how to start.


    Could someone please clarify what steps need to be taken to create such a project? I'd like a net of leds, say ~30x30 or so, maybe bigger so I could write text on it, or smaller, simply to share the Christmas spirit :)


    After viewing some tutorials on wiring LEDs and controlling it with the LaunchPad - seems easy. But how do I wire up and control 100 or 500 or 1000 LEDs individually?

  14. Thank you for the share, it helped my grasp the ability of using the one button for multiple purposes. For instance I was able to create a function where the press of a button adds to an index, while holding it longer than 1 seconds refreshes the index. Thanks again and good luck

  15. Thank you. So for the time being I guess there is now way to fix this, and just wait for the update?


    Also, if anyone could help me get PuTTY working with the LaunchPad would be awesome. I've seen a bunch of videos of people being able to do so, but they're using CCS to write and compile their programs, so is this issue of not being able to send commands to the LaunchPad in any way related to it being compiled by Energia?


    I've just checked, that commands sent from PuTTY actually get received, but in a weird way. If I enter a string in the PuTTY terminal, press enter, close PuTTY, reopen the Energias COM tool and send something, I will receive what was written in PuTTY along with the newly inputted text. To me this seems like a communication error? If I open Energias COM tool, write something and send it, then close the tool, reopen and do the same thing - I never get the previous lines submitted. So as far as I understand a newline isn't sent, or isn't correctly interpreted by the LaunchPad?

  16. Hi there,


    I'm trying to create a sort of CLI for the LaunchPad via Cygwin on Windows. Basically I'm trying to create different "programs" on the LaunchPad, and display the results on a LCD I have coming. For the time being, for development purposes I'm just using the serial com to emulate the output.


    My goal is to have a few programs, such as display number of new emails, show current PC down/up speed, PC sensor readings etc, and being able to navigate through them via the input button on the LaunchPad.


    To do so, I need serial input/output. I need the LaunchPad to send a request to my PC, such as, receive number of new emails, get the output and display it on the LCD (serial com for now).


    It almost works perfectly, just I have an issue with the characters. Sometime the characters get messed up, and the commands are thus broken. Is this due to actual ascii characters being sent? Maybe I have to reset the onboard memory to free space for the receiver? Here's my code for testing the input and displaying what was received. I guess it has something to do with the input being sent/received, as if I add a check if(Input == "some command") { Serial.println("This command was received!"); } It doesn't always display this message, as you can see by the output - it sometimes receives gibberish.


    String Input = "";    // string to hold input
    void setup() {
     Serial.println("Enter Input");
    void loop() {
     while (Serial.available() > 0) {
       int Receiver = Serial.read();
       Input += (char)Receiver; 
       if (Receiver == '\n') {
         Input.replace("\n", "");
         Input = ""; 

    I then send a series of test strings - test; lorem; ipsum; qwerty; launchpad - each of them 3 times. My output is attached below.


    Also a quick question, how do I enable sending characters through Putty? I can view the output just fine, but I can't enter anything.




  17. Hi there, I'm trying to get an internal temperature reading using the follow code


    float temp = 0;
    void setup() {
    void loop() {
     temp = analogRead(TEMPSENSOR);

    And my reading is:










    What is this? How do I convert these numbers to celsius?


    And also, every time I try finding the brightness of my LED, it always returns nothing


    int BrightnessVal = digitalRead(GREEN_LED);
    Serial.println("Green LED brightness: " + BrightnessVal); 



  • Create New...