Project tutorial

MOSMusic © MIT

Portable lighting station synchronized with music, with the Infineon CoolMOS C7 MOSFET.

  • 2,491 views
  • 9 comments
  • 17 respects

Components and supplies

Necessary tools and machines

Apps and online services

About this project

MOSMusic(MM)

Portable lighting station synchronized with music.

Always use technology to improve the world, if you are a black hat or gray hat hacker please abstain at this point......... or at least leave your respects to make me feel less guilty XP.

Introduction

Nowadays for an organizer or independent musician, events, reunions and parties may not follow the traditional way of arriving, playing and leaving. Fans today require a higher level of entertainment, which led to organizers having to buy expensive lighting and sound control systems to achieve the level needed for the fans' show.

This type of lighting systems have a complex and expensive system of controls to handle each of the lights, most of the time it is necessary to set up a light show beforehand for each of the songs, increasing even more the costs.

Here are some similar products in the market, which are of very low quality:

None of the products available in the market sell for less than 40 dollars. They only allows the control of low power elements such as LED's, but if we really want to control high power elements we need a circuit that is capable of it without risking the controller, in this case an Arduino.

The Circuit

The purpose of the circuit is to switch from a digital signal of 0-5 V DC to a control signal of 120 V AC.

In the first stage of the circuit we have an Infineon 600VCoolMOS C7 MOSFET, which will allow us to control the optocoupler demanding the minimum current to the Arduino board, because the optocoupler requires at least 5 volts at 36mA to be able to drive. This is very close to the limit of the current that the Arduino board can supply, however the 600VCoolMOS only requires a signal of 5 volts at 60uA, thus showing an excessive improvement in the consumption that it requires from the board.

This consumption is extremely important because it gives us the possibility of being able to literally use any controller to perform this task due to its low consumption, thus not requiring more expensive drivers that can supply said power in their ports.

The MOSFET's operation is to ground the optocoupler diode, once this is activated it allows the flow of energy through the DIAC and this in turn allows the passage of current in the TRIAC connected to the lamp and igniting it in the process.

The other great advantage of using the MOSFET is the ease of increasing the number of drivers as in Image 1 or using more powerful drivers as in Image 2 without changing the design of the main circuit.

Different results in different boards:

Another solution to this project would have been to use relays, which have the function of performing this same task but mechanically, by generating a "Click" on each switch. The problem with this type of component is that if we use dimerizable lights or the switching frequency was larger, the relay could not perform this task, which the mosfet, optocoupler and triac can easily do.

The PCB (or Protoboard)

For this project it is possible to make individual modules to be able to expand the number of bulbs or high voltage devices connected to the Arduino or to any other board.

You can also make a complete module for 4 AC outputs this in order to integrate the entire system on one PCB, both files are in the "PBC Files" folder in the Github or in the footer of the project.

Development

To develop this circuit, we first tested each of the stages were carried out to demonstrate its effectiveness, the first circuit to be tested was the control of the bulbs by means of a button and safety gloves due to high voltage. (Please if you are to replicate the experiment use any safety measures possible, playing with live current is not wise).

Test circuit 1

For the second circuit since the Lamp control works well, a platform with LEDs was made to see how the Arduino controlled the lights to the rhythm of the music, the code is in the "Arduino Code" folder, the code is thoroughly commented.

Test Circuit 2

Once we saw that the lights control worked, we connected all the components of the whole circuit in a protoboard, to control the 4 lights and connected it to the Arduino.

Full test circuit.

As you can see this was done in steps to manage safety, I repeat it is dangerous managing live 120V AC power so take any precautions into consideration.

The Final Product

With the circuit running, we decided to make control modules like the one shown in the image to not depend on any cable failing in the breadboard.

The board was made based on the one that is in the folder "PCB Files" however since we did not have transfer paper we had to make the vias with a sharpie. It is a permanenr marker so when you dip the plate in ferric chloride it survives, this process is the classic one for making homemade PCBs. You can get to know more about this process in the following link:

