A friend asked me if I would be able to make a RollerShutter node. Yeah, new challenge for me! I am happy to share with you my work :smile:
This is a board for controlling rollershutters (0-100%) and detecting end stops with ACS712 for current sense of motor. It can control 3-wire motor only (Power, Up, Down wires), DC or AC, 12 to 230V. It's fine for me as I'm using AC motor. But this board can't work with 2wire DC motor. You can connect 3 push buttons (UP/DOWN/STOP) and/or external i2c device (for tactile, gesture...).
**Important Note : I share this work for educational purpose. Be very careful with this. It's an AC Board which can be lethal. If you don't know what you are doing, I can't tell you enough to not do anything. **
*Note : the link above for buying pcbs is only for RFM69 version for the moment. **General specs :
|Specs| | |---|---|---| |Size |44.4*45.4 (mm) | | Components size | 0805 | | MCU | Atmel328p TQFP | | Radio | two versions : NRF24 smd or RFM69CW | | Authentication security | ATSHA204A chip footprint | | OverTheAir update | SPI flash eeprom footprint | | Current Sensor | ACS712 5Amp current flow sensors footprint with opamp signal condition. to have a nice 0-3V ADC curve | | Relays | 2x 10Amp relays : OMRON G5Q type, 1xNO, 1xNO-NC for their footprint and quality| | AC/DC Stepdown | HILINK_HLK-PM01 230V->5V | | Screw terminals | 5mm pitch. Input AC, Motor Power Source, Motor Direction| | Extension connectors | 3x JST 1mm pitch connectors : FTDI, AVRSPI, IOs |
Extension Connectors description
AC Connectors description
|Input AC||connect to AC line L to Live and N to Neutral|
|MotorPowerSource||for 12-24VDC just connect power source to 12_230 screwterminal, for 110-230V connect together the pins from Motor Power screwterminal|
|Motor Direction||Motor Up and Down lines|
Arduino Pin description
|Arduino sketch define||Arduino Pin||description|
|MY_OTA_FLASH_SS||8||EEprom CS pin|
|ATSHA204_PIN||17/A3||Arduino Digital I/O pin number for ATSHA204A sot23 ic (for authentication)|
|RELAY_UPDOWN||15/A1||Digital I/O pin number for relay SPDT|
|RELAY_POWER||16/A2||Digital I/O pin number for relay SPST : Normally open, power off rollershutter motor, if A2==1 and A1==0 moveup, if A2==1 and A1==1 movedown, if A2==0 power off|
|DEBUG_LED||6||Digital I/O pin number for onboard debug led|
|BUTTON_STOP||3||Digital I/O pin number for button Stop|
|BUTTON_UP||18/A4||Digital I/O pin number for button Up or I2C|
|BUTTON_DOWN||19/A5||Digital I/O pin number for button Down or I2C|
|ACS712_SENSOR||A7||ADC pin for ACS712 current sensor|
|DS18B20_PIN||4||One Wire Temperature sensor for onboard monitoring|
Q&A about my personal choice
Why not an ESP?
Why current sensor for endstop detection?
Why so much capa, using filtering for analog etc..
About the ACS current sensor
ACS reading measurement results, from 0 to 1000W by 100W step :For fun, this is the light bulbs I have used to do my measurements (5 lights bulbs can be powered separately, the other row in one time, so it's possible to do 100W steps)
For detail about opamp circuit see schematic.
How is the Rollershutter motor controlled:
On-board, there are 2x10Amp Relays. Rollershutter motor don't use 10Amp of course, nor 5Amp. May we expect no need of snubber, if using over rated relays? I hope :) If mandatory for you then, it should be external, not enough space onboard. That said, for a simple relay board too, you can control lot of thing with 10amp.
So, we have 2 relays, for the rollershutter:
How to open/close 0-100%
We need to detect the up and down endstops. It is managed by the onboard ACS7125 sensor. It will senses the motor current flow and we will read it with ADC on arduino. When motor is active, there is a power consumption. And when an up or down end is toggled, the motor stops (because of mechanical switch...). There is no power consumption.
As you can see, with ACS712, we can know in which state we are. We are able to read some kind of power consuption curve too if needed and no mechanical ends switch available.. So, we need to know how long it takes to open the rollershutter, and to close (it may be not the exact timing open vs close time).
Note: the example sketch is for Mysensors v2.x. You can find it in example folder. It is state machine based, so no blocking loop. It's not very polished but it's working. I miss time, too much ideas&projects..I will look at it later.
The sketch present the following Mysensors CHILD_IDs, presented to a controller for instance :
|CHILD_ID_AUTOCALIBRATION||remotely start a calibration|
|CHILD_ID_TEMPERATURE||onboard temperature sensor, to monitor board&Hilink temperature|
|CHILD_ID_ENDSTOP||endstop. for debugging in case...Set it to simulate an endstop during calibration and tell the node that the shutter has reached the endstop (in case no mechanical switch etc..)|
|CHILD_ID_PERCENT||Rollershutter PERCENT for controller which are not Mysensors 2.0 compliant yet|
|CHILD_ID_CURRENT||Current sensor value, for debugging..|
At first launch, the node will use the default values in the state machine and will know it's not calibrated. So, you can launch a calibration. That will automatically :
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 through openhardware.io and pcbway. 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 great too :)
Special thanks to:
Copyright Scalz (2016). released under the CERN Open Hardware Licence v1.2
This is an opensource hardware. So please respect at least license and do what you want with it ;)
|C15||1||DNP||0805||Capacitor||Do not put|
|C6, C17||2||10n(DNP)||0805||Capacitor||Do not put|
|C1, C4, C5, C7, C11, C12, C14, C16, C24||9||0.1u||0805||Capacitor|
|C3, C10, C13||3||4u7||0805||Capacitor|
|D2||1||1n914 type etc.||SOD-323||General Diode|
|L1, L2, L3, L4||4||0||0805||Resistor||or ferrite bead|
|R1, R2, R7, R8, R9, R15||6||10k||0805||Resistor|
|R3, R4, R14||3||56k||0805||Resistor|
|IC2||1||AT25DF512C-SSHN-B||SO-08||512-Kbit Serial Flash , SPI bus|
|IC3||1||MCP1703CB||SOT23-3||250 mA, 16V, Low Quiescent Current LDO Regulator|
|IC4||1||ACS712_5A||SOIC127P600X175-8N||Linear Current Sensor|
|IC6||1||LM321MFX||SOT23-5||Low Power Single Op Amp|
|IC8||1||DS18B20||TO92||One wire temperature sensor|
|SW1||1||Reset Button||KMR2||Micro button tact switch 4 pin SMD 3x4mm|
|JP2||1||JST 1mm pitch 5pins||1X05-1MM||Header|
|J1, J2, J3||3||SCREW-TERMINAL-2P-3470110P1||2P-5.0||Screwterminal|
|JP5, JP6||2||JST 1mm pitch 6pins||1X06-1MM||Header|
|F1||1||BEL RST5 5A||Fuse 5A 250VAC Slow Blow|
|F2||1||MF2410||2410||Fuse 1A 250VAC Fast Blow|
|rev1||7 years ago||2||46 × 45|