Some ideas for a domestic antitheft system... and probably more.

A nice idea could be the support for RFM22 as in sparkfun shield. Could be a solderable option in order to add multiple frequencies support. It will allow wireless extension or radio remotes support.

Regards,
Dario.

Hi Dario.

Some question on your boards:

  1. Does the inputs are insulated?

No. Inputs are not insulated. There are two type of inputs: the first are coming from the Atmel 328 and behave exactly like the pins on a standard Arduino board; the second type of inputs are coming from the SPI expansion chip so... they could be output. I mean, they are programmable lines. Is up to the user to define what type of line needs: output, input, with or without pull-up resistor.
For this reason I did non inserted any optocouple device.

  1. Does the inputs allow powered and not powered mode?

I'm not sure if I correcly understood what do you mean with "powered mode". Input lines are coming from the SPI expansion chip.. so they could receive either a VDD or be grounded to VSS. They provide a programmable pull-up resistor. They could be used either with active sensors (providing 0 and 5V) or with normal pushbuttons/relay/reed contacts etc.

  1. Which is your target price?

It's not yet defined... but it will be a "reasonable" price, i hope.

For what's related to the RFM22 support, the board will be compatible with the most part of the shields... so I suppose the RFM22 module could be plugged through a shield like on "normal" Arduinos.

Thanks!

Hi Marco,

I've read before the attached schematic, only now I found there most of my answers.

Going back to the discussion, in the automation field is called "powered" an input channel that supply also the attached device, otherwise is "not powered". Tipically in case of dry contacts (like pushbuttons, switches, ...) a powered input channel is required.

As per you schematic, you have to connect multiple wires in X4-1 to get the power and use as return X4-3,7 setting a pulldown resistor in the I/O extender. A clean solution could be have a dedicated supply screwed pins for each channel, but I know that this may lead to space problems.

One more critical issue may be the power supply, I saw that you use relays with 5V coil. If you have multiple boards on the same line, the required amperes to supply may became too high.
My suggestion is use 12/24V coils in order to lower the current required by the relays, futhermore a DC/DC converter will help you to avoid high temperature in the linear voltage regulator.

As result you can get a 24V capable device (as per industrial standard) and lower the overall consumption.

Last, regarding the RFM22B is a small and cheap radio that works at different frequencies. If you have space on the bottom of your PCB, you may provide the wiring and a PCB antenna. So, your board may became a wireless one just soldering the small radio on the PCB.

As result, you may interact with 433 MHz remote that are cheap and common (expecially for garage doors and similars), or use the same radio to build a wireless connection between boards and avoid (partially or totally) the wiring.

Note that Souliss yet provide bridging functionalities, but as now doesn't include the RFM22B drivers.

Regards,
Dario.

Hi Dario.

Thank you for your feedbacks.

As per you schematic, you have to connect multiple wires in X4-1 to get the power and use as return X4-3,7 setting a pulldown resistor in the I/O extender. A clean solution could be have a dedicated supply screwed pins for each channel, but I know that this may lead to space problems.

I'm with your opinion. Unfortunately the space left on the board is not so much so I think it's impossible to have three screw pins for each input/output. This will raise the required screws from 7 to 15...

My suggestion is use 12/24V coils in order to lower the current required by the relays, futhermore a DC/DC converter will help you to avoid high temperature in the linear voltage regulator.