https://www.hackster.io/Junezriyaz/how-to-make-pcb-using-marker-531087

After making three aditional PCB's, we decided to put the entire circuit in a box, covering it and with 4 identical lamps so that this was a more aesthetic product and easy to transport.

And we are done! With this we have finished the light synchronization system for electrical elements (120 or 220 volts).

Wooooooooooooo

Comments:

This project was carried out in order to demonstrate that the control of lights through microcontrollers can be efficient and cheap, since current systems at a much lower quality are sold at excessive prices and therefore not available to all.

And to showcase a creative and seldom seen approach to use the CoolMOS C7 MOSFETs provided by Infineon

References

All the information about the technology used, and direct references are in our wiki:

Wiki: https://github.com/altaga/MOSMusic-MM-/wiki

Code

Arduino CodeArduino
Sensor reading and Light Bulbs output sequence
int analog1=0;
int analogm=0;
double basemean=0;
int base=0;
int gain=-5;
unsigned int sensibility=5;
int counter=0;

void setup() 
{
pinMode(LED_BUILTIN,OUTPUT);
pinMode(2,OUTPUT);
pinMode(3,OUTPUT);
pinMode(4,OUTPUT);
pinMode(5,OUTPUT);
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
Serial.begin(115200);
for(int i=0;i<100;i++)
{
basemean+=analogRead(A0);
}
base=(basemean/100)+gain;
analogm=analogRead(A0);
digitalWrite(LED_BUILTIN,LOW);
}

void loop() 
{
  analog1=analogRead(A0);

    if(abs(analog1-analogm)<sensibility && counter>=10)
  {
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
  }
   else if (abs(analog1-analogm)<sensibility && counter<10)
  {
    counter+=1;
  }
  else
  {
    counter=0;
    if(analog1>=(base-30) && analog1<(base-10))
  {
    digitalWrite(2,LOW);
    digitalWrite(3,LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
  }
    else if(analog1>=(base-10) && analog1<(base))
  {
    digitalWrite(2,HIGH);
    digitalWrite(3,LOW);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
  }
    else if(analog1>=(base) && analog1<(base+10))
  {
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,LOW);
    digitalWrite(5,LOW);
  }
    else if(analog1>=(base+10) && analog1<(base+20))
  {
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    digitalWrite(5,LOW);
  }
    else if(analog1>=(base+20) && analog1<(base+50))
  {
    digitalWrite(2,HIGH);
    digitalWrite(3,HIGH);
    digitalWrite(4,HIGH);
    digitalWrite(5,HIGH);
  }  
  }
  analogm=analog1;
  delay(50);
}

Custom parts and enclosures

4 Module DXF
4-module_kFm59jYssL.DXF
4 Module PDF
Single Module DXF
single-module_nJVqMTooAQ.DXF
Single Module PDF

Schematics

Schematic Circuit
68747470733a2f2f692e6962622e636f2f4a78344a6268392f496e66696e656f6e2e706e67 ejirjidl9l

Comments

Similar projects you might like

Standalone Arduino Applied in Projects

Project tutorial by PCBWay and Silícios Lab

  • 5,992 views
  • 10 comments
  • 43 respects

RTC Bird Feeder

Project tutorial by Kutluhan Aktar

  • 1,491 views
  • 2 comments
  • 7 respects

Arduino 4WD RC Car

Project tutorial by Andriy Baranov

  • 14,851 views
  • 5 comments
  • 55 respects

Azure Stream Analytics saving lives!

Project tutorial by Asad Zia

  • 6,589 views
  • 3 comments
  • 28 respects

Personal Home Assistant

Project tutorial by 3 developers

  • 4,164 views
  • 0 comments
  • 29 respects

Alexa BBQ/Kitchen Thermometer with IoT Arduino and e-Paper

Project tutorial by Roger Theriault

  • 2,401 views
  • 0 comments
  • 9 respects
Add projectSign up / Login