UM1502 STMICROELECTRONICS | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 23
Technical content
Datasheet sections
- 1 System introduction
- 1.1 Main features
- 1.2 Target applications
- 1.3 Safety and operating instructions
- 1.3.1 General terms
- 1.3.2 Intended use
- 1.3.3 Installation
- 1.3.4 Electrical connection
- 1.3.5 Board operation
- 2 Board description
- 2.1 Block diagram
- 2.2 Schematic diagram
- 2.3 How the system works
- 2.3.1 Startup
- 2.3.2 Setting the pressure reference (zero, 0 mbar)
- 2.3.3 Output signals
- 2.3.4 LED bar
- 3 Connectors, test pins and jumpers
- 4 Bill of material
- 5 The STEVAL-MKI111V1 layout
- 6 Software customization and real-time debug
- 6.1 Pressure signal
- 6.2 Temperature signal
- 7 Ordering information
- 8 References
- 9 Revision history
The STEVAL-MKI111V1 is a low cost demonstration board for the home appliance market. of the water level is performed by a pressure measurement. 8/16-bit timers, communication interfaces and 640-byte EEPROM. input voltage in the range 5 V - 12 V DC. LPS001WP MEMS pressure sensor, a 300-1100 mbar absolute digital output barometer. The MEMS communicates with the MCU through an I²C bus. STMicroelectronics™ debugging tool. Figure 1. STEVAL-MKI111V1
UM1502 System introduction Doc ID 022625 Rev 1 5/23
1 System introduction
1.1 Main features
The main features of the STEVAL-MKI111V1 demonstration board are:
- Input voltage range: 5-12 V DC or direct 3.3 V DC power supply
- LPS001WP MEMS pressure sensor, 300-1100 mbar absolute digital output barometer
- 20-pin, 8-bit STM8S103F2 MCU as main controller
- Output signal interfaces available: – I²C interface – PWM modulation (43-38 Hz)
- Onboard or external MEMS control (by selector)
- “Zero” button to reset the pressure offset
- RUN LED, OFS LED, and 5-step indicator bar
- Standard in-circuit programming connector (SWIM, single wire interface module)
- RoHS compliant.
1.2 Target applications
As a water level detection demonstration board, the STEVAL-MKI111V1 is mainly targeted at the home appliance market for applications including:
- Domestic or industrial washing machines
- General purpose water level systems
- Respiratory equipment.
1.3 Safety and operating instructions
1.3.1 General terms
Warning: This demonstration board must be used in a suitable laboratory environment only, by qualified personnel who are familiar with the installation, use, and maintenance of electrical systems.
1.3.2 Intended use
The STEVAL-MKI111V1 demonstration board is designed for demonstration purposes only, and must not be used in domestic or industrial installations. The technical data, as well as the information concerning the power supply and working conditions, must be taken from the documentation included in the kit and strictly observed.
System introduction UM1502 6/23 Doc ID 022625 Rev 1
1.3.3 Installation
The installation of the STEVAL-MKI111V1 is described in this document. The components must be protected against excessive strain. In particular, no components should be bent, or isolating distances altered during transportation, handling or use. No contact must be made with electronic components and contacts. The STEVAL-MKI111V1 contains electrostatically sensitive components, which may be damaged if used improperly. To avoid risk of injury, ensure that electrical components are not mechanically damaged.
1.3.4 Electrical connection
Applicable accident prevention rules must be followed when working from the mains power supply. The electrical installation must be completed in accordance with the appropriate requirements (e.g. cross-section areas of conductors, fusing and PE connections).
1.3.5 Board operation
A system architecture which supplies power to the demonstration board must be equipped with additional control and protective devices, in accordance with the applicable safety requirements (e.g. compliance of equipment and accident prevention rules).
2 Board description
2.1 Block diagram
The water level detection demonstration board can be divided into a few simple blocks. Figure 2. STEVAL-MKI111V1 block diagram
- Power supply The power supply is designed using a low drop positive voltage regulator with fixed output voltage set at 3.3 V DC. The input voltage is in the range 5-12 V DC. The power supply is protected against reverse polarity.
- MEMS sensor The demonstration board is physically connected to a container through a rubber tube. The liquid inside the container goes through the rubber tube, pushing the remaining air against the MEMS sensor. The higher the amount of liquid inside the container, the higher the amount of pressure the MEMS sensor reads. The MEMS sensor is also equipped with a temperature sensor. The measure of temperature can be used to compensate the pressure drift due to temperature variations. Note: To work properly, the MEMS sensor must be mounted higher than the container.
- User interface The demonstration board features an LED user interface. It roughly shows the pressure (and depression) read by the MEMS sensor. The user interface is completed with a debugging connector. It serves to precisely read the measurements of pressure and temperature in real-time by means of any standard ST debugging tool with SWIM interface.
- Output signals The pressure and temperature measurements can be accessed either through an I²C interface, or by PWM modulation. The signals can be sent to an external MCU through the I²C interface. Alternatively, the pressure signal is sent out in the form of a 43-38 Hz :ERO OFFSET 5SER INTERFACE 34-3&0 -#5 /UTPUT SIGNALS 0OWERSUPPLY -%-3 SENSOR #ONTAINER ,IQUID!IR 'UMTUBE BUS
pressure sensor. 43 Hz means 0 mbar, while at 38 Hz the pressure is 30 mbar.
- Zero offset The zero offset is a way to set a pressure (and temperature) reference before filling the container with the liquid. In the demonstration board, this operation is performed by pressing a button. Once the button is pressed, the pressure measured at that moment is considered as 0 mbar. In a real application, there is no such a button to press; the zero reference is set by the main MCU through a dedicated software routine.
- STM8S103F2 The entire process is controlled by a 20-pin, 8-bit STM8S103F2 microcontroller. The code size of the firmware is below 2 Kilobytes.
2.2 Schematic diagram
Figure 3. STEVAL-MKI111V1 circuit schematic - part 1
Figure 4. STEVAL-MKI111V1 circuit schematic - part 2
2.3 How the system works
2.3.1 Startup
not been set yet. The LED bar is off.
2.3.2 Setting the pressure reference (zero, 0 mbar)
By pressing the P1 button, the system sets the pressure reference. The pressure reference is the one read by the MEMS at the moment the button is pressed. Every time that button P1 is pressed, a new reference is set. Once the reference is set, the OFS LED turns off, and the lower LED in the LED bar turns on. From now on, the pressure signal is also available as PWM modulation (see Section 2.3.3).
2.3.3 Output signals
Once the pressure reference is set, the pressure signal is available as PWM modulation on connector J3. The signal frequency starts at 43 Hz, meaning 0 mbar. Changes in pressure modulate the frequency accordingly. An increase of 6 mbar means a decrease of 1 Hz in frequency change. Therefore, a frequency of 38 Hz means a pressure of 30 mbar. This frequency range has been adopted to simulate electromechanical pressure sensors. In this way, it's very easy to replace it with the STEVAL-MKI111V1 demonstration board. The signals coming from the MEMS sensor are also available on connector J2, although an external MCU must be connected through the I²C interface. Additionally, the demonstration board can be connected to an ST debugging tool with SWIM interface to read in real-time the pressure and temperature data as variables (see also Section 6).
2.3.4 LED bar
The 5-step LED bar roughly shows the pressure that the MEMS sensor is actually measuring. Each LED means 6 mbar. Therefore the full range indicated by the LED bar is 30 mbar. In the case of a depression, the LED blinks instead. Therefore the full range shown by the LED bar is -30 mbar / 30 mbar.
3 Connectors, test pins and jumpers
Figure 5. How to connect the STEVAL-MKI111V1
- The power supply must be applied to connector J1
- The ST debugging tool with SWIM interface must be connected to connector J4
- The I²C interface must be connected to connector J2
- The PWM output signal must be read on connector J3
- The I²C bus mode (internal or external) must be selected by jumper JP1
used in the demonstration board. Table 1. Connector pinout description Table 2. Test points description Table 3. MCU programming connector (J4)
1 VDD / 5 VDC
2 SWIM / debug
4 RST / NRST / RESET
Table 4. PWM modulation connector (J3)
2 Output signal
Table 5. I²C interface connector (J5)
3 Serial clock, SCL
4 Serial data, SDA
4 Bill of material
The complete list of components used to build the demonstration board is shown in Ta ble 6. Table 6. Bill of material
5 The STEVAL-MKI111V1 layout
of approximately 35 µm. The PCB material is FR-4.
- Length: 66 mm
- Width: 66 mm
- Thickness: 2 mm
Figure 6. STEVAL-MKI111V1 silk-screen (top)
Figure 7. STEVAL-MKI111V1 silk-screen (bottom)
Figure 8. STEVAL-MKI111V1 top layer
Figure 9. STEVAL-MKI111V1 top view
Figure 10. STEVAL-MKI111V1 bottom view
Software customization and real-time debug UM1502 20/23 Doc ID 022625 Rev 1
6 Software customization and real-time debug
The STEVAL-MKI111V1 demonstration board can be fully adapted to the container the user intends to test. The firmware included in the demonstration board kit is provided as open source. The demonstration board can be connected to an ST debugging tool with SWIM interface in order to read in real-time the signals coming from the MEMS sensor.
6.1 Pressure signal
The pressure read by the MEMS sensor is stored in a variable which is constantly updated in an infinite loop. To avoid oscillations and reduce the error introduced by false readings, the variable holds an average pressure value, which is obtained out of 8 raw readings coming from the MEMS sensor. Pressure readings are expressed as absolute values. Pressure signal: Average_Pressure
6.2 Temperature signal
The temperature read by the MEMS sensor is stored in a variable which is constantly updated in an infinite loop. To avoid oscillations and reduce the error introduced by false readings, the variable holds an average temperature value, which is obtained out of 8 raw readings coming from the MEMS sensor. Temperature readings are expressed as 2’s complement numbers. Pressure signal: Average_Temperature
7 Ordering information
The demonstration board is available through the standard STMicroelectronics ordering system. The order code is: STEVAL-MKI111V1. The kit includes an assembled demonstration board screwed to the metal box, the source code in C language, and all related documentation. The rubber tube to connect the container to the demonstration board is also included in the kit. The container itself is not included in the kit.
8 References
- STM8S103F2 datasheet 2. LPS331AP datasheet 3. LD1117 datasheet
9 Revision history
Table 7. Document revision history 16-Mar-2012 1 Initial release.