a couple of articles migrated

This commit is contained in:
Wolfgang Hottgenroth 2018-05-02 16:30:12 +02:00
parent db41f7b8ce
commit b5c6422601
Signed by: wn
GPG Key ID: B586EAFCDF2F65F4
41 changed files with 2323 additions and 1 deletions

View File

@ -20,7 +20,7 @@ Here, I've everything under my on control and I know exactly which of your data
I'm sure about this, since this is a plain old homepage without any dynamic content. No comments, no mail forms, no Javascript, no responsiveness. It is built using a couple of Makefiles and m4 macros and plain old HTML code.
</p>
<p>
If you want to leave a comment on anything, please use my <a href="mailto:woho@hottis.de">email</a> or <a href="https://twitter.com/wollud1969" target="_blank">Twitter account</a><br/>.
If you want to leave a comment on anything, please use my <a href="mailto:woho@hottis.de">email</a> or <a href="https://twitter.com/wollud1969" target="_blank">Twitter account</a>..
</p>
<p>
And: yes, I know, this homepage is soooo ugly. I'm sorry, no CSS yet.
@ -46,6 +46,134 @@ And: yes, I know, this homepage is soooo ugly. I'm sorry, no CSS yet.
<li>
2014-02-08 -<a href="./posts/2014-02-08.01/article.html">Another (better) MBus-Master, Part 5</a><br/>
</li>
<li>
2014-01-22 -<a href="./posts/2014-01-22.01/article.html">Another (better) MBus-Master, Part 4</a><br/>
</li>
<li>
2014-01-18 -<a href="./posts/2014-01-18.01/article.html">Another (better) MBus-Master, Part 3</a><br/>
</li>
<li>
2014-01-15 -<a href="./posts/2014-01-15.01/article.html">Another (better) MBus-Master, Part 2</a><br/>
</li>
<li>
2014-01-14 -<a href="./posts/2014-01-14.01/article.html">Another (better) MBus-Master, Part 1</a><br/>
</li>
<li>
2014-01-08 -<a href="./posts/2014-01-08.02/article.html">Debouncing a rotary encoder is really hard</a><br/>
</li>
<li>
2014-01-08 -<a href="./posts/2014-01-08.01/article.html">Arduino operated Current Sink</a><br/>
</li>
<li>
2013-11-08 -<a href="./posts/2013-11-08.01/article.html">Has this large file something else than zeros?</a><br/>
</li>
<li>
2013-11-07 -<a href="./posts/2013-11-07.01/article.html">DHCP server on a MacBook</a><br/>
</li>
<li>
2013-09-21 -<a href="./posts/2013-09-21.01/article.html">M-Bus Master, Part 5</a><br/>
</li>
<li>
2013-09-11 -<a href="./posts/2013-09-11.01/article.html">M-Bus Master, Part 4 (Gas)</a><br/>
</li>
<li>
2013-09-10 -<a href="./posts/2013-09-10.01/article.html">M-Bus Master, Part 3 (Water)</a><br/>
</li>
<li>
2013-09-09 -<a href="./posts/2013-09-09.01/article.html">M-Bus Master, Part 2 (Electricity)</a><br/>
</li>
<li>
2018-07-24 -<a href="./posts/2013-07-24.01/article.html">M-Bus Master, Part 1 (Basics)</a><br/>
</li>
<li>
2013-07-01 -<a href="./posts/2013-07-01.01/article.html">Theremin</a><br/>
</li>
<li>
2018-06-27 -<a href="./posts/2013-06-27.02/article.html">Network-attached thermometer</a><br/>
</li>
<li>
2013-06-27 -<a href="./posts/2013-06-27.01/article.html">Children Protection for Postfix-based EMail-Server</a><br/>

View File