You're right. Having at least 12V coils is a better solution than using 5V relays. I'm not sure if 12V relays will reduce the overall Amps taken from the DC connector (the current sink from the relays is not related to the voltage but it's something proper to the relay mechanics). Having 12V coils will helps to reduce temperatures on the onboard DC power supply. I'll investigate this solution.
Actually the board is provided with a DC linear voltage regulator with an input voltage up to 20V but it's mandatory to reduce the current drawn by the circuit to be able to run at this maximum voltage.

Last, regarding the RFM22B is a small and cheap radio that works at different frequencies. If you have space on the bottom of your PCB, you may provide the wiring and a PCB antenna. So, your board may became a wireless one just soldering the small radio on the PCB.

This will be sure an option for next board... this one is targeted to RS485.

Yesterday I was able to have the prototype working and running with the optiboot bootloader. It's amazing :slight_smile:
I'm writing a library to allow users to easily interact with relays and inputs/outputs pins and RS485.
I've attached some pictures of the prototypes.

Are you interested on test it with Souliss project? I have two prototypes in my hands. As soon I'll terminated to test them and to write the library I can send them to you ... What do you think about?

Thanks!

Marco.

Hi Marco,

Yes I can imagine, space is a big constrain. Your boards are really small, nice.

Yes, the rated current for the coil is bigger for lower voltages. Basically the energy required to act on the relay is the same, so lower voltages are compensated with bigger currents.
For example, if you look at this datasheet you will found that the 12V coil required almost 60% less current.

I've saw the linear regulator, but my concern is about the overall consumption where more boards will be powered from the same power supply. As you know, with a linear regulator all the exceeding power is converted in heat.

If you will really move to a 12 or 24V relays, the linear regulator shall be integrated with a DC/DC one to lower the voltage without "burn" all the power, otherwise the consumption will not raise down.

The problem of the linear regulator is that if your board require 500 mA @ 5V, the current drawn before the linear regulator is always 500 mA regardless the input voltage. So, if you power at 24V you will "burn" (24-5)*500 mW that means a supply efficiency of 25%.

I know very few components, that tipically I've saw on other boards, Texas Instrument has a DC/DC switching regulator (MC33063ADR) that is small and require some external components, you can find here the datasheet.

Nice, if you are willing to revise the PCB take as option the possibility to solder on the rear the RFM22B radio. You will build a bridge and introduce remote radio and other possibility at lower price.

Sure that I will!

In the project agenda there is the support for RS485, that means build a collision advoidance in the software, because Souliss require P2P.

Now the work is focused on two main jobs: including the ENC28J60 in Souliss and the Android client. The first one is carried out by me, and will allow the support of KMTronic DINo boards; the second one is carried out by shineangelic that care of user interfaces.

Is just a matter of time, I hope to end the work for the ENC28J60 in one month and later I could start with the RS485. Let me say that we can agree some dates to get the Souliss support within the market starting date of the board.

Thanks.

Regards,
Dario.

I'm not good as you with hardware and pcbs, anyway I'll support on Android client every kind of Souliss improvement with new screens and controls to make it easy, for end-user, to interact with security features.

As for now, I'll follow your talk.

Hi

@shineangelic: thank you and nice to meet you!

@veseo: I've just received two days ago the components I've ordered to play with the switching DC/DC converter. As soon I'll have tested I'll try to replace the linear regulator. I've followed your suggestion and I've ordered the MC33063ADR. The only problem I can see is that it requires bigger capacitor respect a linear regulator so I'll have to understand if there will be space left on the PCB. It will also costs a little bit more than the linear regulator but it will be able to run up to 30V without problems.
I've a question for you: as you suggested I'll replace the relays with models working at 12 or 24Volts. Do you think that a separated regulator for that units should needed? My opinion is that is not required but I would like to have your feedback on that.

I think that a reasonable idea should be to propose two versions of the board working at 12 or 24 Volts. The latter would be preferred for domotics installations; the first for other standard usages. What do you think about?

Thanks!

Shine is a co-founder of Soulis, it care of user interfaces and is the developer of the Android application for Souliss. I've asked him to join the discussion :slight_smile:

On my side it will not require a regulator at all, the inlet power will be 12V or 24V that is basically yet stable, so it could power directly the relays' coil via the transitor. So, you will have a direct input at 12 or 24V connected on the transistor collector.

I'm really happy that you decided to move on higher voltages, because a long line with 5V supply may result in excessive drop of voltage over the line.

The DC/DC require a filtering circuit, that why it use bigger capacitor. The MC33063ADR is used by Olimex in many of its open hardware boards, you can look at to find out some ideas on spare arrangement and circuits.

If you found 12 and 24V relays with the same footprint and supply the relays' coil directly from the inlet supply, you shall just change the relay to get a 12 or 24V board.

Thanks.

Regards,
Dario.

Hi Dario.

On my side it will not require a regulator at all, the inlet power will be 12V or 24V that is basically yet stable, so it could power directly the relays' coil via the transitor. So, you will have a direct input at 12 or 24V connected on the transistor collector.

That's what I was thinking too. So we have the same opinion. Ok. I'll do like that!

I'm really happy that you decided to move on higher voltages, because a long line with 5V supply may result in excessive drop of voltage over the line

You're right. I've really appreciated your feedback. That's what I was searching from this discussion on the forum. Thanks!

Just a quick update about libraries. I wrote a library that abstracts to the input/output pins and relays and seems working fine. It's able to use some hardware feature built in the SPI expander (like enable/disable the pull-up for each input, reverse the polarity, read the "onchange" event and so on). I'm satisfied about that.
I've added also an abstraction layer for the RS485, trying to automagically generate the Tx enable with no user intervention. This last feature, unfortunately, is not completed. I've found some limitations on the arduino serial core library code that prevents the possibility to easily inherit from the serial class in order to auto generate the Tx signal. Actually I've a working set of functions (like, for example, the write(string)) but not all.. For example the writeln and write(float) is not working as expected. I know what's the problem but I'm not able to fix it without changing the arduino core library (and I don't want to do that).
I've found other users in the forum with the same problem. I'll investigate a little more when I'll have time.

