Go Down

Topic: Some ideas for a domestic antitheft system... and probably more. (Read 17 times) previous topic - next topic

veseo

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.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

veseo

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.

Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

veseo

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.
Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

Marco Signorini

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.

veseo

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.



Souliss - Open-source Distributed Home Automation with Arduino and Android

http://www.souliss.net
Follow at @soulissteam

@veseotech

Go Up