Circuit Specification

From Curuba Wiki
Jump to: navigation, search

Contents

[edit] Electrical Schematic

Download Master Control Download Slave Light Download Slave Power

[edit] Control unit

The control unit ensures communication between the server and the controlled devices. All decisions and intelligence are centralized at the server, thus the control units only process and react to the server’s commands (except in the case of critical applications such as motion sensing for security purposes; where any detection immediately alerts the server). That reduces the complexity of the software development required for the control unit.

One characteristic of the control unit is related to its design versatility which makes it very suitable for multiple home automation applications. The proposed design allows a single control unit circuit to be used for lighting, heating and other appliances control, and even for capturing elements from the environment such as motion, temperature or current sensing and so on. Due to limited time and resources, only lighting and power appliances control will be implemented within the scope of this project, and this will be accomplished by integrating electrical modules to switches and electrical outlets respectively.

As home automation is mostly intended for energy savings, the controlled devices’ energy consumption was also included within the scope of this project. One can still continue to add further applications as the project was designed to be customizable and released as open source and open hardware. The versatility is possible thanks to 4-bit switches which offer the opportunity to have a maximum of 16 different home automation applications. Moreover, the control unit versatility is not only a hardware issue, but the software inside the controller must also be developed to be easily customizable.

caption


[edit] Microcontroller

The MSP430F5310 controller from Texas Instruments featuring low power consumption was chosen for its low market price. The choice of low-power components is consistent with the fact that one function of home automation is to optimize energy consumption. Furthermore, the MSP430 series controllers are very popular in the software development community and offer plenty of useful features. Moreover, programming and software development tools are affordable for any developer (e.g. MSP-EXP40G2 development kit costs approximately 5$).

[edit] RF module

One of the main features of this project is the fact that it leverages the Wi-Fi network infrastructure already in place in the household so as to reduce integration and installation costs. The CC3000 Wi-Fi embedded module from Texas Instruments is used as the wireless data transceiver device for the control unit. This module requires no special RF design skills and thanks to the availability of the API sources, the software development is more flexible than ever.

[edit] USB (UART)

The control unit uses the Wi-Fi network in place, thus it requires the network connectivity parameters. To ensure the safety of the network’s critical information, such as the router’s SSID and Wi-Fi password, a USB cable using the serial UART protocol of the MSP430 controller through a CP2102 chip is used to push the primary configuration parameters to the CC3000 Wi-Fi module. Alternatively, the USB 5 VDC can be used to power the control unit while configuring.

[edit] Switching power supply

Electronic components on the control unit are powered using a 3.3 V voltage. The incoming 120 VAC source therefore needs to be converted into the required DC voltage using a switching power supply (SMPS), which offers high efficiency and small size.

Custom relay (Specs, etc.) Varistor Simulation results


odradek, vous avez lu le livre Bergougnoux sur Descartes ?vous savez ce philosophe qui avait inventé la glande pinéale.la meilleure critique du livre de Bergougnoux se trouve dans la préface de la partie 5 de l&qu;soqéthirue de Spinoza.Je me demande si Bergougnoux a lu Spinoza ? il aurait dû au moins lire cette préface avant d’écrire son livre.

[edit] Power Units

As already stated, the project takes a modular approach, so that modules for different applications can be created to interact with the control unit. So far, two different power modules were designed. Which one must be used depends on the specific application. The first module is intended for on/off applications that require lots of power, whereas as the second one is mostly dedicated to control lights or for other low power applications. The following sections further describe the power units.

[edit] High Power Module

This module is intended to be used to control devices for which the current consumption ranges from 4 A to 12.5 A. It uses high power relays (240 VAC/16 A) to switch the high voltage to the loads, as shown in the figure below:

caption

An advantage of using relays to perform the switching is that there is no power loss. As can be seen in this figure, two loads can be switched at a time, but the current drawn by the loads must not exceed a total of 12.5 A for the two of them. Each output comes with a current sensor that monitors the actual current drawn. The information is then read by the control unit, which sends it to the server.

Furthermore, this choice allows the user to choose whether or not to switch ON or OFF the controlled devices in the case the Wi-Fi connection runs out, choosing to connect to either the normally open or to the normally closed contact of the relay at the moment of the installation.

The power module can also be used to control household lighting, but since power relays have limited operating frequency switching, only on/off switching at very low frequencies can be done. However, it was a wish to have the power module act as a conventional dimmer, but this can only be achieved if this one can switch on and off at a frequency of 120 Hz. Therefore, another module had to be designed for lighting purposes. Detailed explanation follows.

[edit] Lighting/Low-Power module

As stated above, a second power module was designed for lighting (mostly, dimming) and other low-power purposes.

