HighVoltageLP 0 Posted March 26, 2017 Share Posted March 26, 2017 So I have my MSP430 launchpad with g2553 and g2452 lying around for year now and finally have a reason to use it. I'm a total noob (I mean I programmed some assembler and C in college and know some basic stuff about MCUs but never actually put it to use), but my for my first project I've picked a tough one. That way I'll be challenged and won't get bored. So I've just bought a motherboard that only has 2 fan connectors on it, but I need at least 4 of those, so I decided to make a fan controller. I could just use some 7805s but what's the fun in that? The idea is to use the inferior msp430g2452 controller from the launchpad to generate 4 pwm channels to control 4 fans by changing the duty cycle with potentiometers. From what I've found on the internet, you can only have as many PWM channels as Capture/Compare Registers on a timer, but the first one will always be used for frequency and have 50% duty cycle. 2452 has only one timer with 3 CCRs, so I could only use 2 PWM channels. With g2553 in a 20 pin package that number is 3 and for SMD package you could have 4 PWM channels. But from what I understand from page 6 in tidu761 design guide, you could have as many software PWM channels as you have GPIO pins available. They can all be the same frequency after all, I only need to change the duty cycle. So far as I keep researching design guides and datasheets I have a few questions: 1) What frequency should I use for PWM? I'm guessing it should at least be outside the audible range, so 25 to 30khz should be fine, right? 2) What pins should I use? I would need at least 4 pins for potentiometers, say P1.0 through P1.3 and 4 pins for PWM, P2.0 to P2.3 would be fine? Or should I use some specific pins? Thanks for reading this! Quote Link to post Share on other sites
dubnet 238 Posted March 26, 2017 Share Posted March 26, 2017 First of all, welcome to the forum! In terms of pin usage you will want to pay attention to pins already used by the Launchpad (e.g.switches and LEDs) to avoid conflicts. With regard to the fan speed control, why not use temp sensor(s) in lieu of the potentiometers fed into the A./D converter? Perhaps just one, or possibly two, would be enough to adequately control the speed of all four fans. Just a thought.... HighVoltageLP 1 Quote Link to post Share on other sites
HighVoltageLP 0 Posted March 26, 2017 Author Share Posted March 26, 2017 Thanks, I'm glad to be here) I won't be using the launchpad itself in the final product, only as for debugging and flashing the MCU. I will make a pcb and mount it to the 5.25" dummy with pots on the outside, hopefully nice and tidy) As for the temp sensors, I might fiddle around and make use of motherboards temp sensors in the future by connecting this contraption via COM port and writing some software to manipulate fan speeds from Windows, but that's a long shot, for now I just want to be able to manually dial in the speed to decrease the noise when I'm not pushing my machine that hard and get maximum airflow in the summer while playing some games using headphones) I've just noticed I don't have any free SATA 15 pin power connectors and those are the only ones with 3.3v rail in them (aside from the motherboard 24pin). That's kinda weird, considering my PSU has 28A available to the 3.3v rail and has only 2x SATA 15 pins and mobo 24 pin to distribute it. I might have to splice into one of the connectors to power the MCU or just use Atmega8a which I'm sure I have lying somewhere too. Quote Link to post Share on other sites
dubnet 238 Posted March 27, 2017 Share Posted March 27, 2017 If you use the 2553 on your own PCB you will want to replicate the reset circuit (capacitor and resistor) that the Launchpad uses. Otherwise the MCU won't run. On the temperature sensor(s) I was envisioning using something like an LM34 or LM35 placed near the area in the PC enclosure you are interested in keeping cool. If this is done then when the PC is idling along the fans should run slower and when you are pushing it the fans will run at near maximum speeds. I would guess that you have some free four pin power plugs (with 5V) in the chassis. If you add a 3.3V linear regulator to your PCB to drop the 5V then it would resolve your power issue without splicing. HighVoltageLP 1 Quote Link to post Share on other sites
HighVoltageLP 0 Posted March 27, 2017 Author Share Posted March 27, 2017 Yeah, the current draw is not that high, might as well put a LM1117 there, with 250µA peak draw it's less than half a watt to dissipate, shouldn't even get hot. I'm having trouble finding the maximum impedance for ADC in the g2452 datasheet, I'm thinking 100K linear pots would do the job? Quote Link to post Share on other sites
dubnet 238 Posted March 27, 2017 Share Posted March 27, 2017 I forgot to mention that the MCU has an internal temp sensor that you could potentially use as part of your design. Mux resistance is listed at 1K (page 32 of the datasheet). If your source impedance gets too high then you run the risk of more noise. If you find your A/D results bouncing around significantly then you may need to drop from 100K to perhaps 50k or less. tripwire 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.