MyMultisensors is a compact multi sensors capable node for your/my home automation. Optmized for very low power, ambiant sensors node, battery powered and wireless, i can easily add in each room.
I have to say, this is one of my favorite board! well, you think i'm biased :) a bit true ;) But the truth is i've never seen the same board before (with my requirements) or i wouldn't have made it!
I put multiple "constraints" on myself to get the best of what i can do myself imho.
As everything is customizable, the choice of the battery or the custom pcb size (compact), the easy and quite common way is printing a custom box..
I think i've "almost" achieved my goals :)
We can see this is possible to use different kind of battery, and different antennas (wire or planar pcb).
|Specs| | |---|---|---| |Size |49*25.4 (mm) | | MCU | Atmel328p TQFP 150nA deep sleep| | Radio | RFM69CW 100nA in deep sleep, NRF24 is coming | | Authentication security | ATSHA204A chip footprint 150nA in deep sleep| | OverTheAir Wireless programming | SPI flash eeprom footprint 200nA in deep sleep | | Temperature/Humidity | SI7021 60nA in deep sleep | | Ambiant Light Lux | OPT3001 300nA in deep sleep, with footprint for optional pullup resistor | | Motion detection | LHI968 good quality/price, with its circuit, active 1.6uA | | Door contact | footprint for soldering an optional pullup resistor >1M | | Indicator Led | Yes, on D9 | | Extension connector | FTDI + D3 for connecting Door contact | | Pogo pins | AVRSPI programming | | Battery connectors | CR2032 240mAh, CR2450 500mAh, 2xAAA 1200mAh | | Power Supply | Reverse-polarity protection. 3V3 max |
####Onboard safety
Onboard, there is a reverse polarity protection. But for power savings, better efficiency etc .. there is no voltage regulator. So it's possible to use others batteries, or ftdi of course, but the max input voltage is 3.3V max.
####Extension Connectors
For simplicity, and trying to boost my assembling process (i use reflow), i'm using pogopins. I've done a simple adapter like this..
####Power consumption, what can we expect ?
Power consumption has been checked with uCurrent Gold + old voltcraft vc506..
Measurement done with PIR enabled, sensors sleeping but without spiflash ic nor Door contact
| Mode | Varta coincell CR2032 | Duracell 2xAAA | |---|---|---|---| |MCU in deep sleep, interrupt on change |4uA | 3uA| |MCU in deep sleep, interrupt on change Wdt Enabled | 8uA | 11uA| |MCU running 1Mhz | 732uA | 737uA|
Few simple maths because battery lifetime can change for multiple reasons (battery brand, internal resistance of coincell etc.). I won't explain everything here.
Still important to remember, is we can't expect to have the complete 240mAh of a coincell. Better bet on 200mAh, for a good quality coincell. For bad quality, it can be worse! Bad clone coincell can have only 50% of usable energy! Try clone and good brands, you will see what i mean ;) it's up to you if you want to spend your time to replace batteries :)
As RFM69 radio power consumption is low during sleep mode, no need to disable it, so it allows to use listenmode and wakeup from mcu from deep sleep for instance.
Say a power consumption of 5uA during sleep mode, the PIR is enabled of course, but not triggered (note it is possible to disable the PIR motion sensor to save power). And our RFM69 needs 30mA during 40ms. Rough estimation! it does not spend this whole 40ms transmitting of course! And with automatic RSSI and power level control, the radio can consumes less power in TX. On other hand, it does not take in account the signing time if feature is used.
So 30mA for 40ms, say 10 motions detection/hour, give us a theoretical estimation of 2.33years. Not so bad..but the node can last a lot more if the software is well optimized and flexible to let user to set dynamically during days, the sensibility and motion detection settings etc..
####Arduino Pin description
Arduino sketch define | Arduino Pin | description |
---|---|---|
MY_OTA_FLASH_SS | 8 | EEprom CS pin |
ATSHA204_PIN | 17 | ATSHA204A SOT23 pin (for authentication) |
PIR_INT_PINH | 6 | PIR motion sensor pin H |
PIR_INT_PINL | 7 | PIR motion sensor pin L |
MYNODE_LED_PIN | 9 | Status led pin |
REED_SWITCH_PIN | 3 | Reed switch pin interrupt on int1 D3 |
AMBIANT_LIGHT_INT | A1 | Ambiant light sensor pin interrupt |
|General Node settings | Default Settings | Notes| |---|---|---|---| | MY_NODE_NAME | MYS_MOTION| Node/sketch name| |MY_DEBUG|1.0| General Level Mysensors Debug messages. Comment it to save memory!| |MY_DEBUG_SKETCH|1.0|Sketch Level Debug messages. Comment it to save memory!| |MY_NODE_ID|AUTO| AUTO or set a fixed ID| |PARENT_NODE_ID|| Uncomment it and set your parent node id if needed| |RELEASE |1.0| Sketch version| |MY_BAUD_RATE|38400|| |isMetric |true| true/false| |//atsha204Class sha204(sha204Pin);||Uncomment to enable signing| |//MY_OTA_FIRMWARE_FEATURE||Uncomment to enable OTA wireless programming| |MY_RFM69_NETWORKID|100| Uncomment and set your preferred network id| |MY_RFM69_ATC_TARGET_RSSI_DBM|-80| Uncomment and set your preferred RSSI target| |LIGHT_H_LIMIT|100|High Threshold for Ambiant light sensor| |LIGHT_L_LIMIT|20|Low Threshold for Ambiant light sensor| |LIGHT_TRANSMIT_THRESHOLD|50| Delta needed for updating Ambiant sensor to controller| |HUMI_TRANSMIT_THRESHOLD|5|Delta needed for updating Humidity sensor to controller| |TEMP_TRANSMIT_THRESHOLD|1|Delta needed for updating Temperature sensor to controller| |FORCE_TRANSMIT_INTERVAL|10| Intervalle time between transmit update| |BATTERY_USB| |Uncomment if using ftdi, for batt voltage reading| |BATTERY_VARTA_2032| |Uncomment if using CR2032, for batt voltage reading| |BATTERY_DURAC_2450| |Uncomment if using CR2450, for batt voltage reading| |BATTERY_DURAC_IND_2AAA| |Uncomment if using 2xAAA, for batt voltage reading|
|MyPirHelper.h | Default Settings | Notes | |---|---|---|---| | PIR_SETTLE_TIME | 20000| in milliseconds/ better 30000. Waiting for PIR settling at node init| | PIR_DEFAULT_PULSES | 8| Programmable pulse counter : 1... 255 pulses but for 255 pulses you'll need to dance for a nice motion :)| | PIR_DEFAULT_WINDOWTIME | 1| Window time : 0 to 3. Range: 8s... 16s. Time in sec = 8 * (value+1)| | PIR_DEFAULT_CANCELTIME | 2| Cancel Time : 0 to 10. Range: 8s... 80s. Time = 8 * (value+1)| | PIR_DEFAULT_BLINDTIME | 2| Blind Time : 0 to 15. Range: 0s... 120s. Time = 8 * value|
All these infos can be found in the source files.
####External Libraries needed
####From the controller view
These are the CHILD_IDs used for sensors, or for dynamic settings.
|CHILD NODE ID/CMD | Default ID | Notes| |---|---|---|---| | CHILD_ID_PIR | 1|PIR sensor | | CHILD_ID_PIR_EN | 2|Enable PIR | | CHILD_ID_TEMP | 3|Temperature sensor| | CHILD_ID_HUM | 4|Humidity Child node ID| | CHILD_ID_LIGHT | 5|Ambiant light Child node ID| | CHILD_ID_DOOR | 6|Door reed switch| | CMID_FULL | 10|Command from controller with all params below in one tx. below is for debug..| | CMID_PULSES | 11|Command from controller to set PIR number of pulse for windows time | | CMID_WINDOWTIME | 12|Command from controller to set PIR window time | | CMID_BLINDTIME | 13|Command from controller to set PIR blind time| | CMID_CANCELTIME | 14|Command from controller to set PIR cancel time| | CMID_EN_LIGHT | 15|Command from controller to enable Light sensor threshold| | CMID_LIGHT_MODE | 16|Command from controller to set Light sensor special mode (enable pir at certain light level only...)| | CMID_LIGHT_H | 17|Command from controller to set Light sensor high threshold | | CMID_LIGHT_L | 18|Command from controller to set Light sensor low threshold | | CMID_LIGHT_DELTA | 19|Command from controller to set difference of lux for update controller | | CMID_TRANSMIT_INTERVAL | 20|Command from controller to set time between sensor updates| | CMID_TH_DELTA | 21|Command from controller to set difference of temp/hum needed for update controller | | CMID_EN_LED | 22|Command from controller to set led|
I'm trying to make opensource projects. I do this for free and sharing spirit. I don't do ads etc.. But if you think information here is worth of some money, or want to reward me, feel free to send any amount through paypal.
Or you can also order pcb here : I will earn a little percentage that will allow me to order proto pcb and share more fun design.
Or pay me a protein smoothie if you see me! oh well, a beer is ok too :)
Always special thanks to:
Copyright Scalz (2016). released under the CERN Open Hardware Licence v1.2
Parts | Qty | Don't Put Opt | Value | Package | Description | MPN |
---|---|---|---|---|---|---|
C1, C3, C12, C17, C18, C20, C22, C23, C25, C26 | 10 | 100n | 0603 | Capacitor | ||
C30, C32, C33 | 12 | X | 0603 | Capacitor | ||
C4, C14, C19, C21 | 4 | 1000p | 0603 | Capacitor | ||
C5 | 1 | 3.3u | 0603 | Capacitor | ||
C6 | 1 | 22n | 0603 | Capacitor | ||
C7, C11 | 2 | 1u | 0603 | Capacitor | ||
C8 | 1 | 100p | 0603 | Capacitor | ||
C13, C16 | 2 | 10n | 0603 | Capacitor | ||
C27, C29 | 2 | 4.7u | 0603 | Capacitor | ||
C2 | 1 | 1u | 0805 | Capacitor | ||
C24 | 1 | 100n | 0805 | Capacitor | ||
C9, C31 | 2 | 100u | 0805 | Capacitor | ||
C10, C28 | 2 | 10u | 0805 | Capacitor | ||
C15 | 1 | 33u | 0805 | Capacitor | ||
D1, D2 | 2 | 1N4148 | SOD-123 | Diode | ||
D3 | 1 | Red LED | 0805 | LED | ||
Q1 | 1 | CJ2305 | SOT23-3 | P-Channel MOSFET | ||
R1, R14 | 2 | 0 | 0603 | Resistor | ||
R2 | 1 | 1.3M | 0603 | Resistor | ||
R3, R5, R8, R11, R12 | 5 | 15M | 0603 | Resistor | ||
R4 | 1 | 68.1k | 0603 | Resistor | ||
R6 | 1 | 6.81k | 0603 | Resistor | ||
R7 | 1 | 1.5M | 0603 | Resistor | ||
R9, R18, R19 | 3 | 56k | 0603 | Resistor | ||
R10 | 1 | 619k | 0603 | Resistor | ||
R13, R21 | 2 | X | 1M | 0603 | Resistor | |
R15, R16 | 2 | 4k7 | 0603 | Resistor | ||
R22 | 1 | 1k5 | 0603 | Resistor | ||
R17 | 1 | 10k | 0805 | Resistor | ||
U1, U3 | 2 | TLV3691IDCKR | SC70-5 | Comparator | 595-TLV3691IDCKR | |
U2 | 1 | TSU102IST | MINI_SO8 | Dual Opamp | 511-TSU102IST | |
U4 | 1 | ATMEGA328P-AU | TQFP32 | Atmel 8bit 328P TQFP32 | ||
U5 | 1 | SI7021-A20-GM1 | DFN6 | Temp/Hum sensor | 634-SI7021-A20-GM1 | |
U6 | 1 | OPT3001DNPR | OPT3001DNP | Lux sensor | 595-OPT3001DNPR | |
U7 | 1 | AT25DF512C-MAHN-T | AT25DF512C_MAHNT | SPI Flash | 988-AT25DF512CMAHN-T | |
U8 | 1 | ATSHA204A-STUCZ-T | SOT23-3 | Signing IC | 566-ATSHA204ASTUCZ-T | |
U9 | 1 | RFM69CW | RFM69CW | Hoperf radio | ||
RESET | 1 | 1101NE | Tactile Switch 1101NE | |||
PIR | 1 | LHI968 | TO5 | PIR sensor | ||
X1 | 1 | 8 MHz | RESONATOR-SMD | Resonator | ||
COIN_HOLDER | 1 | Coincell Holder | CR2032/2450 footprints | |||
JP2 | 1 | 1X06 | Pinheader | |||
Notes about optional parts: - Some capa are optional. Footprints is there. For stability or more buffer. - Resistors are for optional Reedswitch and optional Lux sensor Thresholds. Solder them if needed only or power consumption can increase |
Name | Size | # Downloads |
---|---|---|
MyMultisensors_rev1-1.TXT | 2.09 kB | 537 |
MyMultisensors_rev1-1.sch | 331.45 kB | 2182 |
MyMultisensors_rev1-1.brd | 375.3 kB | 2013 |
MyMultisensors_rev1-1.GTP | 13.4 kB | 1831 |
MyMultisensors_rev1-1.GBL | 58.93 kB | 572 |
MyMultisensors_rev1-1.GTS | 14.09 kB | 548 |
MyMultisensors_rev1-1.GBO | 68.81 kB | 566 |
MyMultisensors_rev1-1.GTO | 46.11 kB | 576 |
MyMultisensors_rev1-1.GTL | 113.86 kB | 573 |
MyMultisensors_rev1-1.GML | 2.86 kB | 599 |
MyMultisensors_rev1-1.GBS | 6.56 kB | 550 |
MyMultisensors_rev1-1.GBP | 6.18 kB | 545 |
MyMultisensors_rev1_bom.pdf | 200.81 kB | 761 |