Jump to content

Search the Community

Showing results for tags 'leds'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Found 3 results

  1. GrownUp LA Gears

    As I teased a little bit in another post, here's my latest project: GrownUp LA Gears! For those of us who were growing up in the mid 90s, LA Gears were the best thing you could strap to your feet. They had LEDs in the heal that would flash when you walked. I wasn't lucky enough to have a pair when I was a kid, so maybe this whole thing is just me living out a lost childhood fantasy..... Much like the WS2811 driver library this project is being used to demo, I also snagged the idea from AdaFruit: https://learn.adafruit.com/firewalker-led-sneakers/overview I recommend reading through the post, since they do a better job of explaining things than I will here. While their design is good, there are some improvements to be made. Mainly, there isn't an MSP430 in it. Hardware I didn't want to strap a launchpad to my shoe, so I deadbuged a 430 with the minimal requirements to run it. A small 3.3V LDO, pins broken out for input and programming, and a pullup on RST. I don't have pictures of the final build, but you get the idea. Once all the joints were made, they were encased in hot glue, the best strain-reliever and sealer known to man. For the shoe itself, the LEDs where mounted around the perimeter and glued in with RTV silicon adhesive (https://learn.adafruit.com/firewalker-led-sneakers/attach-neopixel-led-strip). I ended up drilling some holes in the battery case and sewing it to the side of the shoes. The Chucks worked well because they have handy vent holes on the sides to run wires through (they are also classy for every occasion). AdaFruit used a custom sensor made of velostat, a material which changes resistance when force is applied. If you connect the sensor between ground and an analog input, then turn on an internal pullup for that IO, you can essentially make a simple voltage divider. The problem here was that the velostat sensor I made went from 1kohm with no pressure, to 300 with pressure. This in series with the internal 40k of the MSP was just too small a range to detect well. I ended up using a force sensor from SparkFun that goes from 1Mohm down to 1kohm. It saturate at 10kg, but it works well. I may revisit the velostat for cost reasons, but I'm happy with this guy: https://www.sparkfun.com/products/9376 I ended up just gaff taping it down inside the heal. With LEDs on, and sensor in place, it just has to be wired up. Here's a quick block diagram and image of what it all looks like mounted. You can see that I left TEST and RST on there for programming. Software The main push behind these was that I had the modifications to Rickta59's WS2811 driver done, and needed a demo platform ( http://forum.43oh.com/topic/2882-energia-library-ws2811driver-led-controller-class/ ). Since that lib does the hard part, the rest of the Energia project is pretty easy, and hopefully well documented in line. #include <WS2811Driver.h> #define N_LEDS 44 // TOTAL number of LEDs in strip #define SHOE_LEN_LEDS 23 // Number of LEDs down ONE SIDE of shoe #define SHOE_LED_BACK 8 // Index of REAR-MOST LED on shoe #define STEP_PIN 2 // Analog input for footstep #define LED_PIN 3 // NeoPixel strip is connected here #define MAXSTEPS 3 // Process (up to) this many concurrent steps #define STEP_TRIGGER 30 #define STEP_HYSTERESIS 200 WS2811Driver strip = WS2811Driver(N_LEDS, LED_PIN, NEO_GRB); //Globals, becouse lazy boolean stepping = true; // If set, step was triggered, waiting to release uint8_t dup[SHOE_LEN_LEDS]; // Inside/outside copy indexes uint16_t Filtered; uint8_t step_order = 1; void setup() { //Enable internal pullup for analog sensor pinMode(STEP_PIN, INPUT_PULLUP); //Setup the array to index the two sides of the shoe memset(dup, 255, sizeof(dup)); int8_t a, b; for(a=1 , b=SHOE_LED_BACK-1 ; b>=0 dup[a++] = b--; for(a=SHOE_LEN_LEDS-2, b=SHOE_LED_BACK+SHOE_LEN_LEDS; b<N_LEDS;) dup[a--] = b++; //Start the LEDStrip strip.begin(); //Max desired drightness strip.setBrightness(255); } void loop() { //Wait until a step is detected while (stepping == false) { pinMode(STEP_PIN, INPUT_PULLUP); Filtered = analogRead(STEP_PIN); if(Filtered < STEP_TRIGGER) stepping = true; } //A step has been detected, so play the desired pattern //Pulse a different color each step and then fade out switch(step_order){ case 1: colorWipe(strip.Color(0, 0, 255), 5); // Blue step_order = 2; break; case 2: colorWipe(strip.Color(255, 0, 0), 5); // Red step_order = 3; break; case 3: colorWipe(strip.Color(0, 255, 0), 5); // Green step_order = 1; break; } for(uint16_t i=0; i<128; i++) { strip.setBrightness(255-(2*i)); strip.show(); } colorWipe(strip.Color(0, 0, 0), 1); // blank strip.setBrightness(255); //Restore brightness for next pass //Simple back to front color wipe /* colorWipe(strip.Color(128, 0, 10), 5); // Redish colorWipe(strip.Color(255, 255, 255), 5); // White colorWipe(strip.Color(0, 0, 0), 5); // blank */ //Holdoff until the foot has been lifted while (stepping == true) { pinMode(STEP_PIN, INPUT_PULLUP); Filtered = analogRead(STEP_PIN); if(Filtered > STEP_HYSTERESIS) stepping = false; } } // Fill the dots one after the other with a color void colorWipe(uint32_t c, uint8_t wait) { uint8_t j; for(uint16_t i=0; i<strip.numPixels(); i++) { strip.setPixelColor(i+SHOE_LED_BACK, c); // Pixels along inside are funny... j = dup[i]; if(j < 255) strip.setPixelColor(j, c); strip.show(); delay(wait); } } Final Product And here it is! I wore then to a friend of mines baby gender reveal party, and the three AAAs lasted all night. No idea what the actual battery life is yet, but I'll probably do a V2 with a LiPo system. The rainbow pattern is actually in the sample code I put with the library, I was just testing it here. The videos really show it off. Just ignore my messy living room. These are both out of the code I posted above, just comment out the different sections.
  2. [POTM] RGB Binary Clock

    This project is an update to the binary clock that I used on my desk. The new version has a lot of new features including RGB leds(WS2812), a bigger microcontroller(The Olimexino-5510 board), capacitive touch and light sensor. My first idea was to have something based on the MSP430G2553, a couple of WS2812 leds and capacitive touch. But after comparing the work i would have to do, and very few rewards to the Olimexino-5510 functionality I quickly reconsidered. The Olimexino-5510 provides quite a few things I wanted: MSP430F5510 Battery Charger USB capabilities Arduino Form Factor So all I had to do was make a nice board that went on top with the stuff I wanted for the clock functionality. WS2812 RGB LEDs The main feature of the Clock is the 6x3 WS2812 RGB led matrix. These leds contain a little controller that accept a serial protocol for the color data and they handle the PWM. They're also chainable meaning that only one pin(D11, LED-DATA) is required to quite all of them. In my using @@oPossum's library Power Supply The Olimexino-5510 has a connector for a battery. But it just connects the battery to the 5V rail, the battery could go as low as 3V. The WS2812 aren't meant to run that low, specifically the Blue led get a lot dimmer. In order to fix this I incorporated a SMPSU that can get 5V from the battery voltage. It could in theory handle as much as 2A. The design was done with TI Webench, all parts are the same as the suggested ones. I had to modify the Olimexino a little to actually give me the raw battery voltage on the shield connector, on battery there's no voltage on the 5V pin, i assumed there was. It all works quite well now except it's kinda whiny. The WS2812 leds are very bright, so in the darkness this might be a problem. One could dim them by sending them a darker color but this reduces resolution. Q2's purpose is to PWM is the 5V that the LEDs in order to dim them externally. This essentially gives another scaling factor for the brightness. It's a similar principle to how dynamic contrast works in TVs. Unfortunatelly this did not work as I wanted, the mosfet was too slow to PWM the leds fast enough without aliasing. My next design will probably contain a mosfet driver. Capacitive Touch Pads I have 4 pads acting as buttons. I originally connected them directly to some pins assuming I had PinOsc hardware like on the value line. Unfortunately I discovered this was not the case too late. I fixed it by adding 2 resistors between each of the pairs. This allows me to do a pretty crappy RC measure. It still works quite good though, i can get about 200 discrete values of the reading. As suggested by TI I had a non solid ground plane of the backside to reduce the intrinsic capacitance. Light Sensor The shield also has a light sensor, meant to measure ambient brightness. One can use this to make the display's brightness match the room. The sensor is connected via I2C, since neither the Arduino nor the Olimexino-5510 have I2C exposed on the pins I will have to do a software solution for this. The TCS34725FN sensor is also capable of measuring RGB color; I'm sure something fun can be accomplished using that. Of course I managed to do the footprint wrong for this, so it required some cutting traces to swap some pins; after that it worked just fine. Eagle Files I also have the schematics in PDF format. Code The current code is mostly made to prove the hardware. It could use a lot more work for the UI. Features Clock Functionality with fading SMPSU Off demo Capacitive Touch Demo Light Sensor Demo USB CDC ported from Energia that i used for debugging so far Everything was compiled with msp430-gcc. I uploaded the firmware using the new f5529 launchpad board due to the fact that mspdebug does not support the olimexino usb bootloader. Parts Most parts I got from digikey, except the Olimexino-5510, the beefy 6600mAh battery and the WS2812 leds. I got a pretty good price for the LEDs from Alibaba at only 13 cents each. I ordered the board through Elecrow, I really needed it to be black. Meta My old clock was this boring thing with an attiny44, using a matrix of green leds. I originally started this version(v2.0) as a school project, but I wanted to share it. Due to the many issues I had I'll probably make a version 2.1(if i fix the shield) or a v3 if I make a standalone board. I'm open to ideas. I still have quite a few board leftover(about 7), i'm open to sending them to people if postage is cheap/free/easy. Imgur album for non-users.
  3. Hello, Guys! So, as some already know I 'm a noob with embedded system and I really I'm liking of the series MSP430 by TI. I am trying make this code work, but so far I did not succeed, What I want is a simple led sequential on the breadboard, the breadboard will be 9 Leds, being 6 on Port 1, e just 3 in the Port 2 for now. That code work but not syncronized, I'd want which when end the first "array" of the leds, starts the seconds "arrays" of the leds (port 2, 3 leds), I would like to use someone like struct in C but I don't have know enough yet, the code: #include <msp430G2553.h> void Delay(void); void sequencial(void); char led1[7] = {BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6}; char led2[3] = {BIT0, BIT1, BIT2}; volatile int i = 0; volatile int f = 0; int main(void) { WDTCTL = WDTPW | WDTHOLD; P1DIR = 0xff; P2DIR = 0xff; for (; { sequencial(); } } void Delay(void) { unsigned int dly = 30000; while(--dly); { } } void sequencial(void){ i++; Delay(); P1OUT = led1; if(i==7) i=0; P1OUT |= 0x00; f++; Delay(); P2OUT = led2[f]; if(f==3) f=0; P2OUT |= 0x00; } The outpouts are working separately not synchronized, How do I make this? Thanks!