@ -0,0 +1,48 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
<a href="http://a385e-5.de/wp-content/uploads/2013/06/Foto-4-1.jpg"><img class="alignnone size-medium wp-image-23" alt="Foto 4-1" src="http://a385e-5.de/wp-content/uploads/2013/06/Foto-4-1-224x300.jpg" width="224" height="300" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2013/06/201307031008.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/06/201307031008-300x290.jpg" alt="201307031008" width="300" height="290" class="alignnone size-medium wp-image-105" /></a>
Using the voltage-reference LT1004 1.2 and the voltage divider, a voltage of 1.0V is provided to the op-amp, which forms together with the bottom 1k resistor and the BS108 a current source, driving 1.0mA through the PT1000. Since 1mA is a bit high for a PT1000, this current can be shut down using the other BS108 by the mcirocontroller via P5.
For a measurement, the current of 1.0mA is switched on, about 100us later the voltage over the PT100 is measured through the difference amplifier and the ADC MAX187, which is read by the microcontroller via P2, P3 and P4. Immediately after measuring the voltage the current is switched off again to avoid heating up the PT1000 with the measurement current.
Embedded software running on the Arduino Uno calculates the temperature from the voltage of the PT1000. This temperature value is low pass filtered using exponential smoothing. All three values (digital output of the ADC, raw temperature and smoothed temperature are provided via the Arduino Ethernet Shield and a proprietary protocol on the LAN, where the values are queried with a period of one minute by the server-side support software and stored in a database.
<a href="http://files.a385e-5.de/files/NetThermometer-0.9.tar.gz" target="_blank">Embedded code</a>
<a href="http://files.a385e-5.de/files/NetThermometerSupport-0.9.tar.gz" target="_blank">Support code</a>
Temperature of the day:
<a href="https://eupenstrasse.yadynns.net:80/graph/Index?g=today"><img class="alignnone size-medium wp-image-23" alt="Foto 4-1" src="https://eupenstrasse.yadynns.net:80/graph/Today" width="224" height="300" /></a>
Temperature of the last seven days:
<a href="https://eupenstrasse.yadynns.net:80/graph/Index?g=week"><img class="alignnone size-medium wp-image-23" alt="Foto 4-1" src="https://eupenstrasse.yadynns.net:80/graph/Week" width="224" height="300" /></a>
Temperature of the month:
<a href="https://eupenstrasse.yadynns.net:80/graph/Index?g=month"><img class="alignnone size-medium wp-image-23" alt="Foto 4-1" src="https://eupenstrasse.yadynns.net:80/graph/Month" width="224" height="300" /></a>
</body>
</html>

View File

@ -0,0 +1,35 @@
define(`TITLE', `Network-attached thermometer')
define(`DATE', `2018-06-27')
define(`CONTENT', `
<a href="http://a385e-5.de/wp-content/uploads/2013/06/Foto-4-1.jpg"><img class="alignnone size-medium wp-image-23" alt="Foto 4-1" src="http://a385e-5.de/wp-content/uploads/2013/06/Foto-4-1-224x300.jpg" width="224" height="300" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2013/06/201307031008.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/06/201307031008-300x290.jpg" alt="201307031008" width="300" height="290" class="alignnone size-medium wp-image-105" /></a>
Using the voltage-reference LT1004 1.2 and the voltage divider, a voltage of 1.0V is provided to the op-amp, which forms together with the bottom 1k resistor and the BS108 a current source, driving 1.0mA through the PT1000. Since 1mA is a bit high for a PT1000, this current can be shut down using the other BS108 by the mcirocontroller via P5.
For a measurement, the current of 1.0mA is switched on, about 100us later the voltage over the PT100 is measured through the difference amplifier and the ADC MAX187, which is read by the microcontroller via P2, P3 and P4. Immediately after measuring the voltage the current is switched off again to avoid heating up the PT1000 with the measurement current.
Embedded software running on the Arduino Uno calculates the temperature from the voltage of the PT1000. This temperature value is low pass filtered using exponential smoothing. All three values (digital output of the ADC, raw temperature and smoothed temperature are provided via the Arduino Ethernet Shield and a proprietary protocol on the LAN, where the values are queried with a period of one minute by the server-side support software and stored in a database.
<a href="http://files.a385e-5.de/files/NetThermometer-0.9.tar.gz" target="_blank">Embedded code</a>
<a href="http://files.a385e-5.de/files/NetThermometerSupport-0.9.tar.gz" target="_blank">Support code</a>
Temperature of the day:
<a href="https://eupenstrasse.yadynns.net:80/graph/Index?g=today"><img class="alignnone size-medium wp-image-23" alt="Foto 4-1" src="https://eupenstrasse.yadynns.net:80/graph/Today" width="224" height="300" /></a>
Temperature of the last seven days:
<a href="https://eupenstrasse.yadynns.net:80/graph/Index?g=week"><img class="alignnone size-medium wp-image-23" alt="Foto 4-1" src="https://eupenstrasse.yadynns.net:80/graph/Week" width="224" height="300" /></a>
Temperature of the month:
<a href="https://eupenstrasse.yadynns.net:80/graph/Index?g=month"><img class="alignnone size-medium wp-image-23" alt="Foto 4-1" src="https://eupenstrasse.yadynns.net:80/graph/Month" width="224" height="300" /></a>
')

View File

@ -0,0 +1,139 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
<p>
A <a href="https://en.wikipedia.org/wiki/Theremin" target="_blank" rel="noopener">Theremin</a> is a rather old electronic music instrument, invented in 1928. It is played by approaching hands to two antennas, without touching them. One antenna is used to manipulate the frequeny of the tone, the other one to manipulate the volume.
</p>
<p>
<img src="foto-am-30-06-13-um-20-021.jpg"/>
</p>
<p>
This is just another Theremin. Only basic structure of the circuit was taken from many other published Theremin circuits.
</p>
<p>
<img src="scan_005006-1024x654.jpg"/>
</p>
<p>
Completely new (or at least not found during my Theremin googling) is the digital zero-calibration.
</p>
<p>
The both left-hand-side oscillators together with the mixer+filter block provide the signal to control the volume, the right-hand-side oscillators and mixer+filter block provide the signal to control the frequency.
</p>
<p>
Each of these both couples consists of two oscillators and a mixer+filter block. Both oscillators have to swing on exactly the same frequency, in this case of about 1.3MHz. While the exact frequency does not matter, it is significant that both oscillators have the same frequency. The signals of both oscillators will be mixed, which means, multiplied.
</p>
<p>
[math]sin(omega_0 t) sin(omega t)[/math]
</p>
<p>
Here [math]omega[/math] is the frequncy of one of the oscillators while [math]omega_0[/math] is the frequency of the other one.
</p>
<p>
This term can be modified using the addition rule for trigonometric functions into
</p>
<p>
[math]frac{cos((omega_0-omega)t)-cos((omega_0+omega)t)}{2}[/math]
</p>
<p>
Due to this transformation, two signals, one with the sum and one with the difference of both input signal frequencies, are accumulated.
When both frequencies are exactly the same, one part of the sum appears as a DC offset, while the other part is the doubled frequency.
If one oscillator is de-tuned by only a few Hzs, one part are this few Hzs (a very low, hearable frequency) and the other part is still (roughly) the doubled frequency (a high frequency). The high frequency part can now be suppressed using a lowpass-filter.
Multiplication of two signals can be done using an analog four quadrant multiplier, like the AD633. So, this is the schematic of the mixer+filter block:
</p>
<p>
<img src="scan_005006_5-1024x717.jpg"/>
</p>
<p>
The output signal of this block is the difference of the detuning of the one oscillator.
</p>
<p>
Detuning of the oscillator will be achieved by approaching the hand to the antenna of the oscillator.
</p>
<p>
<img src="scan_005006_3.jpg"/>
</p>
<p>
The antenna acts as a kind of a capacitive sensor and by approaching the hand a very small amount of capacity is added into the LC resonator.
</p>
<p>
The other oscillator is a fix-frequency oscillator which can be tuned to swing on the same frequency as the first oscillator in a not detuned state.
</p>
<p>
<img src="scan_005006_4.jpg"/>
</p>
<p>
This tuning is achieved by biasing the two varactor diodes.
</p>
<p>
Here is automated tuning circuit steps in:
</p>
<p>
<img src="scan_005006_6.jpg"/>
</p>
<p>
The low-frequency output signal of the mixer+filter block is provided through a 2-to-1 multiplexer (the four NAND-gates) into a microcontroller. The microcontroller measures the frequency and as long as it is above a frequency [math]epsilon[/math] of say 10Hz, the bias voltage [math]U_{tune}[/math] is increased.
</p>
<p>
These both oscillators with mixer+filter and one channel of the zero-calibration appear twice in the whole circuit, one for frequency manipulation and one for volume manipulation.
</p>
<p>
The low-frequency, hearable, signal and the volume-control signal are brought together in the volume-control circuit
</p>
<p>
<img src="scan_005006_2-1024x553.jpg"/>
</p>
<p>
Here, the low-frequency signal [math]U_{Lf1}[/math] is passed through a high-pass filter. The high-pass filter is calculated that way that the whole detunable frequency range comes onto the ramp of the filter. So, the not detuned output signal of the mixer+filter is a DC signal, which is suppressed completely by the high-pass filter (beginning of the ramp) and the maximum detuned output signal of about 2kHz matched roughly to the end of the ramp. This filtered signal is rectified and only the negative half-wave of the signal passes the diode. This half-wave signal is sieved by the larger capacitor to get a DC signal between 0 and the maximum amplitude which passed the fiter. This negative DC signal is fed into the FET, which is configured as a voltage controlled resistor. This voltage controlled resistor and the fix resistor (5k6) are building a voltage controlled voltage divider. The hearable frequency signal [math]U_{Lf2}[/math] is fed into this voltage divider  and passed to an amplifier.
</p>
<p>
The output signal of this block in turn is the volume-controlled and frequency-controlled signal which is the output signal of this Theremin. It is passed into a power-amplifier and into a speaker - done.
</p>
<p>
<a href="https://www.youtube.com/watch?v=5US8LY_FbQ4&amp;w=420&amp;h=315">Calibrating the Theremin</a>
</p>
<p>
<a href="https://www.youtube.com/watch?v=lDld71HI66o&amp;w=420&amp;h=315">Playing the Theremin</a>
</p>
</body>
</html>

View File

@ -0,0 +1,126 @@
define(`TITLE', `Theremin')
define(`DATE', `2013-07-01')
define(`CONTENT', `
<p>
A <a href="https://en.wikipedia.org/wiki/Theremin" target="_blank" rel="noopener">Theremin</a> is a rather old electronic music instrument, invented in 1928. It is played by approaching hands to two antennas, without touching them. One antenna is used to manipulate the frequeny of the tone, the other one to manipulate the volume.
</p>
<p>
<img src="foto-am-30-06-13-um-20-021.jpg"/>
</p>
<p>
This is just another Theremin. Only basic structure of the circuit was taken from many other published Theremin circuits.
</p>
<p>
<img src="scan_005006-1024x654.jpg"/>
</p>
<p>
Completely new (or at least not found during my Theremin googling) is the digital zero-calibration.
</p>
<p>
The both left-hand-side oscillators together with the mixer+filter block provide the signal to control the volume, the right-hand-side oscillators and mixer+filter block provide the signal to control the frequency.
</p>
<p>
Each of these both couples consists of two oscillators and a mixer+filter block. Both oscillators have to swing on exactly the same frequency, in this case of about 1.3MHz. While the exact frequency does not matter, it is significant that both oscillators have the same frequency. The signals of both oscillators will be mixed, which means, multiplied.
</p>
<p>
[math]sin(omega_0 t) sin(omega t)[/math]
</p>
<p>
Here [math]omega[/math] is the frequncy of one of the oscillators while [math]omega_0[/math] is the frequency of the other one.
</p>
<p>
This term can be modified using the addition rule for trigonometric functions into
</p>
<p>
[math]frac{cos((omega_0-omega)t)-cos((omega_0+omega)t)}{2}[/math]
</p>
<p>
Due to this transformation, two signals, one with the sum and one with the difference of both input signal frequencies, are accumulated.
When both frequencies are exactly the same, one part of the sum appears as a DC offset, while the other part is the doubled frequency.
If one oscillator is de-tuned by only a few Hz'`s, one part are this few Hz'`s (a very low, hearable frequency) and the other part is still (roughly) the doubled frequency (a high frequency). The high frequency part can now be suppressed using a lowpass-filter.
Multiplication of two signals can be done using an analog four quadrant multiplier, like the AD633. So, this is the schematic of the mixer+filter block:
</p>
<p>
<img src="scan_005006_5-1024x717.jpg"/>
</p>
<p>
The output signal of this block is the difference of the detuning of the one oscillator.
</p>
<p>
Detuning of the oscillator will be achieved by approaching the hand to the antenna of the oscillator.
</p>
<p>
<img src="scan_005006_3.jpg"/>
</p>
<p>
The antenna acts as a kind of a capacitive sensor and by approaching the hand a very small amount of capacity is added into the LC resonator.
</p>
<p>
The other oscillator is a fix-frequency oscillator which can be tuned to swing on the same frequency as the first oscillator in a not detuned state.
</p>
<p>
<img src="scan_005006_4.jpg"/>
</p>
<p>
This tuning is achieved by biasing the two varactor diodes.
</p>
<p>
Here is automated tuning circuit steps in:
</p>
<p>
<img src="scan_005006_6.jpg"/>
</p>
<p>
The low-frequency output signal of the mixer+filter block is provided through a 2-to-1 multiplexer (the four NAND-gates) into a microcontroller. The microcontroller measures the frequency and as long as it is above a frequency [math]epsilon[/math] of say 10Hz, the bias voltage [math]U_{tune}[/math] is increased.
</p>
<p>
These both oscillators with mixer+filter and one channel of the zero-calibration appear twice in the whole circuit, one for frequency manipulation and one for volume manipulation.
</p>
<p>
The low-frequency, hearable, signal and the volume-control signal are brought together in the volume-control circuit
</p>
<p>
<img src="scan_005006_2-1024x553.jpg"/>
</p>
<p>
Here, the low-frequency signal [math]U_{Lf1}[/math] is passed through a high-pass filter. The high-pass filter is calculated that way that the whole detunable frequency range comes onto the ramp of the filter. So, the not detuned output signal of the mixer+filter is a DC signal, which is suppressed completely by the high-pass filter (beginning of the ramp) and the maximum detuned output signal of about 2kHz matched roughly to the end of the ramp. This filtered signal is rectified and only the negative half-wave of the signal passes the diode. This half-wave signal is sieved by the larger capacitor to get a DC signal between 0 and the maximum amplitude which passed the fiter. This negative DC signal is fed into the FET, which is configured as a voltage controlled resistor. This voltage controlled resistor and the fix resistor (5k6) are building a voltage controlled voltage divider. The hearable frequency signal [math]U_{Lf2}[/math] is fed into this voltage divider  and passed to an amplifier.
</p>
<p>
The output signal of this block in turn is the volume-controlled and frequency-controlled signal which is the output signal of this Theremin. It is passed into a power-amplifier and into a speaker - done.
</p>
<p>
<a href="https://www.youtube.com/watch?v=5US8LY_FbQ4&amp;w=420&amp;h=315">Calibrating the Theremin</a>
</p>
<p>
<a href="https://www.youtube.com/watch?v=lDld71HI66o&amp;w=420&amp;h=315">Playing the Theremin</a>
</p>
')

View File

Before

Width:  |  Height:  |  Size: 200 KiB

After

Width:  |  Height:  |  Size: 200 KiB

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

@ -0,0 +1,91 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
(Sorry, all images lost in a former migration.)
<p>
The M-Bus (short for meter-bus) is primarily used for household meters for water, gas and electric power. See <a href="http://www.m-bus.com" title="www.m-bus.com" target="_blank">here</a> and <a href="https://en.wikipedia.org/wiki/Meter-Bus" title="Meter-Bus (Wikipedia)" target="_blank">here</a>.
</p>
<p>
This is an attempt to build a simple master for this bus, which is a single-master multiple-slave bus, to be controlled using an Arduino system.
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/laser-drucker_005070.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/07/laser-drucker_005070-300x218.jpg" alt="laser-drucker_005070" width="300" height="218" class="alignnone size-medium wp-image-118" /></a>
</p>
<p>
Master to slave communication is performed by lowering the voltage at the bus by 12V, so here, from 30V to 18V. In the above schematic, T2 and IC1 together with the divider of R1 and R2 are forming a voltage source. When T1 is blocking, the bottom part of the divider is inactive and full 30V is the reference for the voltage source and the output voltage at the bus is 30V. When T1 is conducting (high signal at TX), the bottom part of the divider becomes active and the reference voltage is lowered to 18V, consequently the output voltage at the bus is 18V too.
</p>
<p>
(Maybe the signal driving T1 needs to be inverted first to get the correct logical polarity, not yet verified.)
</p>
<p>
This is the waveform with a feed of 10kHz at TX:
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/TX.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/07/TX-300x219.jpg" alt="TX" width="300" height="219" class="alignnone size-medium wp-image-123" /></a>
</p>
<p>
Ch. 2 (blue) is the input signal from the function generator, Ch. 1 (yellow) is the output signal at the bus terminals. It still needs to be verified whether the setup time (delay between falling edge of input and raising edge of output) is short enough.
</p>
<p>
R5 is a current sense for the receive path, R4 is a ground-load for an open bus and C1 serves to filter the output voltage. Only a rather small capacitor is used here to only filter the high-frequency noise (around 1MHz) from the source but not the signal of about 10kHz fed through T1 from TX.
</p>
<p>
Slave to master communication is performed by changing the current sinked by the slave. A logical "1" is signalled by a current of maximum 1,5mA, a logical "0" is signalled by a current of 11-20mA. This is sensed at R5 and needs to be conditioned before feeding as RX into the microcontroller.
</p>
<p>
The voltage over R5 is in the low load situation about 100mV, in the high load situation about 1V. These are good voltages to block or conduct a PNP transistor, in the following schematic T3.
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/schematic1.png"><img src="http://a385e-5.de/wp-content/uploads/2013/07/schematic1-255x300.png" alt="schematic1" width="255" height="300" class="alignnone size-medium wp-image-128" /></a>
</p>
<p>
The voltage of the signal at the point RX is limited using a Z-diode to fit into the range acceptable for a microcontroller. It is:
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/NewFile2.png"><img src="http://a385e-5.de/wp-content/uploads/2013/07/NewFile2-300x219.png" alt="NewFile2" width="300" height="219" class="alignnone size-medium wp-image-130" /></a>
</p>
<p>
Ch. 1 (yellow) is the signal from the generator to switch the load situation, Ch. 2 (blue) the signal at RX.
</p>
<p>
The MOSFET T1 has been replaced by a NPN transistor BC547, the waveforms are still very good:
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/NewFile3.png"><img src="http://a385e-5.de/wp-content/uploads/2013/07/NewFile3-300x219.png" alt="NewFile3" width="300" height="219" class="alignnone size-medium wp-image-129" /></a>
</p>
<p>
Ch. 1 (yellow) is the voltage on the M-bus terminal, Ch. 2 (blue) is the generator signal at TX.
</p>
</body>
</html>

View File

@ -0,0 +1,78 @@
define(`TITLE', `M-Bus Master, Part 1 (Basics)')
define(`DATE', `2018-07-24')
define(`CONTENT', `
(Sorry, all images lost in a former migration.)
<p>
The M-Bus (short for meter-bus) is primarily used for household meters for water, gas and electric power. See <a href="http://www.m-bus.com" title="www.m-bus.com" target="_blank">here</a> and <a href="https://en.wikipedia.org/wiki/Meter-Bus" title="Meter-Bus (Wikipedia)" target="_blank">here</a>.
</p>
<p>
This is an attempt to build a simple master for this bus, which is a single-master multiple-slave bus, to be controlled using an Arduino system.
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/laser-drucker_005070.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/07/laser-drucker_005070-300x218.jpg" alt="laser-drucker_005070" width="300" height="218" class="alignnone size-medium wp-image-118" /></a>
</p>
<p>
Master to slave communication is performed by lowering the voltage at the bus by 12V, so here, from 30V to 18V. In the above schematic, T2 and IC1 together with the divider of R1 and R2 are forming a voltage source. When T1 is blocking, the bottom part of the divider is inactive and full 30V is the reference for the voltage source and the output voltage at the bus is 30V. When T1 is conducting (high signal at TX), the bottom part of the divider becomes active and the reference voltage is lowered to 18V, consequently the output voltage at the bus is 18V too.
</p>
<p>
(Maybe the signal driving T1 needs to be inverted first to get the correct logical polarity, not yet verified.)
</p>
<p>
This is the waveform with a feed of 10kHz at TX:
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/TX.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/07/TX-300x219.jpg" alt="TX" width="300" height="219" class="alignnone size-medium wp-image-123" /></a>
</p>
<p>
Ch. 2 (blue) is the input signal from the function generator, Ch. 1 (yellow) is the output signal at the bus terminals. It still needs to be verified whether the setup time (delay between falling edge of input and raising edge of output) is short enough.
</p>
<p>
R5 is a current sense for the receive path, R4 is a ground-load for an open bus and C1 serves to filter the output voltage. Only a rather small capacitor is used here to only filter the high-frequency noise (around 1MHz) from the source but not the signal of about 10kHz fed through T1 from TX.
</p>
<p>
Slave to master communication is performed by changing the current sinked by the slave. A logical "1" is signalled by a current of maximum 1,5mA, a logical "0" is signalled by a current of 11-20mA. This is sensed at R5 and needs to be conditioned before feeding as RX into the microcontroller.
</p>
<p>
The voltage over R5 is in the low load situation about 100mV, in the high load situation about 1V. These are good voltages to block or conduct a PNP transistor, in the following schematic T3.
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/schematic1.png"><img src="http://a385e-5.de/wp-content/uploads/2013/07/schematic1-255x300.png" alt="schematic1" width="255" height="300" class="alignnone size-medium wp-image-128" /></a>
</p>
<p>
The voltage of the signal at the point RX is limited using a Z-diode to fit into the range acceptable for a microcontroller. It is:
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/NewFile2.png"><img src="http://a385e-5.de/wp-content/uploads/2013/07/NewFile2-300x219.png" alt="NewFile2" width="300" height="219" class="alignnone size-medium wp-image-130" /></a>
</p>
<p>
Ch. 1 (yellow) is the signal from the generator to switch the load situation, Ch. 2 (blue) the signal at RX.
</p>
<p>
The MOSFET T1 has been replaced by a NPN transistor BC547, the waveforms are still very good:
</p>
<p>
<a href="http://a385e-5.de/wp-content/uploads/2013/07/NewFile3.png"><img src="http://a385e-5.de/wp-content/uploads/2013/07/NewFile3-300x219.png" alt="NewFile3" width="300" height="219" class="alignnone size-medium wp-image-129" /></a>
</p>
<p>
Ch. 1 (yellow) is the voltage on the M-bus terminal, Ch. 2 (blue) is the generator signal at TX.
</p>
')

View File

@ -0,0 +1,123 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-3.jpg"><img class="alignnone size-medium wp-image-145" alt="Foto 3" src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-3-300x225.jpg" width="300" height="225" /></a>
Finally, this MeterBus transceiver is connected to an Arduino Ethernet board and talks to an M-Bus equipped electric powermeter
<a href="http://a385e-5.de/wp-content/uploads/2013/09/kettle.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/kettle-300x221.jpg" alt="kettle" width="300" height="221" class="alignnone size-medium wp-image-167" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-2.jpg"><img class="alignnone size-medium wp-image-144" alt="Foto 2" src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-2-300x225.jpg" width="300" height="225" /></a>
The power meter was configured to M-Bux address 0x21, and so the initialize command, sent through the Arduino and the transceiver has been answered correctly:
<code>
so 10 40 21 61 16
success
SO RESP: E5
</code>
<code>so</code> is the command for the firmware to send the following octets on the bus, <code>success</code> is the acknowledgement, that this has been done and <code>SO RESP:</code> is the prefix for the octets received from the bus.
According the the manufacturers <a href="http://gfinder.findernet.com//assets/Series/388/S7EM-BusDE.pdf" target="_blank">documentation</a> the M-Bus command <code>REQ_UD2</code> (see <a href="http://http://www.m-bus.com/mbusdoc/md5.php" target="_blank">here in the M-Bus documentation</a> should be used to request all the measurement data from the powermeter, and it works:
Here without any consumer load:
<code>
so 10 5b 21 7c 16
success
SO RESP: 68 38 38 68 08 21 72 99 51 00 13 2E 19 21 02 01 00 00 00 8C
10 04 <strong>06 00 00 00</strong> 8C 11 04 00 00 00 00 02 FD C9 FF 01 <strong>E3 00</strong> 02 FD DB
FF 01 <strong>00 00</strong> 02 AC FF 01 <strong>00 00</strong> 82 40 AC FF 01 00 00 EB 16
</code>
Here with an electric kettle as consumer load:
<code>
so 10 5b 21 7c 16
success
SO RESP: 68 38 38 68 08 21 72 99 51 00 13 2E 19 21 02 02 00 00 00 8C
10 04 <strong>06 00 00 00</strong> 8C 11 04 00 00 00 00 02 FD C9 FF 01 <strong>DE 00</strong> 02 FD DB
FF 01 <strong>56 00</strong> 02 AC FF 01 <strong>CD 00</strong> 82 40 AC FF 01 00 00 0A 16
</code>
In the above answer of the powermeter the important measurement values are highlighted:
[table]
Data,measurement category,multiplicator and unit,
<code>06 00 00 00</code>,total consumption,0.01kWh,0.06kWh
<code>DE 00</code>,voltage,1V,222V
<code>56 00</code>,current,0.1A,8.6A
<code>CD 00</code>,power,0.01kW,2.05kW
[/table]
<a href="http://files.a385e-5.de/files/NetMeterBusMaster-0.9.tar.gz" target="_blank">Here</a> is the firmware for the Arduino.
This is a closer look into the response data structure:
(Manufacturer IDs can be found <a href="http://dlms.com/organization/flagmanufacturesids/index.html" target="_blank">here</a>.)
[table]
Octet(s), Field, Meaning
<code>68 38 38 68</code>, Preamble with lentgh,
<code>08</code>, C Field,
<code>21</code>, A Field,
<code>72</code>, CI Field, variable data response
<code>99 51 00 13</code>, Ident. No.,
<code>2E 19</code>, Manufacturer, FIN = Finder GmbH
<code>21</code>, Version,
<code>02</code>, Medium, Electricity
<code>02</code>, Access No,
<code>00</code>, Status,
<code>00 00</code>, Signature,
<code>8C</code>, DIF, ext; instantaneuos value; 8 digit BCD
<code>10</code>, DIFE, tariff 1; storage 0
<code>04</code>, VIF, Energy; 10^(4-3)Wh
<code>06 00 00 00</code>, Value, 0.06kWh
<code>8C</code>, DIF, ext; instantaneuos value; 8 digit BCD
<code>11</code>, DIFE, tariff 1; storage 1
<code>04</code>, VIF, Energy; 10^(4-3)Wh
<code>00 00 00 00</code>, Value, 0
<code>02</code>, DIF, 16bit integer
<code>FD</code>, VIF, ext; true VIF is next; see table for secondary VIF
<code>C9</code>, VIFE, ext; Voltage; 10^(9-9)V
<code>FF</code>, VIFE, manufacturer specific next VIFE
<code>01</code>, VIFE,
<code>DE 00</code>, Value, 222V
<code>02</code>, DIF, 16bit integer
<code>FD</code>, VIF, ext; true VIF is next; see table for secondary VIF
<code>DB</code>, VIFE, ext; Current; 10^(11-12)A
<code>FF</code>, VIFE, manufacturer specific next VIFE
<code>01</code>, VIFE,
<code>56 00</code>, Value, 8.6A
<code>02</code>, DIF, 16bit integer
<code>AC</code>, VIF, ext; Power; 10^(4-3)W
<code>FF</code>, VIFE, manufacturer specific next VIFE
<code>01</code>, VIFE,
<code>CD 00</code>, Value, 2.05kW
<code>82</code>, DIF, ext; 16bit integer
<code>40</code>, DIFE, tariff 0; storage 4
<code>AC</code>, VIF, ext; Power; 10^(4-3)W
<code>FF</code>, VIFE, manufacturer specific next VIFE
<code>01</code>, VIFE,
<code>00 00</code>, Value, 0
<code>0A</code>, Checksum,
<code>16</code>, Stopbyte,
[/table]
</body>
</html>

View File

@ -0,0 +1,110 @@
define(`TITLE', `M-Bus Master, Part 2 (Electricity)')
define(`DATE', `2013-09-09')
define(`CONTENT', `
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-3.jpg"><img class="alignnone size-medium wp-image-145" alt="Foto 3" src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-3-300x225.jpg" width="300" height="225" /></a>
Finally, this MeterBus transceiver is connected to an Arduino Ethernet board and talks to an M-Bus equipped electric powermeter
<a href="http://a385e-5.de/wp-content/uploads/2013/09/kettle.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/kettle-300x221.jpg" alt="kettle" width="300" height="221" class="alignnone size-medium wp-image-167" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-2.jpg"><img class="alignnone size-medium wp-image-144" alt="Foto 2" src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-2-300x225.jpg" width="300" height="225" /></a>
The power meter was configured to M-Bux address 0x21, and so the initialize command, sent through the Arduino and the transceiver has been answered correctly:
<code>
so 10 40 21 61 16
success
SO RESP: E5
</code>
<code>so</code> is the command for the firmware to send the following octets on the bus, <code>success</code> is the acknowledgement, that this has been done and <code>SO RESP:</code> is the prefix for the octets received from the bus.
According the the manufacturers <a href="http://gfinder.findernet.com//assets/Series/388/S7EM-BusDE.pdf" target="_blank">documentation</a> the M-Bus command <code>REQ_UD2</code> (see <a href="http://http://www.m-bus.com/mbusdoc/md5.php" target="_blank">here in the M-Bus documentation</a> should be used to request all the measurement data from the powermeter, and it works:
Here without any consumer load:
<code>
so 10 5b 21 7c 16
success
SO RESP: 68 38 38 68 08 21 72 99 51 00 13 2E 19 21 02 01 00 00 00 8C
10 04 <strong>06 00 00 00</strong> 8C 11 04 00 00 00 00 02 FD C9 FF 01 <strong>E3 00</strong> 02 FD DB
FF 01 <strong>00 00</strong> 02 AC FF 01 <strong>00 00</strong> 82 40 AC FF 01 00 00 EB 16
</code>
Here with an electric kettle as consumer load:
<code>
so 10 5b 21 7c 16
success
SO RESP: 68 38 38 68 08 21 72 99 51 00 13 2E 19 21 02 02 00 00 00 8C
10 04 <strong>06 00 00 00</strong> 8C 11 04 00 00 00 00 02 FD C9 FF 01 <strong>DE 00</strong> 02 FD DB
FF 01 <strong>56 00</strong> 02 AC FF 01 <strong>CD 00</strong> 82 40 AC FF 01 00 00 0A 16
</code>
In the above answer of the powermeter the important measurement values are highlighted:
[table]
Data,measurement category,multiplicator and unit,
<code>06 00 00 00</code>,total consumption,0.01kWh,0.06kWh
<code>DE 00</code>,voltage,1V,222V
<code>56 00</code>,current,0.1A,8.6A
<code>CD 00</code>,power,0.01kW,2.05kW
[/table]
<a href="http://files.a385e-5.de/files/NetMeterBusMaster-0.9.tar.gz" target="_blank">Here</a> is the firmware for the Arduino.
This is a closer look into the response data structure:
(Manufacturer IDs can be found <a href="http://dlms.com/organization/flagmanufacturesids/index.html" target="_blank">here</a>.)
[table]
Octet(s), Field, Meaning
<code>68 38 38 68</code>, Preamble with lentgh,
<code>08</code>, C Field,
<code>21</code>, A Field,
<code>72</code>, CI Field, variable data response
<code>99 51 00 13</code>, Ident. No.,
<code>2E 19</code>, Manufacturer, FIN = Finder GmbH
<code>21</code>, Version,
<code>02</code>, Medium, Electricity
<code>02</code>, Access No,
<code>00</code>, Status,
<code>00 00</code>, Signature,
<code>8C</code>, DIF, ext; instantaneuos value; 8 digit BCD
<code>10</code>, DIFE, tariff 1; storage 0
<code>04</code>, VIF, Energy; 10^(4-3)Wh
<code>06 00 00 00</code>, Value, 0.06kWh
<code>8C</code>, DIF, ext; instantaneuos value; 8 digit BCD
<code>11</code>, DIFE, tariff 1; storage 1
<code>04</code>, VIF, Energy; 10^(4-3)Wh
<code>00 00 00 00</code>, Value, 0
<code>02</code>, DIF, 16bit integer
<code>FD</code>, VIF, ext; true VIF is next; see table for secondary VIF
<code>C9</code>, VIFE, ext; Voltage; 10^(9-9)V
<code>FF</code>, VIFE, manufacturer specific next VIFE
<code>01</code>, VIFE,
<code>DE 00</code>, Value, 222V
<code>02</code>, DIF, 16bit integer
<code>FD</code>, VIF, ext; true VIF is next; see table for secondary VIF
<code>DB</code>, VIFE, ext; Current; 10^(11-12)A
<code>FF</code>, VIFE, manufacturer specific next VIFE
<code>01</code>, VIFE,
<code>56 00</code>, Value, 8.6A
<code>02</code>, DIF, 16bit integer
<code>AC</code>, VIF, ext; Power; 10^(4-3)W
<code>FF</code>, VIFE, manufacturer specific next VIFE
<code>01</code>, VIFE,
<code>CD 00</code>, Value, 2.05kW
<code>82</code>, DIF, ext; 16bit integer
<code>40</code>, DIFE, tariff 0; storage 4
<code>AC</code>, VIF, ext; Power; 10^(4-3)W
<code>FF</code>, VIFE, manufacturer specific next VIFE
<code>01</code>, VIFE,
<code>00 00</code>, Value, 0
<code>0A</code>, Checksum,
<code>16</code>, Stopbyte,
[/table]
')

View File

@ -0,0 +1,129 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
Now, also the water meter talks to me.
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Wasserzaehler.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/Wasserzaehler-225x300.jpg" alt="Wasserzaehler" width="225" height="300" class="alignnone size-medium wp-image-173" /></a>
(Note the thin grey cable, thats the M-Bus cable.)
And, after a small modification of the circuit I can talk to water meter and electric power meter connected in parallel to the master.
<blockquote>
<a href="http://a385e-5.de/wp-content/uploads/2013/09/laser-drucker_005120.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/laser-drucker_005120-209x300.jpg" alt="laser-drucker_005120" width="209" height="300" class="alignnone size-medium wp-image-192" /></a>
IC2 was already added in the last step, since the output of the analog circuit and the requirements of the MCU didnt match concerning their logical polarity.
Now, T3 (BS108) and R9 (2k2) have been added to disable the receive path while data is transmitted.
</blockquote>
Responding the <code>REQ_UD2</code> command, the water meter sends this telegram (address 0x30 has been assigned to it first):
<code>
so 10 5b 30 8b 16
success
SO RESP: 68 46 46 68 08 30 72 45 71 43 00 24 23 25 07 02 00 00 00 0C
13 51 84 00 00 8C 10 13 00 00 00 00 0B 3B 00 00 00 0B 26 62 06 00 02
5A CC 00 04 6D 17 16 A9 19 7C 13 00 00 00 00 FC 10 13 00 00 00 00 72
6C 00 00 42 EC 7E BF 1C 35 16
</code>
A closer look, consulting the <a href="http://www.m-bus.com/mbusdoc/md8.php" title="M-Bus documentation" target="_blank">M-Bus documentation</a> reveals the meaning:
[table]Octet(s), Field, Meaning
<code>68 46 46 68</code>, Preamble with length,
<code>08</code>, C field,
<code>30</code>, A field (address),
<code>72</code>, CI field, variable data response
<code>45 71 43 00</code>, Ident. No.,
<code>24 23</code>, Manufacturer , HYD = Hydrometer GmbH
<code>25</code>, Version,
<code>07</code>, Medium, Water
<code>02</code>, Access No.,
<code>00</code>, Status,
<code>00 00</code>, Signature,
<code>0C</code>, DIF, 8 digit BCD
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>51 84 00 00</code>, Value, 8.451m^3
<code>8C</code>, DIF, ext; 8 digit BCD
<code>10</code>, DIFE, minimum value
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>00 00 00 00</code>, Value, 0
<code>0B</code>, DIF, 6 digit BCD
<code>3B</code>, VIF, Volume flow; 10^(3-6)m^3/h
<code>00 00 00</code>, Value, 0
<code>0B</code>, DIF, 6 digit BCD
<code>26</code>, VIF, Operating time; hours
<code>62 06 00</code>, Value, 662h = 27.6d
<code>02</code>, DIF, 16bit integer
<code>5A</code>, VIF, Flow Temperature; 10^(2-3)°C
<code>CC 00</code>, Value, 20.4°C
<code>04</code>, DIF, 32bit integer
<code>6D</code>, VIF, Time Point; time&amp;date
<code>17 16 A9 19</code>, Value,
<code>7C</code>, DIF, LSB; value during error state; 8 digit BCD
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>00 00 00 00</code>, Value, 0
<code>FC</code>, DIF, ext; LSB; value during error state; 8 digit BCD
<code>10</code>, DIFE, tariff 1
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>00 00 00 00</code>, Value, 0
<code>72</code>, DIF, LSB; value during error state; 16bit integer
<code>6C</code>, VIF, Time Point; date
<code>00 00</code>, Value, 0
<code>42</code>, DIF, LSB; 16bit integer
<code>EC</code>, VIF, ext; Time Point; date
<code>7E</code>, VIFE, ??
<code>BF 1C</code>, Value,
<code>35</code>, Checksum,
<code>16</code>, Stopbyte,
[/table]
Decoding of the time&amp;date type is done like this:
<pre>
if (t_data)
{
if (t_data_size == 4) // Type F = Compound CP32: Date and Time
{
if ((t_data[0] &amp; 0x80) == 0) // Time valid ?
{
t-&gt;tm_min = t_data[0] &amp; 0x3F;
t-&gt;tm_hour = t_data[1] &amp; 0x1F;
t-&gt;tm_mday = t_data[2] &amp; 0x1F;
t-&gt;tm_mon = (t_data[3] &amp; 0x0F) - 1;
t-&gt;tm_year = ((t_data[2] &amp; 0xE0) &gt;&gt; 5) |
((t_data[3] &amp; 0xF0) &gt;&gt; 1);
t-&gt;tm_isdst = (t_data[1] &amp; 0x80) ? 1 : 0; // day saving time
}
}
else if (t_data_size == 2) // Type G: Compound CP16: Date
{
t-&gt;tm_mday = t_data[0] &amp; 0x1F;
t-&gt;tm_mon = (t_data[1] &amp; 0x0F) - 1;
t-&gt;tm_year = ((t_data[0] &amp; 0xE0) &gt;&gt; 5) |
((t_data[1] &amp; 0xF0) &gt;&gt; 1);
}
}
</pre>
(Found on github in the libmbus repo.)
</body>
</html>

View File

@ -0,0 +1,116 @@
define(`TITLE', `M-Bus Master, Part 3 (Water)')
define(`DATE', `2013-09-10')
define(`CONTENT', `
Now, also the water meter talks to me.
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Wasserzaehler.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/Wasserzaehler-225x300.jpg" alt="Wasserzaehler" width="225" height="300" class="alignnone size-medium wp-image-173" /></a>
(Note the thin grey cable, that'`s the M-Bus cable.)
And, after a small modification of the circuit I can talk to water meter and electric power meter connected in parallel to the master.
<blockquote>
<a href="http://a385e-5.de/wp-content/uploads/2013/09/laser-drucker_005120.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/laser-drucker_005120-209x300.jpg" alt="laser-drucker_005120" width="209" height="300" class="alignnone size-medium wp-image-192" /></a>
IC2 was already added in the last step, since the output of the analog circuit and the requirements of the MCU didn'`t match concerning their logical polarity.
Now, T3 (BS108) and R9 (2k2) have been added to disable the receive path while data is transmitted.
</blockquote>
Responding the <code>REQ_UD2</code> command, the water meter sends this telegram (address 0x30 has been assigned to it first):
<code>
so 10 5b 30 8b 16
success
SO RESP: 68 46 46 68 08 30 72 45 71 43 00 24 23 25 07 02 00 00 00 0C
13 51 84 00 00 8C 10 13 00 00 00 00 0B 3B 00 00 00 0B 26 62 06 00 02
5A CC 00 04 6D 17 16 A9 19 7C 13 00 00 00 00 FC 10 13 00 00 00 00 72
6C 00 00 42 EC 7E BF 1C 35 16
</code>
A closer look, consulting the <a href="http://www.m-bus.com/mbusdoc/md8.php" title="M-Bus documentation" target="_blank">M-Bus documentation</a> reveals the meaning:
[table]Octet(s), Field, Meaning
<code>68 46 46 68</code>, Preamble with length,
<code>08</code>, C field,
<code>30</code>, A field (address),
<code>72</code>, CI field, variable data response
<code>45 71 43 00</code>, Ident. No.,
<code>24 23</code>, Manufacturer , HYD = Hydrometer GmbH
<code>25</code>, Version,
<code>07</code>, Medium, Water
<code>02</code>, Access No.,
<code>00</code>, Status,
<code>00 00</code>, Signature,
<code>0C</code>, DIF, 8 digit BCD
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>51 84 00 00</code>, Value, 8.451m^3
<code>8C</code>, DIF, ext; 8 digit BCD
<code>10</code>, DIFE, minimum value
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>00 00 00 00</code>, Value, 0
<code>0B</code>, DIF, 6 digit BCD
<code>3B</code>, VIF, Volume flow; 10^(3-6)m^3/h
<code>00 00 00</code>, Value, 0
<code>0B</code>, DIF, 6 digit BCD
<code>26</code>, VIF, Operating time; hours
<code>62 06 00</code>, Value, 662h = 27.6d
<code>02</code>, DIF, 16bit integer
<code>5A</code>, VIF, Flow Temperature; 10^(2-3)°C
<code>CC 00</code>, Value, 20.4°C
<code>04</code>, DIF, 32bit integer
<code>6D</code>, VIF, Time Point; time&amp;date
<code>17 16 A9 19</code>, Value,
<code>7C</code>, DIF, LSB; value during error state; 8 digit BCD
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>00 00 00 00</code>, Value, 0
<code>FC</code>, DIF, ext; LSB; value during error state; 8 digit BCD
<code>10</code>, DIFE, tariff 1
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>00 00 00 00</code>, Value, 0
<code>72</code>, DIF, LSB; value during error state; 16bit integer
<code>6C</code>, VIF, Time Point; date
<code>00 00</code>, Value, 0
<code>42</code>, DIF, LSB; 16bit integer
<code>EC</code>, VIF, ext; Time Point; date
<code>7E</code>, VIFE, ??
<code>BF 1C</code>, Value,
<code>35</code>, Checksum,
<code>16</code>, Stopbyte,
[/table]
Decoding of the time&amp;date type is done like this:
<pre>
if (t_data)
{
if (t_data_size == 4) // Type F = Compound CP32: Date and Time
{
if ((t_data[0] &amp; 0x80) == 0) // Time valid ?
{
t-&gt;tm_min = t_data[0] &amp; 0x3F;
t-&gt;tm_hour = t_data[1] &amp; 0x1F;
t-&gt;tm_mday = t_data[2] &amp; 0x1F;
t-&gt;tm_mon = (t_data[3] &amp; 0x0F) - 1;
t-&gt;tm_year = ((t_data[2] &amp; 0xE0) &gt;&gt; 5) |
((t_data[3] &amp; 0xF0) &gt;&gt; 1);
t-&gt;tm_isdst = (t_data[1] &amp; 0x80) ? 1 : 0; // day saving time
}
}
else if (t_data_size == 2) // Type G: Compound CP16: Date
{
t-&gt;tm_mday = t_data[0] &amp; 0x1F;
t-&gt;tm_mon = (t_data[1] &amp; 0x0F) - 1;
t-&gt;tm_year = ((t_data[0] &amp; 0xE0) &gt;&gt; 5) |
((t_data[1] &amp; 0xF0) &gt;&gt; 1);
}
}
</pre>
(Found on github in the libmbus repo.)
')

View File

@ -0,0 +1,87 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
And finally, the gas meter talks:
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-e1378843697609.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-e1378843697609-300x225.jpg" alt="Foto" width="300" height="225" class="alignnone size-medium wp-image-197" /></a>
First, assign address 0x40:
<code>
so 68 06 06 68 53 fe 51 01 7a 40 5d 16
success
SO RESP: E5
</code>
And it works:
<code>
so 10 40 40 80 16
success
SO RESP: E5
</code>
And here is the measurement:
<code>
so 10 5b 40 9b 16
success
SO RESP: 68 56 56 68 08 40 72 43 60 52 00 77 04 14 03 CA 10 00 00 0C 78 76 03 01 10 0D 7C 08 44 49 20 2E 74 73 75 63 0A 30 30 30 30 30 30 30 30 30 30 04 6D 38 15 AA 19 02 7C 09 65 6D 69 74 20 2E 74 61 62 22 0C 04 13 C1 0E 00 00 04 93 7F 4E 01 00 00 44 13 5D 08 00 00 0F 01 00 1F DE 16
</code>
[table]Octet(s), Field, Meaning
<code>68 56 56 68</code>, preamble and length,
<code>08</code>, C Field,
<code>40</code>, A Field,
<code>72</code>, CI Field, variable data response
<code>43 60 52 00</code>, Ident. No.,
<code>77 04</code>, Manufacturer, ACW; Actaris (Itron)
<code>14</code>, Version,
<code>03</code>, Medium, Gas,
<code>CA</code>, Access No,
<code>10</code>, Status,
<code>00 00</code>, Signature,
<code>0C</code>, DIF, 8 digit BCD
<code>78</code>, VIF, Fabrication No
<code>76 03 01 10</code>, Value,
<code>0D</code>, DIF, variable length
<code>7C</code>, VIF, true in following string; length in first byte
<code>08</code>, VIF, first byte; length = 8
<code>44 49 20 2E 74 73 75 63</code>, VIF, Value (LSB first) = "cust. ID";
<code>0A</code>, Value, length = 10
<code>30 30 30 30 30 30 30 30 30 30</code>, Value, data
<code>04</code>, DIF, 32bit integer
<code>6D</code>, VIF, Time Point; time&amp;date
<code>38 15 AA 19</code>, Value,
<code>02</code>, DIF, 16bit integer
<code>7C</code>, VIF, true in following string; length in first byte
<code>09</code>, VIF, first byte; length = 9
<code>65 6D 69 74 20 2E 74 61 62</code>, VIF, Value (LSB first) = "bat. time"
<code>22 0C</code>, Value;
<code>04</code>, DIF, 32bit integer
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>C1 0E 00 00</code>, Value,
<code>04</code>, DIF, 32bit integer
<code>93</code>, VIF, ext; Volume; 10^(3-6)m^3
<code>7F</code>, VIFE,
<code>4E 01 00 00</code>, Value,
<code>44</code>, DIF, 32bit integer
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>5D 08 00 00</code>, Value,
<code>0F</code>, DIF, Special Functions; Start of manufacturer specific data structures to end of user data
<code>01 00 1F</code>, ,
<code>DE</code> , Checksum,
<code>16</code>, Stopbyte
[/table]
</body>
</html>

View File

@ -0,0 +1,74 @@
define(`TITLE', `M-Bus Master, Part 4 (Gas)')
define(`DATE', `2013-09-11')
define(`CONTENT', `
And finally, the gas meter talks:
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-e1378843697609.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-e1378843697609-300x225.jpg" alt="Foto" width="300" height="225" class="alignnone size-medium wp-image-197" /></a>
First, assign address 0x40:
<code>
so 68 06 06 68 53 fe 51 01 7a 40 5d 16
success
SO RESP: E5
</code>
And it works:
<code>
so 10 40 40 80 16
success
SO RESP: E5
</code>
And here is the measurement:
<code>
so 10 5b 40 9b 16
success
SO RESP: 68 56 56 68 08 40 72 43 60 52 00 77 04 14 03 CA 10 00 00 0C 78 76 03 01 10 0D 7C 08 44 49 20 2E 74 73 75 63 0A 30 30 30 30 30 30 30 30 30 30 04 6D 38 15 AA 19 02 7C 09 65 6D 69 74 20 2E 74 61 62 22 0C 04 13 C1 0E 00 00 04 93 7F 4E 01 00 00 44 13 5D 08 00 00 0F 01 00 1F DE 16
</code>
[table]Octet(s), Field, Meaning
<code>68 56 56 68</code>, preamble and length,
<code>08</code>, C Field,
<code>40</code>, A Field,
<code>72</code>, CI Field, variable data response
<code>43 60 52 00</code>, Ident. No.,
<code>77 04</code>, Manufacturer, ACW; Actaris (Itron)
<code>14</code>, Version,
<code>03</code>, Medium, Gas,
<code>CA</code>, Access No,
<code>10</code>, Status,
<code>00 00</code>, Signature,
<code>0C</code>, DIF, 8 digit BCD
<code>78</code>, VIF, Fabrication No
<code>76 03 01 10</code>, Value,
<code>0D</code>, DIF, variable length
<code>7C</code>, VIF, true in following string; length in first byte
<code>08</code>, VIF, first byte; length = 8
<code>44 49 20 2E 74 73 75 63</code>, VIF, Value (LSB first) = "cust. ID";
<code>0A</code>, Value, length = 10
<code>30 30 30 30 30 30 30 30 30 30</code>, Value, data
<code>04</code>, DIF, 32bit integer
<code>6D</code>, VIF, Time Point; time&amp;date
<code>38 15 AA 19</code>, Value,
<code>02</code>, DIF, 16bit integer
<code>7C</code>, VIF, true in following string; length in first byte
<code>09</code>, VIF, first byte; length = 9
<code>65 6D 69 74 20 2E 74 61 62</code>, VIF, Value (LSB first) = "bat. time"
<code>22 0C</code>, Value;
<code>04</code>, DIF, 32bit integer
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>C1 0E 00 00</code>, Value,
<code>04</code>, DIF, 32bit integer
<code>93</code>, VIF, ext; Volume; 10^(3-6)m^3
<code>7F</code>, VIFE,
<code>4E 01 00 00</code>, Value,
<code>44</code>, DIF, 32bit integer
<code>13</code>, VIF, Volume; 10^(3-6)m^3
<code>5D 08 00 00</code>, Value,
<code>0F</code>, DIF, Special Functions; Start of manufacturer specific data structures to end of user data
<code>01 00 1F</code>, ,
<code>DE</code> , Checksum,
<code>16</code>, Stopbyte
[/table]
')

View File

@ -0,0 +1,30 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
Final (hopefully) part of hardware work
Besides putting everything into a nice aluminum enclosure, replacing the linear voltage regulator - which burns three times as much power as the whole circuits consumes - by an SMPS (based on the old L4962) an over-current-protection and two status LEDs have been added.
<a href="http://a385e-5.de/wp-content/uploads/2013/09/laser-drucker_0051221.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/laser-drucker_0051221-278x300.jpg" alt="laser-drucker_005122" width="278" height="300" class="alignnone size-medium wp-image-231" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-11.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-11-300x225.jpg" alt="Foto 1" width="300" height="225" class="alignnone size-medium wp-image-217" /></a>
(Milling aluminum is something else than milling wood. One cutter and nearly the front panel have been ruined. Dont know how to do it right, but very slow revolution and feed helped at least a bit. Maybe the cutter should have been cooled.)
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-4-Kopie-e1379788252466.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-4-Kopie-e1379788252466-300x225.jpg" alt="Foto 4 Kopie" width="300" height="225" class="alignnone size-medium wp-image-222" /></a>
<a href="http://files.a385e-5.de/files/NetMeterBusMaster-0.9.tar.gz" target="_blank">Here</a> is the firmware for the Arduino.
</body>
</html>

View File

@ -0,0 +1,17 @@
define(`TITLE', `M-Bus Master, Part 5')
define(`DATE', `2013-09-21')
define(`CONTENT', `
Final (hopefully) part of hardware work
Besides putting everything into a nice aluminum enclosure, replacing the linear voltage regulator - which burns three times as much power as the whole circuits consumes - by an SMPS (based on the old L4962) an over-current-protection and two status LEDs have been added.
<a href="http://a385e-5.de/wp-content/uploads/2013/09/laser-drucker_0051221.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/laser-drucker_0051221-278x300.jpg" alt="laser-drucker_005122" width="278" height="300" class="alignnone size-medium wp-image-231" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-11.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-11-300x225.jpg" alt="Foto 1" width="300" height="225" class="alignnone size-medium wp-image-217" /></a>
(Milling aluminum is something else than milling wood. One cutter and nearly the front panel have been ruined. Don'`t know how to do it right, but very slow revolution and feed helped at least a bit. Maybe the cutter should have been cooled.)
<a href="http://a385e-5.de/wp-content/uploads/2013/09/Foto-4-Kopie-e1379788252466.jpg"><img src="http://a385e-5.de/wp-content/uploads/2013/09/Foto-4-Kopie-e1379788252466-300x225.jpg" alt="Foto 4 Kopie" width="300" height="225" class="alignnone size-medium wp-image-222" /></a>
<a href="http://files.a385e-5.de/files/NetMeterBusMaster-0.9.tar.gz" target="_blank">Here</a> is the firmware for the Arduino.
')

View File

@ -0,0 +1,80 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
When working with the Arduino I almost have the Ethernet Shield attached or directly make use of the Arduino Ethernet board. Nearly everything Im playing around with is network-attached.
Once it is done, I connect it to my home network, where a DHCP server provides network configuration. But while developing software for the beast, it is on the table in front of me with no network cables around, my laptop is connected via WLAN. A while a was using a small Mikrotik 750 with only the DHCP server enabled to connect my MacBook Air via the USB adapter and the Arduino. The problem: so much stuff and more over, the DHCP server of the Mikrotik overwrites the default gateway of my home network. So the MacBook has access to the home network, but when accessing the Internet it tries to route via the Mikrotik, which has no Internet connection. Bad!
To solve this issue I considered to start a DHCP server on the MacBook, attaching it only to the USB network adapter. Since the related interface has no other connection, particularly hasnt received a network configuration from another DHCP server (the one in the home network has configured the WLAN interface), first an IP address has to be assigned to the interface.
Actually, Mac OS X comes with a DHCP server, which just needs some configuration:
/etc/bootptab (this is the MAC-address of the Arduino, just to know which IP address is assigned to it):
<pre>
%%
due 1 DE:AD:BE:EF:FE:ED 192.168.75.20
</pre>
/etc/bootpd.plist:
<pre>
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
&lt;key&gt;bootp_enabled&lt;/key&gt;
&lt;false/&gt;
&lt;key&gt;dhcp_enabled&lt;/key&gt;
&lt;array&gt;
&lt;string&gt;en2&lt;/string&gt;
&lt;/array&gt;
&lt;key&gt;Subnets&lt;/key&gt;
&lt;array&gt;
&lt;dict&gt;
&lt;key&gt;name&lt;/key&gt;
&lt;string&gt;internal&lt;/string&gt;
&lt;key&gt;net_mask&lt;/key&gt;
&lt;string&gt;255.255.255.0&lt;/string&gt;
&lt;key&gt;net_address&lt;/key&gt;
&lt;string&gt;192.168.75.0&lt;/string&gt;
&lt;key&gt;net_range&lt;/key&gt;
&lt;array&gt;
&lt;string&gt;192.168.75.20&lt;/string&gt;
&lt;string&gt;192.168.75.29&lt;/string&gt;
&lt;/array&gt;
&lt;key&gt;allocate&lt;/key&gt;
&lt;true/&gt;
&lt;/dict&gt;
&lt;/array&gt;
&lt;/dict&gt;z
&lt;/plist&gt;
</pre>
And finally a small script to assign the address and start the server:
<pre>
#!/bin/sh
INTF=en2
ifconfig $INTF alias 192.168.75.1
/usr/libexec/bootpd -D -d -i $INTF
ifconfig $INTF -alias 192.168.75.1
</pre>
Done.
Once the script is started, it assigns the IP address and starts the booted (the DHCP server). The server will not detach from the terminal and does not fork into background. So, it can simply be stopped using Ctrl-C. However, Ctrl-C also interrupts the script and the unassigning of the address is not executed. This unfortunately needs to be done manually.
Now I can connect the Adruino Ethernet directly to my MacBook and it will receive the network configuration from it.
</body>
</html>

View File

@ -0,0 +1,67 @@
define(`TITLE', `DHCP server on a MacBook')
define(`DATE', `2013-11-07')
define(`CONTENT', `
When working with the Arduino I almost have the Ethernet Shield attached or directly make use of the Arduino Ethernet board. Nearly everything I'`m playing around with is network-attached.
Once it is done, I connect it to my home network, where a DHCP server provides network configuration. But while developing software for the beast, it is on the table in front of me with no network cables around, my laptop is connected via WLAN. A while a was using a small Mikrotik 750 with only the DHCP server enabled to connect my MacBook Air via the USB adapter and the Arduino. The problem: so much stuff and more over, the DHCP server of the Mikrotik overwrites the default gateway of my home network. So the MacBook has access to the home network, but when accessing the Internet it tries to route via the Mikrotik, which has no Internet connection. Bad!
To solve this issue I considered to start a DHCP server on the MacBook, attaching it only to the USB network adapter. Since the related interface has no other connection, particularly hasn'`t received a network configuration from another DHCP server (the one in the home network has configured the WLAN interface), first an IP address has to be assigned to the interface.
Actually, Mac OS X comes with a DHCP server, which just needs some configuration:
/etc/bootptab (this is the MAC-address of the Arduino, just to know which IP address is assigned to it):
<pre>
%%
due 1 DE:AD:BE:EF:FE:ED 192.168.75.20
</pre>
/etc/bootpd.plist:
<pre>
&lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
&lt;key&gt;bootp_enabled&lt;/key&gt;
&lt;false/&gt;
&lt;key&gt;dhcp_enabled&lt;/key&gt;
&lt;array&gt;
&lt;string&gt;en2&lt;/string&gt;
&lt;/array&gt;
&lt;key&gt;Subnets&lt;/key&gt;
&lt;array&gt;
&lt;dict&gt;
&lt;key&gt;name&lt;/key&gt;
&lt;string&gt;internal&lt;/string&gt;
&lt;key&gt;net_mask&lt;/key&gt;
&lt;string&gt;255.255.255.0&lt;/string&gt;
&lt;key&gt;net_address&lt;/key&gt;
&lt;string&gt;192.168.75.0&lt;/string&gt;
&lt;key&gt;net_range&lt;/key&gt;
&lt;array&gt;
&lt;string&gt;192.168.75.20&lt;/string&gt;
&lt;string&gt;192.168.75.29&lt;/string&gt;
&lt;/array&gt;
&lt;key&gt;allocate&lt;/key&gt;
&lt;true/&gt;
&lt;/dict&gt;
&lt;/array&gt;
&lt;/dict&gt;z
&lt;/plist&gt;
</pre>
And finally a small script to assign the address and start the server:
<pre>
#!/bin/sh
INTF=en2
ifconfig $INTF alias 192.168.75.1
/usr/libexec/bootpd -D -d -i $INTF
ifconfig $INTF -alias 192.168.75.1
</pre>
Done.
Once the script is started, it assigns the IP address and starts the booted (the DHCP server). The server will not detach from the terminal and does not fork into background. So, it can simply be stopped using Ctrl-C. However, Ctrl-C also interrupts the script and the unassigning of the address is not executed. This unfortunately needs to be done manually.
Now I can connect the Adruino Ethernet directly to my MacBook and it will receive the network configuration from it.
')

View File

@ -0,0 +1,60 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
This small piece of code was used during the analysis of an 800GB VMWare image after a server crash.
notnull.c:
<pre>
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
int main(int argc, const char* argv[]) {
if (argc != 2) {
printf(&quot;give filenamen&quot;);
exit(1);
}
FILE *f = fopen(argv[1], &quot;r&quot;);
const unsigned int BUFSIZE = 4096;
unsigned char buffer[BUFSIZE];
unsigned long cnt = 0;
unsigned long found = 0;
size_t r;
while (0 != (r = fread(&amp;buffer, 1, BUFSIZE, f))) {
cnt += r;
for (int i = 0; i &lt; r; i++) {
if (0 != *(buffer + i)) {
found++;
}
}
if (0 == (cnt % 1000000)) {
printf(&quot;cnt: %ld, found: %ldn&quot;, cnt, found);
}
}
printf(&quot;finally: cnt: %ld, found: %ldn&quot;, cnt, found);
}
</pre>
Compile it using:
<pre>
gcc -std=c99 -o notnull notnull.c
</pre>
</body>
</html>

View File

@ -0,0 +1,47 @@
define(`TITLE', `Has this large file something else than zeros?')
define(`DATE', `2013-11-08')
define(`CONTENT', `
This small piece of code was used during the analysis of an 800GB VMWare image after a server crash.
notnull.c:
<pre>
#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
int main(int argc, const char* argv[]) {
if (argc != 2) {
printf(&quot;give filenamen&quot;);
exit(1);
}
FILE *f = fopen(argv[1], &quot;r&quot;);
const unsigned int BUFSIZE = 4096;
unsigned char buffer[BUFSIZE];
unsigned long cnt = 0;
unsigned long found = 0;
size_t r;
while (0 != (r = fread(&amp;buffer, 1, BUFSIZE, f))) {
cnt += r;
for (int i = 0; i &lt; r; i++) {
if (0 != *(buffer + i)) {
found++;
}
}
if (0 == (cnt % 1000000)) {
printf(&quot;cnt: %ld, found: %ldn&quot;, cnt, found);
}
}
printf(&quot;finally: cnt: %ld, found: %ldn&quot;, cnt, found);
}
</pre>
Compile it using:
<pre>
gcc -std=c99 -o notnull notnull.c
</pre>
')

View File

@ -0,0 +1,43 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
This Arduino operated current sink sinks up to 3A and burns it in a good old 2N3055. It became required to test a circuit in an upcoming project.
(Actually, first the upper current limit was 5A. After killing one power transistor in a test by overheating it, the upper limit was decreased to 3A.)
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131111.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131111-225x300.jpg" alt="20140108-131111.jpg" width="225" height="300" class="alignnone size-medium wp-image-261" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131229.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131229-225x300.jpg" alt="20140108-131229.jpg" width="225" height="300" class="alignnone size-medium wp-image-263" /></a>
The current through the sink is controlled using an op amp (TS912), current is measured with one of three shunt resistors (0.1R, 1R, 10R), reference voltage for the op is provided by a DAC (LTC1257), which in turn is operated by the Arduino. The 2N3055 power transistor is driven through a BD135 connected in a Darlington circuit.
Additionally to providing a given value through the DAC, the actual current value is measured of the same shunt resistor using an ADC (MAX187). As an auxilliary value, the voltage at the terminals of the sink is measured, also using an ADC (again MAX187) through a voltage divider.
The user interface is setup with a 16*2 LCD display and a rotary encoder with push button.
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131150.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131150-225x300.jpg" alt="20140108-131150.jpg" width="225" height="300" class="alignnone size-medium wp-image-262" /></a>
Besides this "hardware user interface" it is also possible the control the device with commands send over the USB port.
Here are the schematics:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/laser-drucker_005479_2.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/laser-drucker_005479_2-209x300.jpg" alt="laser-drucker_005479_2" width="209" height="300" class="alignnone size-medium wp-image-275" /></a>
And finally, here is the source code: <a href="http://a385e-5.de/wp-content/uploads/2014/01/CurrentSink-0.9.tar.gz">CurrentSink-0.9.tar.gz</a>
</body>
</html>

View File

@ -0,0 +1,30 @@
define(`TITLE', `Arduino operated Current Sink')
define(`DATE', `2014-01-08')
define(`CONTENT', `
This Arduino operated current sink sinks up to 3A and burns it in a good old 2N3055. It became required to test a circuit in an upcoming project.
(Actually, first the upper current limit was 5A. After killing one power transistor in a test by overheating it, the upper limit was decreased to 3A.)
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131111.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131111-225x300.jpg" alt="20140108-131111.jpg" width="225" height="300" class="alignnone size-medium wp-image-261" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131229.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131229-225x300.jpg" alt="20140108-131229.jpg" width="225" height="300" class="alignnone size-medium wp-image-263" /></a>
The current through the sink is controlled using an op amp (TS912), current is measured with one of three shunt resistors (0.1R, 1R, 10R), reference voltage for the op is provided by a DAC (LTC1257), which in turn is operated by the Arduino. The 2N3055 power transistor is driven through a BD135 connected in a Darlington circuit.
Additionally to providing a given value through the DAC, the actual current value is measured of the same shunt resistor using an ADC (MAX187). As an auxilliary value, the voltage at the terminals of the sink is measured, also using an ADC (again MAX187) through a voltage divider.
The user interface is setup with a 16*2 LCD display and a rotary encoder with push button.
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131150.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140108-131150-225x300.jpg" alt="20140108-131150.jpg" width="225" height="300" class="alignnone size-medium wp-image-262" /></a>
Besides this "hardware user interface" it is also possible the control the device with commands send over the USB port.
Here are the schematics:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/laser-drucker_005479_2.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/laser-drucker_005479_2-209x300.jpg" alt="laser-drucker_005479_2" width="209" height="300" class="alignnone size-medium wp-image-275" /></a>
And finally, here is the source code: <a href="http://a385e-5.de/wp-content/uploads/2014/01/CurrentSink-0.9.tar.gz">CurrentSink-0.9.tar.gz</a>
')

View File

@ -0,0 +1,107 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
... but finally it worked:
<pre>
const unsigned long DEBOUNCING_DEAD_TIME = 100;
const int DEBOUNCING_REPEAT = 1000;
volatile int rotaryCount = 0;
volatile bool switchState = false;
volatile unsigned long lastEvent = 0;
int myDigitalRead(int a) {
int r = 0;
for (int i = 0; i &lt; DEBOUNCING_REPEAT; i++) {
if (digitalRead(a) == HIGH) {
r++;
} else {
r--;
}
}
int res = -1;
if (r &gt;= (DEBOUNCING_REPEAT / 2)) {
res = 1;
} else if (r &lt;= -1 * (DEBOUNCING_REPEAT / 2)) {
res = 0;
}
return res;
}
void rotary_a_interrupt() {
unsigned long currentEvent = millis();
if ((lastEvent == 0) || (lastEvent + DEBOUNCING_DEAD_TIME &lt; currentEvent)) {
lastEvent = currentEvent;
int a = myDigitalRead(ROTARY_A);
int b = myDigitalRead(ROTARY_B);
if (((a != -1) &amp;&amp; (b != -1))) {
if (a == b) {
rotaryCount++;
} else {
rotaryCount--;
}
}
}
}
void rotary_b_interrupt() {
unsigned long currentEvent = millis();
if ((lastEvent == 0) || (lastEvent + DEBOUNCING_DEAD_TIME &lt; currentEvent)) {
lastEvent = currentEvent;
int a = myDigitalRead(ROTARY_A);
int b = myDigitalRead(ROTARY_B);
if (((a != -1) &amp;&amp; (b != -1))) {
if (a == b) {
rotaryCount--;
} else {
rotaryCount++;
}
}
}
}
void switch_interrupt() {
unsigned long currentEvent = millis();
if ((lastEvent == 0) || (lastEvent + DEBOUNCING_DEAD_TIME &lt; currentEvent)) {
lastEvent = currentEvent;
switchState = true;
}
}
void hardwareInit() {
pinMode(SWITCH, INPUT_PULLUP);
pinMode(ROTARY_A, INPUT_PULLUP);
pinMode(ROTARY_B, INPUT_PULLUP);
attachInterrupt(SWITCH_IRQ, switch_interrupt, FALLING);
attachInterrupt(ROTARY_A_IRQ, rotary_a_interrupt, CHANGE);
attachInterrupt(ROTARY_B_IRQ, rotary_b_interrupt, CHANGE);
}
</pre>
The primary problem was not to get any rotary event of the wrong direction, the secondary problem was not to miss too much events, best of course none.
Only the combination of a dead time after one interrupt and validating a read pin state by rereading it MANY times solved the primary problem. To solve the secondary problem too, the validation has be softened by not requiring all reread states to have the same value but accepting a limited number of wrong values.
</body>
</html>

View File

@ -0,0 +1,94 @@
define(`TITLE', `Debouncing a rotary encoder is really hard')
define(`DATE', `2014-01-08')
define(`CONTENT', `
... but finally it worked:
<pre>
const unsigned long DEBOUNCING_DEAD_TIME = 100;
const int DEBOUNCING_REPEAT = 1000;
volatile int rotaryCount = 0;
volatile bool switchState = false;
volatile unsigned long lastEvent = 0;
int myDigitalRead(int a) {
int r = 0;
for (int i = 0; i &lt; DEBOUNCING_REPEAT; i++) {
if (digitalRead(a) == HIGH) {
r++;
} else {
r--;
}
}
int res = -1;
if (r &gt;= (DEBOUNCING_REPEAT / 2)) {
res = 1;
} else if (r &lt;= -1 * (DEBOUNCING_REPEAT / 2)) {
res = 0;
}
return res;
}
void rotary_a_interrupt() {
unsigned long currentEvent = millis();
if ((lastEvent == 0) || (lastEvent + DEBOUNCING_DEAD_TIME &lt; currentEvent)) {
lastEvent = currentEvent;
int a = myDigitalRead(ROTARY_A);
int b = myDigitalRead(ROTARY_B);
if (((a != -1) &amp;&amp; (b != -1))) {
if (a == b) {
rotaryCount++;
} else {
rotaryCount--;
}
}
}
}
void rotary_b_interrupt() {
unsigned long currentEvent = millis();
if ((lastEvent == 0) || (lastEvent + DEBOUNCING_DEAD_TIME &lt; currentEvent)) {
lastEvent = currentEvent;
int a = myDigitalRead(ROTARY_A);
int b = myDigitalRead(ROTARY_B);
if (((a != -1) &amp;&amp; (b != -1))) {
if (a == b) {
rotaryCount--;
} else {
rotaryCount++;
}
}
}
}
void switch_interrupt() {
unsigned long currentEvent = millis();
if ((lastEvent == 0) || (lastEvent + DEBOUNCING_DEAD_TIME &lt; currentEvent)) {
lastEvent = currentEvent;
switchState = true;
}
}
void hardwareInit() {
pinMode(SWITCH, INPUT_PULLUP);
pinMode(ROTARY_A, INPUT_PULLUP);
pinMode(ROTARY_B, INPUT_PULLUP);
attachInterrupt(SWITCH_IRQ, switch_interrupt, FALLING);
attachInterrupt(ROTARY_A_IRQ, rotary_a_interrupt, CHANGE);
attachInterrupt(ROTARY_B_IRQ, rotary_b_interrupt, CHANGE);
}
</pre>
The primary problem was not to get any rotary event of the wrong direction, the secondary problem was not to miss too much events, best of course none.
Only the combination of a dead time after one interrupt and validating a read pin state by rereading it MANY times solved the primary problem. To solve the secondary problem too, the validation has be softened by not requiring all reread states to have the same value but accepting a limited number of wrong values.
')

View File

@ -0,0 +1,24 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
This upcoming MBus-master should be able to handle the maximum number of client, actually 250 devices.
This is the analog part of the very first prototype:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140115-171708-e1389802907973.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140115-171708-e1389802907973-300x183.jpg" alt="20140115-171708.jpg" width="300" height="183" class="alignnone size-medium wp-image-323" /></a>
More follows soon ...
</body>
</html>

View File

@ -0,0 +1,11 @@
define(`TITLE', `Another (better) MBus-Master, Part 1')
define(`DATE', `2014-01-14')
define(`CONTENT', `
This upcoming MBus-master should be able to handle the maximum number of client, actually 250 devices.
This is the analog part of the very first prototype:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140115-171708-e1389802907973.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140115-171708-e1389802907973-300x183.jpg" alt="20140115-171708.jpg" width="300" height="183" class="alignnone size-medium wp-image-323" /></a>
More follows soon ...
')

View File

@ -0,0 +1,35 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
The new MBus-Master can now handle 250mA (supplying clients and TX path) and it is reliably possible to identify a 10mA swing on top of it (RX path) and convert it into a logic signal.
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-2-e1389822292462.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-2-e1389822292462-300x225.jpg" alt="Foto 2" width="300" height="225" class="alignnone size-medium wp-image-336" /></a>
Switching the TX-path with 1kHz, 80% duty cycle:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-1-e1389822333254.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-1-e1389822333254-300x225.jpg" alt="Foto 1" width="300" height="225" class="alignnone size-medium wp-image-335" /></a>
Loading the TX-path with about 250mA (the current sink specifically built - see <a href="http://a385e-5.de/?p=264" title="Arduino operated Current Sink" target="_blank">here</a> - for this project is here in operation):
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-3-e1389822313359.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-3-e1389822313359-300x225.jpg" alt="Foto 3" width="300" height="225" class="alignnone size-medium wp-image-334" /></a>
Finally, here are the most recent schematics of this new MBus-Master:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/MBusMaster2.pdf"><img src="http://a385e-5.de/wp-content/uploads/2014/01/MBusMaster2-300x170.png" alt="MBusMaster2" width="300" height="170" class="alignnone size-medium wp-image-343" /></a>
(The TX-test and the test for recognition of the 10mA swing have been done without the MCU at the moment.)
</body>
</html>

View File

@ -0,0 +1,22 @@
define(`TITLE', `Another (better) MBus-Master, Part 2')
define(`DATE', `2014-01-15')
define(`CONTENT', `
The new MBus-Master can now handle 250mA (supplying clients and TX path) and it is reliably possible to identify a 10mA swing on top of it (RX path) and convert it into a logic signal.
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-2-e1389822292462.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-2-e1389822292462-300x225.jpg" alt="Foto 2" width="300" height="225" class="alignnone size-medium wp-image-336" /></a>
Switching the TX-path with 1kHz, 80% duty cycle:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-1-e1389822333254.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-1-e1389822333254-300x225.jpg" alt="Foto 1" width="300" height="225" class="alignnone size-medium wp-image-335" /></a>
Loading the TX-path with about 250mA (the current sink specifically built - see <a href="http://a385e-5.de/?p=264" title="Arduino operated Current Sink" target="_blank">here</a> - for this project is here in operation):
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-3-e1389822313359.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-3-e1389822313359-300x225.jpg" alt="Foto 3" width="300" height="225" class="alignnone size-medium wp-image-334" /></a>
Finally, here are the most recent schematics of this new MBus-Master:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/MBusMaster2.pdf"><img src="http://a385e-5.de/wp-content/uploads/2014/01/MBusMaster2-300x170.png" alt="MBusMaster2" width="300" height="170" class="alignnone size-medium wp-image-343" /></a>
(The TX-test and the test for recognition of the 10mA swing have been done without the MCU at the moment.)
')

View File

@ -0,0 +1,57 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
Hardware has been extended by means to measure the current on the MBus and by a over current sensing, which will be extended to over current protection soon.
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-e1390078985461.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-e1390078985461-300x225.jpg" alt="Foto" width="300" height="225" class="alignnone size-medium wp-image-356" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2014/01/MBusMaster2-1.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/MBusMaster2-1-300x220.png" alt="MBusMaster2-1" width="300" height="220" class="alignnone size-medium wp-image-355" /></a>
<blockquote><strong>Well, it seems, that this way of over current signaling to the MCU does not work properly. In the first design, the input of the comparator was directly the lower end of the shunt resistor, which worked. So, the differentiator is required of current measurement, but is not usable for over current signaling. Needs some more work.</strong></blockquote>
The both blue LEDs show activity on RX and TX, the red LED signals over current.
The whole development setup:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200610.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200610-300x225.jpg" alt="20140118-200610.jpg" width="300" height="225" class="alignnone size-medium wp-image-351" /></a>
Power supply:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200600.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200600-300x225.jpg" alt="20140118-200600.jpg" width="300" height="225" class="alignnone size-medium wp-image-350" /></a>
Load simulation:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200526.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200526-300x225.jpg" alt="20140118-200526.jpg" width="300" height="225" class="alignnone size-medium wp-image-348" /></a>
Wave form of a simple communication:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200623.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200623-300x225.jpg" alt="20140118-200623.jpg" width="300" height="225" class="alignnone size-medium wp-image-352" /></a>
(Yellow is the voltage on the bus, blue is the control signal of the sample-hold-device.)
The test client:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200540.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200540-300x225.jpg" alt="20140118-200540.jpg" width="300" height="225" class="alignnone size-medium wp-image-349" /></a>
And finally, some communication with the master:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Bildschirmfoto-2014-01-18-um-22.13.50.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Bildschirmfoto-2014-01-18-um-22.13.50-300x241.png" alt="Bildschirmfoto 2014-01-18 um 22.13.50" width="300" height="241" class="alignnone size-medium wp-image-364" /></a>
</body>
</html>

View File

@ -0,0 +1,44 @@
define(`TITLE', `Another (better) MBus-Master, Part 3')
define(`DATE', `2014-01-18')
define(`CONTENT', `
Hardware has been extended by means to measure the current on the MBus and by a over current sensing, which will be extended to over current protection soon.
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-e1390078985461.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-e1390078985461-300x225.jpg" alt="Foto" width="300" height="225" class="alignnone size-medium wp-image-356" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2014/01/MBusMaster2-1.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/MBusMaster2-1-300x220.png" alt="MBusMaster2-1" width="300" height="220" class="alignnone size-medium wp-image-355" /></a>
<blockquote><strong>Well, it seems, that this way of over current signaling to the MCU does not work properly. In the first design, the input of the comparator was directly the lower end of the shunt resistor, which worked. So, the differentiator is required of current measurement, but is not usable for over current signaling. Needs some more work.</strong></blockquote>
The both blue LEDs show activity on RX and TX, the red LED signals over current.
The whole development setup:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200610.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200610-300x225.jpg" alt="20140118-200610.jpg" width="300" height="225" class="alignnone size-medium wp-image-351" /></a>
Power supply:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200600.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200600-300x225.jpg" alt="20140118-200600.jpg" width="300" height="225" class="alignnone size-medium wp-image-350" /></a>
Load simulation:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200526.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200526-300x225.jpg" alt="20140118-200526.jpg" width="300" height="225" class="alignnone size-medium wp-image-348" /></a>
Wave form of a simple communication:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200623.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200623-300x225.jpg" alt="20140118-200623.jpg" width="300" height="225" class="alignnone size-medium wp-image-352" /></a>
(Yellow is the voltage on the bus, blue is the control signal of the sample-hold-device.)
The test client:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200540.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/20140118-200540-300x225.jpg" alt="20140118-200540.jpg" width="300" height="225" class="alignnone size-medium wp-image-349" /></a>
And finally, some communication with the master:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Bildschirmfoto-2014-01-18-um-22.13.50.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Bildschirmfoto-2014-01-18-um-22.13.50-300x241.png" alt="Bildschirmfoto 2014-01-18 um 22.13.50" width="300" height="241" class="alignnone size-medium wp-image-364" /></a>
')

View File

@ -0,0 +1,46 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
Now everything is on one board. A step-up power supply, based on the LM2577, has been added to provide the unusual voltage of 35V required for the bus. Thus, a simple 12V-DC-walk-plug could be used to power the system. However, this introduced some difficulties - hold on.
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-31-e1390381553417.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-31-e1390381553417-300x225.jpg" alt="Foto 3" width="300" height="225" class="alignnone size-medium wp-image-377" /></a>
The beast works as it should, with no additional load, only one slave connected or with different additional load (50mA, 150mA, 250mA), simulating the related number of slaves (1mA per slave).
However, receive the signal has gone really bad.
First, here are the signal without onboard SMPS, for comparison:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/without_smps.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/without_smps-300x219.png" alt="without_smps" width="300" height="219" class="alignnone size-medium wp-image-372" /></a>
(blue is trigger of S/H device, yellow is output of difference amplifier)
This is with the SMPS, with an additional load of 200mA:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/with_smps.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/with_smps-300x219.png" alt="with_smps" width="300" height="219" class="alignnone size-medium wp-image-386" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2014/01/with_smps_2.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/with_smps_2-300x219.png" alt="with_smps_2" width="300" height="219" class="alignnone size-medium wp-image-375" /></a>
The receive signal can still be recognized and the comparator does its job, but the difference is impressive - although not really unexpected.
Here is it with the SMPS again, now without additional load:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/with_smps_noload.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/with_smps_noload-300x219.png" alt="with_smps_noload" width="300" height="219" class="alignnone size-medium wp-image-374" /></a>
So, the SMPS must either be strictly separated from the remaining circuit on one board or even better be placed on a separate board - however, putting the SMPS and the receive recognition so close to each other was - rethinking it now - asking for trouble.
</body>
</html>

View File

@ -0,0 +1,33 @@
define(`TITLE', `Another (better) MBus-Master, Part 4')
define(`DATE', `2014-01-22')
define(`CONTENT', `
Now everything is on one board. A step-up power supply, based on the LM2577, has been added to provide the unusual voltage of 35V required for the bus. Thus, a simple 12V-DC-walk-plug could be used to power the system. However, this introduced some difficulties - hold on.
<a href="http://a385e-5.de/wp-content/uploads/2014/01/Foto-31-e1390381553417.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/01/Foto-31-e1390381553417-300x225.jpg" alt="Foto 3" width="300" height="225" class="alignnone size-medium wp-image-377" /></a>
The beast works as it should, with no additional load, only one slave connected or with different additional load (50mA, 150mA, 250mA), simulating the related number of slaves (1mA per slave).
However, receive the signal has gone really bad.
First, here are the signal without onboard SMPS, for comparison:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/without_smps.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/without_smps-300x219.png" alt="without_smps" width="300" height="219" class="alignnone size-medium wp-image-372" /></a>
(blue is trigger of S/H device, yellow is output of difference amplifier)
This is with the SMPS, with an additional load of 200mA:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/with_smps.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/with_smps-300x219.png" alt="with_smps" width="300" height="219" class="alignnone size-medium wp-image-386" /></a>
<a href="http://a385e-5.de/wp-content/uploads/2014/01/with_smps_2.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/with_smps_2-300x219.png" alt="with_smps_2" width="300" height="219" class="alignnone size-medium wp-image-375" /></a>
The receive signal can still be recognized and the comparator does it'`s job, but the difference is impressive - although not really unexpected.
Here is it with the SMPS again, now without additional load:
<a href="http://a385e-5.de/wp-content/uploads/2014/01/with_smps_noload.png"><img src="http://a385e-5.de/wp-content/uploads/2014/01/with_smps_noload-300x219.png" alt="with_smps_noload" width="300" height="219" class="alignnone size-medium wp-image-374" /></a>
So, the SMPS must either be strictly separated from the remaining circuit on one board or even better be placed on a separate board - however, putting the SMPS and the receive recognition so close to each other was - rethinking it now - asking for trouble.
')

View File

@ -0,0 +1,38 @@
<html>
<head>
<title>Projects - just for fun</title>
</head>
<body>
As mentioned before, the setup introduced in part 4 suffered from interferences of the SMPS into the receive path.
Here, the SMPS has been separated onto its own board:
<a href="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213036-e1391950621439.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213036-e1391950621439-300x165.jpg" alt="20140208-213036.jpg" width="300" height="165" class="alignnone size-medium wp-image-388" /></a>
The SMPS is implemented using an LM2577 module, although first a XL6009 was planned, but this is a different story.
With the rest of the circuit, which has already been introduced before it looks this way:
<a href="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213315.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213315-225x300.jpg" alt="20140208-213315.jpg" width="225" height="300" class="alignnone size-medium wp-image-389" /></a>
And now the receive signals are very clear again:
<a href="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213433.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213433-300x225.jpg" alt="20140208-213433.jpg" width="300" height="225" class="alignnone size-medium wp-image-390" /></a>
Blue is the receive signal measured at the output of the comparator, yellow is the transmit signal measured as the bus voltage.
Here, for comparison to the screenshots in the last post, the trigger of the S/H device in blue and the output of the difference amplifier in yellow:
<a href="http://a385e-5.de/wp-content/uploads/2014/02/20140209-162211.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/02/20140209-162211-300x225.jpg" alt="20140209-162211.jpg" width="300" height="225" class="alignnone size-medium wp-image-396" /></a>
</body>
</html>

View File

@ -0,0 +1,25 @@
define(`TITLE', `Another (better) MBus-Master, Part 5')
define(`DATE', `2014-02-08')
define(`CONTENT', `
As mentioned before, the setup introduced in part 4 suffered from interferences of the SMPS into the receive path.
Here, the SMPS has been separated onto its own board:
<a href="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213036-e1391950621439.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213036-e1391950621439-300x165.jpg" alt="20140208-213036.jpg" width="300" height="165" class="alignnone size-medium wp-image-388" /></a>
The SMPS is implemented using an LM2577 module, although first a XL6009 was planned, but this is a different story.
With the rest of the circuit, which has already been introduced before it looks this way:
<a href="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213315.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213315-225x300.jpg" alt="20140208-213315.jpg" width="225" height="300" class="alignnone size-medium wp-image-389" /></a>
And now the receive signals are very clear again:
<a href="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213433.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/02/20140208-213433-300x225.jpg" alt="20140208-213433.jpg" width="300" height="225" class="alignnone size-medium wp-image-390" /></a>
Blue is the receive signal measured at the output of the comparator, yellow is the transmit signal measured as the bus voltage.
Here, for comparison to the screenshots in the last post, the trigger of the S/H device in blue and the output of the difference amplifier in yellow:
<a href="http://a385e-5.de/wp-content/uploads/2014/02/20140209-162211.jpg"><img src="http://a385e-5.de/wp-content/uploads/2014/02/20140209-162211-300x225.jpg" alt="20140209-162211.jpg" width="300" height="225" class="alignnone size-medium wp-image-396" /></a>
')

128
toc.inc
View File

@ -16,6 +16,134 @@
<li>
2014-02-08 -<a href="./posts/2014-02-08.01/article.html">Another (better) MBus-Master, Part 5</a><br/>
</li>
<li>
2014-01-22 -<a href="./posts/2014-01-22.01/article.html">Another (better) MBus-Master, Part 4</a><br/>
</li>
<li>
2014-01-18 -<a href="./posts/2014-01-18.01/article.html">Another (better) MBus-Master, Part 3</a><br/>
</li>
<li>
2014-01-15 -<a href="./posts/2014-01-15.01/article.html">Another (better) MBus-Master, Part 2</a><br/>
</li>
<li>
2014-01-14 -<a href="./posts/2014-01-14.01/article.html">Another (better) MBus-Master, Part 1</a><br/>
</li>
<li>
2014-01-08 -<a href="./posts/2014-01-08.02/article.html">Debouncing a rotary encoder is really hard</a><br/>
</li>
<li>
2014-01-08 -<a href="./posts/2014-01-08.01/article.html">Arduino operated Current Sink</a><br/>
</li>
<li>
2013-11-08 -<a href="./posts/2013-11-08.01/article.html">Has this large file something else than zeros?</a><br/>
</li>
<li>
2013-11-07 -<a href="./posts/2013-11-07.01/article.html">DHCP server on a MacBook</a><br/>
</li>
<li>
2013-09-21 -<a href="./posts/2013-09-21.01/article.html">M-Bus Master, Part 5</a><br/>
</li>
<li>
2013-09-11 -<a href="./posts/2013-09-11.01/article.html">M-Bus Master, Part 4 (Gas)</a><br/>
</li>
<li>
2013-09-10 -<a href="./posts/2013-09-10.01/article.html">M-Bus Master, Part 3 (Water)</a><br/>
</li>
<li>
2013-09-09 -<a href="./posts/2013-09-09.01/article.html">M-Bus Master, Part 2 (Electricity)</a><br/>
</li>
<li>
2018-07-24 -<a href="./posts/2013-07-24.01/article.html">M-Bus Master, Part 1 (Basics)</a><br/>
</li>
<li>
2013-07-01 -<a href="./posts/2013-07-01.01/article.html">Theremin</a><br/>
</li>
<li>
2018-06-27 -<a href="./posts/2013-06-27.02/article.html">Network-attached thermometer</a><br/>
</li>
<li>
2013-06-27 -<a href="./posts/2013-06-27.01/article.html">Children Protection for Postfix-based EMail-Server</a><br/>