[edit] Dimmer function

A conventional dimmer consists mainly of a triac switched on and off by a diac, itself controlled by an RC network. The resistance in this network is actually a potentiometer, and this is what the operator controls. Depending on the resistance of the potentiometer, the time constant of the network will change, and the time delay between each moment when the diac breaks over will be modified. This means that the triac’s switching duty cycle will be modified accordingly, but always in phase with the alternative voltage, since it is its variation in voltage that triggers the diac (just google dimmer ;) ). The resulting waveform at the load is shown in the following figure:

One can easily conclude that the longer the triac stays on, the brighter the light will be. In order for this behaviour to be reproduced, another module was designed. This module uses power triacs to switch the high voltage on and off. Because of the internal resistance of the triac, lots of power must be dissipated as the current increases. Thefore, and since the available space on the board is very limited, these modules are not intended for applications exceeding 500 W of power. On the other hand, triacs are designed to be used with alternative current and can be switched at frequencies much higher than what is needed to create a dimmer, which is 120 Hz, because the triac needs to be turned on and off twice inside a 60 Hz cycle as can be seen on the above figure.


caption

[edit] Zero crossing detection

In order to be able to always have the same light intensity relatively to a certain triac switching duty cycle, the moment of where the alternative voltage passes by 0V must be known, so as to synchronize the triac triggering. This has been realized with a simple zero crossing detection circuit, shown in the following figure:



caption


The logic of this circuit is to provide a narrow pulse at the instant when the alternative voltage crosses 0V, which means that enough current must be fed to the diodes for the larger part of the cycle. There is however a compromise that must be made between a very narrow pulse and not having too much power dissipation in R1 and R2. An important factor that must be taken into account in the calculations is the current transfer ratio (CTR) of the opto-isolator, which is the percentage of current that can be transferred to the right side of the circuit for a given forward current If in either of the diodes. To minimize the power dissipation in R1 and R2, a very low value for If for which the diodes still conduct is desirable, say 1mA. For the MOC3023, at If = 1mA, the CTR is 34%, which means that only 340𝜇A can flow through R3. To have at least a 3.5V drop across R3 at this current to ensure a low-logic level reading by the MCU for the larger part of the cycle, then R3 will be:


𝑅3>3.5𝑉340𝜇𝐴=10.2𝑘Ω

Then, the peak alternative voltage is calculated taking a 6% tolerance into account:

𝑉𝑝=0.94∗120𝑉𝑟𝑚𝑠2=160𝑉

Suppose 95% of the diode conducting at half cycle is wanted. Then, the diode needs to conduct from 4.5° to 175.5°. In voltage, this gives:

𝑉=160∗sin4.5°=12.5𝑉

Calculating R1+R2 to give 1mA leads to

𝑅1+𝑅2=(12.5𝑉−1.65𝑉)1𝑚𝐴=11𝑘Ω

Thus the maximum dissipated power can be calculated as follows:

𝑃𝑑=120𝑉−1.65𝑉211𝑘Ω=1.4𝑊

Therefore, It is desired to choose two 5%, ¾ W resistors of 5.6kΩ for R1 and R2. Raising the value for R1 and R2 would stretch the conduction angle, thereby also stretching the zero crossing pulse, but it would reduce the power dissipation of the resistors.

[edit] Your own power module!

As previously stated, the Curuba platform is made so you can develop your own modules in order to control whatever device you want, such as:

  • Infrared sensor/controller;
  • Motion sensor;
  • Wireless camera;
  • Etc.

As the existing design are available for you to modify, you can use them as a base for your design, or you can also start from scratch, if you think you have better ideas :). If you want to interface your module with the existing control unit, which is highly recommended, just make sure to take into account the following considerations during your design process:

  • Connector position and pinout;
  • Mounting holes position;
  • Tracks width and clearance (see below);
  • Component clearance between control and power module.
  • What else?

We would recommend that you order at least one assembly of control/power modules before starting to design your own, so you can see exactly understand how the above-mentioned factors will affect it. Plus, you will be more capable to determine which aspects of the design should be modified, or kept as-is.


[edit] Printed circuit boards

[edit] Design considerations

Since high voltages and currents are involved in the scope of the products, many considerations had to be taken into account for the design.

First, the PCB traces had to respect certain width and spacing constraints. The ANSI IPC-2221/2221A standards provide guidelines that allow one to calculate the value of those constraints. In fact, an ANSI PCB trace width and clearance calculator can be found on the Internet . The two following figures illustrate what constraints had to be respected for our particular requirements:


caption