I'm actually too busy in other projects so I've to stop the library development for some time.

Ciao!
Marco.

Hi Marco,

Thanks nice.

in Souliss the support for RS485 will be based on custom drivers and not the Arduino ones. This let me have a stable software that is not addressed during the IDE releases and at same time I can modify the same as per my requirements.

For example, the W5100 drivers are based on the Sockets/W5100 libraries but not on the Ethernet from the IDE.

If you would like to share the problem that you found, it will let me easy do the job. I hope to end as soon the uIP integration for ENC28J60, so I will move on the RS485 side.

Regards,
Dario.

Hi Marco,

I know that there isn't space available, but maybe during the re-design for 12/24V operation, you may found space for the holes of a UEXT connector.

You can provide just the holes and let people solder it themself if required.

This may embeed in your board nice features like IrDa or 2.4Ghz wireless.

Regards,
Dario.

Hi Dario.

It's a very good idea.
I'll do the best to have as least the holes for the connector.
Probably to be soldered on the back side would be an option.

Thank you for the feedback!

Regards,
Marco.

Hi.

A little update about the project status...
I've built a prototype of a new switching power supply as suggested by Dario. Below is a picture. I was able to test it at 400mAmps and a Vin Max of 31Volt DC.
The output voltage is 5V. I've measured about 200mV of ripple in these conditions.
I think it's good and I'll integrate as soon as possible in the target board.

Thanks!

Marco.

Hi Marco,

nice news. Does you have the oscilloscope graphs for the input and output voltage/current with the 400mA load?

It would be nice find out the switching efficiency.

Thanks for sharing.

Regards,
Dario.

Hello Dario.
Sorry for the delay... but my spare time is very limited...

Unfortunately I've not a current probe for the scope so I've modified a little bit the schematics inserting a 1ohm resistor series to the inductor. I've then used two scope channels to measure the voltage across the resistor terminals. I've also placed a multimeter measuring current flowing either on the input side, either on the output side.
In the attached picture you can see the results.

