GMU:Connecting Max to the World/Gracia Quintero: Difference between revisions

From Medien Wiki
No edit summary
No edit summary
Line 55: Line 55:
The LED lights used in this project are analog ones.
The LED lights used in this project are analog ones.


<gallery>
 
[[File:https://i.postimg.cc/Qtn5J6cm/led-strips-analogstrip-t.jpg]]
https://i.postimg.cc/Qtn5J6cm/led-strips-analogstrip-t.jpg
</gallery>
 


''Because there are three LEDs in series, you cannot drive these LEDs from a 5V supply. The LED strips say "+12V" on them to mark the anode and that's the maximum voltage we suggest. Each segment of 3 LEDs draws approximately 20 milliAmperes from a 12V supply, per string of LEDs. So for each segment, there is a maximum 20mA draw from the red LEDs, 20mA draw from the green and 20mA from the blue. If you have the LED strip on full white (all LEDs lit) that would be 60mA per segment.''  
''Because there are three LEDs in series, you cannot drive these LEDs from a 5V supply. The LED strips say "+12V" on them to mark the anode and that's the maximum voltage we suggest. Each segment of 3 LEDs draws approximately 20 milliAmperes from a 12V supply, per string of LEDs. So for each segment, there is a maximum 20mA draw from the red LEDs, 20mA draw from the green and 20mA from the blue. If you have the LED strip on full white (all LEDs lit) that would be 60mA per segment.''  


<gallery>
 
[[Media:https://i.postimg.cc/pdcBXQqw/led-strips-wires-t.jpg]]
https://i.postimg.cc/pdcBXQqw/led-strips-wires-t.jpg
</gallery>
 


I had to look for a 12V power supply that would be capable of powering up the whole system. I also has to solder cables from each RGB channel, and a 4th one for the power. Until it looked a like this:
I had to look for a 12V power supply that would be capable of powering up the whole system. I also has to solder cables from each RGB channel, and a 4th one for the power. Until it looked a like this:


<gallery>
 
https://i.postimg.cc/zGVvYnHb/led-strips-heatshrunk-t.jpg
https://i.postimg.cc/zGVvYnHb/led-strips-heatshrunk-t.jpg
</gallery>
 


Once the LED stripe was ready, I had to fix the arduino board and the breadboard in order to be able to control each LED channel individually. For this, I needed MOSFETS:
Once the LED stripe was ready, I had to fix the arduino board and the breadboard in order to be able to control each LED channel individually. For this, I needed MOSFETS:
Line 77: Line 77:
You can use any power NPN or N-Channel MOSFET, make sure the transistor is rated to be able to pass as much current as you need. For example, since we draw about 0.2Amps per channel per meter, if you have a 5 meter strip you will need to pass up to 1 Ampere per transistor. Get the beefy "TO-220" packages, not the dinky little guys. Make sure they look like this:''
You can use any power NPN or N-Channel MOSFET, make sure the transistor is rated to be able to pass as much current as you need. For example, since we draw about 0.2Amps per channel per meter, if you have a 5 meter strip you will need to pass up to 1 Ampere per transistor. Get the beefy "TO-220" packages, not the dinky little guys. Make sure they look like this:''


<gallery>
 
https://i.postimg.cc/TPNZMDmw/led-strips-7805-t.jpg
https://i.postimg.cc/TPNZMDmw/led-strips-7805-t.jpg
</gallery>
 


And the connection in the breadboard goes like this:
And the connection in the breadboard goes like this:


<gallery>
 
https://i.postimg.cc/qvbmzd7D/led-strips-ledstripfet.gif
https://i.postimg.cc/qvbmzd7D/led-strips-ledstripfet.gif
</gallery>
 


As you can see. Each cable we soldered to the LED stripe, was placed in the middle leg of each MOSFET. Each right led was connected to another cable that went to the channel 5, which is the main controller in the arduino code. And each left leg, was connected by bridge to the ground in the arduino board. The extra cable for the LED stripe power supply was not connected as shown in the picture, it was connected directly to the 12V power supply.
As you can see. Each cable we soldered to the LED stripe, was placed in the middle leg of each MOSFET. Each right led was connected to another cable that went to the channel 5, which is the main controller in the arduino code. And each left leg, was connected by bridge to the ground in the arduino board. The extra cable for the LED stripe power supply was not connected as shown in the picture, it was connected directly to the 12V power supply.


<gallery>
 
https://i.postimg.cc/4NBCbqdV/led-strips-m0-analog-rgb-bb.png
https://i.postimg.cc/4NBCbqdV/led-strips-m0-analog-rgb-bb.png
</gallery>
 


Arduino code: [[:File:sketch_mar12a.ino]]
Arduino code: [[:File:sketch_mar12a.ino]]
Line 97: Line 97:


MAx code: [[:File:FINAL PATCH.maxpat]]
MAx code: [[:File:FINAL PATCH.maxpat]]
<gallery>
 
https://i.postimg.cc/4dVyYsXz/Untitled.png
https://i.postimg.cc/4dVyYsXz/Untitled.png
</gallery>
{{#ev:vimeo|328945477|640 x 480}}
{{#ev:vimeo|328945435|640 x 480}}
{{#ev:vimeo|328945387|640 x 480}}
{{#ev:vimeo|328945366|640 x 480}}




Line 122: Line 111:




<gallery>
{{#ev:vimeo|328945477|640 x 480}}
{{#ev:vimeo|328945435|640 x 480}}
{{#ev:vimeo|328945387|640 x 480}}
{{#ev:vimeo|328945366|640 x 480}}
</gallery>




==Homeworks==
==Homeworks==
[[/Homeworks]]
[[/Homeworks]]