As can be noted, a copper temperature rise up to 50°C is tolerated. Also, the trace width is calculated considering a copper thickness of 2 oz, whereas if 3 oz is used, the trace width constraint is reduced to 50 mils.

[edit] CC3000, Antenna and RF

The information below was taken from TI’s wiki.

PCB Stack:

  • The PCB can be two layers, but 4 layers are used in CC3000MOD reference;
  • The PCB should be made of standard FR4 material;
  • If two-layer PCB, both layers should be used for signal routing.

Module:

  • The proximity of ground vias must be close to the pad;
  • Signal traces must not be run underneath the module on the layer where the module is mounted;
  • Have a complete ground pour in layer 2 for thermal dissipation;
  • Have a solid ground plane and ground vias under the module for stable system and thermal dissipation;
  • Increase the ground pour in the first layer and have all of the traces from the first layer on the inner layers, if possible;
  • Signal traces can be run on a third layer under the solid ground layer, which is below the module mounting layer.

Antenna Considerations:

  • Antenna should be located on far side of board, and should be pointing away from any ground plane;
  • The trace to the RF antenna should be as short as possible beyond the ground reference to avoid excess creating excess radiation;
  • There should be no traces, components or ground plane underneath the antenna.

RF Trace Considerations:

  • A 50-ohm trace impedance match is recommended on the trace to the antenna (for a PCB of 1 oz copper thickness, this is achieved with a trace width of 14.3 mils);
  • RF traces should be as short as possible and located near the edge of the PCB. Consider the enclosure material and proximity when designing;
  • RF traces should have via stiching on ground plane (both sides of trace);
  • RF traces should have constant impedance;
  • The RF trace bends must be gradual with an approximate maximum bend of 45 degrees with trace mitered. RF traces must not have sharp corners;
  • For best results, the RF trace ground layer must be the ground layer immediately below the RF trace. The ground layer must be solid.

[edit] Size

The printed circuit boards (PCB) of the electronic modules were subject to a very important goal: achieving the smallest possible size. In fact, these modules were designed so as to be mounted one above the other, and integrated into the existing switches and electrical outlets housings. The electrical wires can then be directly connected to the assembled module.

A great effort was made in minimizing the size of the control unit during the design of the printed circuit board’s third revision. In fact, almost 11 mm were withdrawn from the circuit’s length.

[edit] Three-way configuration

In order for the light controlling power module to allow the use of the mechanical switch (i.e. manual control) simultaneously with the server automatic control, the module needs to be wired using a three-way configuration, as illustrated on the following figure:


caption


This configuration requires the user to replace the existing switch. That is, if the control in place is a single pole, single throw (SPST) interrupter, it needs to be replaced by a three-way. Also, if the control in place is already a three-way, it needs to be replaced by a four-way. If the configuration is already a four-way, the user needs to find one of the two three-way interrupters that control the same light (located at either end of the lighting network), and replace it by a four-way. The following figure illustrates this configuration:

caption

[edit] Wiring

[edit] Used conventions

To simplify the electrical modules’ connection within existing household electrical enclosures, some conventions were put in place. First, it was decided to use individual screw-on terminals, shown on the following figure:


caption

On the power modules, two of those were installed for each neutral and high voltage entry. This is useful to be able to connect the wires to the modules when they are also needed elsewhere, without the need to use wire nuts, so as to optimize the available space. The following figures illustrate how each module is to be connected with a power outlet:

caption


You can see that the second « HOT » terminal on the power module is very useful to conduct the hot and neutral signals to other outlets or switches, without using a wire nut. This is most likely the case for a power outlet, unless it is the last one that’s connected on the breaker. If it is, one could use the remaining terminal to connect the power module to the control unit.

However, it wouldn’t be possible to connect two 14 AWG wires in a single screw-on terminal, but since the current drawn from the hot wire by the transformer on the control unit reaches a maximum of only 1 A, a 24 AWG wire is big enough, which can be screwed in the terminal with the 14 AWG wire.

Also, note that the outputs were chosen arbitrarily. The user has the liberty of choosing whether he wants his devices plugged on the normally open or on the normally closed terminal of the relays.

caption

In the case of a switch, it is rare that the hot and neutral wires will be needed elsewhere. This is why these wires are dashed. If those are not connected, then the remaining terminal might be used to connect the lighting module to the control unit. Here again, 24 AWG wires are big enough for that purpose.

[edit] Physical integration

As already stated, the modules are meant to be installed in existing electrical infrastructures. Installations were made with many different types of switches and actuators, to ensure this is always possible. We were always able to install the modules in the electrical enclosures, keeping at least a 20 cm length of 14 AWG wires, so the switch or plug could be pulled out easily. The following figures give some examples: