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

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.

Hi Marco,

I've the hardware to start the development of the RS485 drivers, so don't worry for the time required to get the PCBs. Now for me is just a matter of time, because I've some pending activities before the release of the next Souliss and only after I may start the development of RS485 and other features.
If you will open a new topic, I will be in the chat :slight_smile:

Regarding the new proposal for others boards, let me say that compete with the Big of the automation is too hard, if you want to win or at least stay alive, the easy way is propose something different. This is why Souliss has a different approach that is not found in the commercial automation systems. On my side, I think that the actual commercial products are not strong enough on the small installation, where you have to spent an huge amount of money compared to the home size. In a big home the ration looks different.

On my side I think that the hardwired pushbutton, in a modern automated home, shall be less as possible. Maybe, you have it all in one remote location, used only when required. Sensors like PIRs and mobile devices may act for this.

To lower the price of the automation system, I think that the option shall be use less board with high density of I/O, rather than boards in each junction box. It require more cabling, but in a small home shall not be a problem.

I’ve an idea to propose, dimming is something “cool” but use old fashing lights has no meaning, play with high power LEDs is more interesting. I think that on the market there aren’t LEDs power supply that can be easily included in an home automation system, I was working to a power supply that may interact with Souliss (RS485, Wireless 2.4 GHz or Ethernet).

I’ve tried to find out a commercial power supply that was easy to interface with a board (the best was dimmed via analog output), but I’ve found nothing as now.

Is this something that look interesting to you?

Thanks again for your sharing.

Regards,
Dario.

This was just my point of view, if you will move to a input board like you have described, it will happy to support it in the framework.

Regards,
Dario.

Hi!

@Flx: Thank you for sharing your opinion. It's not important if you don't have so much experience in developing boards and/or schematics. Here we are for share ideas... and all contributes are really appreciated. The success of a product is not strictly related to technical solutions but more on ideas! So you're welcome!

@Dario: I don't want (can't) compete with big players. I would like to develop objects targeted to DIY fans. I can tell you an example... my house. The electric plan was built following the conventional style. No domotics, no other goodies. Being a DIY-man I would like to add some domotics functions... but this requires to change all switches and much more. So I was thinking about re-use the electrical hardware (that not only costs a lot... but is also beautiful and I like it!). I can then re-use the electric junction boxes disseminated through the home to install actuators... all could be connected through a 485 bus and probably integrated with the ethernet equipment through a gateway for controlling/supervising. I'll be able to program it because each "agent" in the system contains open software. I think that there are a lot of people that love this approach in the Community and could be interested in this type of products that, sure, will not demote the Souliss approach but can help integration through a "classic" human interface.

