UM1546 STMICROELECTRONICS | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 17
Technical content
Datasheet sections
- 1 Getting started
- 1.1 Package
- 1.2 Safety rules
- 1.3 System setup
- 2 System overview
- 2.1 Hardware design description
- 2.1.1 STEVAL-IHM037V1
- 2.1.2 RC5 protocol
- 2.1.3 RC5 frame reading mechanism
- 2.2 Hardware layout
- 3 Hardware schematics
- 3.1 Bill of material
fit easily inside an enclosure with the dimensions of a single-switch module. tactile switches or by using the IR remote controller. Figure 1. Remote fan speed controller board STEVAL-IHM037V1 This document explains the different parts of the application. ■ Low cost solution. Can be used for light dimmer applications with software modifications.
1 Getting started
1.1 Package
The remote fan speed controller includes the following items:
- Hardware content: – Demonstration board: STEVAL-IHM037V1
- Documentation: – User manual (this document) – Schematics, Gerber files, BOM
- Firmware: – Pre-programmed STM8S device soldered on the demonstration board – Object files are also available for the firmware.
1.2 Safety rules
This board can be connected to mains voltage (240 V). In the case of improper use, wrong installation or malfunction, there is a danger of serious personal injury and damage to property. All operations such as transport, installation and commissioning, as well as maintenance, should be carried out only by skilled technical personnel (regional accident prevention rules must be observed). Danger: Due to the risk of electrical shock or death when using this prototype on mains voltage (240 V), only skilled technical personnel who are familiar with the installation, mounting, commissioning and operation of power electronic systems and have the qualifications needed to perform these functions, may use this prototype. Warning: The debugger tool must not be connected to 4-pin header(J3) for SWIM interface when circuit is running on mains supply.
1.3 System setup
The remote fan speed controller board can be setup as follows: 1. Before proceeding, ensure that the mains power supply switch used during testing is capable of disconnecting both the live and neutral terminals and it is in the off position. Always wear safety gloves when working with mains operated circuit. 2. Connect fan/lamp live terminal to J5 of the FSC board. 3. Connect the fan neutral terminal to J7 of the FSC board.
- Connect the two combined neutral black wires to the mains supply neutral and, lastly, connect J6 from the FSC board to live of the mains supply. 5. Ensure that all parts of the FSC PCB and connection wires are well isolated from any conducting surfaces such as metal parts, etc. to avoid accidental shock hazard or damage to the circuit. 6. Once the switch is turned on, ensure that no part of the PCB is touched using bare hands or metallic objects. 7. The fan speed can now be changed using the IR remote transmitter unit or using the tactile switches provided onboard. When using the onboard tactile switches, kindly ensure that no direct body contact is made with the circuit (use safety gloves). 8. The microcontroller can be programmed over the SWIM interface using an ST -Link or R-Link programming tool. When doing so, the circuit should be completely disconnected from the mains supply and powered using the +5 V supply from an R- Link or an external +5 V power supply.
2 System overview
2.1 Hardware design description
Figure 2. Wiring block diagram
2.1.1 STEVAL-IHM037V1
same. The same MCU can even control multiple TRIACs depending on the application.
2.1.2 RC5 protocol
Figure 5. RC5 idle time
2.1.3 RC5 frame reading mechanism
- Adaptive timing takes care of variations in transmitter bit period within the standard range specified in Table 1.
- Algorithm synchronizes sampling time after every bit to ensure robust decoding performance.
- Uses one external interrupt and one hardware timer to efficiently decode received data on the fly. The RC5 decoded data has the inherent property of changing its logic state at the middle of every bit transmitted, as it is Manchester format. This state change can be used to synchronize the sampling of the RC5 data output line connected to the microcontroller for robust decoding performance irrespective of timing variations at the receiver, as well as the transmitter side. Figure 4 highlights the decoding algorithm used in this application.
Table 1. RC5 timings
Figure 6. RC5 frame reception mechanism
- State 1: Enable EXT interrupt and start timer with ARR value for 3.5 ms overflow time. Go to State 2 when timer overflow occurs.
- State 2: Wait for first EXT interrupt, when it occurs, initialize and start timer and go to State 3.
- State 3: Wait for second EXT interrupt. When it occurs, stop timer and validate ½ bit time period. If valid, use it to calculate ¾ bit time and go to State 4, or else reset state to State 1.
- State 4: Wait for EXT interrupt. When it occurs (red downward arrow), disable EXT interrupt and start timer with ARR set to ¾ bit time. Go to State 5.
- State 5: When timer overflow interrupt occurs, sample the data line (green upward arrow) and push its value into the RC5 data sampling variable. If all 13 bits are sampled (including the last idle state), give the valid decoded output and go back to State 1 for the next detection cycle, or else re-enable EXT interrupt and go to State 4. The algorithm synchronizes the first half midpoint sampling location (green upward arrow) of each bit with the logic transition point of the previous bit (red downward arrow). The field bit is not decoded in the existing algorithm but this can be easily incorporated with minor modifications in the firmware.
2.2 Hardware layout
3 Hardware schematics
Figure 9. IR remote transmitter STEVAL-IHM037V1
Figure 10. Remote fan speed controller
3.1 Bill of material
Table 2. BOM
0.5 W SOD123 Any DDZ5V6B-7 Digi-Key DDZ5V6BDICT -ND
- C4 X2 rating is important for reliable operation. A DC rated c apacitor (even rated at 1000V DC) will fail over time as it is not designed to withstand the stress conditions
present on AC supply lines. Use 330 nF for 230 V AC nominal supply voltage and increase to 680 nF for 110V AC supply.
- SW1, SW2, SW3 are carbon contact footprints on PCB while the ac tual carbon contact is integrated into the enclosure. Alternately 2 pin tactile SMD switch from
MULTICOMP part no. DTSM-32S-B can be used on the same footprint. Table 2. BOM (continued)
Table 3. Acronym definitions
Revision history
Table 4. Document revision history 12-Sep-2012 1 Initial release.