| Electronics > Microcontrollers |
| first MSP430 project |
| (1/3) > >> |
| KTP:
Ok, I just did a really weak MSP430 first project. This is a bike 360 degree led strobe for my wife's recumbent tadpole trike. I used 135 lumen 170 degree smt leds from Digikey (I think they are like 3 or 4 watts each). I have three in series at the top of the flag pole to give a very full 360 degree visibility. I just dremeled a little scrap of copper pcb for each one to make a heat sink and a landing for the anode and cathode. Right now I just have it pulsing at 12V 1 amp, pulse on for 20ms, off for 150ms, on for 20ms, off for 500ms, repeat. This is pretty good for the battery life. The MSP430 is so easy to breadboard...just 3.3V and ground, and a 47K pullup on the reset line is all you need to get it off the launchpad board and into your breadboard. I am driving a OTC 4N36 opto from my junkbox directly with the MSP430 through a 100 ohm resistor and this is driving the gate of a IRF520N (all I had on hand). Seems to work pretty well, and checking the pulse at the leds with my Rigol shows a fairly good turn on (the turn off is a bit weak, but I am only using a 10K resistor to drain the mosfet gate to ground). I doubt the IRF520N will get very overworked only being on for 40mS every 690mS. I attached a video, but at 30fps you can't really see the short double pulse...in real life it is almost too bright to look at. |
| TopherTheME:
Wow, seizure city. Nicely done. Are you using IAR or CC for programming? |
| DJPhil:
--- Quote from: KTP on September 04, 2010, 02:08:47 am ---recumbent tadpole trike --- End quote --- I had to look that bit up, then I went, "Oh, that's what they're called!" :D It's good to hear that the chip's well behaved in a breadboard, that's a relief! I'm curious as well which IDE you went with. I'll be fumbling through my baby steps with one or the other in a couple of weeks or so, and I've still got to sort out the differences. That, and learn to program I guess. :) Well done. 8) |
| KTP:
Hey thanks. I used CC, which is extremely bloated for what I need (the simple c program compiling/assembling/debugging of the MSP430) but it seemed to work better than IAR. Seriously...1GB download to program a 2K part... |
| KTP:
Well my wife actually thinks it is too bright at night! We took the circuit outside to view it 360 degrees and at a distance, and a short time later a neighbor came out to see if there was a police car or ambulance at our house ;D I think I will add a pushbutton that selects 25%, 50%, and 100% brightness by implementing PWM of the LEDs during the 20mS pulse. The question now becomes do I need to implement a better driver for the gate of the IRF520N in order to actually fully turn on and off the mosfet during these faster PWM switching events... Maybe I could have the opto drive a small pnp and npn transistor in a push/pull configuration which charges and discharges the gate capacitance equally? Right now as mentioned, the emitter of the opto is dumping current directly into the gate (no idea how much, but it would depend on the amount of light hitting the base of the opto transistor and the gain of said transistor...probably 50 to 100mA going into the gate as a guess...) but the gate is only turned off by being discharged through a 10K resistor (totally lame, I know). Isn't it always funny how such a simple thing snowballs into something more complicated? :) |
| Navigation |
| Message Index |
| Next page |