For what's related to High Power LEDs: it's something I started to follow some years ago (there is a Circuit Cellar's article I wrote, where I used a dsPIC to drive three 1Watt LEDs in a three channel psychedelic lights project http://www.scribd.com/doc/50577471/CC-248-2011). I'm interested on this type of project and it's something I would like to propose. We can start a new thread to understand what are the requirements.
Have you checked the High Power LED Shield proposed on the www.EtherMania.com website? It's a four channel 350mA constant current driver for High Power LEDs. LEDs could be dimmered through the Arduino PWM channels. 4 Channels High Power LED driver shield : EtherMania, The store for network enthusiasts It could be a good starting point... but I think we are OT on this thread (sorry for the link-spamming).

Thank you for sharing your opinions!
Marco Signorini

Hi Marco,

nice shield, I've missed it when I was looking into your store. I will spent some time to read the documentation and the links that you have provided.

I agree that we can move the discussion into another topic.

Thanks.

Regards,
Dario.

Hi Marco,

I would like to evaluate the board consumption, in order to understand which are the constrains in terms of number of board vs bus lenght.

Does you have the model number for 12 and 24V relays that you are planning to use?

Thanks.

Dario.

Hi Dario.

I'm planning to use the T7SS5E6-24. I've already used the 5V version without problem in these years and I like it.
They have a 360mW coil consumption so I can calculate a 15mA for the 24V version... (quite like a normal LED). Having three of that + LEDs I suspect we are in the range of a 100mA at full load.
I think we can also reduce the coil dimension used in the last PCB because I suspect that nobody needs a 0.4Amps on the 5V... and probably reduce the switching output capacitor.

But... speaking about DC and power related... I'm thinking to something that could help to have an easy deploy of these items in the house. I'm thinking to merge the data and power on the same line.
What do you think to have a carrier modulated injected over the DC line?
I'm thinking to something like DTMF tones or the "simplest" FSK. I'm quite sure we can do something like what was used in the sotware modem library for Arduino:

http://code.google.com/p/arms22/downloads/detail?name=SoftModem-004.zip

Thanks!

Hi Marco,

assuming a system over 10 nodes rated at 24V and 100 m of bus for 1 mm2, at the end of the line we have lost 4V (4 Ohm/100m). Its enought to operate the coils (>16V) and power the boards. I was thinking that a single cable with two twisted pairs maybe one way to power the boards and get the signal.

Unfortunately cable with two pairs doesn't have size larger than 0.5 mm2, at least on eBay. That for sure are too small cables to carry out the power, and may create us problems in case of larger boards (with more relays).

Have you some suggestion?

In the while I'm looking to the library SoftModem.

Regards,
Dario.

Hi Marco,

I've looked a bit into SoftModem and I've to say that is really a nice library. It build a binary-FSK modulator/demodulator in hardware, using the analog comparator and an internal timer. Is interrupt driven and so isn't so heavy for the uC.

In attachment you can found the electrical sheme that I've used to build a bus of AVRs without any additional hardware (out of wires and resistors). I was able to readback what was written on the bus and find out collision on the bus.

I would like to build a library based on SoftModem, it will use a different managment of the buffer and include CRC and collision detection. This library will be a base option that shall be included in Souliss/vNet also.

Now the problem is find out a way to move the data over a powered bus, thats no so simple. Now I'm using a floating bus (see the attachment) that offers less realibility of a open-drain one, because the resistor split the voltage and so, the noise can create more problem rather than a solution without voltage splitting.

Now the question is how to insert a low 3.3/5V voltage over a 24V bus. I've always seen the capacitve coupling used to filter a DC signal and I'm not sure on how the same can be injected in.
Looking to some scheme in internet, looks that capacitive coupling shall be enough (with maybe a smith trigger in between), but I'm not sure about this. I will try to study the problem.

Let me say that with this library we can read back what we write, that means have an easy way to detect the collision. So we shall try to retain this capability.

Regards,
Dario.

In the while of the development of the library for the FSK (it will require a bit, because I've a planned release of Souliss in short time), I'm studying the circuit with a SPICE simulator (I'm using LTIspice) to learn more about a singnal over the power line.

As now I've cleared some of my dobuts, the first was how I can inject a low voltage over a cable that has a bigger one, the answer was the internal generator resistance.
The simulation has highlighted a point that I've forget, also if we use a FSK wave that is always >0V, after the filtering it will have a wave above and below the zero, so an offset is required.

Now the interesting matter is find what happen in case of collision, what I mean, I've studied (in my previous attachment) what happen on the electrical side in case of time-invariant bits. Now the goal is understand what happen when a bit is no longer a time invariant voltage, but a modulated one.

I will try to post some result as soon.

Regards,
Dario.

Hi Dario.
Thank you for your contributes and sorry for the delay in my answers... but my spare time is limited, unfortunately.
Let me answer to some of your questions.

  1. The cable. I've some examples of real installations coming from the big players. An example is here: http://www.catalogo.bticino.it/sites/default/files/media_files/BT00094-a.PDF. It's available in 100m and 500m and it's made by a two 0.35mmq cables. The number of devices you can power from the bus is obviously dependent by the length of the cable and the consumption of devices itself. We can assume that not all relays are powered on at the same time... so there is a little statistical margin. Looking at this brand I can tell you that the most used power supply is rated at 1.2A@27V and it's normally enough to serve a small/medium size home. When more than 1.2Amps are needed, they provide a sort of "bus merger" that convey data over the busses but electrically insulate them in order to allow the user to have more than one power supplies on the same plant.

  2. Injecting the data over the DC bus. I've found an interesting example here: http://e2e.ti.com/support/interface/industrial_interface/f/142/t/75687.aspx. I like the idea to use the same RS485 transceiver but there are some drawback on that. As you can see in the example TI provides, there are a set of capacitors used to block the DC on the data lines. Capacitors are cheap, small and do the job. Some diodes are probably needed to limit spikes that can damage the driver... but I'm not sure because the RS485 driver is already protected.
    When data line is applied on the DC it's mandatory to use inductors in series to the power generators/regulators. This prevents that the power regulator low internal resistance and the filtering capacitors "cut" the data injected on the bus. Inductors should be rated in order to provide high resistance to the data signal (that's not a DC signal but it's a modulated signal) and very low resistance to the DC. Inductors are not cheap... and not small... so I think this could be a little problem. This problem is amplified when using the RS485 driver because this type of driver works in differential way, so it introduces modulated signal on either cable on the bus, with inverted polarity, requiring a set of common mode chokes instead of normal inductors! I was not able to find in the market common mode chokes that can easy provide 20mH rated at 100mA (I'm assuming to have a max of 100mA power consumption on each board at 28V) and that are either cheap and small =(
    This is not a problem at the power supply side where a 1.5Amps rated chokes could be easily found (they are normally used on switching as EMI suppressors).
    So I've to investigate about the possibility to replace the RS485 driver with some other and/or replace the common mode chokes with something different....

I think a push pull type driver is required. I think the simple open drain solution is not enough to warranty that the bus voltage drops instantaneously when the drive is open either because the decoupling capacitors are on the line, either because the line is a (small) capacitor.
Due to the presence of the decoupling capacitors, I think that there is no need to have a three-state driver: the current flowing to GND when the push-pull is driven to the low side (when in tx idle state) will be blocked by the capacitor.. so the RS485 is probably something overkill. I'll look on MOSFET drivers...

Ideas and suggestions are welcomed!

Thanks and bye!
Marco Signorini.

Hi Marco,

yesterday I've played with paper and simulator to find out how data are injected and basically how much voltage is really transferred.

On my side, I think that the RS485 solution shall be discarded, just because all the available IC doesn't allow to read back the values that are on the bus. This feature is important to build an easy collision detection. Relevant the push-pull, the main problem is the requirement of a dual-voltage +V,-V.

I'm using a capacitive coupling and a resistor to protect the output pin in case of collision. In fact, if two devices write at same time, the pins output pins may be damaged. Damage may happen if one pins apply H voltage and the other L, the resistor protect the pins and avoid the use of tri-state devices. The RS485 chip, use a tri-state enable to avoid this problems.

The open-drain will not create problems in discharging of the the bus, but require a non-floating bus. If fact, the bus will be forced at H voltage and discharged by the open drains MOSFET when a L shall be transmitted. Using an open drain, there is a common "load" for all the MOSFET on the bus an collision doesn't make longer electrical problems.
In case of MOSFET, on the line is required a "load" that shall be an inductor. Using a non-differential transmission, just a classic single inductor can be used. Problem on space and cost shall be addressed.

So I'm proposing two ways:

  • Capacitive coupling with a protection resistor,
  • Capacitve coupling with external open-drain MOSFET.

The first solution offer a less reliability to noise, because the voltage that is "injected" on the bus is splitted between the resistor that protect the pins, rather the open-drain solution offer the full voltage over it.

In my test I was using the internal resistor of the main power supply to transfer the FSK wave from the pins to the bus, but due to small resistance, the voltage drops mainly on the protection resistor. Using an inductor as load will solve the issue, if in series with the bus, the voltage will drop on it and so on the bus.

I will post an electric schematic to be more clear.

Let me know your opinion.

Regards,
Dario.

Two more issue that shall be taken in account: - The 100u capacitor used to filter-in the input voltage to the DC/DC will act as filter for the FSK-wave. During the transmission (discharging) this will be in parallel to the capacitor used for the coupling on the bus. - The DC/DC will produce noise also on the bus, this noise will increase if the inlet 100u capacitor will decrease.

Hi Dario.

I agree to discard the RS485 solution.
As a "push pull driver" I've this on my mind:

It's a compact (protected) unit able to directly drive a line either to high then low side. This avoid the usage of the common load.

I'll try to post you as soon as possible an example of schematics I've in my mind that I think solves the two problems you arise on the section below.

So we can discuss in front of a schematics.

Thanks!
Marco Signorini.