Hi all,
I've been a programmer for many years but I got an Arduino last year to teach myself electronics. I had a blast making a heap of things such as a 1 handed keyboard and laser beam obstacle course. Reading all the tutorials and helpful posts on this site has been a GREAT help since I've had no formal electronics training. I've now decided to make something a little more power hungry and before I spend the cash and get soldering I'd love it if someone could just sanity check my set-up. Since I'm fairly new and mostly self taught there is bound to be some (or lots) of things I've forgotten or screwed up ![]()
For this project I want to turn on/off a few sets of LEDs with a pressure sensors. It reads the pressure sensors with analogue input and use the PWM output to fad in/out the LEDs. Think extremely small/limited version of a 70's disco dance floor. Press a "tile", pressure sensors register touch, a bunch of LED's inside the tile turn on (proportionally to the pressure).
I've have a demo set-up with 1 sensor running 1 led and it works great. But to make it light up a bigger tile brightly I'm going to need more LED's - I guessing at 10 or 20 per tile. My understanding is 1 PWM pin can't handle the current required for that many LEDs. Arduino pins can output 20mA max I believe so going by the LED wizard at http://led.linear1.org/led.wiz, with 15 LED's in parallel I need 300mA ... which clearly a no no. So the LEDs will need to be powered separately.
I've looked at LED controller specific chips but they're mostly about being able to control each LED individually. Since I only want to turn 1 set of LED's on and off I don't believe I need that (and I'd like to build as much as I can myself). My arduino has enough analogue inputs, and PWM outputs to cover the number of tiles I want, it's just the power it can't handle. After looking around an n-channel mosfet that I control from the arduino seems like a good solution.
Circuit Diagram is attach. Important parts are:
Power supply: http://www.jaycar.com.au/productView.asp?ID=GH1379&form=CAT2&SUBCATID=1000
- Output: 12VDC @ 5 Amps total
LED: Super Brights Australia | Little Bird Australia
- 3.4V, 20mA
MOSFET: http://www.jaycar.com.au/productView.asp?ID=ZT2400
- 2N7000 n-channel, 200mA, 60v
So back to LED Wizard page. With 12volt source, 3.4v LED drop and 20mA current for 15 LEDs I get: 5 parallel sets of 3 LEDs in series, which a should draw 100 mA. If the 2N7000 has a max current of 200ma, then I don't think I'll destroy the mosfet with this setup (and 12v is way below the 60v limit).
Now if I'm using 100mA per "tile" with 15 LED's, then the power supply at 5Amps should be ok with supporting 5 tiles all in parrallel. That will be 500mA, well below the 5A limit (circuit diagram only has 3 sets of LED blocks but the idea for 5 sets is identical).
Then I'll hook up the Arduino PWM outputs to the gates of the mosfets, to turn each set on/off (with a pull down resistor so that the PWM pin don't float when the Arduino is off).
Ok - so what have I screwed up? There's always something. Or anything that can be improved? All comments welcome, thanks!
(Please excuse my Australian links, since I live in Australia shipping cost of shipping from US/EU is sometimes 2x or 3x the price of the parts so it's much better if I can source stuff locally and Jaycar is only 10minute driver)
*** Attachment doesn't seem to have worked: Uploaded it here instead! ***