Channel1, the yellow line, is the output side voltage (more or less 5V). Channel 2, the cyan line, is the input voltage (an average of 31.4V).
Channel3 is the "hot" resistor terminal (the one attached to the inductor), Channel4, the green line, is the resistor on the capacitor side (i.e. it's attached to the same position of CH1 but the sensitivity on this channel is 1V). The red line is the difference between Ch3 and Ch4.
With a 1ohm resistor I can imagine to read Amps instead of Volts. Effectively we can see a sawtooth with an averaged value supposed to be a bit less than a half of Ampere.

The Frequency measurement on Ch3 reports that the switching is running at 24.3kHz. It's probably something I can modify changing the capacitor value connected to the switching IC... Probably increasing the frequency will rise up the efficiency... but I've to investigate about.

On the multimeter snapshots, below the scope picture, are the DC and AC current measurements at the input side (on the left) and at the output side (on the right).

With this collected data I can calculate:

Pin = Vin x Iin = 31.40.10 = 3.14W
Pout = Vout x Iout = 5.4
0.43 = 2.32W

having an efficiency of E = Pout/Pin *100 = 73.8%

I think is an interesting value, do you? We have to consider that there are some power losses introduced by the 1ohm resistor...

Thanks!

Marco Signorini.

Hi Marco,

the result is pretty nice and close to the maximum efficiency that you can have. Using a linear regulator with 31V input (if it doesn't burn before) has (5V/31V) 16% of efficiency because the input and output current are the same.

The frequency value is related to the power loss, bigger is the frequency lower is the efficiency. This because this type of devices has losses during the switching phase, rather during the ON or OFF phase the power that is lost is pretty low. On the other side, bigger frequencies gives you a lower ripple.

You may try to increase the efficiency with a lower frequency and a bigger output capacity, but I think that your result are good and also the output voltage is stable.

Thanks for sharing.

Regards,
Dario.

Thank you Dario.
You're absolutely right about efficiency variation vs switching frequency.

In the meantime I would like to update this thread with the new schematics and the board layout.
In this new revision is the switching power supply and the UEXT connector. This will not be populated but it will be available for users that like this type of expansion connector.
The two I2C pull-up resistors will be soldered on but left unconnected from the 3v3 through the SJ2 placed on the back side. I'm thinking that probably the best solution would be to have a SJ for each resistor instead of a single SJ2 in series with the 3.3V. This will prevents a series resitor connections between SCL and SDA lines when UEXT is not used. I'll do it.
The PD5 line is used as slave select in the SPI related part of UEXT connector. This connector receives, as required by the UEXT documentation, the 3.3V generated by IC6.

Lastly, the three relays and related LEDs are directly connected to the Vin.

I'm planning to have a new set of prototypes in next three weeks.

Thank you.
Marco Signorini.

Domoduino12b.png

Hi Marco,

I think that your board will be very interesting and I hope to have the RS485 drivers running on Souliss as soon. It will be a nice work, because I shall build a P2P over RS485 and so means have a collision management done at software side.

In Souliss, we are planning the new release by the end of the June or earlier July. The new release shall contain the support for ENC28J60, a new scheduler, anti-theft logics and some general improvement and bugfix. After, we will start for the new features that will include: RS485 drivers, Ethernet-MAC support (to skip IP configuration) and a binary protocol for the external interfaces.

In the while, we are working with the Freedomotic team for the integration between Souliss and Freedomotic, using a plugin on the freeedomotic side (JSON), and I hope to be able to release also a new web-based user interface.

Thanks for sharing your work.

Regards,
Dario.

Hi Dario.
I'll send you in a short time a prototype. Unfortunately actually I have only one unit in my hands (I built two units but one is actually out of the office and will be back in a few days (I hope))... but I think you're more interested in the new version with UEXT connector... so we have to wait for the PCB production and assembly.

In the meantime I'm thinking to a new other object that I think could help Freedomotic and Souliss to have a more impact on domotic systems. Let's imagine to have a board could be easily connected to pushbuttons and/or switches like the one provided by Living Series or similar. A board with ATMEGA328, power supply and the RS485 bus logic onboard, with LEDs (RGB?) placed in the proper position in order to be fitted in the Living pushbuttons hole for status indication... Something like a piggy back for three standard switches...

May I've to open a new thread? :slight_smile:

Thank you!
Marco Signorini.

Great idea Marco. I'm following your thread since the beginning. Unfortunately I have no such experience in this field in order to be able to contribute.