A friend asked me if I would be able to make a RollerShutter node which could open/close his roller shutters 0-100%. Yeah, new challenge for me! I am happy to share with you my work
Another thing, the board can be used as a simple relay board of course
Note : it is still dev, even if I have successfully debbugged my previous revision of this board. But I have not ordered yet this new one. As I have made some changes, I am still afraid to have a small hidden mistake, lol. That is why I say this but I have hope. And I will update this note when I will be 100% sure!
There are some people who will order pcb and help me to betatest this board. Thanks to them and for their advice too (I am thinking to @Fabien, and some jeedom users.)
Ah, of course, I would be very happy if you have any feedbacks, remarks about my schematics or layout. I'm not an electronician
How is Rollershutter motor controlled:
On-board, there are 2x10Amp Relays. Rollershutter motor don't use 10Amp of course, nor 5Amp. So maybe if relays are 10Amp rated, no need of snubber (I hope). If needed, it should be external, there is no 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 a rollershutter:
- 1x NO : which enable/disable power on the second relay. It is like "Stop Motor".
- 1X NO-NC. you can toggle it, and drive Up, or Down the rollershutter motor. Remember this relay need to be enabled by the previous one.
So relays are "interlocked", you can't enable "Up" and "Down" outputs to motor at same time and burn your motor.
How to open/close 0-100%
- We need to know the up and down ends. It is managed by the onboard ACS7125 sensor. It senses motor current flow and we read it with ADC on arduino. So when motor is active, we have a power consumption.
When an up or down end is toggled, the motor stops (because of mechanical switch...). So there is no power consumption. So 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..
- We need to know how long it takes to open the rollershutter, and to close too (it may be not the exact timing open vs close time). So, here it is a story of millis chrono, taking some sample, making average etc...software stuff
- good care of states in the sketch. no loop inside to not block anything, etc...
General specs (also visible on my github) :
- Components size 0805. Board size 47*48mm.
- Can drive 12V up to 220V motors (for 12-24V just connect power source to PWR connector, for 110-220V connect one L connector to PWR connector)
- AC/DC step down 220v-5v
- 2x10amp relays, G5Q type, 1xNO, 1xNO-NC
- ACS712 0-5A current flow sensors
- Inputs for UP, DOWN, STOP
- Some securities. On AC input, there are varistor+5Amp fuse. A CTN thermistor, on pcb bottom, under the AC/DC step down, to know board temperature in case. A dual relay driver to manage relays and parasite.
- ATSHA chip footprint for authentication
- Eeprom chip footprint for OTA update
- Connector for ftdi
- Connector with AVRSPI, I2C for external breakout (tactile switch, gesture...), 2 available I/O (D3 int, D4)
- two versions : NRF24 smd or RFM69(H)W
- Screwterminal 5mm pitch
Here is the schematic:
Here some pcb views:
Some 3d views:
For fun, a first idea for a rollershutter custom box, with holes on cover for luminosity+gesture
Sketch is almost done but not tested yet. I will post an example soon, before I need to clean and update it as it was for my previous rev.
All my files (including gerbers) are here : https://github.com/scalz/MySensors-HW/tree/development/RollerShutterNode
**Note **: it is a project in progress. I repeat it just in case lol. It is hobby, opensource, and I share the little time I have for this with others projects in progress too. It costs some money of course, we are all in same boat with diy. So all these parameters can make the project longer. Very sorry for this
But all the stuff is almost done. It just need to test now!
Note 2 : As I said, I debugged my previous rev. All seems good, but I don't want to say it is a stable version until I am 100% sure.
Thanks for all your feedbacks.
Great! Really like the idea of detecting end-stops.
@hek thank you! yes it would be coool.
It is not tested yet. I need to test it before send to fabhouse.
For detecting, I am thinking about sensing current consumption on motor. I hope acs712 will be do the job (I think with 610mv/A, it could handle small 90w motor, i should have something like 120 on adc...). If people have best ideas...
- reset : up until end stop detected.
- then calibration begins : start timer and down until end stop. Get the down travel time.
- then start timer and up until end stop. Get the up travel time.
- you can do another time and abs.
- then store in eeprom
To start calibration : button sequence or v_light command
And V_DIMMER to set your roller shutter with sunlight, temperature...
I think, it will need some adjustments (if the motor have a capa, relay response...).
I am a little disappointed because i was hoping to make something smaller but i would like to stay simple for others (mini pro, 1206 size...). and transfo takes place too! But it stays 5x5 ratio so cheap at fabhouse.
@scalz , wonderful project, thanks for the initiative! With minor changes the board can also be used as a "mysensor dual-relay" (within consumption meeter) --- It is really very nice!
@rvendrame : I was thinking about dual relay too! Good idea for the snubber, thank you. I did not think about this even I saw it in a datasheet yesterday, argh, my lack of knowledge (I have not some automatics yet). So I am happy to show you for this. I will check for the snubber and hope it will find its place! I missed some creepage too. and will add a capa near my adc.
if it can help people, I am more than happy!
So, here my files (need to be tested) : https://github.com/scalz/MySensors-HW/tree/development/RollerShutterNode_small
Now I will work on my sketch and release when all will be ok.
I follow your work. Very interresting.
One question, why use an arduino board on top of it? You could just add the atmega chip directly to your board. You have SMD components on it anyways, so one more or less, is nothing..
@tbowmo : I agree with you. and I was thinking to do like this. But if I had choosen this way, I would have used 0805 (but not under, it makes me nervous, lol) and maybe using lnk306 or tny to have compact transfo. So it would be less fun for those who just want to take files and are not friend with soldering. So I have 1206 (easy to soldier), and you are right there are some small ics but just a few... But it's sure, those who take files knows soldering I think.
Humm, you are tempting me to try to make it smaller version but I have others projects..You are right it could be smaller...I will see.
Thank you , I'm very interested with your feedback. I am learning a lot here.
@scalz , it looks you will power the motors from AC Mains (through Fuse F1 + ACS712). Maybe you could add a side track for those who want to use 12V or 24V motors instead?
I would suggest that you look at kicad instead, we have some mysensor specific parts in a common repo on github. Look at mysensors-kicad project on github
@rvendrame: exactly, I saw my mistake today. I will update files soon.
@tbowmo: thank you for advice. next time I will think about it.
For mysensors kicad project, wow, thank you for the link. team mysensors is making a great work. I noticed last weeks there is a kicad movement.
Too bad I started to learn Eagle some months ago and I am just starting to like it. What I like too with eagle is lots of libs, and that I can get some footprints at farnell. But in other hand when I see all of your projects with 3d rendering, it is very hard to not have a look. And kicad is opensource...and if I can contribute..
I updated screenshots and my github files. Now I think it can handle 12-220v motors. I had to change screw terminals (it was 5mm before, 3.5 now, i hope it is good). I have no place for capa snubber (too big unfortunately ) it will have to be external if needed. And I removed fuse too. Because it could change if 24v or 220v motor (not same current for 90w-24V and 90W-220v) and it is not easy to place it. So it will have to be external too if needed.
In case using 220v motors, now it needs to tie together Source and 12_220(Live) at the screw terminals.
I will see if I can make it better and smaller in the future (to put it in wall) and designed with kicad
So, I tried to reduce size board to be able to fit in wall. I thought about using switching ic or to use sealed ac dc step down. not very easy choice but I keep the sealed (for galvanic protection), because I think it should not gain so much space finally and sw ic is more expensive to use. RFs footprints, atmel, eeprom... takes place too.
Here is how it looks for the moment. I just tried 3d for eagle to see so 3d rendering not complete.
It is 42x43mm
Top: power, relay, ldo reg, eeprom, ftdi connector.
Bottom: atmel, atsha, acs712, nrf smd & rfm footprint
it is almost 0805 (i am just seeing I missed 2diodes).
But as you can see there is no snubber? I am thinking to add a capa only. Do you have a good not expensive ref smd that I can put on bottom.??
And there is no AVRSPI connector for the moment I need to find a little place for it, not easy.
See you soon
Take car about antenna position (no metal just under the antenna). I experience some issues with sensebender micro and FTDI connector just under the antenna. And perhaps you can use small SSR relay.
As @Fabien just mentioned, you should keep the area under, and around, the antenna of the NRF clear of any tracks, and components.. Otherwise you are asking for trouble..
@Fabien @tbowmo: thank you very much for your feedback.
So no tracks under the chip, or on the other plane? Arrgh, I will try. Is it related to nrf because on moteino designs it seems rfm don't care about it? Anyway I don't want to have problems. I don't know how I will do that but I will see this evening.Last night, I added spi for programmer so it's cool. I found capa for snubber but 2220 size...
And for small SSR, I thought about it but the board must handle 12/24v motors too so current won't be the same and small SSR won't like that. That is why I choosed these relays. I want to be able to handle 12/24 and 220v so the board would be useful for lots of application.
I was lazy to move to kicad but I will move for sure
No track under the chip. I use kicad for few years now and it's ok !
@fabien: so not under chip, but other side of board is ok i think? Anyway, I think I will have to do some reroute. Not easy. I am not electronician. I'm database soft archi. So I have not done lots of pcb yet. I am learning.. but at my job I played a lot with mikroelectronika even if I am not in charge to design pcb.
And I think I made a wrong choice with eagle (I saw lots of libs so I thought it would be easier. But I have to make lots of parts myself so...).
Here what I did last night : moved ant smd for rfm, spi connector, and 3d model for stepdown. Not a lot of things. And, tried to place snubber, but not good, clearance drc errors..I am thinking to add snubber externally.
Next screenshot I hope all will be ok
@tbowmo: which tools do you use to create 3d models for Kicad? I tried Sketchup yesterday but don't like interface as I usually use Solidworks at job when needed. Would be great if I could export Solidworks to kicad, I will see if it's possible..
rfm modules have an external antenna, that is why they can be mounted like they do on moteino boards.
NRF modules incorporates an anteanna, and you need to keep the anteanna area (+ some space around it) clear of components and tracks. on both sides of the PCB. Otherwise they will interfere with the antenna radiation.
I use the build in 3D viewer in kicad. (Using almost bleeding edge of kicad on linux, with additions from CERN)