www.mcThings.com 2020 mc-Things Inc. Page | 1 mcSens Product Specification REVISION 0.2 MAY 06, 2020 Contents 1. DEVICE OVERVIEW ................................................................................................................................ 3 2. PRODUCT FEATURES .......................................................................................................................... 5 2.1 mc-Air LPLAN .............................................................................................................................. 5 2.2 ARM Cortex-M4F Processor ............................................................................................................. 5 2.3 mcStudiio ......................................................................................................................................... 5 2.4 mcCloud ........................................................................................................................................... 6 2.5 Humidity Sensor ............................................................................................................................... 7 2.6 Accelerometer .................................................................................................................................. 7 2.7 Button .............................................................................................................................................. 8 2.8 LEDs .................................................................................................................................................. 9 2.9 GPIOs ................................................................................................................................................ 9 2.9.1 Digital Inputs ............................................................................................................................. 10 2.9.2 Digital Outputs .......................................................................................................................... 10 2.9.3 Analog Inputs ............................................................................................................................ 11 2.10SPI Interface .................................................................................................................................... 12 2.11 UART Interface ............................................................................................................................... 13 2.12 I2C Interface ................................................................................................................................... 14 2.13 PWM .............................................................................................................................................. 15 3. ELECTRICAL SPECIFICATIONS .............................................................................................................. 16 3.1 Absolute Maximum Ratings ............................................................................................................. 16 3.2 Recommended Operating Conditions .............................................................................................. 16 3.3 Power Consumption......................................................................................................................... 16 4. Regulatory .......................................................................................................................................... 17 4.1 FCC Notice.. 17 4.2 Industry Canada Notice. 17 2020 mc-Things Inc. Page | 2 1. DEVICE OVERVIEW The mcSense is an affordable, ultra-low-power indoor/outdoor remote sensor that lets you wirelessly collect and deliver data to the cloud. This built to last, pocket-sized Internet of Things device is a fully pre-programmed (and programmable), scalable and manageable solution that lasts for up to 5 years on 2 x AA batteries. Featuring various onboard sensors the mcSens can monitor multiple variables, from anywhere, and deliver that information to the cloud. In addition to the mcSenss onboard sensors, this device offers the versatility to interface with practically any 3rd party sensor on the market making it a fully customizable sensor solution. The device is housed in a screw mountable enclosure making it dust-
tight and protected against low-pressure water jets. Size 104mm x 49mm x 26mm The mcSens employs the long range mcAir (LPLAN) low-power communication protocol to deliver data to the cloud with a communication range of ~1km+ in optimal conditions. mcSens edge compute applications are programmed and debugged wirelessly using the mcStudio Software without the need to open the device. 2020 mc-Things Inc. Page | 3 mcSens HUMIDITY SENSOR 3 Axis ACCEL HIGH ACCURACY TEMPERATURE SENSOR LIGHT SENSOR mcAir ARM LED BUTTON GPIO HI-Z INPUT POWER CONTROL www.mcThings.com Key Components Application Processor mc-Air Wireless LPLAN Operating System Humidity Sensor Accelerometer Temperature sensor Ambient Light Sensor External Interfaces GPIO ADC SPI UART I2C PWM Figure 1-1: mcSens Block Diagram Table 1-1: Key Components 32-bit ARM Cortex M4F Ultra low power mc-Air wireless technology over 2.4GHz. mc-OS (specifically designed for IoT applications) Low power Humidity sensor measuring relative humidity, barometric pressure and ambient temperature Low power 12-bit Digital accelerometer with onboard motion processor. Low power temperature sensor with 0.0625C resolution over -40C to +85C Low power ambient light sensor that measures the intensity of visible light. 0.01lux to 83k lux Table 1-2: External Interfaces 8 GPIOs (shared with analog inputs) 4 Analog Inputs (shared with GPIO pins) SPI Interface can be assigned to any of the GPIO pins. UART Interface can be assigned to any of the GPIO pins. I2C interface Hardware PWM 2020 mc-Things Inc. Page | 4 2. PRODUCT FEATURES 2.1 mc-Air LPLAN The mc-Air LPLAN (Low Power Local Area Network) is a new protocol specifically designed for the Internet of Things. Using a high performance 2.4GHz onboard PCB antenna with a gain of +3.3dB allows distances of up to 200m between the mc-Modules and mc-Gateway using very little power. 2.2 ARM Cortex-M4F Processor The ARM Cortex-M4F Processor runs the mc-OS operating system. This operating system was designed to run natively on the ARM Cortex-M0 with ultra low power consumption. Features include:
< 2.0 A sleep current 2.4 GHz transceiver UART, SPI, I2C, PWM The datasheet for this device can be found here:
http://infocenter.nordicsemi.com/pdf/nRF52832_PS_v1.0.pdf 2.3 mcStudio mcStudio lets you focus on the solution rather than the intricacies of firmware development. With powerful software tools creating new or updating existing use-cases is made easy. Remotely create and debug features using mcStudio makes development truly agile and accelerates implementation. Features unclude:
Object-Oriented Programmming using mcScript Predictive Code Completion Local management 2020 mc-Things Inc. Page | 5 mcScript User Guide can be found here:
https://www.mcthings.com/wp-content/uploads/files/mcScript/mcScript-User-Guide.pdf 2.4 mcCloud mcCloud is a cloud computing service that provides Platform as a Service (PaaS). The service includes features for authoring, modifying, compiling, refactoring, deploying and debugging applications. The platform manages the hardware and includes authentication, security, provisioning and large scale deployment so customers can manage millions of devices on the fly. All services are provided Over-the-air so battery powered devices can stay where they are. Features Include:
Provision millions of devices with ease Develop and manage remotely from anywhere APIs for integration with existing control systems Security domains and permissions Inorder to visualize or capture your data into a cloud application please contact mcThings. 2020 mc-Things Inc. Page | 6 2.5 Humidity Sensor The sensor is a BME280 is a combined digital humidity, pressure and temperature sensor based on proven sensing principles. The humidity sensor communicates via 12C (address 0x77) Features include:
0% to 100% relative humidity 300 to 1100 hPa pressure The datasheet for this device can be found here:
https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf Figure 3-1: Humidity Schematic 2.6 Accelerometer The low power I2C 12-bit 3-axis accelerometer (ST LIS2DH12) with configurable interrupt generation enables motion, freefall, and orientation detection. Features include:
Output Data Rates (ODR) from 1 Hz to 5.3 kHz 2 g, 4 g, 8 g, and 16 g dynamically selectable full-scale ranges Configurable motion detection (Freefall, Motion, Pulse, Transient) Ultra Low power (3 A in 10Hz low power 8 bit mode) 2 programmable interrupts 12-bit digital output The datasheet for this device can be found here:
www.st.com/resource/en/datasheet/lis2dh12.pdf The accelerometer communicates via I2C (address 0x19) and also routes two (2) separate interrupt pins which allow the accelerometer to wake on predefined acceleration events. It is setup as shown in Figure 3-1. 2020 mc-Things Inc. Page | 7 Figure 3-1: Accelerometer Schematic Refer to the example project in mc-Studio for proper usage of the accelerometer. 2.7 Button There is one (1) button available for user input. The button is NO (Normally Open) and the processor enables an internal pullup so the button is an active low device as shown in Figure 3-6. Figure 3-6: Button Schematic 01 02 03 04 05 06 07 08 09 Monitoring of this button is built into mc-Studio which is shown in Figure 3-7. Shared Event ButtonChanged() If Button0 = True Then
//button pressed LedGreen = True //turn on green LED if button pressed
//button released LedGreen = False //turn off green LED if button released Else End If End Event 2020 mc-Things Inc. Figure 3-7: Button mc-Script Page | 8 2.8 LED There is on active high LEDs available for visual indication, a red LED as shown in Figure 3-8. Figure 3-8: LEDs Schematic Control of the LEDs is built into mc-Studio which is shown in Figure 3-9. LedGreen = Not LedGreen //toggle green LED LedRed = Not LedRed //toggle red LED Shared Event blinkLEDs() RaiseEvent Every 500 milliSeconds 1 2 3 4 End Event Figure 3-9: LED mc-Script 2.9 GPIOs There are 9 General Purpose Input/Output Pins on the mcMod110. These pins are configurable as digital inputs, digital outputs, and analog inputs as shown in Table 3-1. Table 3-1: GPIO Pin Modes PIN0 PIN1 PinMode Y Not Used Y DigitalInput Y DigitalInputPullDown DigitalInputPullDownWeak Y Y DigitalInputPullUp Y DigitalInputPullupWeak Y DigitalOutput AnalogInput Y N AnalogInputPullDown N AnalogInputPullUp Y Y Y Y Y Y Y Y N N PIN2 PIN3 PIN4 PIN5 PIN6 PIN7 PIN8 Y Y Y Y Y Y Y Y N N Y Y Y Y Y Y Y Y N N Y Y Y N Y N Y N N N Y Y Y N Y N Y N N N Y Y Y N Y N Y N N N Y Y Y N Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y 2020 mc-Things Inc. Page | 9 2.9.1 Digital Inputs Any of the 9 GPIOs may be configured as digital inputs. There are five different input configurations as shown in Table 3-2. Input Pin Configuration DigitalInput DigitalInputPullDown DigitalInputPullDownWeak DigitalInputPullUp DigitalInputPullUpWeak Description Table 3-2: Input Pin Configurations Configure as high impedance (floating) Configure with internal pull-down to GND Configure with external pull-down (1 M) to GND Configure with internal pull-up to VDD Configure with external pull-up (1 M) to VDD A GPIO digital input example is shown in Figure 3-10. Shared Event Pin0FallingEdge() 01 Define PinMode Pin0 As DigitalInputPullUp 02 Class InputPinTest() 3 4 5 6 7 8 9 End Class
// pin0 has gone low, turn on LED for 100ms LedGreen = True // Turn on LED Thread.Sleep(100000) // Sleep for 100 ms LedGreen = False // Turn off LED End Event Figure 3-10: Input Pin mc-Script 2.9.2 Digital Outputs Any of the 9 GPIOs may be configured as digital outputs. A GPIO digital output example is shown in Figure 3-11. Shared Event TogglePin1() RaiseEvent Every 500 milliSeconds 01 Define PinMode Pin1 As DigitalOutput 02 Class OutputPinTest() 3 4 5 6 7 End Class End Event
// toggle Pin1 every 500 milliseconds Pin1 = Not Pin1 // Toggle Pin1 Figure 3-11: Output Pin mc-Script 2020 mc-Things Inc. Page | 10 2.9.3 Analog Inputs There are 6 pins that may be configured as analog inputs, 2 of which offer high impedance connections, as shown in Table 3-3. Table 3-3: Analog Pins Parameter ADC Pin ADC Voltage Range Value PIN4-PIN7 0V VDD (3.6V Max) 2020 mc-Things Inc. Page | 11 2.10 SPI Interface The SPI Master interface enables synchronous communication between the mcMod110 and peripheral devices. The parameters of the SPI interface are shown in Table 3-4. Table 3-4: SPI Parameters Parameter SCK Pin MISO Pin MOSI Pin CS Pin Data Rates SPI Modes Master/Slave Value PIN0-PIN8 PIN0-PIN8 PIN0-PIN8 PIN0-PIN8 125kHz, 250kHz, 500kHz, 1Mhz, 2MHz, 4MHz, 8 MHz 0, 1, 2, 3 Master ONLY 2.11 UART Interface There UART interface can be set on any of the pins (PIN0-PIN8). The parameters of the UART interface are shown in Table 3-5. Table 3-5: UART Parameters Parameter RX Pin TX Pin Flow Control Supported Baud rates 230400, 250000, 460800, 921600, 1000000 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 76800, 115200, PIN0-PIN8 PIN0-PIN8 Not Supported Value An example of UART communications is shown in Figure 3-15. 01 Class Display 2 3 4 5 6 7 8 Dim chr As Integer = Disp.Read() While chr >= 0 End Sub Shared Event Uart0Receive() Shared Disp As Uart Public Sub New() Disp = Uart.Create(9600, Pin.Pin0, Pin.Pin1)
// Process Character and do something
// .... chr = Disp.Read() End Event Public Sub DisplayText(row As Byte, col As Byte, str As String) End While If row >= 0 Then 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 End Sub 27 End Class Else End If 2020 mc-Things Inc. Disp.Write(0xff) Disp.Write(row) Disp.Write(col) Disp.Write(str.Length.ToByte) Disp.Write(str) Disp.Write(0xfe) Disp.Write(str.Length.ToByte) Disp.Write(str) Figure 3-15: UART mc-Script Page | 13 2.12 I2C Interface There is a dedicated I2C communications interface on pins SCL and SDA. This interface bus is shared with the accelerometer (Address 0x19) and temperature sensor (Address 0x48). There are 10k pull-ups on included on the module. The parameters of the I2C interface are shown in Table 3-6. Table 3-6: I2C Parameters Parameter SCL Pin SDA PIN Data Rates Pull-ups (On Module) Unavailable Addresses Value SCL SDA 100kHz & 400 kHz 10k 0x19, 0x48 Shared Function GetTemp() As Float An example of I2C communications is shown in Figure 3-16. 01 Class Temperature 2 3 4 5 6 7 8 9 Dim sensor As I2c sensor = I2c.Create(400000, Pin.SCL, Pin.SDA, 0x48) Device.EnableTempSensor() Thread.Sleep(40000) // See page 13 of the datasheet Dim res As ListOfByte = sensor.Read(2) Dim temp As Float = Float.NaN If res <> Nothing Then Dim part As Float = res(1) >> 4 part = part / 16 temp = res(0).SignExtend() + part End If Device.DisableTempSensor() Return temp End Function 10 11 12 13 14 15 16 17 End Class Figure 3-16: I2C mc-Script 2.13 PWM The module contains a hardware PWM (Pulse Width Modulation) peripheral with the parameters specified in Table 3-7. There are 3 PWM modules each with 4 channels per module. All channels using the same PWM module MUST be the same frequency but their polarity and duty cycle may be changed. The three things that define a PWM signal are the Pin, Period and Duty cycle. The pin specifies where the PWM signal is sent to, the Period is the amount of time between the rising edges of the signal in Sec and the duty cycle is the time that the pulse is active in Sec. So to create a pulse of 1Khz and a duty cycle of 20% the user has to specify a 1000 Sec Period and a 200 Sec Duty Cycle. If the duty cycle is 0 or negative the signal is always low and if the duty cycle is equal or larger than the period, the signal is always high. 2020 mc-Things Inc. Page | 14 Parameter PWM Pin Duty Cycle Frequency PWM Modules Channels per Module Value Table 3-7: PWM Parameters 4 (each channel on same module must be same frequency) 0-100% (resolution based on frequency) 3.8Hz to 5.333 MHz PIN0-PIN8 3 An example using PWM is shown in Figure 3-17. Define PinMode Pin0 As PwmOutput Public Sub SetPwm() Dim pwm1kHz As Pwm pwm1kHz = Pwm.Create(1000) // create PWM with 1000s period pwm1kHz.SetDutyCycle(Pin0, 200) // set PWM to 20% duty cycle on Pin0 pwm1kHz.Start() // start PWM Figure 3-17: PWM Example 1 3 4 5 6 7 8 2 End Sub 2020 mc-Things Inc. Page |15 3. ELECTRICAL SPECIFICATIONS 3.1 Absolute Maximum Ratings Absolute Maximum Ratings VDD Voltage I/O Pin Voltage
-0.3V to +3.7V
-0.3V to VDD Storage Temperature
-40C to +60C Table 4-1: Absolute Maximum Ratings NOTE: Exposure to the absolute maximum ratings for prolonged periods of time may affect long term reliability of the device. 3.2 Recommended Operating Conditions Table 4-2: Recommended Operating Conditions Recommended Operating Conditions Input Voltage
+1.7V to +3.6V (+3.0V Typical) Operating Temperature
-40C to +60C (Battery specs limited) 3.3 Power Consumption Power Consumption Sleep Current
<2.0uA (TBD) mc-Air Transmit Current 60 mA @ +16dBm mc-Air Receive Current 5.4 mA Table 4-3: Power Consumption 2020 mc-Things Inc. Page | 16 4. Regulatory 4.1 FCC Notice Caution: Changes or modifications to this unit not expressly approved by the party responsible for compliance could void the users authority to operate the equipment. This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. The grantee is not responsible for any changes or modifications not expressly approved by the party responsible for compliance. Such modifications could void the users authority to operate the equipment. The RF Exposure Compliance distance is 20 centimeters. NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
Reorient or relocate the receiving antenna. Increase the separation between the equipment and receiver. Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. Consult the dealer or an experienced radio/TV technician for help. 4.2 Industry Canada Notice This device complies with Innovation, Science and Economic Development Canada licence-exempt RSS standard(s). Operation is subject to the following two conditions: (1) this device may not cause interference, and (2) this device must accept any interference, including interference that may cause undesired operation of the device. CAN ICES-3(B)/NMB-3(B) Le prsent appareil est conforme aux CNR Innovation, Sciences et Dveloppement conomique Canada applicables aux appareils radio exempts de licence. Lexploitation est autorise aux deux conditions suivantes:
(1) il ne doit pas produire de brouillage et (2) l utilisateur du dispositif doit tre prt accepter tout brouillage radiolectrique reu, mme si ce brouillage est susceptible de compromettre le fomctionnement du dispositif. CAN ICES-3(B)/NMB-3(B) The device meets the exemption from the routine evaluation limits in section 2.5 of RSS 102 and compliance with RSS-102 RF exposure, users can obtain Canadian information on RF exposure and compliance. Le dispositif rencontre lexemption des limites courantes dvaluation dans la section 2.5 de RSS 102 et la conformit lexposition de RSS-102 rf, utilisateurs peut obtenir linformation canadienne sur lexposition et la conformit de rf. This transmitter must not be co-located or operating in conjunction with any other antenna or transmitter. This equipment should be installed and operated with a minimum distance of 20 centimeters between the radiator and your body. Cet metteur ne doit pas tre Co-plac ou ne fonctionnant en mme temps quaucune autre antenne ou metteur. Cet quipement devrait tre install et actionn avec une distance minimum de 20 centimtres entre le radiateur et votre corps. Model: MCSENS FCC ID: 2AGBO-MCSENS IC: 21078-MCSENS 2020 mc-Things Inc. Page | 17