Mictronics - DIY Electronic projects and more.Mictronics blog.https://www.mictronics.de/img/site/mictronics-logo-32x32.pnghttps://www.mictronics.de/img/site/mictronics-logo-32x32.png2024-03-04T00:00:00Zhttps://www.mictronics.de/Mictronicsmichael@mictronics.deInside Sony Unilink2009-11-21T00:00:00Zhttps://www.mictronics.de/posts/Inside-Sony-Unilink/<h1 id="for-information-only---no-support!">For information only - No support! <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#for-information-only---no-support!">#</a></h1>
<p>All information on this page has been collected by members of the unilink discussion board by reverse engineering the protocol. The information cannot be guaranteed to be correct and is used at your own risk.</p>
<h5 id="bus-information">Bus Information <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#bus-information">#</a></h5>
<ul>
<li>Signals are TTL 0V (LOW) or 5V (HIGH)</li>
<li>There is only one master.</li>
<li>The unilink bus has three lines: BUS ON, CLOCK and DATA</li>
<li>the master provides the clock for all slaves</li>
</ul>
<p>The bus always is in one of three states:</p>
<ul>
<li>off - BUS ON = 0, CLOCK and DATA don´t care</li>
<li>idle - BUS ON = 1, CLOCK = 0, DATA 8ms low, then 8ms high</li>
<li>active - BUS ON = 1</li>
</ul>
<h5 id="timing-information">Timing Information <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#timing-information">#</a></h5>
<p>When no bytes are been sent the clock line will remain at 0 volts. The data line is changed at the half way point through the high clock. Clock period for one bit is 20us 50% duty cycle.</p>
<p>Bytes are normally sent out using a one-millisecond clock. One byte per millisecond.</p>
<p>There is an 3ms data line low cap at start of a new packet.</p>
<h6 id="data-word-types%3A">Data word types: <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#data-word-types%3A">#</a></h6>
<p>6 byte short word:</p>
<p>RAD|TAD|CMD1|CMD2|Parity1| 0</p>
<p>11 byte middle word:</p>
<p>RAD|TAD|CMD1|CMD2|Parity1|D1|D2|D3|D4|Parity2| 0</p>
<p>16 byte long word:</p>
<p>RAD|TAD|CMD1|CMD2|Parity1|D1|D2|D3|D4|D2_1|D2_2|D2_3|D2_4|D2_5|Parity2|0</p>
<p>with:</p>
<p><strong>RAD</strong> - Receiver address<br />
<strong>TAD</strong> - Transmitter address<br />
<strong>CMD1</strong> - First byte of command identifier<br />
<strong>CMD2</strong> - Either a subcommand id or first data byte (depending CMD1)<br />
<strong>Parity1</strong> - Parity byte (The parity is simply the lower 8 bits of the addition of all the bytes that were sent before. )</p>
<p><strong>D1-D4</strong> - four additional data bytes in middle and long data word<br />
<strong>D2_1-D2_5</strong> - another five data bytes in long word<br />
<strong>Parity2</strong> - Second parity byte. Works like first parity byte (add ALL data bytes that were sent before, also the ones that already count into the first parity byte, but not the firt parity itself)<br />
<strong>0</strong> - A zero byte that follows every data word</p>
<h6 id="addresses%3A">Addresses: <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#addresses%3A">#</a></h6>
<p>An address is always built of two nibbles of 4 bits each. The higher 4 bits specify the device group and depend on the device´s type. The lower 4 bits specify the device id that is assigned by the master during initial link mode.</p>
<p>If the device id 0 is specified as RAD, it´s a broadcast to the specified group.</p>
<h6 id="group-ids%3A">Group IDs: <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#group-ids%3A">#</a></h6>
<p>0x3 CD players/changers<br />
0x5 Tuners<br />
0x6 Cassette recorders<br />
0x7 Display<br />
0x8 Unilink Audio/Bus Multiplexer like an XA-C30<br />
0xC Clock<br />
0xD MD Changers</p>
<p>Others:</p>
<p>0x11 - Keypad<br />
0x21 - Keypad(Controll)<br />
0x91 - DSP(Vol,Tone,etc)</p>
<h6 id="special-addresses%3A">Special addresses: <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#special-addresses%3A">#</a></h6>
<p>0x10 Master<br />
0x18 Broadcast</p>
<p>Commands starting "0x01" are system commands, and regarded as very important. If a Changer or whatever picks up one of these commands and then finds out later that it´s partially corrupt, it will result in a complete re-initialisation sequence.</p>
<h6 id="modes">Modes <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#modes">#</a></h6>
<ul>
<li><strong>Sleep Mode</strong> In this mode the BUS ON line is low and no communication occurs</li>
<li><strong>Wake Up</strong> A slave can wake up the master by forcing the DATA line high. The master will respond by activating the BUS ON line.</li>
<li><strong>Normal Mode</strong> idle/standby (no data activity, just square wave)</li>
<li>Idle/Standby</li>
<li>Inital LinkThe master must find all slaves:
<ol>
<li>Each slave will be polled with the Anyone command short word.</li>
<li>The slave responds by telling the master what group type it is.</li>
<li>The master will assign the slave a member address in its group.</li>
<li>The slave will remember the address and acknowledge its new address.</li>
<li>The master ends polling with Appoint end command short word.</li>
<li>The slave returns a NAK to end the link.</li>
</ol>
</li>
<li>The master will then issue the Link On command to see if there are more slaves beyond the one it just found.</li>
<li>Time PollingThe master cheks the slaves to see if they are still there and if there is any status update.</li>
<li>Request PollingWhen slaves want to send data they make a request The master will then poll all slaves for information.For an slave break, a slave must force the data line low during an high idle state.</li>
<li><strong>Slave break timing</strong> After 8ms low of data line (bus is idle) the slave waits 2ms for high of data line (bus still idle) then he force the data line low for 3ms. Now he release the data line back to high for the last 3ms. So a slave break is done within 8ms high level while bus is idle. Remember that the bus is set to idle by the master with alternating 8ms low and 8ms high level.</li>
</ul>
<h6 id="device-info-data">Device info data <a class="direct-link" href="https://www.mictronics.de/posts/Inside-Sony-Unilink/#device-info-data">#</a></h6>
<pre><code>Cmd1 Cmd2 D1 D2 D3 D4
0x8C, 0xA0, 0x06, 0xA8, 0x25, 0xA0 ;CDC device CDX-605, CDX-91
0x8C, 0x89, 0x15, 0xAC, 0x17, 0xA0 ;CDC device CDX-71
0x8C, 0xC0, 0x24, 0xa8, 0x3C, 0xA0 ;CDC device info
0x8C, 0xA0, 0x06, 0xa8, 0x25, 0xA0 ;CDC device info
0x8C, 0x10, 0x24, 0xa8, 0x17, 0xA0 ;MDC device info
0x8C, 0x00, 0x24, 0x1C, 0x22, 0x00 ;internal MD drive
0x8C, 0x00, 0x24, 0x2C, 0x22, 0xA0 ;same as above, but now external
Cmd1
0x8C Command identifier
Cmd2
D1
D2
0001xxxx internal device, only 1 CD slot accepted
0010xxxx external device
D3
0001xxxx Custom file
0010xxxx no Custom file
D4
11110000 Number of CD slots
</code></pre>
<p><a href="https://www.mictronics.de/img/2009/11/command.htm">Command table</a></p>
RDS Decoder2009-11-21T00:00:00Zhttps://www.mictronics.de/posts/RDS-Decoder/<p>This is an quite old project I made in 1996 but still interesting. It´s an simple RDS decoder based on TDA7330B RDS demodulator and AT90S2313 (obsolete part, replace with Atmel ATtiny2313) controller. The RDS data is displayed on an 2x16 character LCD. It shows program service name, RDS clock, TA flag status and scrolling 64 characters long radio text. The decoder needs an Stereo multiplex signal as input which is normally found at the input pin of an Stereo decoder IC in many radios.</p>
<p>Source code is available in assembler, I will make a C version some day. Decoding of the RDS data stream is based on Motorola´s "AN460 - RDS decoder using the MC68HC05", see this document for details.</p>
<figure><img src="https://www.mictronics.de/img/2009/11/IMG_0497.jpg" alt="PCB with LCD connected" class="img-fluid" /><figcaption>PCB with LCD connected</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2009/11/IMG_0499.jpg" alt="PCB top" class="img-fluid" /><figcaption>PCB top</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2009/11/IMG_0500.jpg" alt="PCB bottom" class="img-fluid" /><figcaption>PCB bottom</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2009/11/IMG_0501.jpg" alt="Showing program service name, clock, TA flag and scrolling radio text A" class="img-fluid" /><figcaption>Showing program service name, clock, TA flag and scrolling radio text A</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2009/11/IMG_0502.jpg" alt="Showing program service name, clock, TA flag and scrolling radio text B" class="img-fluid" /><figcaption>Showing program service name, clock, TA flag and scrolling radio text B</figcaption></figure>
<p><a href="https://www.mictronics.de/img/2009/11/EN50067_RDS_Standard.pdf">RDS Standard</a><br />
<a href="https://www.mictronics.de/img/2009/11/rbds1998.pdf">RBDS Standard</a><br />
<a href="https://www.mictronics.de/img/2009/11/AN460.pdf">AN460 Motorola RDS Decoder</a><br />
<a href="https://www.mictronics.de/img/2009/11/rds_decoder_plans.pdf">RDS Deocder Plans</a><br />
<a href="https://www.mictronics.de/img/2009/11/RDS_Decoder_V1.04.zip">RDS Decoder Firmware</a><br />
<a href="https://www.mictronics.de/img/2009/11/RDS-Decoder-Gerber.zip">RDS Decoder Gerber</a></p>
USB-CAN Bus Interface2009-11-21T00:00:00Zhttps://www.mictronics.de/posts/USB-CAN-Bus/<h1 id="for-information-only---no-support!">For information only - No support! <a class="direct-link" href="https://www.mictronics.de/posts/USB-CAN-Bus/#for-information-only---no-support!">#</a></h1>
<p>The purpose of this project is a simple and easy to use USB<>CAN bus interface. Heart of the circuit is an Atmel AVR ATmega162 microcontroller which controls the Communication between FTDI FT245BM USB to parallel converter and Philips SJA1000 Stand-alone CAN bus controller.<br />
The SJA1000 is memory mapped into memory space of the AVR, which reduces data and address line handling and increases data transfer speed.<br />
An FT245BM handles all USB communication and provides data transfer from and to PC application. An extra EEPROM can store the multi device template for the FT245BM.<br />
A Philips PCA82C250/251 works as CAN controller interface.</p>
<p>Firmware is written in C, compatible to latest compiler version WinAVR.</p>
<p>The firmware is now compatible to run on a CANDIP module. The download include a pre-compiled firmware file to flash into a CANDIP module. Both pins for LED connection remaining the same.</p>
<p><a href="https://www.mictronics.de/img/2009/12/CAN_BUS_Interface_v2_Eagle.zip">Layout Eagle</a><br />
<a href="https://www.mictronics.de/img/2009/12/CAN_BUS_Interface_v2_Gerber.zip">Layout Gerber</a><br />
<a href="https://www.mictronics.de/img/2009/12/CAN_BUS_Interface_v2_Target.zip">Layout Target3001</a><br />
<a href="https://www.mictronics.de/img/2009/12/can_control.7z">Sourcecode CAN Control</a><br />
<a href="https://www.mictronics.de/img/2009/12/CAN-Control_v1.0b8.zip">Sourcecode CAN Control</a><br />
<a href="https://www.mictronics.de/img/2009/12/CANHackerV2.00.01.zip">CANHacker v2.00.01</a><br />
<a href="https://www.mictronics.de/img/2009/12/Documentation_Iss.F.pdf">Documentation Issue F</a><br />
<a href="https://www.mictronics.de/img/2009/12/Firmware_v1.09.zip">Firmware v1.09</a><br />
<a href="https://www.mictronics.de/img/2009/12/pcb_B.pdf">Layout Issue B</a><br />
<a href="https://www.mictronics.de/img/2009/12/Schematic.pdf">Schematic</a></p>
AVR Sony Unilink Interface2009-11-22T00:00:00Zhttps://www.mictronics.de/posts/AVR-Sony-Unilink-Interface/<h1 id="for-information-only---no-support-!">For information only - No support ! <a class="direct-link" href="https://www.mictronics.de/posts/AVR-Sony-Unilink-Interface/#for-information-only---no-support-!">#</a></h1>
<h5 id="my-atmel-avr-based-unilink-interface">My Atmel AVR based Unilink interface <a class="direct-link" href="https://www.mictronics.de/posts/AVR-Sony-Unilink-Interface/#my-atmel-avr-based-unilink-interface">#</a></h5>
<p>Something about my own development for an Sony Unilink interface.</p>
<h6 id="hardware">Hardware <a class="direct-link" href="https://www.mictronics.de/posts/AVR-Sony-Unilink-Interface/#hardware">#</a></h6>
<ul>
<li>Controller Atmel ATmega8 at 7,3728MHz (up to 16MHz)</li>
<li>Some external components for signal converting</li>
</ul>
<p><a href="https://www.mictronics.de/img/2009/11/AVR_Unilink_Interface_bw.gif">Schematic</a><br />
<a href="https://www.mictronics.de/img/2009/11/AVR-Unilink_v2.05.zip">Source Code</a></p>
<p>Possible ATmega8 PCB layout:</p>
<figure><img src="https://www.mictronics.de/img/2009/11/Dcp_1026_2.jpg" alt="Bottom" class="img-fluid" /><figcaption>Bottom</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2009/11/DCP_1027.JPG" alt="Top" class="img-fluid" /><figcaption>Top</figcaption></figure>
<h6 id="simon-wood%C2%B4s-gnunilink-interface">Simon Wood´s GNUnilink interface <a class="direct-link" href="https://www.mictronics.de/posts/AVR-Sony-Unilink-Interface/#simon-wood%C2%B4s-gnunilink-interface">#</a></h6>
<p>Many thanks to Simon Wood for his great support!</p>
<p>Some informations about the Unilink dongle.</p>
<p>Hardware:</p>
<ul>
<li>PIC16F628 at 10MHz</li>
<li>RS232 input/output</li>
</ul>
<p>Schematic: <a href="https://www.mictronics.de/img/2009/11//dongleschematic.png">HERE</a></p>
<p>What the dongle can do:</p>
<ul>
<li>emulate an CD or MD changer on a Sony radio with changer support</li>
<li>set and display disc number (CD/MD: 0-14)</li>
<li>set and displaytrack number (CD: 0-99, MD: 0-255)</li>
<li>set and display track time</li>
<li>set and display disc name in CD and MD mode (8 or 16 characters)</li>
<li>set and display track name in MD mode (8 or 16 characters)</li>
</ul>
<p>RS232 output on the following radio functions:</p>
<ul>
<li>CD/MD changer select/deselect</li>
<li>Next/Previous disk and/or track</li>
<li>Direct disk</li>
<li>Shuffle, intro, repeat</li>
</ul>
<p>Recommended Links:<br />
<a href="http://gnunilink.sourceforge.net/">GNUnilink homepage</a> homepage by Simon Wood, developer of GNUnilink<br />
<a href="http://sophana.free.fr/">Sophana´s GNUnilink page</a> the most up-to-date GNUnilink page. Find new sourcecodes and improvements for Simons interface here.</p>
<p>This project is not endorsed by Sony.<br />
Sony and Unilink are registered trademarks of Sony Corporation.</p>
AVR USB Joystick2009-11-22T00:00:00Zhttps://www.mictronics.de/posts/AVR-USB-Joystick/<h1 id="for-information-only---no-support!">For information only - No support! <a class="direct-link" href="https://www.mictronics.de/posts/AVR-USB-Joystick/#for-information-only---no-support!">#</a></h1>
<p>This project is a USB joystick based on a simple AVR ATmega8. The ATmega8 simulates a standard USB HID device with 8 analog axis and up to 28 buttons including the Coolie hat.</p>
<p>The project is based on Mjoy hardware and source code made by Mindaugas Milasauskas.<br />
<a href="http://www.flightsim.com/vbfs/content.php?2112">Other Source</a> or Google.</p>
<p>I have changed the hardware to ATmega8 in SMD TQFP package to increase the analog channel number from 6 to 8. I made also the required code changes to support the 2 additional channels. Unfortunately the button order on the PCB header is a bit confuse, see the button and axis assignment image for details.</p>
<figure><img src="https://www.mictronics.de/img/2009/11/circuit.png" alt="Circuit overview" class="img-fluid" /><figcaption>Circuit overview</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2009/11/Button_Axis_Assignment.png" alt="Button and axis assignment" class="img-fluid" /><figcaption>Button and axis assignment</figcaption></figure>
<p><a href="https://www.mictronics.de/img/2009/11/AVR_USB_Joystick_Schematic.pdf">Schematic</a><br />
<a href="https://www.mictronics.de/img/2009/11/AVR_USB_Joystick_Gerber.zip">Gerber</a><br />
<a href="https://www.mictronics.de/img/2009/11/AVR_USB_Joystick_Code.zip">Sourcecode</a><br />
<a href="https://www.mictronics.de/img/2009/11/AVR_USB_Joystick_BOM.txt">BOM</a></p>
DIY Yagi for 868MHz2010-04-18T00:00:00Zhttps://www.mictronics.de/posts/868MHz-Yagi/<p>If someone is looking for a Yagi useable in the 868MHz ISM range - here is my DIY construction:</p>
<figure><img src="https://www.mictronics.de/img/2010/04/IMG_7411.jpg" alt="868MHz Yagi Antenna" class="img-fluid" /><figcaption>868MHz Yagi Antenna</figcaption></figure>
<p>Construction details from calculation:</p>
<pre><code>VK5DJ´s YAGI CALCULATOR
Yagi design frequency =868,50 MHz
Wavelength =345 mm
Parasitic elements fastened to a non-metallic or separated from boom
Folded dipole fully insulated from boom
Director/reflector diam =4 mm
Radiator diam =4 mm
REFLECTOR
167 mm long at boom position = 30 mm (IT = 77,5 mm)
RADIATOR
Single dipole 160 mm tip to tip, spaced 69 mm from reflector at boom posn 99 mm (IT = 74,0 mm)
Folded dipole 164 mm tip to tip, spaced 69 mm from reflector at boom posn 99 mm (IT = 76,0 mm)
DIRECTORS
Dir Length Spaced Boom position IT Gain Gain
(no.) (mm) (mm) (mm) (mm) (dBd) (dBi)
1 146 26 125 67,0 3,5 5,6
2 144 62 187 66,0 5,8 7,9
3 142 74 261 65,0 7,3 9,5
4 140 86 348 64,0 8,5 10,7
5 139 97 444 63,5 9,5 11,7
COMMENTS
The abbreviation "IT" means "Insert To", it is the construction distance from the element tip to the edge
of the boom for through boom mounting
Spacings measured centre to centre from previous element
Tolerance for element lengths is +/- 1 mm
Boom position is the mounting point for each element as measured from the rear of the boom and includes
the 30 mm overhang.The total boom length is 474mm including two overhangs of 30 mm
The beam´s estimated 3dB beamwidth is 53 deg
A half wave 4:1 balun uses 0,70 velocity factor coax and is 121 mm long plus leads
FOLDED DIPOLE CONSTRUCTION
Measurements are taken from the inside of bends
Folded dipole length measured tip to tip = 164mm
Total rod length =350mm
Centre of rod=175mm
Distance HI=GF=69mm
Distance HA=GE=87mm
Distance HB=GD=105mm
Distance HC=GC=175mm
Gap at HG=3mm
Bend diameter BI=DF=23mm
If the folded dipole is considered as a flat plane (see ARRL Antenna Handbook) then its resonant frequency
is less than the flat plane algorithm´s range of 10:1
The cap between the dipole halfs at the feedpoint is not critical but should be less than 5mm.
</code></pre>
<p>The required balun is made from RG316 coax cable and calculated with a velocity factor of 0.7.</p>
<figure><img src="https://www.mictronics.de/img/2010/04/Balun-for-8685-MHz-using-121-mm-loop-of-User-defined-coax.png" alt="Balun 868MHz" class="img-fluid" /><figcaption>Balun 868MHz</figcaption></figure>
<p>Feedpoint detail:</p>
<figure><img src="https://www.mictronics.de/img/2010/04/IMG_7415.jpg" alt="Feedpoint" class="img-fluid" /><figcaption>Feedpoint</figcaption></figure>
<p>And finaly the plot of the VSWR measurment to proof the construction:</p>
<figure><img src="https://www.mictronics.de/img/2010/04/VSWR.png" alt="VSWR" class="img-fluid" /><figcaption>VSWR</figcaption></figure>
<p>Material costs <10€.</p>
DIY Yagi Antenna for 1200MHz (2400MHz)2010-06-14T00:00:00Zhttps://www.mictronics.de/posts/1200MHz-Yagi/<p>Here is another DIY Yagi antenna design for 1200MHz and also suitable for 2400MHz:</p>
<figure><img src="https://www.mictronics.de/img/2010/06/IMG_7729.jpg" alt="1200MHz (2400MHz) Yagi Antenna" class="img-fluid" /><figcaption>1200MHz (2400MHz) Yagi Antenna</figcaption></figure>
<p>Construction details from calculation:</p>
<pre><code>VK5DJ´s YAGI CALCULATOR
Yagi design frequency =1200,00 MHz
Wavelength =250 mm
Parasitic elements fastened to a non-metallic or separated from boom
Folded dipole fully insulated from boom
Director/reflector diam =4 mm
Radiator diam =3,5 mm
REFLECTOR
121 mm long at boom position = 30 mm (IT = 54,5 mm)
RADIATOR
Single dipole 116 mm tip to tip, spaced 50 mm from reflector at boom posn 80 mm (IT = 52,0 mm)
Folded dipole 118 mm tip to tip, spaced 50 mm from reflector at boom posn 80 mm (IT = 53,0 mm)
DIRECTORS
Dir Length Spaced Boom position IT Gain Gain
(no.) (mm) (mm) (mm) (mm) (dBd) (dBi)
1 103 19 99 45,5 2,8 5,0
2 102 45 144 45,0 5,4 7,6
3 101 54 197 44,5 7,1 9,3
4 99 62 260 43,5 8,4 10,5
5 98 70 330 43,0 9,4 11,6
6 97 75 405 42,5 10,2 12,4
COMMENTS
The abbreviation "IT" means "Insert To", it is the construction distance from the element tip to
the edge of the boom for through boom mounting
Spacings measured centre to centre from previous element
Tolerance for element lengths is +/- 1 mm
Boom position is the mounting point for each element as measured from the rear of the boom and
includes the 30 mm overhang.The total boom length is 435 mm including two overhangs of 30 mm
The beam´s estimated 3dB beamwidth is 49 deg
A half wave 4:1 balun uses 0,70 velocity factor coax and is 87 mm long plus leads
FOLDED DIPOLE CONSTRUCTION
Measurements are taken from the inside of bends
Folded dipole length measured tip to tip = 118mm
Total rod length =259mm
Centre of rod=129mm
Distance HI=GF=46mm
Distance HA=GE=64mm
Distance HB=GD=82mm
Distance HC=GC=129mm
Gap at HG=3mm
Bend diameter BI=DF=23mm
</code></pre>
<p>The required balun is made from RG316 coax cable and calculated with a velocity factor of 0.7.</p>
<figure><img src="https://www.mictronics.de/img/2010/06/balun_1200MHz.jpg" alt="Balun 1200MHz" class="img-fluid" /><figcaption>Balun 1200MHz</figcaption></figure>
<p>The dipole is made from 10mm² (diameter 3.5mm) copper wire .</p>
<p>Feedpoint detail:</p>
<figure><img src="https://www.mictronics.de/img/2010/06/IMG_7728.jpg" alt="Feedpoint 1200MHz" class="img-fluid" /><figcaption>Feedpoint 1200MHz</figcaption></figure>
<p>And finaly the plot of the VSWR measurment to proof the construction:</p>
<figure><img src="https://www.mictronics.de/img/2010/06/1200MHz_Yagi_.jpg" alt="1200MHz VSWR" class="img-fluid" /><figcaption>1200MHz VSWR</figcaption></figure>
<p>This Yagi is also suitable for 2400MHz where the VSWR is a bit worser but still below 2 which is still accetable.</p>
<figure><img src="https://www.mictronics.de/img/2010/06/1200MHz_Yagi@2400MHz_.jpg" alt="2400MHz VSWR" class="img-fluid" /><figcaption>2400MHz VSWR</figcaption></figure>
PLL Control2010-08-02T00:00:00Zhttps://www.mictronics.de/posts/PLL-Control/<p>This page will describe how to control the PLL on common GMRS/FRS/PMR/LPD UHF 2-way radios.<br />
Controlling the PLL gives the ability to customized TX and/or RX frequency.</p>
<p>Known PLL´s so far:</p>
<ul>
<li>Gaintech GP214D</li>
<li>Samsung S1T8825</li>
<li>Toshiba TP31202</li>
<li>MC Devices MCD8825B</li>
<li>Panasonic AN6311</li>
</ul>
<p><strong>Gaintech GP214D</strong> <a href="http://www.epartshub.com/include/common_fileAttach.jsp?filename=00006158-GP214D_l.4.pdf&cmpyCd=00006158&type=Doc">Datasheet</a></p>
<p><strong>Samsung S1T8825</strong> <a href="http://www.datasheetarchive.com/?q=S1T8825">Datasheet</a></p>
<p><strong>Toshiba TP31202</strong> <a href="https://www.mictronics.de/img/2010/08/TB31202_PLL_Frequency_Synthesizer.pdf">Datasheet</a></p>
<p><strong>MC Devices MCD8825B</strong> <a href="https://www.mictronics.de/img/2010/08/MCD8825B-PLL.pdf">Datasheet</a></p>
<p><a href="https://www.mictronics.de/img/2010/08/GP214D_Calculator.xls">Download the GP214D/S1T8825/TP31202/MCD8825B PLL Calculator</a></p>
<p><strong>Panasonic AN6311</strong> No datasheet available.</p>
<figure><img src="https://www.mictronics.de/img/2010/08/AN6311_Pinout.png" alt="AN6311 Pinout" class="img-fluid" /><figcaption>AN6311 Pinout</figcaption></figure>
<p>The AN6311 is used for example in ALAN-445 Sport radio. <a href="https://www.mictronics.de/img/2010/08/ALAN445-circuit-diagram.pdf">See schematic</a></p>
<h5 id="how-to-control-the-an6311-pll">How to control the AN6311 PLL <a class="direct-link" href="https://www.mictronics.de/posts/PLL-Control/#how-to-control-the-an6311-pll">#</a></h5>
<ul>
<li>Three control signals are required: CLKIN, DATAIN, EN</li>
<li>Pins: CLKIN = 56, DATAIN = 55, EN = 1</li>
<li>Three types of frames are used:
<ul>
<li>1 Frame to set reference counter – Length 17 bit</li>
<li>1 Frame to with configuration bits – Length 18 bit</li>
<li>1 Frame to set the programmable and swallow counter – Length 19 bit</li>
</ul>
</li>
<li>Frames will be transferred MSB first</li>
</ul>
<h5 id="bus-timing">Bus timing <a class="direct-link" href="https://www.mictronics.de/posts/PLL-Control/#bus-timing">#</a></h5>
<ul>
<li>CLKIN t1 = 2us; t0 = 10us</li>
<li>DATAIN changes 2us before CLKIN rising edge</li>
<li>DATAIN goes LO 6us after last CLKIN falling edge</li>
<li>EN goes HI 2us after last DATAIN falling edge</li>
<li>EN t1 = 2us</li>
<li>Delay between two frames 100us</li>
</ul>
<h5 id="init-sequence">Init sequence <a class="direct-link" href="https://www.mictronics.de/posts/PLL-Control/#init-sequence">#</a></h5>
<ul>
<li>Power up</li>
<li>CLKIN & EN = LO while DATAIN = HI for 1-2 seconds, depends on radio CPU startup</li>
</ul>
<ol>
<li>Frame = set reference counter; 0x99A7 for 6.25 KHz channel spacing 50us pause</li>
<li>Frame = set reference counter; 0x99A7 for 6.25 KHz channel spacing 300us pause</li>
<li>Frame = set PLL configuration; 0x02E805 for RX 100us pause</li>
<li>Frame = set programmable and swallow counter; 0x0469A9 for 451.8625 MHz = RX FRS chan 1 800us pause</li>
<li>Frame = set PLL configuration; 0x02E805 for RX 100us pause</li>
<li>Frame = set programmable and swallow counter; 0x0469A9 for 451.8625 MHz = RX FRS chan 1</li>
</ol>
<p>Offset between RX and TX frequency depends on intermediate frequency used in RX stage.</p>
<h5 id="set-tx-mode-and-frequency">Set TX mode and frequency <a class="direct-link" href="https://www.mictronics.de/posts/PLL-Control/#set-tx-mode-and-frequency">#</a></h5>
<ol>
<li>Frame = set PLL configuration; 0x02E005 for TX 100us pause</li>
<li>Frame = set programmable and swallow counter; 0x048469 for 462.5625 MHz = TX FRS chan 1 100us pause</li>
<li>Frame = set PLL configuration; 0x02E205 for RX 100us pause</li>
<li>Frame = set PLL configuration; 0x02E205 for TX</li>
</ol>
<h5 id="end-tx-and-set-back-to-rx-frequency">End TX and set back to RX frequency <a class="direct-link" href="https://www.mictronics.de/posts/PLL-Control/#end-tx-and-set-back-to-rx-frequency">#</a></h5>
<ol>
<li>Frame = set PLL configuration; 0x02E805 for RX 100us pause</li>
<li>Frame = set programmable and swallow counter; 0x0469A9 for 451.8625 MHz = RX FRS chan 1</li>
</ol>
<h5 id="frame-description-(what-is-known-so-far)">Frame description (what is known so far) <a class="direct-link" href="https://www.mictronics.de/posts/PLL-Control/#frame-description-(what-is-known-so-far)">#</a></h5>
<ul>
<li>Frame to set reference counter, 17-bit</li>
</ul>
<p style="padding-left: 60px;"><span style="background-color: #ffff00;">01</span><span style="background-color: #00ff00;">001100110100</span><span style="background-color: #ff00ff;"><span style="color: #000000;">111</span></span></p>
<p style="padding-left: 60px;"><span style="background-color: #00ff00;"><span style="background-color: #ffff00;">Unknown</span>
Reference counter</span>, 001100110100 = 0x334 = 820
<span style="background-color: #ff00ff;">Register code</span></p>
<ul>
<li>Frame to set frequency, 19-bit</li>
</ul>
<p style="padding-left: 60px;"><span style="background-color: #ffff00;">10001101001</span><span style="background-color: #00ff00;">10101</span><span style="background-color: #ff00ff;">001</span></p>
<p style="padding-left: 60px;"><span style="background-color: #ffff00;">11-bit programmable counter</span>, 10001101001 = 0x469 = 1129
<span style="background-color: #00ff00;">5-bit swallow counter</span>, 10101 = 0x15 = 21<span style="background-color: #ff00ff;">
Register code</span></p>
<h5 id="how-to-calculate-pll-counters-for-desired-tx-frequency">How to calculate PLL counters for desired TX frequency <a class="direct-link" href="https://www.mictronics.de/posts/PLL-Control/#how-to-calculate-pll-counters-for-desired-tx-frequency">#</a></h5>
<p>Things you need to know:</p>
<ul>
<li>PLL oscillator frequency, ie. 10.25MHz</li>
<li>Channel spacing, ie. 6.25KHz</li>
<li>TX frequency, ie. FRS channel 1 = 462.5625MHz</li>
</ul>
<pre><code>1. Calculate reference counter
Reference counter = PLL oscillator frequency / Channel spacing / 2
Reference counter = 10.25MHz / 6.25KHz / 2 = 820
2. Calculate total divide ratio
Total divide ratio = TX frequency / Channel spacing
Total divide ratio = 462.5625MHz / 6.25KHz = 74010
3. Calculate programmable counter
Programmable counter = (Total divide ration / 2) / 32
Programmable counter = (74010 / 2) / 32 = 1156
4. Calculate swallow counter
Swallow counter = (Total divide ration / 2) – (32 * Programmable counter)
Swallow counter = (74010 / 2) – (32 * 1156) = 13
</code></pre>
<h5 id="how-to-calculate-pll-counters-for-desired-rx-frequency">How to calculate PLL counters for desired RX frequency <a class="direct-link" href="https://www.mictronics.de/posts/PLL-Control/#how-to-calculate-pll-counters-for-desired-rx-frequency">#</a></h5>
<p>To calculate the RX frequency from a known TX frequency, you need to know the intermediate frequency used in the RX stage of the radio, for example 10.7MHz or 21.4Mhz.</p>
<p>Example:</p>
<ul>
<li>PLL oscillator frequency, ie. 10.25MHz</li>
<li>Channel spacing, ie. 6.25KHz</li>
<li>TX frequency, ie. FRS channel 1 = 462.5625MHz</li>
<li>Intermediate frequency 10.7MHz</li>
</ul>
<pre><code>1. Calculate RX frequency
RX frequency = TX frequency – Intermediate frequency
RX frequency = 462.5625MHz – 10.7MHz = 451.8625MHz
2. Calculate reference counter
Reference counter = PLL oscillator frequency / Channel spacing / 2
Reference counter = 10.25MHz / 6.25KHz / 2 = 820
3. Calculate total divide ratio
Total divide ratio = TX frequency / Channel spacing
Total divide ratio = 451.8625MHz / 6.25KHz = 72298
4. Calculate programmable counter
Programmable counter = (Total divide ration / 2) / 32
Programmable counter = (72298 / 2) / 32 = 1129
5. Calculate swallow counter
Swallow counter = (Total divide ration / 2) – (32 * Programmable counter)
Swallow counter = (72298 / 2) – (32 * 1129) = 21
</code></pre>
<p><a href="https://www.mictronics.de/img/2010/08/AN6311_Calculator.xls">Download the AN6311 PLL Calculator</a></p>
L/S Band Low Noise Amplifier2010-12-14T00:00:00Zhttps://www.mictronics.de/posts/LS-Amplifier/<p>While ago I bought a low noise amplifier kit from Jim at <a href="http://www.w6pql.com/">www.w6pql.com</a>.</p>
<p>The LNA is set to work in the L- and S-band between 900MHz and 1300MHz. Althought it's possible to configure the LNA for use in 13cm band (2.4Ghz) as well. See Jim's page for details.</p>
<p>Some pictures and a gain plot:</p>
<figure><img src="https://www.mictronics.de/img/2010/12/IMG_8211.jpg" alt="W6QPL LNA" class="img-fluid" /><figcaption>W6QPL LNA</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2010/12/IMG_8213.jpg" alt="W6QPL LNA" class="img-fluid" /><figcaption>W6QPL LNA</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2010/12/IMG_8216.jpg" alt="W6QPL LNA" class="img-fluid" /><figcaption>W6QPL LNA</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2010/12/gain_plot.png" alt="W6QPL LNA" class="img-fluid" /><figcaption>W6QPL LNA</figcaption></figure>
<p>Gain is ~15dB @ 1200MHz.</p>
1.3 GHz Wireless AV set - Summary2011-01-24T00:00:00Zhttps://www.mictronics.de/posts/1.3GHz-Wireless-AV-Set/<p>Here is a little summary about the following 1.3 GHz Wireless AV set:</p>
<figure><img src="https://www.mictronics.de/img/2011/01/1.3GHz_Wireless_AV_Set.jpg" alt="1.3GHz_Wireless_AV_Set" class="img-fluid" /><figcaption>1.3GHz_Wireless_AV_Set</figcaption></figure>
I got mine from eBay. The set was shipped with the following items shown on the next picture:
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_8365.jpg" alt="1.3GHz_Wireless_AV_Set" class="img-fluid" /><figcaption>1.3GHz_Wireless_AV_Set</figcaption></figure>
<h3 id="transmitter">Transmitter <a class="direct-link" href="https://www.mictronics.de/posts/1.3GHz-Wireless-AV-Set/#transmitter">#</a></h3>
<p>Technical details:</p>
<ul>
<li>Supply voltage 12V</li>
<li>Supply current 280mA</li>
<li>Output power <28.5dBm</li>
<li>Size 65x50x20mm</li>
<li>Weight (measured) 62g complete; bare PCB 10g</li>
<li>SMA antenna connector</li>
<li>3.5mm 4 pin AV+power jack</li>
<li>Gain adjustable</li>
<li>One button control</li>
<li>15 Channels</li>
</ul>
<h5 id="externals%3A">Externals: <a class="direct-link" href="https://www.mictronics.de/posts/1.3GHz-Wireless-AV-Set/#externals%3A">#</a></h5>
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_8367.jpg" alt="Transmitter front" class="img-fluid" /><figcaption>Transmitter front</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_8366.jpg" alt="Transmitter top" class="img-fluid" /><figcaption>Transmitter top</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_8368.jpg" alt="Transmitter bottom" class="img-fluid" /><figcaption>Transmitter bottom</figcaption></figure>
<h5 id="internals%3A">Internals: <a class="direct-link" href="https://www.mictronics.de/posts/1.3GHz-Wireless-AV-Set/#internals%3A">#</a></h5>
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_83702.jpg" alt="Transmitter PCB top" class="img-fluid" /><figcaption>Transmitter PCB top</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_83712.jpg" alt="Transmitter PCB bottom" class="img-fluid" /><figcaption>Transmitter PCB bottom</figcaption></figure>
<p>As you can see there is no extra shielding around the PCB. Heat dissipation is mainly done through the bottom side of the PCB.<br />
Some details about the components:</p>
<ul>
<li>Philips TSA5520 1.3 GHz universal bus-controlled TV synthesizer</li>
<li>Futjitsu FLU10 RF power amplifier</li>
<li>24C02B EEPROM</li>
<li>uC marked JX903D</li>
</ul>
<p>Interesting is the separate EEPROM. Obviously the channel is stored inside. The EEPROM is used only to store the selected channel. The channel will be read on power up and stored on new selection.</p>
<pre><code>Channel Frequency [MHz] Power [dBm]
1 993 28.3
2 1020 28.4
3 1050 28.3
4 1060 28.2
5 1080 28.2
6 1100 28.0
7 1120 28.0
8 1140 28.2
9 1160 28.6
A 1180 28.7
B 1200 28.6
C 1220 28.3
D 1240 27.9
E 1256 27.6
F 1280 27.3
</code></pre>
<p>Harmonic Distortion:</p>
<ol>
<li>28.04 dBm @ 992.97 MHz</li>
<li>-13.51 dBc @ 1.99 GHz</li>
<li>-16.15 dBc @ 2.98 GHz</li>
</ol>
<h3 id="receiver">Receiver <a class="direct-link" href="https://www.mictronics.de/posts/1.3GHz-Wireless-AV-Set/#receiver">#</a></h3>
<p>The receiver is similar to many others coming with such wireless AV sets. You have two buttons to control the receiver, one to cycle channels and a second to store channels for auto cycle.</p>
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_8369.jpg" alt="1.3 GHz Wireless AV Receiver" class="img-fluid" /><figcaption>1.3 GHz Wireless AV Receiver</figcaption></figure>
<p>A very interesting fact: The receiver is rated for the frequency range 0.9 - 1.56 GHz, split into 28 channels!</p>
<pre><code>Channel Frequency [MHz]
1 921
2 993
3 1022
4 1051
5 1062
6 1081
7 1100
8 1120
9 1140
10 1160
11 1180
12 1200
13 1220
14 1240
15 1256
16 1280
17 1300
18 1320
19 1340
20 1360
21 1380
22 1400
23 1420
24 1440
25 1460
26 1480
27 1500
28 1520
</code></pre>
<h5 id="internals%3A-1">Internals: <a class="direct-link" href="https://www.mictronics.de/posts/1.3GHz-Wireless-AV-Set/#internals%3A-1">#</a></h5>
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_8372.jpg" alt="1.3GHz Wireless AV Receiver" class="img-fluid" /><figcaption>1.3GHz Wireless AV Receiver</figcaption></figure>
<p>The quality of the PCB looks much better on this receiver than on others I have seen so far. A large spring washer keeps the tuner module in place. But it's also the first one with separate video amplifier. By default the gain of the video amplifier is fixed. But there are pads to solder a potentiometer (2KOhm) to adjust video signal level. Very useful if you drive more than one video input in parallel from the receiver.</p>
<p>Some details about the components:</p>
<ul>
<li>TA7176 IF Amplifier+FM Detector</li>
<li>EEPROM 24C02B</li>
<li>Philips NE592D Video amplifier</li>
<li>uC without marking</li>
<li>78M05 + 78M09 Linear voltage regulators</li>
</ul>
<p>The tuner module is common standard but the RSSI output pin is missing. You need to solder one yourself, the PCB is already prepared. See picture below.</p>
<figure><img src="https://www.mictronics.de/img/2011/01/IMG_83762.jpg" alt="RSSI Pin on Tuner Module" class="img-fluid" /><figcaption>RSSI Pin on Tuner Module</figcaption></figure>
<pre><code>Level [dBm] RSSI [V]
-115 0,786
-110 0,784
-105 0,781
-100 0,771
-95 0,758
-90 0,789
-85 0,938
-83,5 1,000
-80 1,160
-75 1,382
-70 1,601
-65 1,810
-60 3,370
-55 3,570
-50 3,660
-45 3,710
-40 3,750
-35 3,790
-30 3,870
-29 3,940
-25 4,340
-20 4,340
</code></pre>
<p>The tuner uses the common TA1322FN Down converter in combination with a TA8804F FM demodulator. A 27MHz SAW filter ECS-D479.5B is used in the tuner. (Should be replaced by a ECS-D480A with 17MHz)</p>
<h5 id="antennas">Antennas <a class="direct-link" href="https://www.mictronics.de/posts/1.3GHz-Wireless-AV-Set/#antennas">#</a></h5>
<p>No idea here. These antennas are usually crap so I will not test them for VSWR. Better stick with an Yagi and the Inverted-V.</p>
<h5 id="conclusion">Conclusion <a class="direct-link" href="https://www.mictronics.de/posts/1.3GHz-Wireless-AV-Set/#conclusion">#</a></h5>
<p>With some rework this wireless AV set has a big potential for hacking and customizing.<br />
A separate shielding box needs to be made for the receiver. 65g for the original one is a way to much to carry up in the air. Also heat dissipation can be improved this way. All in all I think that's a good set, good hardware potential and better quality than I have seen before.</p>
Corona RP8D1 - Reverse Engineering2011-02-01T00:00:00Zhttps://www.mictronics.de/posts/Corona-RP8D1/<p>Due to my special interests in a customized RC transmitter and receiver system I started with reverse engineering of a Corona RP8D1 35MHz receiver.</p>
<p>The RP8D1 is my favourite candidate cause it´s a double superheterodyne receiver, uses a PLL synthesizer and is controller by an AVR ATmega88V.</p>
<p>Interesting fact about the micro-controller:</p>
<p>Corona obviously has been changed the controller type on actual receiver boards. The first receiver I bought in mid 2010 uses the mentioned ATmega88V.<br />
Two newer receiver, bought in January 2011, are using a controller marked "225K01" with manufacturer "QRG".</p>
<p>Fact is the PCB layout is 100% identical on both receivers so must be the pin-out of the different controllers!</p>
<p>So the 225K01 is either a clone or some official AVR derivative, already contacted Atmel for details.</p>
<p>Used components, followed by pictures and the controller pin-out:</p>
<ul>
<li>Controller AVR ATmega88V on mid 2010 board</li>
<li>Controller QRG 225K01 on 2011 boards</li>
<li>Rohm BU2630 Dual PLL</li>
<li>Rohm BH4126 Wideband IF Detector</li>
<li>Philips SA616DK High Performance Mixer FM IF System</li>
</ul>
<p>Board top layer:</p>
<figure><img src="https://www.mictronics.de/img/2011/02/IMG_83822.jpg" alt="Corona RP8D1 Top Layer" class="img-fluid" /><figcaption>Corona RP8D1 Top Layer</figcaption></figure>
<p>Board top layer, filter and crystal removed:</p>
<figure><img src="https://www.mictronics.de/img/2011/02/IMG_83852.jpg" alt="RP8D1 Top Layer with filter and crystal removed" class="img-fluid" /><figcaption>RP8D1 Top Layer with filter and crystal removed</figcaption></figure>
<p>A word about the second LED (PLL lock detect) on the RP8D1: The LED will signal the status of the PLL control loop. If the LED lights the PLL is out of sync, that means the synthesizer can not set the receiving frequency correctly. For normal operation the LED shall be always off.</p>
<p>Board bottom layer:<br />
There is a typo in the picture, the controller type is 225K01.</p>
<figure><img src="https://www.mictronics.de/img/2011/02/IMG_83832.jpg" alt="RP8D1 Bottom Layer" class="img-fluid" /><figcaption>RP8D1 Bottom Layer</figcaption></figure>
<p>The RSSI signal can be picked up for external use easily on one of the resistors instead of removing the filter and wiring to the SA616 pin 5.</p>
<p>Receiver board with AVR ATmega88V controller:</p>
<figure><img src="https://www.mictronics.de/img/2011/02/IMG_83812.jpg" alt="RP8D1 with ATmega88V" class="img-fluid" /><figcaption>RP8D1 with ATmega88V</figcaption></figure>
<p>Receiver board with QRG 225K01 controller:</p>
<figure><img src="https://www.mictronics.de/img/2011/02/IMG_83802.jpg" alt="RP8D1 with QRG 225K01 controller" class="img-fluid" /><figcaption>RP8D1 with QRG 225K01 controller</figcaption></figure>
<p>Controller pin-out:</p>
<pre><code>Pin Name Function
1 PD3 Bind button input
2 PD4 Bind LED output
3 GND GND
4 VCC VCC 3.3V
5 GND GND
6 VCC VCC 3.3V
7 XTAL1 Crystal 8MHz
8 XTAL2 Crystal 8MHz
9 PD5 Not connected
10 PD6/AIN0 PPM sum signal input
11 PD7/AIN1 DC 1.46V
12 PB0 Channel 1 PPM output
13 PB1 Channel 2 PPM output
14 PB2 Channel 3 PPM output
15 PB3 Channel 4 PPM output
16 PB4 Channel 5 PPM output
17 PB5 Channel 6 PPM output
18 AVCC AVCC 3.26V
19 ADC6 Not connected
20 AREF AREF 3.26V
21 GND GND
22 ADC7 Not connected
23 PC0/ADC0 RSSI signal input
24 PC1/ADC1 PPM signal threshold for analog comparator, level set by ext. voltage divider
25 PC2 PLL CE signal output
26 PC3 PLL DATA signal output
27 PC4 PLL CLK signal output
28 PC5 Not connected
29 PC6 Channel 9 PPM output
30 PD0 Channel 8 PPM output
31 PD1 Channel 7 PPM output
32 PD2 Not connected
</code></pre>
<p>Unfortunately pin PC6, the RESET input, is used as IO pin, this means the ISP serial interface is disabled and one can´t dump the flash and EEPROM content. (Already tried ;-) ) Therefore only parallel programming is the way to go which is quite complicated due to the MLF package and required number of wiring connections.</p>
<p>I made a HV programming adapter and tried to dump the flash of the controller. Unfortunately the memory protection fuse is set, so that´s not an option.<br />
The boot reset fuse isn´t set so there is no bootloader installed.</p>
<p>A fact: The QRG 225K01 is definately an ATmega88 since the signature bytes match in AVR-Studio.</p>
<p>Some more work to do. In any case a firmware for the AVR must be programmed from scratch.</p>
5.8 GHz Helix Antenna2011-07-08T00:00:00Zhttps://www.mictronics.de/posts/5.8GHz-Helix-Antenna/<p>This is an example how one can hit the target on spot with a clean build even on 5.8GHz.</p>
<p>Antenna dimensions:</p>
<ul>
<li>Design frequency 5800MHz</li>
<li>8 turns</li>
<li>Wavelength 0.23</li>
<li>Internal diameter 17-17.5mm</li>
<li>Wire diameter 1mm</li>
<li>Coil spacing 11.8mm</li>
<li>Reflector 40mmx40mm</li>
<li>Wave Trap size 6.5mmx3.2mm</li>
<li>Wave Trap spacing from feed point 2mm</li>
<li>Feed point height 2.5mm (wire center), maintained over 1/4 turn</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix.jpg" alt="5.8GHz Helix" class="img-fluid" /><figcaption>5.8GHz Helix</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_Feedpoint.jpg" alt="5.8GHz Helix Feedpoint" class="img-fluid" /><figcaption>5.8GHz Helix Feedpoint</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_Feedpoint_Height.jpg" alt="5.8GHz Helix Feedpoint Height" class="img-fluid" /><figcaption>5.8GHz Helix Feedpoint Height</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_WaveTrap.jpg" alt="5.8GHz Helix Wave Trap" class="img-fluid" /><figcaption>5.8GHz Helix Wave Trap</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_ReturnLoss.jpg" alt="5.8GHz Helix Return Loss" class="img-fluid" /><figcaption>5.8GHz Helix Return Loss</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_ReturnLoss_Tuned.jpg" alt="5.8GHz Helix Return Loss tuned" class="img-fluid" /><figcaption>5.8GHz Helix Return Loss tuned</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_VSWR.jpg" alt="5.8GHz Helix VSWR" class="img-fluid" /><figcaption>5.8GHz Helix VSWR</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_VSWR_NotTuned.jpg" alt="5.8GHz Helix VSWR not tuned" class="img-fluid" /><figcaption>5.8GHz Helix VSWR not tuned</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_VSWR_Tuned.jpg" alt="5.8GHz Helix VSWR tuned" class="img-fluid" /><figcaption>5.8GHz Helix VSWR tuned</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/5800MHz_Helix_SmithChart.jpg" alt="5.8GHz Helix Smith chart" class="img-fluid" /><figcaption>5.8GHz Helix Smith chart</figcaption></figure>
2.45 GHz Helix Antenna2011-07-12T00:00:00Zhttps://www.mictronics.de/posts/2.45GHz-Helix-Antenna/<p>A last helix to cover all interesting frequencies for FPV.</p>
<p>Antenna dimensions:</p>
<ul>
<li>Design frequency 2450MHz</li>
<li>8 turns</li>
<li>Wavelength 0.23</li>
<li>Internal diameter 41mm</li>
<li>Wire diameter 2.5mm</li>
<li>Coil spacing 28mm</li>
<li>Reflector diameter 80mm</li>
<li>Wave Trap size 15.2mmx7.6mm</li>
<li>Feed point height 5mm (wire center), see pictures</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2011/07/Helix1.jpg" alt="2.45GHz Helix" class="img-fluid" /><figcaption>2.45GHz Helix</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/Helix2.jpg" alt="2.45GHz Helix" class="img-fluid" /><figcaption>2.45GHz Helix</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/Feedpoint_Complete.jpg" alt="2.45GHz Helix Feedpoint Complete" class="img-fluid" /><figcaption>2.45GHz Helix Feedpoint Complete</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/Feedpoint1.jpg" alt="2.45GHz Helix Feedpoint" class="img-fluid" /><figcaption>2.45GHz Helix Feedpoint</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/Feedpoint2.jpg" alt="2.45GHz Helix Feedpoint" class="img-fluid" /><figcaption>2.45GHz Helix Feedpoint</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/Feedpoint3.jpg" alt="2.45GHz Helix Feedpoint" class="img-fluid" /><figcaption>2.45GHz Helix Feedpoint</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/Helix_2450MHz_ReturnLoss.png" alt="2.45GHz Helix Return Loss" class="img-fluid" /><figcaption>2.45GHz Helix Return Loss</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/Helix_2450MHz_VSWR.png" alt="2.45GHz Helix VSWR" class="img-fluid" /><figcaption>2.45GHz Helix VSWR</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2011/07/Helix_2450MHz_SmithChart.png" alt="2.45GHz Helix Smith chart" class="img-fluid" /><figcaption>2.45GHz Helix Smith chart</figcaption></figure>
LT3652 Solar Cell MPPT2012-09-13T00:00:00Zhttps://www.mictronics.de/posts/LT3652-Solar-Cell-MPPT/<p>Maximum power point tracking (MPPT) is a technique that solar battery chargers and similar devices use to get the maximum possible power from one or more solar panels (several solar cells connected in series and parallel). Solar cells have a complex relationship between solar irradiation, temperature and total resistance that produces a non-linear output efficiency known as the I-V curve. It is the purpose of the MPPT system to sample the output of the cells and apply the proper load to obtain maximum power for any given environmental conditions.</p>
<p>The following solar battery charger circuit is based on a <a href="http://www.linear.com/product/LT3652">LT3652</a> from Linear Technology. It's simple design just based on the data sheet and application notes. Another advantage apart from simplicity is the fact the board using the LT3652 can be stacked in parallel and therefore provide more output power if the solar panel can handle it.</p>
<p>My circuit is designed to charge a LiPo battery in 3S configuration with a current of max 2A out of a 36 series cells solar panel providing a nominal voltage of ~18V. The output provides a constant current or constant voltage to the battery depending on the charging state.</p>
<p>A plot showing the input and output current as well as input power under ideal conditions:</p>
<figure><img src="https://www.mictronics.de/img/2012/09/mppt_plot.png" alt="MPPT Plot" class="img-fluid" /><figcaption>MPPT Plot</figcaption></figure>
<p>PCB is double sided with only one side populated while the other one serves as heat sink. A exposed pad on the bottom side (just below the LT3652) can be used to attach the board to a separate heat sink.</p>
<figure><img src="https://www.mictronics.de/img/2012/09/MPPT_boards.jpg" alt="MPPT Boards" class="img-fluid" /><figcaption>MPPT Boards</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2012/09/MPPT_stacked.jpg" alt="MPPT two boards stacked" class="img-fluid" /><figcaption>MPPT two boards stacked</figcaption></figure>
<p>Visible are the connections between input and output and in the middle two extra connections for input reference voltage and output voltage feedback. Basically one board provides these two voltages for all others stacked to this one. In other words a master board driving several slave boards.</p>
<p>My design uses a P-channel MOSFET instead of a Schottky diode to protect the solar panel from reverse currents. This trick minimizes the voltage drop on the protection circuit to <10mV compared to a diode with roughly 400-600mV. Efficiency of the circuit increases this way.</p>
<p>Two LEDs indicating the status of the charger board. A green LED indicating the charging status when the board is suppling more than 1/10 of the programmed charging current. The second red LED indicates any faults which can be over temperature, internal charging timer overflow or battery fault.</p>
<p>Useful design documents:</p>
<p><a href="https://www.mictronics.de/img/2012/09/LT3652hvf-DevBoard1.pdf">LT3652 Development Board</a><br />
<a href="https://www.mictronics.de/img/2012/09/LTJournal-V20N4-02-df-LT3652-Jay_Celani.pdf">LTJournal-V20N4-02-df-LT3652-Jay_Celani</a><br />
<a href="https://www.mictronics.de/img/2012/09/LT3652hvf.pdf">LT3652 Datasheet</a><br />
<a href="https://www.mictronics.de/img/2012/09/LTMag-V19N4-04-LT3652-JimDrew.pdf">LTMag-V19N4-04-LT3652-JimDrew</a></p>
<p><a href="https://www.mictronics.de/img/2012/09/LT3652_MPPT_Schematic.pdf">Schematic</a><br />
<a href="https://www.mictronics.de/img/2012/09/LT3652_MPPT_BOM.txt">BOM</a><br />
<a href="https://www.mictronics.de/img/2012/09/LT3652_MPPT_INPUT_15V_OUTPUT_7.2V.pdf">Schematic Input 15V/Output 7.2V</a><br />
<a href="https://www.mictronics.de/img/2012/09/BOM_LT3652_MPPT_7.2V.txt">BOM 7.2V</a><br />
<a href="https://www.mictronics.de/img/2012/09/LT3652_MPPT_INPUT_18V_OUTPUT_14.2V.pdf">Schematic Input 18V/Output 14.2V</a><br />
<a href="https://www.mictronics.de/img/2012/09/BOM_LT3652_MPPT_14.2V.txt">BOM 14.2V</a></p>
openEVSE2013-05-31T00:00:00Zhttps://www.mictronics.de/posts/openEVSE/<p>This page is dedicated to the build of a openEVSE device to charge out Toyota Prius Plug-in in our garage. EVSE stand for Electric Vehicle Supply Equipment and it´s basically a control and protection circuit to connect and charge the car from a ordinary 230V socket. The EVSE enhance safety by enabling two-way communication between the charging station and the electric vehicle. This two-way communication ensures that the current passed to the vehicle is both below the limits of the 240V socket itself and below the limits of what the car can receive. There are additional safety features such as a safety lock-out that does not allow current to flow from the EVSE until the plug is physically inserted into the car.</p>
<p>The Toyota Prius Plug-in comes with a OEM adapter cable that includes the EVSE and just plugs into a 230V wall socket. I find the cable a bit bulky and since it´s stored in the trunk below the floor cover it´s inconvenient to get it in and out every time you park the car in the garage for charging. A spare cable is more than 1000€ and so is the Toyota proposed wall charger from Electrodrive here in Germany.</p>
<figure><img src="https://www.mictronics.de/img/2013/05/PriusEVSE.jpg" alt="Prius OEM EVSE" class="img-fluid" /><figcaption>Prius OEM EVSE</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/electrodrive.png" alt="electrodrive" class="img-fluid" /><figcaption>electrodrive</figcaption></figure>
<p>Since 1000€ is a way off the budget I´m willing to spend for a additional charger I searched through the net and founr the openEVSE project @ <a href="https://github.com/openevse">https://github.com/openevse</a></p>
<p>The project is open source and hardware, DIY and therefore fits perfectly my needs. I have ordered the openEVSE v2 Plus kit along with the optional LCD+RTC. The kit includes only the partly assembled main board with required components. Some external components are required to build the complete device, they were ordered from Digikey.</p>
<figure><img src="https://www.mictronics.de/img/2013/05/parts.jpg" alt="Parts" class="img-fluid" /><figcaption>Parts</figcaption></figure>
<pre><code>Count Digikey Order# Description
1 PB486-ND Relay 230V/30A, 12V driven
1 582-1018-ND Ground fault transformer
2 F5598CT-ND Varistor 250V
2 240-2119-ND Ferrite tubular bead
10 WM18717-ND Piggy back connector 6.3mm
10 WM2980-ND Connector 6.3mm
1 102-2664-ND AC/DC Converter 230V/12V/10W
1 CKN10008-ND Switch, red&green LED
2 P47KW-1BK-ND 47KOhm Resistor, required for AC detection circuit with 230V, not sure if they are supplied with the kit
2 486-1752-ND Fuse holder, 250V/30A
6 F4644-ND Fuse 250V/16A
</code></pre>
<figure><img src="https://www.mictronics.de/img/2013/05/openEVSEplus_Kit.jpg" alt="openEVSE Plus kit arrived together with the LCD & RTC extension board." class="img-fluid" /><figcaption>openEVSE Plus kit arrived together with the LCD & RTC extension board.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/openEVSEplus_2.jpg" alt="Obviously the openEVSE Plus kit comes with a AC/DC converter already, correct resistors for AC voltage detection are included as well." class="img-fluid" /><figcaption>Obviously the openEVSE Plus kit comes with a AC/DC converter already, correct resistors for AC voltage detection are included as well.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/openEVSEplus_1.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/openEVSE_Version.jpg" alt="Kit and LCD+RTC built." class="img-fluid" /><figcaption>Kit and LCD+RTC built.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/openEVSE_Selftest.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/openEVSE_Ready.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/Box_1.jpg" alt="First power up" class="img-fluid" /><figcaption>First power up</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/Box_2.jpg" alt="" class="img-fluid" /></figure>
<p>IP65 box designed for in-house electrical installations. Will be modified to take all the components and to have a nice front panel with LCD and button.</p>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_112627.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_112713.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_113702.jpg" alt="" class="img-fluid" /></figure>
<p>Front panel made from acrylic glass. LCD and button installed. The whole front panel is glued inside the box where I trimmed of the inner frame.</p>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_120501.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_144509.jpg" alt="" class="img-fluid" /></figure>
<p>Relay and controller mounted. Later on partly wired. Ferrite beads were placed just in case. Not sure if they are needed.</p>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_170905.jpg" alt="" class="img-fluid" /></figure>
<p>Final inside view.</p>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_170656.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_170701.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_170847.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2013/05/20130815_170725.jpg" alt="" class="img-fluid" /></figure>
Tape wound helical antenna2014-04-04T00:00:00Zhttps://www.mictronics.de/posts/Tape-Wound-Helical-Antenna/<p>Here is just another way to make a helical antenna. Cheap and easy. Aluminum sheet reflector, cardboard tube and self-adhesive copper tape. Designed and tuned for 1240MHz this helical has 8 turns on a 85mm diameter tube.</p>
<figure><img src="https://www.mictronics.de/img/2014/04/IMG_20140404_201100.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2014/04/IMG_20140404_201137.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2014/04/IMG_20140404_201121.jpg" alt="" class="img-fluid" /></figure>
Solar panel repair2014-08-28T00:00:00Zhttps://www.mictronics.de/posts/Solar-Panel-Repair/<p>I got a 290W solar panel with a shattered glass cover for free.</p>
<figure><img src="https://www.mictronics.de/img/2014/08/IMG_20140828_170809.jpg" alt="" class="img-fluid" /></figure>
<p>I asked Google about repair methods and found some results where people covered the panel with epoxy. Talked to composite specialists about resin that can be used for that purpose. They recommended a water clear, 2-component epoxy, that is UV stable and will not change color over time while exposed to sun light. A primer additive was also added for usage on glass.</p>
<figure><img src="https://www.mictronics.de/img/2014/08/IMG_20140828_170839.jpg" alt="" class="img-fluid" /></figure>
<p>Surface is smooth and sealed. The resin got obviously soaked in the glass cracks by capillary effect. With coating the glass seems to be more translucent than is was before.</p>
<figure><img src="https://www.mictronics.de/img/2014/08/IMG_20140828_170748.jpg" alt="" class="img-fluid" /></figure>
<p>Result looking good and ready for experimenting.</p>
<p><a href="https://www.harzspezialisten.de/Decor_Kaltglasur_2">Link Resin</a></p>
<p><a href="https://www.harzspezialisten.de/haftvermittler_A187">Link Primer additive</a></p>
LT8490 MPPT Solar Charger2014-08-30T00:00:00Zhttps://www.mictronics.de/posts/LT8490-MPPT-Solar-Charger/<p>Finally I finished the prototype for the MPPT solar charger board with new Linear LT8490.</p>
<figure><img src="https://www.mictronics.de/img/2014/09/LT8490_MPPT_PCB_Top.jpg" alt="LT8490 MPPT PCB Top" class="img-fluid" /><figcaption>LT8490 MPPT PCB Top</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/LT8480_MPPT_PCB_Bottom.jpg" alt="LT8490 MPPT PCB Bottom" class="img-fluid" /><figcaption>LT8490 MPPT PCB Bottom</figcaption></figure>
<p>It´s a 4-layer board with a size of 30mm * 60mm, height about 15mm with correct SMD capacitors (those on the picture are temporary). The board is designed to connect battery and solar panel with terminal lugs, the UART output is available, there are two LEDs (status and fault), battery temperature sensor input and the component side is equally flat for attachment to a heat sink.</p>
<p>Special thanks to Tage Bjorklund from Linear Technology for support and recommendations on the board layout (which is indeed critical due to high currents and sensitivity to noise).</p>
<p>The board passed some initial tests with a 3S LiPo configuration. Here are a few numbers with different solar panel voltages.</p>
<pre><code>Solar Input Battery Output
28,3V/0,5A 11,95V/0,95A
31,3V/0,6A 11,99V/1,20A
33,5V/0,47A 11,99V/1,28A
33,1V/1,1A 11,99V/2,7A
33,7V/0,6A 11,99V/1,75A
21,3V/1,65A 11,98V/2,69A
18,5V/0,35A 11,6V/0,6A
21,7V/1,29A 11,98V/2,34A
10,8V/1,05A 11,99V/1,3A
10,7V/1,02A 11,96V/0,9A
10,77V/0,99A 11,95V/0,95A
</code></pre>
<p>The Linear Technology LT8490 is a synchronous buck-boost battery charging controller for lead acid and Lithium batteries, featuring automatic maximum power point tracking (MPPT) and temperature compensation. The device operates from input voltages above, below or equal to the regulated battery float voltage. The LT8490’s full-featured battery charger offers many selectable constant-current constant-voltage (CC-CV) charging profiles, making it ideal for charging a variety of Lithium or lead acid chemistry types, including sealed lead acid, gel cells and flooded cells. All charge termination algorithms are provided onboard, eliminating the need for software or firmware and thus reducing design cycle time.</p>
<p>The LT8490 operates over a wide 6V to 80V input voltage range and can produce a 1.3V to 80V battery float voltage output using a single inductor with 4-switch synchronous rectification. The device is capable of charging currents as high as 10A depending on the choice of external FETs. The LT8490’s MPPT circuit enables a sweep of the full operating range of a solar panel, finding the true maximum power point, even in the presence of local maxima points caused by partial shading of the panel. Once the true maximum power point is found, the LT8490 will operate at that point while using a dithering technique to quickly track changes in the local maximum power point. With this methodology, the LT8490 fully utilizes the power generated by a solar panel even in non ideal operating environments.</p>
<p>The LT8490 performs automatic temperature compensation of the battery charge voltage by sensing an external thermistor on the battery. The STATUS and FAULT pins can be used to drive LED indicator lamps. Charging current limits can be adjusted by changing as few as 1 or 2 resistors, and a charging time scale can be selected with the appropriate resistor divider.</p>
<p>My LT8490 design follows closely the recommendation from Linear Technology. The schematic was designed in reference to the examples from datasheet and demo board. For the board layout I got help from a nice Linear guy, Tage Bjorklund, who previewed the layout a few times to ensure a proper design for high currents and low noise.</p>
<p>Down below are some design documents available for download. The BOM files including order numbers for all parts from Digikey. To design a charger for your own requirements a spread sheet (LibreOffice) is available to calculate all components that have an influence on the charging parameters.</p>
<p>CAD files for the layout will be not available any time soon. The board is a 4-layer design and requires a manufacturer who can handle the specifications for that, they are not cheap when ordered in a low count. I will probably sale the boards for a reasonable price when manufactured in a large number.</p>
<figure><img src="https://www.mictronics.de/img/2014/09/LT8490_Top_Layout.png" alt="LT8490 Top Layout" class="img-fluid" /><figcaption>LT8490 Top Layout</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/LT8490_Bottom_Layout.png" alt="LT8490 Bottom Layout" class="img-fluid" /><figcaption>LT8490 Bottom Layout</figcaption></figure>
<p>The photos are showing the prototype design with a size of 30mm*60mm and a height of about 15mm. The board will not be modified, wasting empty board space just to provide four mounting holes isn't a cheap solution on a 4-layer design. Instead I have designed a frame that allows attachment to a 50x50mm heatsink. The frame is available at <a href="http://shpws.me/vTht">Shapeways</a>.</p>
<h5 id="optional-heatsink">Optional Heatsink <a class="direct-link" href="https://www.mictronics.de/posts/LT8490-MPPT-Solar-Charger/#optional-heatsink">#</a></h5>
<figure><img src="https://www.mictronics.de/img/2014/09/LT8490_Heatsink_Mount.jpg" alt="LT8490 Heatsink Mount" class="img-fluid" /><figcaption>LT8490 Heatsink Mount</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/ATS-CPX050050006-199-C2-R0.jpg" alt="ATS-CPX050050006-199-C2-R0" class="img-fluid" /><figcaption>ATS-CPX050050006-199-C2-R0</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/IMG_20140919_163801.jpg" alt="Heatsink Components" class="img-fluid" /><figcaption>Heatsink Components</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/IMG_20140919_164808.jpg" alt="Board in frame" class="img-fluid" /><figcaption>Board in frame</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/IMG_20140919_165012.jpg" alt="Heat transfer and isolation sheet" class="img-fluid" /><figcaption>Heat transfer and isolation sheet</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/IMG_20140919_165410.jpg" alt="Heatsink attached to board" class="img-fluid" /><figcaption>Heatsink attached to board</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/IMG_20140919_165417.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2014/09/IMG_20140919_165423.jpg" alt="" class="img-fluid" /></figure>
<p>Required parts</p>
<ul>
<li>Heatsink, ATS series, 50x50mm, fin height as required, Digikey part number <a href="http://www.digikey.de/product-detail/de/ATS-CPX050050025-124-C2-R0/ATS1590-ND/4753996">ATS1590-ND</a></li>
<li>Heat transfer and isolation sheet, Digikey part number <a href="http://www.digikey.de/product-search/de?vendor=0&keywords=1168-1978-ND">1168-1978-ND</a>, good for a few boards</li>
</ul>
<h5 id="downloads">Downloads <a class="direct-link" href="https://www.mictronics.de/posts/LT8490-MPPT-Solar-Charger/#downloads">#</a></h5>
<p><a href="https://www.mictronics.de/img/2014/09/LT8490_schematic.pdf">Schematic</a><br />
<a href="https://www.mictronics.de/img/2014/09/LT8490_components_top.pdf">Layout Top</a><br />
<a href="https://www.mictronics.de/img/2014/09/LT8490_components_bottom.pdf">Layout Bottom</a><br />
<a href="https://www.mictronics.de/img/2014/09/BOM_Digikey_3.6V_10A.ods">BOM 3.6V</a><br />
<a href="https://www.mictronics.de/img/2014/09/BOM_Digikey_12.6V_5A.ods">BOM 12.6V</a><br />
<a href="https://www.mictronics.de/img/2014/09/BOM_Digikey_14.2V_10A.ods">BOM 14.2V</a><br />
<a href="https://www.mictronics.de/img/2014/09/LT8490_Component_Calculator.ods">LT8490 Calculator</a><br />
<a href="https://www.mictronics.de/img/2014/09/DC2069A-4-SCH.PDF">Demo Board Schematic</a></p>
Beer-CanTenna - A antenna for 433MHz2015-04-02T00:00:00Zhttps://www.mictronics.de/posts/Beer-CanTenna/<p>Just in case someone needs a simple and easy to build ground station antenna, usable with any 433MHz TX, here is a solution:</p>
<figure><img src="https://www.mictronics.de/img/2015/04/BeerCanTenna_Measure.jpg" alt="Beer-CanTenna measurement setup." class="img-fluid" /><figcaption>Beer-CanTenna measurement setup.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2015/04/BeerCanTenna_Return_Loss.jpg" alt="Return loss at 433MHz." class="img-fluid" /><figcaption>Return loss at 433MHz.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2015/04/BeerCanTenna_Inside.jpg" alt="Inside the can." class="img-fluid" /><figcaption>Inside the can.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2015/04/BeerCanTenna_Tripod.jpg" alt="On a tripod, extended to ~3m height." class="img-fluid" /><figcaption>On a tripod, extended to ~3m height.</figcaption></figure>
<p>What you need:<br />
1x Beer can, height 170mm, outer diameter 66mm, top opening diameter 52mm<br />
1x Steel welding rod, 500mm length, diameter 1.5mm<br />
1x BNC or SMA panel mount socket with front side nut</p>
<p>How to build:</p>
<ul>
<li>First, enjoy the beer, thats a mandatory step. ;)</li>
<li>Remove the top cover of the can. In a way, that you keep the outer folded ring.</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2015/04/Folded_Ring.jpg" alt="" class="img-fluid" /></figure>
<p>-Drill a hole in the bottom center to insert the BNC/SMA socket.</p>
<ul>
<li>Solder the welding rod to the BNC/SMA center contact.</li>
<li>Measure the length of the rod including the center contact and cut the overall length to 490mm.</li>
<li>Insert the socket through the bottom hole and fix with the nut.</li>
<li>Cover the top opening with some non-conductive material. I used some EPS foam.</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2015/04/Top_cover.jpg" alt="" class="img-fluid" /></figure>
<ul>
<li>That´s all.</li>
</ul>
<p>I made a extension pipe with a BNC socket on one end and some tripod adapter on the other. This way I can raise the antenna up to 3m on the tripod.</p>
<figure><img src="https://www.mictronics.de/img/2015/04/Extention.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2015/04/Ext_Socket.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2015/04/Ext_Cable.jpg" alt="The antenna connects with a 5m BNC cable to the transmitter." class="img-fluid" /><figcaption>The antenna connects with a 5m BNC cable to the transmitter.</figcaption></figure>
<p>I have tested the antenna during my 11km flight with excellent results.</p>
<figure><img src="https://www.mictronics.de/img/2015/04/BeerCanTenna_RSSI.jpg" alt="FPV 11km out over clouds, controlled with EzUHF." class="img-fluid" /><figcaption>FPV 11km out over clouds, controlled with EzUHF.</figcaption></figure>
<p>Note, a different size beer can may require a different length of the welding rod.</p>
Discone Antenna for GSM/3G/4G2015-07-18T00:00:00Zhttps://www.mictronics.de/posts/Discone-Antenna/<p>Here is another DIY antenna, this time for GSM/3G/4G usage. The design was calculated for 800-2100MHz and works well in this range. The antenna has a very broad bandwidth with a low gain and can be used for any application within the frequency range. Since the results are very good even up to 3GHz the antenna is also useful for WiFi. As well as ADS-B (flight radar) because 1090MHz is covered too. In general an excellent antenna for rtl-sdr operations.</p>
<p>Based on this <a href="http://www.changpuak.ch/electronics/calc_11.php">calculator</a>.</p>
<figure><img src="https://www.mictronics.de/img/2015/07/IMG_20150718_105634.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2015/07/IMG_20150718_105610.jpg" alt="" class="img-fluid" /></figure>
<p>Metal sheet cone and single side FR4 disc.</p>
<figure><img src="https://www.mictronics.de/img/2015/07/IMG_20150718_095022.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2015/07/IMG_20150718_111907.jpg" alt="" class="img-fluid" /></figure>
<p>A 1.2mm thick Nylon nut is used as spacer. Join stabilized with epoxy.</p>
<figure><img src="https://www.mictronics.de/img/2015/07/IMG_20150718_095032.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2015/07/IMG_20150718_111839.jpg" alt="" class="img-fluid" /></figure>
<p>Metal sheet is overlapping and soldered inside and outside. Hot glue is holding the plastic post.</p>
<figure><img src="https://www.mictronics.de/img/2015/07/IMG_20150718_105220.jpg" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2015/07/IMG_20150718_105458.jpg" alt="" class="img-fluid" /></figure>
<p>Return loss is -10dB or better in the desired operating range 800-2100MHz, VSWR 1.5 or better.</p>
<p>Dimensions:</p>
<ul>
<li>Disc diameter 90mm</li>
<li>Disc FR4, single side copper, thickness 0.8mm</li>
<li>Cone upper diameter 5mm</li>
<li>Cone lower diameter 115mm</li>
<li>Cone height 90mm</li>
<li>Cone angle 60°</li>
<li>Cone metal sheet thickness 0.3mm</li>
<li>Spacing cone-disc 2mm (1.2mm nylon nut + 0.8mm FR dielectric)</li>
</ul>
<p>On the cone template the inner radius is 5mm, outer 114.7mm, torus angle 180°, with overlapping 183°.</p>
<p><a href="https://www.mictronics.de/img/2015/07/Discone_800-2100MHz_Unwinding.pdf">Cone Template</a></p>
piDrive2016-12-15T00:00:00Zhttps://www.mictronics.de/posts/piDrive/<p>Well, I´m very happy with the piDrive I got as pledge from the <a href="https://www.kickstarter.com/projects/2073955313/pidrive-low-power-msata-ssd-for-the-raspberry-pi/">Kickstarter campaign</a>. Work nice and smooth on a 24/7 base in my personal webserver. But while building some other stuff with Raspberries I had a demand for some more piDrives. Unfortunately the maker of the Kickstarter campaign no longer response, there webpage has not seen any updates for month, almost a year, and there shop shows the piDrive anytime out of stock.</p>
<p>So I fired up my layout tool and put together my own piDrive design, similar to the original one, also based on PL-2571B.</p>
<figure><img src="https://www.mictronics.de/img/2016/12/IMG_20161214_152133.jpg" alt="mictronics piDrive" class="img-fluid" /><figcaption>mictronics piDrive</figcaption></figure>
<p>That´s a first prototype. USB wiring is maybe an object to change.</p>
<figure><img src="https://www.mictronics.de/img/2016/12/IMG_20161209_210243.jpg" alt="piDrive bottom layer" class="img-fluid" /><figcaption>piDrive bottom layer</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2016/12/IMG_20161209_210233.jpg" alt="piDrive top layer" class="img-fluid" /><figcaption>piDrive top layer</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2016/12/IMG_20161210_134539.jpg" alt="piDrive top components" class="img-fluid" /><figcaption>piDrive top components</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2016/12/capture_pidrive.jpg" alt="64GB piDrive with Debian" class="img-fluid" /><figcaption>64GB piDrive with Debian</figcaption></figure>
<p>Setting up the piDrive is a simple task. Required is microSD card of at least 128MB size, the SD image below and an actual Raspberry PI OS image of your choice.</p>
<p>Step by step:</p>
<ul>
<li>Download the <a href="https://www.mictronics.de/img/2016/12/mictronics-pidrive-sd.7z">microSD image</a>.</li>
<li>Download a RaspBerry Pi OS image of your choice. Check <a href="https://www.raspberrypi.org/downloads/">raspberrypi.org</a></li>
<li>Connect both, the microSD card and the piDrive to a PC by USB.</li>
<li>Write the microSD image to the card.</li>
<li>Write the Raspberry Pi OS to the piDrive. For both task you may use <code>dd</code> on Linux or <a href="https://sourceforge.net/projects/win32diskimager">Win32DiskImager</a> on Windows.</li>
<li>Put the microSD card in and connect the piDrive to your Raspberry Pi.</li>
<li>On first power up the init script will automatically resize the root disk, that is /dev/sda2, and you should see a blue message when connected to a monitor. After resizing the Pi reboots itself one more time.</li>
<li>The second boot should bring you the login prompt if everything goes well.</li>
</ul>
<p>Note: The microSD image will enable SSH by default.</p>
ADSB Receiver with GPS Precision Time2016-12-20T00:00:00Zhttps://www.mictronics.de/posts/ADSB-Receiver-GPS-Precision-Time/<p>Here is an upgrade for my ADSB receiver - GPS precision time. The MLAT position calculation for aircrafts depends on a precise time. While there is already a time synchronization between MLAT receivers in a specific area it is also possible to add a precise time source to improve the calculation result. A GPS receiver is such source when equipped with a PPS (pulse per second) output. The PPS is a signal with a width of less than one second and a sharply rising or abruptly falling edge that accurately repeats once per second with low jitter. The GPS time and PPS signal are then used to sync the internal ntp time service and keep a low offset and jitter.</p>
<p>My choice for GPS receiver was the <a href="https://www.adafruit.com/product/746">Adafruit GPS v3 breakout</a> board as it was a spare in my boxes. Beside the small size and high channel GPS receiver it has a PPS output and operates at 3.3V-5V input, but 3.3V TTL logic output, perfect for the Raspberry Pi. The additional backup battery come in handy in case of a power cut.</p>
<h5 id="gps-board-connection-to-raspberry-pi-2%2F3">GPS board connection to Raspberry Pi 2/3 <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-Receiver-GPS-Precision-Time/#gps-board-connection-to-raspberry-pi-2%2F3">#</a></h5>
<pre><code>Adafruit GPS v3 pin Raspberry Pi I/O header pin
VIN Pin 2 = 5V
GND Pin 14 = GND
TX Pin 10 = GPIO 15
RX Pin 8 = GPIO 14
PPS Pin 12 = GPIO 18
</code></pre>
<h5 id="enable-pps-input-and-set-uart-baudrate">Enable PPS input and set UART baudrate <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-Receiver-GPS-Precision-Time/#enable-pps-input-and-set-uart-baudrate">#</a></h5>
<p>To enable the PPS input and setting the correct baudrate for the GPS the Raspberry Pi config file <code>/boot/config.txt</code> must be changed. Add at the end:</p>
<pre><code># GPS PPS input
dtoverlay=pps-gpio,gpiopin=18
init_uart_baud = 9600
</code></pre>
<h5 id="disable-serial-console-on-uart0">Disable serial console on UART0 <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-Receiver-GPS-Precision-Time/#disable-serial-console-on-uart0">#</a></h5>
<p>The GPS is connected to the UART0 serial interface (ttyAMA0) that is usually occupied by the Raspberry Pi serial console. That needs to be disabled. So we edit <code>/boot/cmdline.txt</code> and change <code>console=ttyAMA0</code> to <code>console=tty1</code>.</p>
<p>Also the getty instance on ttyAMA0 needs to be disabled:<br />
<code>$ sudo systemctl disable serial-getty@ttyAMA0.service</code></p>
<h5 id="install-gps-service">Install GPS service <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-Receiver-GPS-Precision-Time/#install-gps-service">#</a></h5>
<p>This service is required to access the GPS and it provides a shared memory the for the ntp service with its own time informations.</p>
<p><code>$ sudo apt-get install gpsd gpsd-clients python-gps</code></p>
<p>To successfully run the GPS service, its configuration needs to be changed to access the UART0. So edit <code>/etc/default/gpsd</code> as follows.</p>
<pre><code># Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
START_DAEMON="true"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="true"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyAMA0 /dev/pps0"
# Other options you want to pass to gpsd
GPSD_OPTIONS="-n"
</code></pre>
<p>Now we reboot and check that PPS and GPS are working.</p>
<pre><code>$ dmesg | grep pps
[ 5.957377] pps_core: LinuxPPS API ver. 1 registered
[ 5.957515] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it;
[ 5.973778] pps pps0: new PPS source pps.-1
[ 5.973907] pps pps0: Registered IRQ 184 as PPS source
</code></pre>
<p>Installing pps-tools will provide some additional informations. This is a mandatory step in order to get ntp service with PPS working. Compiling ntp has a dependency for timepps.h that comes with pps-tools.</p>
<pre><code>$ sudo apt-get install pps-tools
$ sudo ppstest /dev/pps0
trying PPS source "/dev/pps0"
found PPS source "/dev/pps0"
ok, found 1 source(s), now start fetching data...
source 0 - assert 1482268186.000006148, sequence: 4647 - clear 0.000000000, sequence: 0
source 0 - assert 1482268187.000003768, sequence: 4648 - clear 0.000000000, sequence: 0
source 0 - assert 1482268188.000003324, sequence: 4649 - clear 0.000000000, sequence: 0
</code></pre>
<p>Checking that GPS service is running:</p>
<pre><code>$ sudo service gpsd status
gpsd.service - GPS (Global Positioning System) Daemon
Loaded: loaded (/lib/systemd/system/gpsd.service; static)
Active: active (running) since Tue 2016-12-20 19:45:08 UTC; 1h 26min ago
Main PID: 745 (gpsd)
CGroup: /system.slice/gpsd.service
└─745 /usr/sbin/gpsd -N -n /dev/ttyAMA0</pre>
Dec 20 19:45:08 raspberrypi systemd[1]: Started GPS (Global Positioning System) Daemon.
</code></pre>
<p>Also <code>$ cgps -s</code> should output something like:</p>
<pre><code>x Time: 2016-12-20T21:14:35.000Z xxPRN: Elev: Azim: SNR: Used: x
x Latitude: xx.xxxxxx N xx 12 78 291 24 Y x
x Longitude: xx.xxxxxx E xx 24 67 133 00 Y x
x Altitude: xxx.x m xx 25 36 261 29 Y x
x Speed: 1.1 kph xx 32 33 303 15 Y x
x Heading: 71.1 deg (true) xx 19 32 050 17 Y x
x Climb: 0.0 m/min xx 6 21 087 00 N x
x Status: 3D FIX (5 secs) xx 17 18 042 00 N x
x Longitude Err: +/- 16 m xx 2 15 122 00 N x
x Latitude Err: +/- 27 m xx 14 14 322 21 N x
x Altitude Err: +/- 19 m xx 15 10 182 19 N x
x Course Err: n/a xx 29 04 203 00 N x
x Speed Err: +/- 199 kph xx 10 01 268 00 N x
x Time offset: 0.506 xx 136 00 000 00 N x
x Grid Square: xxxxxx xx x
</code></pre>
<h5 id="getting-an-ntp-with-pps-(%22atom%22)-support">Getting an NTP with PPS ("ATOM") support <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-Receiver-GPS-Precision-Time/#getting-an-ntp-with-pps-(%22atom%22)-support">#</a></h5>
<p>Unfortunately, the version of NTP supplied with the Raspberry Pi Linux does not support PPS. These are the steps to download, compile and install NTP. You can choose between a release and a development version. The lines below are shown for release version ntp-4.2.8p9, but you will need to alter the version number to suit the version you wish to compile.</p>
<pre><code>$ sudo cp /usr/include/sys/timepps.h /usr/include/.
$ mkdir ntp # make a convenient working directory, if you don't already have one
$ cd ntp # enter that directory
$ sudo apt-get install libcap-dev # once-off, required to prevent later file not found error
$ sudo apt-get install libssl-dev # once-off, you may not need this, but reports suggest you might to build keygen
$ wget https://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p9.tar.gz
$ tar xvfz ntp-4.2.8p9.tar.gz
$ cd ntp-4.2.8p9
$ ./configure --enable-linuxcaps # takes some minutes
$ make -j5 # takes some minutes
(use "make -j5" for faster execution on the four-core Raspberry Pi 2/3.)
$ sudo make install # puts ntp* in /usr/local/bin/ntp*, takes some seconds
$ sudo service ntp stop
$ sudo cp /usr/local/bin/ntp* /usr/bin/ &amp;&amp; sudo cp /usr/local/sbin/ntp* /usr/sbin/
$ sudo service ntp start
</code></pre>
<p>Optional check for version and basic function<br />
<code>$ ntpq -crv -pn</code></p>
<p>Before we can alter the ntp service configuration we need to overcome a problem on Raspberry Pi's Debian OS. In fact, when you edit /etc/ntp.conf to use PPS and GPS time the DHCP or DHCP3 service will stealthy replace your ntp configuration by its own. So after reboot the ntp service will most like not use PPS and GPS as configured. This is why we disabled the DHCP behavior with overwriting the ntp configuration. Edit <code>/etc/dhcp/dhclient.conf</code>:</p>
<pre><code>From:
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers;
To:
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search,
netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes;</pre>
Remove the DHCP service hook and the stealthy created ntp configuration:
$ sudo rm /etc/dhcp/dhclient-exit-hooks.d/ntp
$ sudo rm /var/lib/ntp/ntp.conf.dhcp
</code></pre>
<p>Reboot.</p>
<p>No we can edit the ntp service configuration to use PPS and GPS inputs for precision time. My configuration in <code>/etc/ntp.conf</code></p>
<pre><code># /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# coarse time ref-clock, not really needed here as we have LAN &amp; WAN servers
server 127.127.28.2 minpoll 4 maxpoll 4 iburst true prefer
fudge 127.127.28.2 flag1 1 refid SHM2 stratum 1
# Kernel-mode PPS ref-clock for the precise seconds
server 127.127.22.0 minpoll 4 maxpoll 4
fudge 127.127.22.0 refid PPS
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: &lt;http://www.pool.ntp.org/join.html&gt;
server 0.de.pool.ntp.org minpoll 10 iburst prefer
server 1.de.pool.ntp.org minpoll 10 iburst
server 2.de.pool.ntp.org minpoll 10 iburst prefer
server 3.de.pool.ntp.org minpoll 10 iburst
server fritz.box minpoll 5 maxpoll 5 iburst
</code></pre>
<p>Note that when using a PPS source you <em>must</em> have one other server marked "prefer". In the example above I have added prefer to the shared memory driver (type 28) so that the combination of PPS and GPSD would provide the correct time even with no Internet servers. The ntp service needs a restart then.</p>
<p><code>$ sudo service ntp force-reload</code></p>
<p>Now the ntp service should use PPS and GPS input for precision time keeping.<br />
<code>$ ntpq -crv -pn</code></p>
<pre><code>associd=0 status=0115 leap_none, sync_pps, 1 event, clock_sync,
version="ntpd 4.2.8p9@1.3265-o Tue Dec 20 15:33:14 UTC 2016 (1)",
processor="armv7l", system="Linux/4.4.38-v7+", leap=00, stratum=1,
precision=-19, rootdelay=0.000, rootdisp=1.075, refid=PPS,
reftime=dc042552.9b78088d Tue, Dec 20 2016 21:46:58.607,
clock=dc042558.9751bae5 Tue, Dec 20 2016 21:47:04.591, peer=44360, tc=4,
mintc=3, offset=0.011402, frequency=-8.472, sys_jitter=0.001907,
clk_jitter=0.107, clk_wander=0.011
remote refid st t when poll reach delay offset jitter
==============================================================================
127.127.28.0 .GPS. 1 l 7 16 377 0.000 4.899 5.445
o127.127.22.0 .PPS. 0 l 6 16 377 0.000 0.011 0.002
192.168.178.255 .BCST. 16 B - 64 0 0.000 0.000 0.002
+192.168.178.1 131.188.3.221 2 u 44 64 77 0.515 0.967 0.038
*131.188.3.221 .DCFp. 1 u 359 1024 1 34.215 0.470 0.172
+2003:63:2737:e7 131.188.3.221 2 u 30 32 377 0.547 0.910 0.114
</code></pre>
<p>The PPS and GPS drivers are present and connected (reach = 377).</p>
<p>References:</p>
<p><a href="https://frillip.com/raspberry-pi-stratum-1-ntp-server/">https://frillip.com/raspberry-pi-stratum-1-ntp-server/</a></p>
<p><a href="http://www.satsignal.eu/ntp/Raspberry-Pi-quickstart.html">http://www.satsignal.eu/ntp/Raspberry-Pi-quickstart.html</a></p>
<p><a href="http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html">http://www.satsignal.eu/ntp/Raspberry-Pi-NTP.html</a></p>
<p><a href="http://www.catb.org/gpsd/gpsd-time-service-howto.html">http://www.catb.org/gpsd/gpsd-time-service-howto.html</a></p>
<p><a href="http://serverfault.com/questions/329596/how-to-override-the-ntp-information-sent-by-dhcp-in-debian">http://serverfault.com/questions/329596/how-to-override-the-ntp-information-sent-by-dhcp-in-debian</a></p>
<p><a href="http://www.catb.org/gpsd/troubleshooting.html">http://www.catb.org/gpsd/troubleshooting.html</a></p>
<p><a href="https://www.adafruit.com/product/746">https://www.adafruit.com/product/746</a></p>
G7RGQ Antenna 1090MHz2017-03-16T00:00:00Zhttps://www.mictronics.de/posts/G7RGQ-Antenna-1090MHz/<p>After successfully testing of my G7RGQ antenna here my built details:</p>
<figure><img src="https://www.mictronics.de/img/2017/03/G7RGQ_Antenna_Mictronics.png" alt="In red the dimensions I ended up with." class="img-fluid" /><figcaption>In red the dimensions I ended up with.</figcaption></figure>
<p>With above dimensions the antenna is tuned to about -22dB return loss at 1090MHz when placed inside the PVC tube.</p>
<figure><img src="https://www.mictronics.de/img/2017/03/G7RGQ_Antenna_2.jpg" alt="G7RGQ Antenna. Radials are brass tube 4mm OD." class="img-fluid" /><figcaption>G7RGQ Antenna. Radials are brass tube 4mm OD.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/03/G7RGQ_Antenna_6.jpg" alt="SMA feedpoint" class="img-fluid" /><figcaption>SMA feedpoint</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/03/G7RGQ_Antenna_1.jpg" alt="Antenna protected by 20mm PVC pipe." class="img-fluid" /><figcaption>Antenna protected by 20mm PVC pipe.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/03/G7RGQ_Antenna_5.jpg" alt="SMA feedpoint" class="img-fluid" /><figcaption>SMA feedpoint</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/03/G7RGQ_Antenna_4.jpg" alt="SMA feedpoint" class="img-fluid" /><figcaption>SMA feedpoint</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/03/G7RGQ_Antenna_3.jpg" alt="SMA feedpoint. Copper wire drilled 1.5mm and soldered to the SMA center." class="img-fluid" /><figcaption>SMA feedpoint. Copper wire drilled 1.5mm and soldered to the SMA center.</figcaption></figure>
NESDR Smart performance2017-03-20T00:00:00Zhttps://www.mictronics.de/posts/NESDR-Smart-performance/<p>Today I tried my G7RGQ antenna together with a NooElec NESDR Smart stick connected to the ADSB Raspberry Pi. I put the antenna and the stick on the roof and had it running for a while. To my surprise the performance was not as expected. I needed the same a gain setting to archive results comparable to my QFH antenna with 6m coax to the receiver. Again, I removed 6m of coax, around 6dB attenuation, but results were ain´t better. Took everything down again and disassembled the setup for testing.</p>
<p>For a test setup I used my Rohde&Schwarz FSH spectrum analyzer to generate a signal at 1090MHz and SDR# to tune and monitor the reception. For comparison I tested three SDR sticks, 1) NooElec NESDR Smart 2) FlightAware SDR Pro stick and 3) general E4000 SDR stick.</p>
<p>The FSH was set to:</p>
<ul>
<li>1090MHz</li>
<li>zero span (single frequency CW output)</li>
<li>tracking generator enabled</li>
<li>tracking generator attenuation 20dB</li>
</ul>
<p>An external attenuator with 30dB was connected between the tracking generator output and the SDR sticks. The input to the stick was around -50dBm then. I have not measured absolute levels but compared the relative levels at 1090MHz of the sticks indicated in SDR#. No gain was used.</p>
<figure><img src="https://www.mictronics.de/img/2017/03/E4000-SDR-Stick.png" alt="General E4000 SDR stick" class="img-fluid" /><figcaption>General E4000 SDR stick</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/03/FlightAware-SDR-Stick.png" alt="FlightAware Pro SDR stick" class="img-fluid" /><figcaption>FlightAware Pro SDR stick</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/03/NESDR-SMART-Stick.png" alt="NooElec NESDR Smart stick" class="img-fluid" /><figcaption>NooElec NESDR Smart stick</figcaption></figure>
<p>While the input conditions for all sticks were the same, the outcome is a bit different, at least for the NESDR stick. The E4000 and FlightAware stick are sampling under the given input conditions close to the full scale maximum. The NESMART in turn shows a level of -12dB less than the other two sticks.</p>
<p>This -12dB less seems to be the reason for the bad performance I noticed in dump1090.</p>
<p>The NESDR Smart is a nice piece of hardware compared to other sticks. I had chosen it in the latest setup over the FlightAware SDR stick because of its slim design that nicely fitted inside the antenna pole. But the performance, at least for ADSB at 1090MHz is a NOGO for me. I have not compared other frequencies so can´t say whether it performs better at lower frequencies.</p>
<p>By the way, that E4000 stick is not usable for ADSB at all, it has no TCXO and a frequency drift like hell.</p>
2013 Prius-Plugin modified for type 2 socket2017-06-24T00:00:00Zhttps://www.mictronics.de/posts/2013-Prius-Type2-Socket/<p>The 2013 Toyota Prius-Plugin is fitted with a SAE J1772/IEC62196 type 1 socket for external charging. In Germany most of the charging stations are supporting at least a IEC62196 type 2 connection. So one needs to deal with a adapter cable on such chargers. But that only works in case the charger is fitted with just a socket and the driver needs to bring its own cable between charger and car. I have seen an increasing number of chargers (made by ABB and others) that have a fix cable attached to it. On such stations a adapter cable will not work because of the type 2 connector design (pin length). Hence I can not charge my Prius there. So time for a change.</p>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170624_183041.jpg" alt="Type 2 connector on Prius-Plugin." class="img-fluid" /><figcaption>Type 2 connector on Prius-Plugin.</figcaption></figure>
<p>Some pictures of the modification. I used original parts wherever possible, especially for the wiring. I built only a new steel bracket that is supporting the back side of the housing (like the original) and a face panel covering the front of the socket. Even while I had to make space for the bigger type 2, the modification is reversible and the original type 1 socket can be installed again. The original wiring harness was not modified, just cut from the old type 1 and soldered to the new one. Used phase L1 on the type 2 socket.</p>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170607_153309.jpg" alt="Type 1 before." class="img-fluid" /><figcaption>Type 1 before.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170624_145047.jpg" alt="Indicators unused." class="img-fluid" /><figcaption>Indicators unused.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170612_155525.jpg" alt="Plugin socket assembly removed." class="img-fluid" /><figcaption>Plugin socket assembly removed.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170612_155752.jpg" alt="Type 1 socket assembly." class="img-fluid" /><figcaption>Type 1 socket assembly.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170612_160503.jpg" alt="Type 1 socket removed from housing assembly." class="img-fluid" /><figcaption>Type 1 socket removed from housing assembly.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170612_161118.jpg" alt="Housing assembly back with reinforcement bracket." class="img-fluid" /><figcaption>Housing assembly back with reinforcement bracket.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170612_161127.jpg" alt="Housing assembly front." class="img-fluid" /><figcaption>Housing assembly front.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170612_161154.jpg" alt="Type 2 socket original shape." class="img-fluid" /><figcaption>Type 2 socket original shape.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170612_165714.jpg" alt="Type 2 socket shaped to fit inside the housing assembly." class="img-fluid" /><figcaption>Type 2 socket shaped to fit inside the housing assembly.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170624_145010.jpg" alt="Everything reassembled. Used the original wiring harness. New reinforcement bracket partly visible." class="img-fluid" /><figcaption>Everything reassembled. Used the original wiring harness. New reinforcement bracket partly visible.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/06/IMG_20170624_145047.jpg" alt="Outside without charger connector. Face panel is covering the shaped socket and sealed against environment. Used allen head bolts because of the tight space." class="img-fluid" /><figcaption>Outside without charger connector. Face panel is covering the shaped socket and sealed against environment. Used allen head bolts because of the tight space.</figcaption></figure>
<p>Of course I had to change the original type 1 plug on the Toyota EVSE that come with the car for a type 2.</p>
<p>Parts sourced from <a href="http://www.evcables.co.uk/">http://www.evcables.co.uk/</a>.</p>
JavaFX on Beaglebone Black2017-07-01T00:00:00Zhttps://www.mictronics.de/posts/JavaFX-on-BBB/<p>Get JavaFX working on a Beaglebone Black -PITA- but here is how I did it:</p>
<figure><img src="https://www.mictronics.de/img/2017/07/IMG_20170701_142424.jpg" alt="JavaFX on Beaglebone Black." class="img-fluid" /><figcaption>JavaFX on Beaglebone Black.</figcaption></figure>
<p>Steps to be performed:</p>
<ul>
<li>Flash Debian 8 to eMMC</li>
<li>Upgrade kernel</li>
<li>Install SGX driver</li>
<li>Install JDK 8</li>
<li>Install JavaFX</li>
<li>Finalize</li>
</ul>
<p>My hardware is a Beaglebone Black with 4D Systems 4DCAPE-43T LCD+Touchscreen.</p>
<h6 id="flash-debian-8-to-emmc">Flash Debian 8 to eMMC <a class="direct-link" href="https://www.mictronics.de/posts/JavaFX-on-BBB/#flash-debian-8-to-emmc">#</a></h6>
<p>I started with a fresh Debian 8 image that was flashed to eMMC. Pick a flasher version from <a href="http://elinux.org/Beagleboard:BeagleBoneBlack_Debian">http://elinux.org/Beagleboard:BeagleBoneBlack_Debian</a>.</p>
<h5 id="upgrade-kernel">Upgrade kernel <a class="direct-link" href="https://www.mictronics.de/posts/JavaFX-on-BBB/#upgrade-kernel">#</a></h5>
<p>Next I installed the latest RT+SGX kernel (4.4.74-bone-rt-r18).</p>
<pre><code>cd /opt/scripts/tools/
sudo ./update_kernel.sh --bone-rt-kernel --lts-4_4
sudo reboot
sudo apt-get install linux-headers-'uname -r'
</code></pre>
<p>And the ti-sgx modules for that kernel version</p>
<pre><code>sudo apt-get install ti-sgx-es8-modules-'uname -r'
sudo depmod -a 'uname -r'
sudo update-initramfs -uk 'uname -r'
sudo reboot
</code></pre>
<h5 id="install-sgx-driver">Install SGX driver <a class="direct-link" href="https://www.mictronics.de/posts/JavaFX-on-BBB/#install-sgx-driver">#</a></h5>
<p>Tried by the description from <a href="http://elinux.org/BeagleBoardDebian#SGX_Drivers">http://elinux.org/BeagleBoardDebian#SGX_Drivers</a> but without success. I was not able to build the package (on Debian 9 i386). Found the file through Google at <a href="https://github.com/goeland86/Umikaze2/raw/master/GFX_5.01.01.02_es8.x.tar.gz">https://github.com/goeland86/Umikaze2/raw/master/GFX_5.01.01.02_es8.x.tar.gz</a> <a href="https://www.mictronics.de/img/2017/07/GFX_5.01.01.02_es8.x.tar.gz">Mirror</a></p>
<p>With that package we can install the SGX driver:</p>
<pre><code>sudo apt-get install lsb-release
sudo tar xfv GFX_5.01.01.02_es8.x.tar.gz -C /
cd /opt/gfxinstall/
sudo ./sgx-install.sh
sudo reboot
</code></pre>
<p>After reboot the driver should be running:</p>
<pre><code>lsmod | grep omaplfb
omaplfb 12228 0
tilcdc 26781 1 omaplfb
pvrsrvkm 157020 1 omaplfb
</code></pre>
<h5 id="install-jdk8">Install JDK8 <a class="direct-link" href="https://www.mictronics.de/posts/JavaFX-on-BBB/#install-jdk8">#</a></h5>
<p>Get the JDK from <a href="http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/index.html">http://www.oracle.com/technetwork/java/embedded/embedded-se/downloads/index.html</a> and unpack.<br />
<code>sudo tar xfv jdk-8u131-linux-arm32-vfp-hflt.tar.gz -C /opt</code></p>
<p>Export the Java enviroment variables to all users.</p>
<pre><code>sudo nano /etc/profile
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.8.0_131/bin"
else
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.8.0_131/bin"
fi
export PATH
export JAVA_HOME=/opt/jdk1.8.0_131
visudo
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.8.0_131/bin"
</code></pre>
<h6 id="install-javafx">Install JavaFX <a class="direct-link" href="https://www.mictronics.de/posts/JavaFX-on-BBB/#install-javafx">#</a></h6>
<p>Get the JavaFX Embedded SDK from <a href="http://gluonhq.com/products/mobile/javafxports/get/">http://gluonhq.com/products/mobile/javafxports/get/</a> and unpack.<br />
<a href="https://www.mictronics.de/img/2017/07/armv6hf-sdk-8.60.9.zip">Mirror</a><br />
<code>sudo unzip armv6hf-sdk-8.60.9.zip</code></p>
<p>Its content must be moved to the JDK installation folder. See also 2.1.4 at <a href="http://docs.gluonhq.com/javafxports/#anchor-1">http://docs.gluonhq.com/javafxports/#anchor-1</a></p>
<pre><code>cd armv6hf-sdk/rt/lib/ext/
sudo cp jfxrt.jar /opt/jdk1.8.0_131/jre/lib/ext/.
cd ..
cd arm
sudo cp *.* /opt/jdk1.8.0_131/jre/lib/arm/
cd ..
sudo cp javafx.platform.properties /opt/jdk1.8.0_131/jre/lib/.
sudo cp javafx.properties /opt/jdk1.8.0_131/jre/lib/.
sudo cp jfxswt.jar /opt/jdk1.8.0_131/jre/lib/.
</code></pre>
<p>Next install some required packages to make JavaFX working:<br />
<code>sudo apt-get install libgtk2.0-bin libXtst6 libxslt1.1</code></p>
<h5 id="finalize">Finalize <a class="direct-link" href="https://www.mictronics.de/posts/JavaFX-on-BBB/#finalize">#</a></h5>
<p>Disable cursor blinking on the console since this will disturb the GUI.<br />
<code>nano /etc/rc.local</code><br />
Before exit 0 add<br />
<code>echo 0 &gt; /sys/class/graphics/fbcon/cursor_blink</code></p>
<p>Set the correct geometry and buffer size for the frame buffer device. This is important because it will cause buffer overflows in JavaFX when incorrect. Make sure physical and virtual screen size are the same, set correct color depth.</p>
<p><code>nano /etc/rc.local</code><br />
Before exit 0 add<br />
<code>fbset -xres 480 -yres 272 -vxres 480 -vyres 272 -depth 16 -rgba 5,6,5,0</code></p>
<p>Disable sudo password for specific user since the JavaFX application must be run as root to access certain devices. In Netbeans run the application then with execution prefix "sudo".</p>
<p>Be aware: This makes your system less secure!</p>
<p><code>visudo</code><br />
Add at bottom<br />
<code>debian ALL=(ALL) NOPASSWD: ALL</code></p>
Raspberry Pi 3 with external antenna2017-10-03T00:00:00Zhttps://www.mictronics.de/posts/Raspberry-Pi3-external-antenna/<p>Just modified a Raspberry Pi 3 to accept an external WiFi/Bluetooth antenna via U-FL socket.</p>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170919_112553.jpg" alt="External antenna connected" class="img-fluid" /><figcaption>External antenna connected</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170914_210001.jpg" alt="PCB prepared to solder U-FL socket" class="img-fluid" /><figcaption>PCB prepared to solder U-FL socket</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170914_210108.jpg" alt="PCB prepared to solder U-FL socket" class="img-fluid" /><figcaption>PCB prepared to solder U-FL socket</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170914_210222.jpg" alt="PCB prepared to solder U-FL socket" class="img-fluid" /><figcaption>PCB prepared to solder U-FL socket</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170919_110712.jpg" alt="U-FL ready to use" class="img-fluid" /><figcaption>U-FL ready to use</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170919_110758.jpg" alt="RF routed from on-board antenna to U-FL socket" class="img-fluid" /><figcaption>RF routed from on-board antenna to U-FL socket</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170919_110834.jpg" alt="U-FL socket soldered and RF path re-routed" class="img-fluid" /><figcaption>U-FL socket soldered and RF path re-routed</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170919_112606.jpg" alt="U-FL cable connected" class="img-fluid" /><figcaption>U-FL cable connected</figcaption></figure>
<p>Detailed tutorial can be found here:</p>
<p><a href="http://web.archive.org/web/20181019182655/https://www.dorkbotpdx.org/blog/wramsdell/external_antenna_modifications_for_the_raspberry_pi_3">https://www.dorkbotpdx.org/blog/wramsdell/external_antenna_modifications_for_the_raspberry_pi_3</a></p>
Rohde&Schwarz FSH6 modified for Li-Io battery2017-10-03T00:00:00Zhttps://www.mictronics.de/posts/Rohde-Schwarz-FSH6-modified/<p>Finally I modified my Rohde&Schwarz FSH6 spectrum analyzer to run from a Li-Io battery instead NiMH. Dying batteries are an annoying problem of the old R&S FSH3/6 series by design. The device has no real power switch but goes in standby on power off. Drawing a standby current of about 1.2mA in combination with the memory and self-discharge effect in NiMH batteries let them die sooner or later.</p>
<p>To solve that I decided to install a Li-Io battery with protection board. Apart from a better Li-Io life cycle these batteries double the capacity with a lower cell count. Original 6S1P 3200mAh NiMH replaced by 2S2P 7000mAh Li-Io type 18650 cells. 2S2P means two cells in parallel with another two cells in series.</p>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170930_175359.jpg" alt="Li-Io battery pack installed in FSH6. Connected by original wiring." class="img-fluid" /><figcaption>Li-Io battery pack installed in FSH6. Connected by original wiring.</figcaption></figure>
<p>A four cell pack of 18650 type Li-Io batteries fits nicely into the FSH6 battery bay. I used the original wiring harness that connects the battery to main PCB. It includes a temperature sensor that is required to keep the FSH6 running. Two black wires and the temperature senors open end connect together to ground on the battery protection board. Red wire goes to positive output on protection board.</p>
<figure><img src="https://www.mictronics.de/img/2017/10/IMG_20170930_175257.jpg" alt="2S2P Li-Io battery pack." class="img-fluid" /><figcaption>2S2P Li-Io battery pack.</figcaption></figure>
<p>Battery protection board is a cheap one from eBay and includes protection against short/high current, under voltage and over voltage. Important feature is the under voltage protection that prevents deep discharge of cells. The battery cells will be disconnected from load (= FSH6 standby mode) until next charge cycle.</p>
<p>Charging the Li-Io battery is simple since the FSH6 includes already a charging circuit based on <a href="https://www.mictronics.de/img/2017/10/ADP3806-Li-Io-Charger-in-FSH6.pdf">ADP3806</a> that is capable of Li-Io chemistry. The battery pack will be charged in CC/CV mode as required. The only modification required is for final battery voltage by replacing a single SMD resistor.</p>
<p>A few facts about the charging/power supply circuit:</p>
<ul>
<li>Low battery shut-off at 6.2V</li>
<li>NiMH Charge voltage 10V, current up to 1A</li>
<li><strong>Charging occurs only when device is in standby (off)</strong></li>
<li>According to service manual battery will not be charged when device is turned on!?</li>
<li>External power supply 18V/0.8A</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2017/10/FSH6_Charger_Modification_2S_Li-Io.jpg" alt="FSH6 battery charger circuit modification for 2S Li-Io battery." class="img-fluid" /><figcaption>FSH6 battery charger circuit modification for 2S Li-Io battery.</figcaption></figure>
<p>The ADP3806 sets the final battery voltage by two resistors. Marked red and green in image above. Original these are 330kOhm and 100kOhm. In datasheet linked below these are R11 and R12 in schematic on page 11. This page describes the calculation of the final battery voltage from these two resistors. With 330kOhm and 100kOhm that results in a ratio of 3.3 or a final battery voltage of 10.75V, which is close to the 10V I have measured.</p>
<p>For a two series cell Li-Io battery pack the final voltage needs to reduced below 8.2V. So I replaced the 330kOhm resistor with 220kOhm. Resulting in a ratio of 2.2 or final battery voltage of 8V, measured 8.05V in reality. That's sufficient for the Li-Io battery pack to be considered full charged.</p>
<p>Still need to perform a long term test for run time but the modification looks promising.</p>
Laser distance meter hack2018-02-17T00:00:00Zhttps://www.mictronics.de/posts/Laser-Distance-Meter-Hack/<p>I'm finally hacked a cheap laser distance meter from Amazon. Arduino Mini is taking control. <a href="https://hackaday.io/project/12767-peek-inside-uni-t-ut390b/log/49277-tried-and-gave-up">Someone else tried before</a> but gave up on this. Mine looks the same like the KKMOON but has no brand marking.</p>
<figure><img src="https://www.mictronics.de/img/2018/02/LaserDistanceMeter.jpg" alt="Laser distance meter under hack." class="img-fluid" /><figcaption>Laser distance meter under hack.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/DevelopmentSetup.jpg" alt="Bench setup for development." class="img-fluid" /><figcaption>Bench setup for development.</figcaption></figure>
<p>Taking the laser distance meter apart.</p>
<figure><img src="https://www.mictronics.de/img/2018/02/BatteryBoxLabel.jpg" alt="Battery box and backside label." class="img-fluid" /><figcaption>Battery box and backside label.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/InitScreen.jpg" alt="Init screen." class="img-fluid" /><figcaption>Init screen.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/OperationalScreen.jpg" alt="Operational screen." class="img-fluid" /><figcaption>Operational screen.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/LaserDistanceMeterOpen.jpg" alt="Laser distance meter open." class="img-fluid" /><figcaption>Laser distance meter open.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/MainBoardFront.jpg" alt="Main board front." class="img-fluid" /><figcaption>Main board front.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/KeyBoard.jpg" alt="Keyboard markings." class="img-fluid" /><figcaption>Keyboard markings.</figcaption></figure>
<p>While there are no outside markings, the inside reveals the manufacturer - <a href="http://www.sndway.com/">SNDWAY</a>. Seems to be an SW-A40.</p>
<figure><img src="https://www.mictronics.de/img/2018/02/OpticBoard.jpg" alt="Optic board marking." class="img-fluid" /><figcaption>Optic board marking.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/MainBoardBack.jpg" alt="Main board back with two missing chips." class="img-fluid" /><figcaption>Main board back with two missing chips.</figcaption></figure>
<p><a href="https://hackaday.io/project/12767-peek-inside-uni-t-ut390b/log/49277-tried-and-gave-up">Hackaday.io</a> has a description of several pads on the main board.</p>
<figure><img src="https://cdn.hackaday.io/images/2765401479665661646.PNG" alt="Description of pads on main board. Origin hackaday.io." class="img-fluid" /><figcaption>Description of pads on main board. Origin hackaday.io.</figcaption></figure>
<p>The keypads on my device main board are different to the description above.</p>
<figure><img src="https://www.mictronics.de/img/2018/02/MainBoardKeypads.jpg" alt="Keypads on main board. No all keys available." class="img-fluid" /><figcaption>Keypads on main board. No all keys available.</figcaption></figure>
<p>Debugging pads on the main board backside providing acces to the STM32 SW debug port. I tried with an ST-Link V2 just to find the chip being locked in protection level 1. So one can not read the firmware. However, there are two chips missing on the main boards back side. So I probed the with an oscilloscope. Found three pins with activity on which is an unidirectional SPI bus.</p>
<figure><img src="https://www.mictronics.de/img/2018/02/MissingChipPinout.jpg" alt="Missing chip pinout for data bus." class="img-fluid" /><figcaption>Missing chip pinout for data bus.</figcaption></figure>
<p>Details about the bus that I found so far:</p>
<figure><img src="https://www.mictronics.de/img/2018/02/SingleFrame.png" alt="Single 68 bytes frame." class="img-fluid" /><figcaption>Single 68 bytes frame.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/SingleFrameLength.png" alt="Single frame length 16.6ms." class="img-fluid" /><figcaption>Single frame length 16.6ms.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/2HzFrameRate.png" alt="Frames with 2Hz rate." class="img-fluid" /><figcaption>Frames with 2Hz rate.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/MeasurementFrames.png" alt="2Hz frames with additional frame right after measurement end." class="img-fluid" /><figcaption>2Hz frames with additional frame right after measurement end.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/TwoConsequtiveFrames.png" alt="WTwo consecutive frames after measurement." class="img-fluid" /><figcaption>WTwo consecutive frames after measurement.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/02/StartThreeBytes.png" alt="Start of frame with first three bytes." class="img-fluid" /><figcaption>Start of frame with first three bytes.</figcaption></figure>
<ul>
<li>Signal level is 0V to 3V.</li>
<li>Clock frequency 37KHz.</li>
<li>The are 8 long clock pulses and one short pulse for each byte. Data is LOW in first, second and third byte of each sub-frame during this short pulse (byte data is a command). For any other byte in sub-frames DATA is HIGH during this short pulse (byte data are LCD symbols).</li>
<li>Data sampling at rising clock edge.</li>
<li>Bit order seems to be MSB first.</li>
<li>CS signal (D2 in above plots) is high when bus inactive, there is a short strobe pulse at the end of each byte.</li>
<li>In continuous measurement mode the main frame is randomly split and the 17 bytes sub-frames are transmitted with a pause in between. Obviously a timing issue when the controller is busy while measuring distance.</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2018/02/FirstByte.png" alt="First byte of frame." class="img-fluid" /><figcaption>First byte of frame.</figcaption></figure>
<p><strong>Before you connect any hardware to the LCD bus of the laser distance meter make sure it runs at 3V signal levels! The Arduino Mini by default is not! Solutions are either level converters or, what I did, simply exchange the linear voltage regulator IC1 on the Arduino Mini board to an 3V version.</strong></p>
<p>Running the Arduino Mini at 3V brings also the advantage that you can power the device main board directly from the Arduino Mini. Doing so requires an additional capacitor of at least 1000uF/6.3V connected to the power input (where the battery wires were connected) to buffer any power surge when the device and laser will be switched on.</p>
<p>Next I coded a quick and dirty sketch for a Arduino Mini board. It uses the circular buffer library from <a href="https://github.com/rlogiacco/CircularBuffer">https://github.com/rlogiacco/CircularBuffer</a>.</p>
<script src="https://gist.github.com/Mictronics/e959ce730838c4e1893cfc7602a925cd.js"></script>
<p>This code reads two frames then sends them via serial interface. It ignores the very first short pulse leading each data byte. The result looks like this:</p>
<pre><code>10 00 C0 00 00 0A 00 02 00 00 05 58 00 00 00 00 00 10 01 C0 00 00 06 00 02 00 00 03 F0 00 00 00 00 00 10 02 C0 00 00 02 00 02 C0 00 C5 70 00 00 40 00 00 10 03 C0 00 00 00 00 42 00 00 07 58 60 00 06 00 00
10 00 C0 00 00 0A 00 02 00 00 05 58 00 00 00 00 00 10 01 C0 00 00 06 00 02 00 00 03 F0 00 00 00 00 00 10 02 C0 00 00 02 00 06 C0 00 C5 70 00 00 40 00 00 10 03 C0 00 00 00 00 42 00 00 07 50 60 00 06 00 00
10 00 C0 00 00 0A 00 02 00 00 05 58 00 00 00 00 00 10 01 C0 00 00 06 00 02 00 00 03 F0 00 00 00 00 00 10 02 C0 00 00 02 00 02 C0 00 C5 70 00 00 40 00 00 10 03 C0 00 00 00 00 42 00 00 07 58 60 00 06 00 00
</code></pre>
<p>Each 68 bytes frame contains 4 sub-frames of 17 bytes starting with:</p>
<pre><code>10 00 C0
10 01 C0
10 02 C0
10 03 C0
</code></pre>
<p>These are command bytes (first bit = 0) while the remaining 14 bytes are LCD data (first bit = 1). This bus is driving the LCD.</p>
<pre><code>2F 34 B1 1E B2 0F 14 A0 94 68 3D 88 88 88 88 60 E3
10 00 C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 10 01 C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 10 02 C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 10 03 C0 FF FF FF FF FF FF FF FF FF FF FF FF FF FF
10 00 C0 FF FF FF DF FF FF FF FF FF FF FF FF FF FF 10 01 C0 FF FF FF F7 FF FF FF FF FF FF FF FF FF FF 10 02 C0 FF FF FF FB FF FF FF FF FF FF FF FF FF FF 10 03 C0 FF FF FF F3 FF FF FF FF FF FF FF FF FF FF
</code></pre>
<p>First line is configuration data for the LCD driver while the two lines with all byte 0xFF are showing all the LCD segments and symbols that we can see for a short moment on the power on screen.</p>
<p>The following sub-frames are showing all symbols of the lowest LCD line, where the actual measured distance is shown including its unit.</p>
<pre><code>10 00 C0 00 00 00 00 00 00 00 FF FF 00 00 00 00 00
10 01 C0 00 00 00 00 00 00 00 FF FF 00 00 00 00 00
10 02 C0 00 00 00 00 00 00 00 FF FF 00 00 00 00 00
10 03 C0 00 00 00 00 00 00 00 FF FF 00 00 00 00 00
</code></pre>
<p>So we can break down the distance look-up process into 2 bytes per sub-frame, 8 bytes in total or 64 bit. The look-up table for each number per digit, sign and unit is available for download below.</p>
<p><a href="https://www.mictronics.de/img/2018/02/LookupTableLcdLastLine.pdf">Lookup Table</a></p>
<p>This Arduino code will simply read out the distance and sends via serial interface.</p>
<script src="https://gist.github.com/Mictronics/6cc804749f014d5f73fc659f158ef01a.js"></script><!--nextpage-->
<figure><img src="https://www.mictronics.de/img/2018/02/DevelopmentSetup.jpg" alt="Bench setup for development." class="img-fluid" /><figcaption>Bench setup for development.</figcaption></figure>
<p>Final code to control and read the SW-A40 laser distance meters.</p>
<script src="https://gist.github.com/Mictronics/0fd2f99e0f2ae3fe89f5c473044f9534.js"></script>
RF Amplifier 27dBm2018-04-30T00:00:00Zhttps://www.mictronics.de/posts/RF-Amplifier-27dBm/<p>Small project for a RF power amplifier using a <a href="https://www.mictronics.de/img/2018/04/TQP369180.pdf">TQP369180</a> and <a href="https://www.mictronics.de/img/2018/04/AH102A.pdf">AH102</a> combination to reach a nominal output power of 27dBm. Frequency range is limited by the AH102 to 350-3000MHz.</p>
<figure><img src="https://www.mictronics.de/img/2018/04/rf_power_amp3.jpg" alt="RF amplifier 27dBm" class="img-fluid" /><figcaption>RF amplifier 27dBm</figcaption></figure>
<p>PCB is designed for Rogers 4003C with 0.508mm thickness.</p>
<figure><img src="https://www.mictronics.de/img/2018/04/rf_power_amp1.jpg" alt="PCB top" class="img-fluid" /><figcaption>PCB top</figcaption></figure>
<p>PCB bottom layer has no components since the board has to fixed flat to a mandatory heat sink.</p>
<figure><img src="https://www.mictronics.de/img/2018/04/rf_power_amp2.jpg" alt="PCB bottom" class="img-fluid" /><figcaption>PCB bottom</figcaption></figure>
<p><a href="https://www.mictronics.de/img/2018/04/Amplifier_Rogers4003C_PCB.T3001">Board Layout</a><br />
<a href="https://www.mictronics.de/img/2018/04/Power-Amplifier-Schematic.pdf">Schematic</a></p>
Laser Distance Meter Hack - Type 22018-07-23T00:00:00Zhttps://www.mictronics.de/posts/Laser-Distance-Meter-Hack2/<p>Here is a second description as follow up of my first post hacking a laser distance meter for Arduino Nano support.</p>
<p>The second device looks identical to the first one from outside. But there is a different board inside. That fits to a report of one blog commenter who is trying to modify his own device as well. In sum we got three devices with three different board layouts so far, apparently looking the same from outside.</p>
<figure><img src="https://www.mictronics.de/img/2018/06/MainBoard2Front.jpg" alt="With space for a wireless add-on board, Bluetooth maybe?" class="img-fluid" /><figcaption>With space for a wireless add-on board, Bluetooth maybe?</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/06/MainBoard2Back.jpg" alt="Board back side." class="img-fluid" /><figcaption>Board back side.</figcaption></figure>
<p>Fortunately for this modification, the LCD's on both devices are equal and exchangeable.</p>
<figure><img src="https://www.mictronics.de/img/2018/06/LcdTypeEqual.jpg" alt="Same part number and exchangeable." class="img-fluid" /><figcaption>Same part number and exchangeable.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/06/LcdConnectorPinout.jpg" alt="LCD connector pinout to pickup signals for Arduino Nano." class="img-fluid" /><figcaption>LCD connector pinout to pickup signals for Arduino Nano.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/06/LcdConnection.jpg" alt="Using the LCD flex PCB for connection to Arduino." class="img-fluid" /><figcaption>Using the LCD flex PCB for connection to Arduino.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/06/ButtonSignals2.jpg" alt="Button signals on test pads." class="img-fluid" /><figcaption>Button signals on test pads.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/06/ButtonSignal2Unit.jpg" alt="Unit button requires extra wiring. Pin32 on the controller." class="img-fluid" /><figcaption>Unit button requires extra wiring. Pin32 on the controller.</figcaption></figure>
<p>Improved Arduino control code:</p>
<script src="https://gist.github.com/Mictronics/be511fde25391e3bbacd5878f44d3b6d.js"></script>
RF Amplifier 27dBm – Results2018-08-23T00:00:00Zhttps://www.mictronics.de/posts/RF-Amplifier-27dBm-Results/<p>Some measurement results for the 27dBm RF amplifier that was descripted in an <a href="https://www.mictronics.de/posts/RF-Amplfier-27dBm/">earlier post</a>. Results are shown for two builds, without and with additional SAW filter.</p>
<figure><img src="https://www.mictronics.de/img/2018/08/27dBm-RF-Amplifier.jpg" alt="27dBm RF Amplifier builds" class="img-fluid" /><figcaption>27dBm RF Amplifier builds</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/08/rf-amp_normalized.png" alt="Frequency range 300MHz - 3GHz. Input -20dBm, normalized to 0dBm, hence coax cables and output attenuator are calibrated out of the measurment loop." class="img-fluid" /><figcaption>Frequency range 300MHz - 3GHz. Input -20dBm, normalized to 0dBm, hence coax cables and output attenuator are calibrated out of the measurment loop.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/08/rf-amp_full_spectrum.png" alt="Gain over frequency range 300MHz - 3GHz." class="img-fluid" /><figcaption>Gain over frequency range 300MHz - 3GHz.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/08/rf-amp_gps_spectrum.png" alt="Second RF amplifier build with 1575MHz GPS SAW filter installed." class="img-fluid" /><figcaption>Second RF amplifier build with 1575MHz GPS SAW filter installed.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/08/rf-amp_gps_bw.png" alt="Gain and 3dB bandwidth @ 1575MHz" class="img-fluid" /><figcaption>Gain and 3dB bandwidth @ 1575MHz</figcaption></figure>
BQ40Z80 Battery pack2018-09-10T00:00:00Zhttps://www.mictronics.de/posts/BQ40Z80-Battery-Pack/<p>This is a battery pack that I built for my Turtle Rover. It's a custom battery pack in a 6S3P configuration of Samsung 18650-35E cells. That's 22.2V/10.2Ah in total. The <a href="http://www.ti.com/product/BQ40Z80">Texas Instruments BQ40Z80</a>, a 2 to 7 series battery pack manager with impedance track gas gauge, takes care of the entire pack. Its protection and balancing features guarantee safe handling of this energy source. The SMBus interface allows readout and indication of all battery lifetime parameters in the Rovers mission control software.</p>
<figure><img src="https://www.mictronics.de/img/2018/09/BQ40Z80_BMS_Battery.jpg" alt="Battery pack management board based on TI BQ40Z80." class="img-fluid" /><figcaption>Battery pack management board based on TI BQ40Z80.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/09/BQ40Z80_BMS_Board.jpg" alt="Battery pack management board based on TI BQ40Z80." class="img-fluid" /><figcaption>Battery pack management board based on TI BQ40Z80.</figcaption></figure>
<p>The BQ40Z80 requires several charge and discharge cycles to learn battery chemistry, internal resistance, capacity etc. Since these cycles are time consuming and several parameters and flags must be monitored, I created a C# software that semi- or fully automates this process with help of a simple relay jig. It's open source and can be found on <a href="https://github.com/Mictronics/bqev23k">Github</a>. However, the software might be obsolete as soon as the BQ40Z80 is fully supported in TI BQStudio software.</p>
<figure><img src="https://www.mictronics.de/img/2018/09/bq40z80_learning_cycle_complete.jpg" alt="Complete BQ40Z80 learning cycle with Mictronics bqev2300 software." class="img-fluid" /><figcaption>Complete BQ40Z80 learning cycle with Mictronics bqev2300 software.</figcaption></figure>
BQ40Z80 Battery Management System2018-10-07T00:00:00Zhttps://www.mictronics.de/posts/BQ40Z80-Battery-Management-System/<p>Printed circuit board for my Turtle Rover battery management system, based on TI BQ40Z80 2 to 7 series battery pack manager with impedance track gas gauge.</p>
<figure><img src="https://www.mictronics.de/img/2018/10/bq40z80_pcb_top.jpg" alt="Q40Z80 PCB Top" class="img-fluid" /><figcaption>Q40Z80 PCB Top</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2018/10/bq40z80_pcb_bottom.jpg" alt="Q40Z80 PCB Bottom" class="img-fluid" /><figcaption>Q40Z80 PCB Bottom</figcaption></figure>
<p>A 4-layer board, where its customized schematic and layout follows as close as possible the reference design of the BQ40Z80EVM-020 evaluation module. Both are available in <a href="http://www.ti.com/lit/pdf/sluubt4">here</a>.</p>
Wordpress is gone2020-04-14T00:00:00Zhttps://www.mictronics.de/posts/Wordpress-Gone/<p>Mictronics site has been changed to move away from Wordpress, which was overkill for the low usage and update rate lately.</p>
<p>Most of the content has been transfered. What is gone and missing will not come back. That stuff was online for more than 10 years<br />
now and is mainly obsolete, no longer in use or whatever.</p>
<p>This website is now running static with the help of <a href="https://www.11ty.dev/">11ty</a> that fit's my needs and is more sufficient for its purpose.<br />
Update rate has slowed down in the last two years and will probably not increase anymore. However, the site and its content will stay online and<br />
I will post some interesting stuff from time to time.</p>
<p>So stay tuned...<br />
/Michael @ Mictronics</p>
moserial extended2020-05-02T00:00:00Zhttps://www.mictronics.de/posts/moserial-extended/<p>I have extended the Linux serial terminal <em>moserial</em> with some functionality that is available in famous Windows tool Bray's Terminal.<br />
Get a copy from my <a href="https://github.com/Mictronics/moserial">Github</a></p>
<figure><img src="https://www.mictronics.de/img/2020/05/moserial.png" alt="moserial extended" class="img-fluid" /><figcaption>moserial extended</figcaption></figure>
Simple can antenna for ADS-B 1090MHz reception2020-05-03T00:00:00Zhttps://www.mictronics.de/posts/ADSB-1090MHz-Can-Antenna/<p>Here is a simple and easy to build antenna for ADS-B reception at 1090MHz:</p>
<figure><img src="https://www.mictronics.de/img/2020/05/L1000044.JPG" alt="Antenna measurement setup. Return loss -28dB @ 1090MHz." class="img-fluid" /><figcaption>Antenna measurement setup. Return loss -28dB @ 1090MHz.</figcaption></figure>
<p>What you need:<br />
1x Aluminium can, length/height 69mm, outer diameter 44mm (mine was a spice can, Knorr/Unilever Aromat, EAN 40387444)<br />
1x Brass pipe, 200mm length, outer diameter 2mm, inner diameter 1mm<br />
1x SMA panel mount socket with front side nut</p>
<p>How to build:</p>
<ul>
<li>Cut the can to 69mm length. (Quarter wave length of 1090MHz)</li>
</ul>
<ul>
<li>Drill a 6mm hole center bottom.</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2020/05/L1000037.JPG" alt="Inside can." class="img-fluid" /><figcaption>Inside can.</figcaption></figure>
<ul>
<li>Solder the brass pipe to SMA socket center pin.</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2020/05/L1000036.JPG" alt="Feed point. Brass pipe soldered to SMA center pin." class="img-fluid" /><figcaption>Feed point. Brass pipe soldered to SMA center pin.</figcaption></figure>
<ul>
<li>Cut the brass pipe length exactly to 194mm (see picture).</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2020/05/L1000035.JPG" alt="Center rod length." class="img-fluid" /><figcaption>Center rod length.</figcaption></figure>
<ul>
<li>Mount SMA socket in previously drilled center hole in can.</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2020/05/L1000040.JPG" alt="SMA center mounted." class="img-fluid" /><figcaption>SMA center mounted.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/L1000041.JPG" alt="Connect your SDR." class="img-fluid" /><figcaption>Connect your SDR.</figcaption></figure>
<ul>
<li>That's all.</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2020/05/L1000039.JPG" alt="Simple can antenna." class="img-fluid" /><figcaption>Simple can antenna.</figcaption></figure>
<p>The antenna has a fairly broad resonance, accepts therefore some mechanical tolerances.</p>
ADS-B Antenna comparison2020-05-11T00:00:00Zhttps://www.mictronics.de/posts/adsb-antenna-comparison/<p>This is a comparison of three ADS-B antennas: a OPA-5 from Embedded Development GmbH, the GNS HULC-M from GNS Electronics and my simple DIY built.</p>
<h4 id="disclaimer">Disclaimer <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#disclaimer">#</a></h4>
<p><strong>This is a pure hobbyist test and comparison of ADS-B hardware that you can buy online.</strong><br />
<strong>I have no relation with Embedded Development GmbH nor GNS Electronics GmbH.</strong></p>
<h5 id="equipment-under-test">Equipment under test <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#equipment-under-test">#</a></h5>
<p>(in that order)</p>
<ul>
<li>Modes-Beast with OPA-5 antenna, see <a href="https://shop.jetvision.de/">Shop Jetvision</a></li>
<li>GNS HULC-M antenna, see <a href="https://www.gns-electronics.de/shop/">Shop GNS Electronics</a></li>
<li>Modes-Beast with <a href="https://www.mictronics.de/posts/ADSB-1090MHz-Can-Antenna/">DIY antenna</a></li>
</ul>
<h5 id="test-location">Test location <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#test-location">#</a></h5>
<p>The <a href="https://en.wikipedia.org/wiki/Ipf_(mountain)">Ipf</a> mountain.<br />
Latitude N48.87131<br />
Longitude E10.35730<br />
Elevation 668m above MSL</p>
<h5 id="test-setup">Test setup <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#test-setup">#</a></h5>
<figure><img src="https://www.mictronics.de/img/2020/05/opa-5-n.jpg" alt="OPA-5 facing north" class="img-fluid" /><figcaption>OPA-5 facing north</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/opa-5-s.jpg" alt="OPA-5 facing south" class="img-fluid" /><figcaption>OPA-5 facing south</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/hulc-n.jpg" alt="GNS HULC facing north" /><figcaption>GNS HULC facing north</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/hulc-e.jpg" alt="GNS HULC facing east" /><figcaption>GNS HULC facing east</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/diy-ne.jpg" alt="DIY antenna facing north east" class="img-fluid" /><figcaption>DIY antenna facing north east</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/diy-w.jpg" alt="DIY antenna facing west" class="img-fluid" /><figcaption>DIY antenna facing west</figcaption></figure>
<h5 id="test-time">Test time <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#test-time">#</a></h5>
<p>Start: 10.05.2020 14:00<br />
End: 10.05.2020 17:00</p>
<p>Each antenna setup was operated for 1 hour.</p>
<ul>
<li>Modes-Beast with OPA-5 antenna: 14:00 to 15:00</li>
<li>GNS HULC antenna: 15:00 to 16:00</li>
<li>Modes-Beast with DIY antenna: 16:00 - 17:00</li>
</ul>
<p><em>Note:</em><br />
<em>Time shown in graphs is not correct due to Raspberry Pi clock being out of sync while running offline.</em></p>
<h5 id="additional-test-hardware">Additional test hardware <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#additional-test-hardware">#</a></h5>
<ul>
<li>Raspberry Pi 3B</li>
<li><a href="https://dietpi.com/">DietPi</a> image based on Raspian buster</li>
<li><a href="https://github.com/Mictronics/readsb-protobuf">readsb v4.0.0</a> ADS-B decoder software</li>
<li>USB Power pack</li>
<li>Monitoring PC connected via Pi's Wifi hotspot.</li>
</ul>
<h6 id="readsb-run-command-line-options">readsb run command line options <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#readsb-run-command-line-options">#</a></h6>
<pre><code>./readsb --device-type modesbeast --beast-serial /dev/ttyUSB0 --max-range 0 --no-modeac-auto --net --lat 48.87131 --lon 10.35730 --no-modeac-auto --rx-location-accuracy 1 --write-output-every 5 --write-output /run/readsb --stats-range --quiet
./readsb --device-type gnshulc --beast-serial /dev/ttyUSB0 --max-range 0 --no-modeac-auto --net --lat 48.87131 --lon 10.35730 --no-modeac-auto --rx-location-accuracy 1 --write-output-every 5 --write-output /run/readsb --stats-range --quiet
</code></pre>
<h5 id="readsb-performance-graphs">readsb performance graphs <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#readsb-performance-graphs">#</a></h5>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-local_trailing_rate.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-aircraft_message_rate.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-aircraft.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-tracks.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-range-metric.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-range-nautical.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-range-statute.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-local_rate.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-signal.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/readsb-cpu.png" alt="OPA-5 left - GNS HULC center - DIY right" class="img-fluid" /><figcaption>OPA-5 left - GNS HULC center - DIY right</figcaption></figure>
<h5 id="readsb-polar-range-graph">readsb polar range graph <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#readsb-polar-range-graph">#</a></h5>
<p><em>Note: These graphs depend on maximum distance of aircraft seen in any 5° sector during runtime.</em></p>
<figure><img src="https://www.mictronics.de/img/2020/05/polar-range-km.png" alt="Range in kilometer" class="img-fluid" /><figcaption>Range in kilometer</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2020/05/polar-range-nm.png" alt="Range in nautical miles" class="img-fluid" /><figcaption>Range in nautical miles</figcaption></figure>
<h5 id="some-thoughts-at-the-end">Some thoughts at the end <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#some-thoughts-at-the-end">#</a></h5>
<p>(in loose order, expressing my personal opinion)</p>
<ul>
<li>Compared to the GNS HULC and my DIY antenna the OPA-5 has a higher gain and therefore a higher effective aperture, hence better performance.</li>
<li>The GNS HULC-M seems to have a smaller dynamic range than Modes-Beast. Looks like an AGC is involved.</li>
<li>The included GPS in GNS HULC is a nice option. Makes it suitable for mobile ADS-B receivers. (readsb v4.0.0 supports frequent position update)</li>
<li>Would be interesting to see a GNS5894T receiver module combined with an OPA-5 antenna. I expect a significant raise in performance (over the HULC).</li>
<li>There is not much difference when comparing the GNS HULC with Modes-Beast + DIY antenna. I'm positive surprised about that DIY antenna performance.</li>
<li>As usual in RF, a good antenna is the most important and first step toward good performance.</li>
<li>If you are willing to invest a fair amount of money then the Modes-Beast + OPA-5 combo gives you the biggest bang for the buck.</li>
</ul>
<h5 id="credits">Credits <a class="direct-link" href="https://www.mictronics.de/posts/adsb-antenna-comparison/#credits">#</a></h5>
<p>Special thanks to <em>Gian Dido</em> for temporary provision of the GNS HULC-M antenna.</p>
ADLAM-Pluto OCXO Modification2021-01-15T00:00:00Zhttps://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/<h4 id="about-ocxo">About OCXO <a class="direct-link" href="https://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/#about-ocxo">#</a></h4>
<p>A crystal oven is a temperature-controlled chamber used to maintain the quartz crystal in electronic crystal oscillators at a constant temperature,<br />
in order to prevent changes in the frequency due to variations in ambient temperature.<br />
An oscillator of this type is known as an oven-controlled crystal oscillator (OCXO, where "XO" is an old abbreviation for "crystal oscillator".)<br />
The oven-controlled oscillator achieves the best frequency stability possible from a crystal. The short term frequency stability of OCXOs is typically<br />
1×10^−12 over a few seconds, while the long term stability is limited to around 1×10^−8 (10 ppb) per year by aging of the crystal.</p>
<p>See <a href="https://en.wikipedia.org/wiki/Crystal_oven">Wikipedia</a> for details.</p>
<h4 id="details">Details <a class="direct-link" href="https://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/#details">#</a></h4>
<p>This modification exchanges the original ADLAM-Pluto crystal oscillator by an temperature-controlled crystal oscillator.</p>
<p>The original oscillator (RXO3225M) is rated with a temperature stability of +-25 ppm.</p>
<p>The replacement temperature-controlled oscillator is rated with +-20 ppb or 0.02 ppm (1 ppb = 1x10^-9).<br />
A Connor-Winfield DOCSC series OCXO is used, type DOCSC022F-040.0M, available from<br />
<a href="https://www.digikey.de/product-detail/de/connor-winfield/DOCSC022F-040-0M/CW884CT-ND/5399028">Digikey</a> order number CW884CT-ND.</p>
<p><a href="http://www.conwin.com/pdfs/AN2093.pdf">AN2093 System Design Information and Printed Circuit Board Layout Guidelines for OCXO Oscillators</a></p>
<p>In addition a 3.3V linear regulator and two capacitors are required. In fact the ADLAM-Pluto doesn't provide 3.3V for the OCXO anywhere on its PCB.<br />
So we have to convert down from 5V USB supply. The linear voltage regulator is a LT1117-3.3 in this modification. But any other will do as long as<br />
it can handle the power/current requirements.</p>
<p><strong>The OCXO requires up to 3W power supply, hence up to 1A @ 3.3V</strong></p>
<p>My measurements on two units showing 680mA drawn from 5V on power up for few seconds when the OCXO initally heats up. Current then drops down to<br />
~170mA depending on enviroment and Pluto internal temperature. The current drawn decreases with raising temperature and vice versa.</p>
<h4 id="preparation">Preparation <a class="direct-link" href="https://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/#preparation">#</a></h4>
<figure><img src="https://www.mictronics.de/img/2021/01/Y3_soldered.jpg" alt="Original crystal oscillator Y3" class="img-fluid" /><figcaption>Original crystal oscillator Y3</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/01/Y3_removed.jpg" alt="The original crystal oscillator Y3 on Pluto PCB must be removed. Warranty will be lost!" class="img-fluid" /><figcaption>The original crystal oscillator Y3 on Pluto PCB must be removed. Warranty will be lost!</figcaption></figure>
<h4 id="modification-v1">Modification v1 <a class="direct-link" href="https://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/#modification-v1">#</a></h4>
<p>Example modification. The LT1117-3.3 requires a small heat sink.</p>
<figure><img src="https://www.mictronics.de/img/2021/01/L1000089.JPG" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2021/01/L1000090.JPG" alt="" class="img-fluid" /></figure>
<figure><img src="https://www.mictronics.de/img/2021/01/L1000092.JPG" alt="" class="img-fluid" /></figure>
<h4 id="modification-v2">Modification v2 <a class="direct-link" href="https://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/#modification-v2">#</a></h4>
<p>A second modification taking into account some recommendations from above linked AN2093.</p>
<ul>
<li>OCXO separated from linear regulator to avoid thermal coupling.</li>
<li>OCXO board mounted on several layers of double-side foam tape to thermal isolate the OCXO from Pluto PCB.</li>
<li>Linear regulator changed for type <a href="https://www.digikey.de/product-detail/de/microchip-technology/MCP1826S-3302E-DB/MCP1826S-3302E-DB-ND/1635997">MCP1826S33</a>, 3.3V/1A with ground on heat sink tap. (important for next point)</li>
<li>3.3V linear regulator soldered to Pluto PCB for better heat dissipation and ground coupling.</li>
<li>ADLAM-Pluto PCB mounted inside a spare enclosure indented for hackRF. <a href="https://www.digikey.de/product-detail/de/hammond-manufacturing/1455J1201BK/HM1719-ND/2359766">Hammond 1455J1201</a></li>
</ul>
<figure><img src="https://www.mictronics.de/img/2021/01/L1000096.JPG" alt="OCXO foam tape isolated, LDO soldered to PCB" class="img-fluid" /><figcaption>OCXO foam tape isolated, LDO soldered to PCB</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/01/L1000100.JPG" alt="ADLAM-Pluto in hackRF enclosure" class="img-fluid" /><figcaption>ADLAM-Pluto in hackRF enclosure</figcaption></figure>
<h4 id="schematic">Schematic <a class="direct-link" href="https://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/#schematic">#</a></h4>
<p>See <a href="https://www.mictronics.de/img/2021/01/pluto_ocxo_mod_schematic.pdf">pluto_ocxo_mod_schematic.pdf</a> for details.</p>
<p><strong>Only valid for LT1117-3.3 regulator!</strong> The MCP1826S33 has a different pinout. See datasheet.</p>
<h4 id="calibration">Calibration <a class="direct-link" href="https://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/#calibration">#</a></h4>
<p>Each ADLAM-Pluto unit is factory calibrated for the installed crystal oscillator. However, this calibration is usually way off for the new OCXO and<br />
has to reverted.</p>
<p>Calibration is done by setting the <code>xo_correction</code> environment variable in Pluto bootloader. See last command on this page<br />
<a href="https://wiki.analog.com/university/tools/pluto/devs/booting#examples">https://wiki.analog.com/university/tools/pluto/devs/booting#examples</a></p>
<p>Step by step:</p>
<ol>
<li>Connect to Pluto by ssh: <code>ssh -l root 192.168.2.1</code> use password <code>analog</code></li>
<li>Set enviroment variable: <code>fw_setenv xo_correction 40000000</code></li>
<li><code>reboot</code> or cycle Pluto power.</li>
</ol>
<p>All environment variables can be printed with <code>fw_printenv</code>.</p>
<p>Alternative way:</p>
<p>Open config.txt in Pluto's USB mass storage device. Edit or add <code>xo_correction</code> in system section if not exists. Then eject the device.</p>
<pre><code>[SYSTEM]
xo_correction = 40000000
</code></pre>
<p>In case you have a precise measurement tool, for example a spectrum analyzer, then you can calibrate your Pluto at the desired operating<br />
frequency and fine tune the value for xo_correction. In that case, wait at least 30min, keep the Pluto powered on during that time, to heat up<br />
and temperature stabilize the entire unit.</p>
<p><strong>Note</strong></p>
<p>Keep in mind that any OCXO minimal offset increases with Pluto TX frequency due to internal multiplication.<br />
For example, changing the calibration value <code>xo_correction</code> by 1Hz will change the offset by 25Hz @ 1GHz TX frequency. (1GHz / 40MHz = factor 25)</p>
<h4 id="maximum-cpu-activation">Maximum CPU activation <a class="direct-link" href="https://www.mictronics.de/posts/ADLAM-Pluto-OCXO-Mod/#maximum-cpu-activation">#</a></h4>
<p>The Pluto has a dual core cpu but only a license for one core, this command will activate both cpu cores while ssh access is active:</p>
<p><code>fw_setenv maxcpus</code></p>
DAB/DAB+ Radio broadcast - DIY2021-07-25T00:00:00Zhttps://www.mictronics.de/posts/DAB-Box/<p>How to broadcast DAB/DAB+ digital radio via LimeSDR and Raspberry Pi. A nice project for my new LimeSDR Mini. I followed basically the tutorial <a href="https://medium.com/@sundayglee/digital-radio-transmission-using-limesdr-and-odr-part-1-b1bcb274d23c">Digital Radio Broadcasting Using LimeSDR and ODR Tools</a> written Godfrey L. Some fine tuning was necessary during installation and configuration of ODR tools.</p>
<p>Please read the above linked tutorial before you start as it provides some fundamentals and additional insides on DAB/DAB+ not covered here.</p>
<p>The ODR tools configuration has been improved for running the tool chain with EDI connection (instead of ZeroMQ) and includes the ODR padding encoder with DLS text and slides transmission. The full running image is available for <a href="https://www.mictronics.de/posts/DAB-Box/#download">download</a> below and was tested on Raspberry Pi 3 and 4 running <a href="https://dietpi.com/">dietpi</a> Debian Buster.</p>
<figure><img src="https://www.mictronics.de/dabbox/terminal.png" alt="ODR tool chain broadcasting the DAB stream" class="img-fluid" /><figcaption>ODR tool chain broadcasting the DAB stream</figcaption></figure>
<p><a href="https://www.welle.io/">welle.io</a> with simple RTL-SDR on a Windows environment was used for test reception.</p>
<figure><img src="https://www.mictronics.de/dabbox/welleio.png" alt="welle.io receiving on a Windows environment" class="img-fluid" /><figcaption>welle.io receiving on a Windows environment</figcaption></figure>
<p>The SD card image and example configuration stream famous <a href="https://lynxradionetwork.com/">CRIK FM - The Lynx</a> via DAB. The Raspberry Pi needs an internet connection for that.</p>
<h4 id="build-odr-tool-chain">Build ODR tool chain <a class="direct-link" href="https://www.mictronics.de/posts/DAB-Box/#build-odr-tool-chain">#</a></h4>
<pre><code>#
# Build on Raspberry Pi OS armv6 32-bit
#
# ODR-audioenc fails with SEGFAULT in libasound.so when build on Raspberry Pi OS armv8 64-bit
#
cd /home/dietpi/
mkdir DAB
cd DAB
# Build dependencies
sudo apt-get -y --no-install-recommends --no-install-suggests install build-essential git wget automake cmake
sudo apt-get -y --no-install-recommends --no-install-suggests install libtool libzmq3-dev libzmq5 libcurl4-openssl-dev
sudo apt-get -y --no-install-recommends --no-install-suggests install alsa-tools alsa-utils libasound2 libasound2-dev libjack-jackd2-dev jackd2
sudo apt-get -y --no-install-recommends --no-install-suggests install libvlc-dev vlc-data vlc-plugin-base
sudo apt-get -y --no-install-recommends --no-install-suggests install libboost-all-dev
# ODR-mmbTools
git clone https://github.com/Opendigitalradio/fdk-aac.git
cd fdk-aac
git checkout dabplus
./bootstrap
./configure
make -j4
sudo make install
sudo ldconfig
git checkout dabplus2
./bootstrap
./configure
make
sudo make install
sudo ldconfig
cd ~/DAB
git clone https://github.com/Opendigitalradio/ODR-AudioEnc.git
cd ODR-AudioEnc
git checkout next
./bootstrap
./configure --enable-alsa --enable-jack --enable-vlc
make -j4
sudo make install
sudo ldconfig
cd ~/DAB
git clone https://github.com/Opendigitalradio/ODR-DabMux.git
cd ODR-DabMux
git checkout next
./bootstrap.sh
# On Raspberry Pi OS armv6:
./configure --with-boost-libdir=/lib/arm-linux-gnueabihf/
# On Raspberry Pi OS armv8
./configure
make
sudo make install
sudo ldconfig
# HackRF support (optional)
cd ~/DAB
sudo apt-get install libusb-1.0-0-dev libfftw3-dev
git clone https://github.com/mossmann/hackrf.git
cd hackrf/host
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
# SoapySDR
cd ~/DAB
sudo apt-get -y install libpython-dev python-numpy swig
git clone https://github.com/pothosware/SoapySDR.git
cd SoapySDR
mkdir build
cd build
cmake ..
make -j4
sudo make install
sudo ldconfig
# SoapySDR HackRF support (optional)
cd ~/DAB
git clone https://github.com/pothosware/SoapyHackRF.git
cd SoapyHackRF
mkdir build
cd build
cmake ..
make
sudo make install
# SoapySDR LimeSDR support
cd ~/DAB
sudo apt-get install libsqlite3-dev libi2c-dev
git clone https://github.com/myriadrf/LimeSuite.git
cd LimeSuite
git checkout master
mkdir builddir
cd builddir
cmake ../
make -j4
sudo make install
sudo make config
cd ..
cd udev-rules
sudo ./install.sh
# ODR-DABMOD
cd ~/DAB
git clone https://github.com/Opendigitalradio/ODR-DabMod.git
cd ODR-DabMod
git checkout next
./bootstrap.sh
# On Raspberry Pi OS armv6
./configure --disable-output-uhd --enable-limesdr --with-boost-libdir=/lib/arm-linux-gnueabihf/
# On Raspberry Pi OS armv8
./configure --disable-output-uhd --enable-limesdr
make
sudo make install
sudo ldconfig
# ODR-PADENC
cd ~/DAB
git clone https://github.com/Opendigitalradio/ODR-PadEnc.git
cd ODR-PadEnc
git checkout next
./bootstrap
./configure
make
sudo make install
sudo ldconfig
# Configuration
cd ~/DAB/configs
</code></pre>
<h4 id="configuration">Configuration <a class="direct-link" href="https://www.mictronics.de/posts/DAB-Box/#configuration">#</a></h4>
<h6 id="odr-dabmux">odr-dabmux <a class="direct-link" href="https://www.mictronics.de/posts/DAB-Box/#odr-dabmux">#</a></h6>
<p>DAB service names and labels can be changed in <code>~/DAB/configs/dabmux.mux</code>. See <a href="https://wiki.opendigitalradio.org/ODR-DabMux">ODR-DabMux wiki</a> and <a href="https://github.com/Opendigitalradio/ODR-DabMux">Github</a> for details.</p>
<pre><code>general {
dabmode 1
nbframes 0
tist true
tist_offset 0
}
remotecontrol { telnetport 0 }
ensemble {
id 0x4fff
ecc 0xec
local-time-offset auto
international-table 1
label "DAB+ Radio Test"
shortlabel "DAB+Test"
}
services {
srv-p1 {
label "CRIK FM-The Lynx"
shortlabel "The Lynx"
pty_sd static
pty 27
}
}
subchannels {
sub-p1 {
; MPEG
type dabplus
bitrate 64
id 1
protection 3
inputuri "tcp://*:9001"
inputproto edi
buffer-management prebuffering
buffer 40
prebuffering 20
}
}
components {
comp-p1 {
service srv-p1
subchannel sub-p1
}
}
outputs {
edi {
destinations {
output_tcp {
protocol tcp
listenport 9201
}
}
enable_pft false
fec 0
}
throttle "simul://"
}
</code></pre>
<h6 id="odr-dabmod">odr-dabmod <a class="direct-link" href="https://www.mictronics.de/posts/DAB-Box/#odr-dabmod">#</a></h6>
<p>Configuration for the DAB modulator is stored in file <code>~/DAB/configs/dabmod.ini</code>. See <a href="https://wiki.opendigitalradio.org/ODR-DabMod">ODR-DabMod wiki</a> and <a href="https://github.com/Opendigitalradio/ODR-DabMod">Github</a> for details.</p>
<p>The DAB channel, hence the transmission frequency can be changed by modifying <code>channel=5C</code> in <code>~/DAB/configs/dabmod.ini</code>.</p>
<pre><code>[remotecontrol]
telnet=0
telnetport=2121
zmqctrl=0
zmqctrlendpoint=tcp://127.0.0.1:9400
[log]
syslog=0
filelog=0
filename=odr-dabmod.log
[input]
transport=edi
source=tcp://localhost:9201
edi_max_delay=240
[modulator]
gainmode=var
digital_gain=0.8
rate=2048000
[cfr]
enable=0
clip=50.0
error_clip=0.1
[firfilter]
; Disable on Raspberry Pi 3, CPU overload
; Use hardware FIR in LimeSDR below
enabled=0
[poly]
enabled=0
polycoeffile=polyCoefs
[output]
;output=soapysdr
output=limesdr
[soapyoutput]
device=
master_clock_rate=32768000
txgain=90
channel=5C
[delaymanagement]
synchronous=0
mutenotimestamps=0
offset=0.002
[limeoutput]
; Lime output directly runs against the LMS device driver. It does not support SFN nor predistortion.
device=
master_clock_rate= 32768000
; txgain range: 0 .. 100
txgain=90
tx_antenna=BAND1
channel=5C
; The LimeSDR contains a FIR filter in FPGA that can be used to filter the IQ signal.
; This is useful because it allows us to upsample in a very cheap way in software instead
; of using the FFT-based resampler.
upsample=1
[tii]
enable=0
comb=1
pattern=11
old_variant=0
</code></pre>
<h6 id="odr-padenc">odr-padenc <a class="direct-link" href="https://www.mictronics.de/posts/DAB-Box/#odr-padenc">#</a></h6>
<p>The DLS text for padding encoder is stored in file <code>~/DAB/configs/dls.txt</code>. Change and add lines as desired. All images, logo etc. shall be stored in <code>~/DAB/configs/slide</code>. Accepted format is JPEG or PNG with a recommended size of 320x240 pixel. Images are send in raw format. See <a href="https://wiki.opendigitalradio.org/ODR-PadEnc">ODR-PadEnc wiki</a> and <a href="https://github.com/Opendigitalradio/ODR-PadEnc">Github</a> for details.</p>
<h6 id="odr-audioenc">odr-audioenc <a class="direct-link" href="https://www.mictronics.de/posts/DAB-Box/#odr-audioenc">#</a></h6>
<p>The <code>-v "http://fusion.shoutca.st:8086"</code> option defines the audio stream source. Modify to stream something else than CRIK FM.</p>
<p>Changing the audio bitrate requires modification of <code>-b 64</code> option and in addition the bitrate of the sub-channel in <code>~/DAB/configs/dabmux.mux</code> needs to be modified for an equal value.</p>
<h4 id="run">Run <a class="direct-link" href="https://www.mictronics.de/posts/DAB-Box/#run">#</a></h4>
<p>Open 4 terminals to run the ODR tool chain in the following order:</p>
<pre><code>1. dietpi@dabbox:~/DAB/configs $ sudo odr-dabmux dabmux.mux
2. dietpi@dabbox:~/DAB/configs $ odr-padenc -R -o thelynx -t dls.txt -d ./slides
3. dietpi@dabbox:~/DAB/configs $ odr-audioenc -v "http://fusion.shoutca.st:8086" -r 48000 -c 2 -e "tcp://localhost:9001" -l -b 64 -p 128 -P thelynx
4. dietpi@dabbox:~/DAB/configs $ sudo odr-dabmod -C dabmod.ini
</code></pre>
<h4 id="download">Download <a class="direct-link" href="https://www.mictronics.de/posts/DAB-Box/#download">#</a></h4>
<p>A full running image is available for download and includes all the installations described above. Runs on Raspberry Pi 3 and 4 and requires a LimeSDR (Mini) for DAB/DAB+ streaming.</p>
<p>=> <a href="https://www.mictronics.de/dabbox/dabbox_rpi-armv6-buster.7z">Click to download image</a> <=</p>
<p>Based on DietPi v7.3.2, Debian Buster armv6 32-bit</p>
<p>root user credentials:<br />
username = <strong>root</strong><br />
password = <strong>dietpi</strong></p>
<p>non-root user credentials:<br />
username = <strong>dietpi</strong><br />
password = <strong>dietpi</strong></p>
<p>All installation repositories are saved in <code>~/DAB</code>.</p>
Pillbox antenna for ADS-B 1090MHz reception2021-10-02T00:00:00Zhttps://www.mictronics.de/posts/ADSB-1090MHz-Pillbox-Antenna/<p>Pillbox antenna for ADS-B reception at 1090MHz, started as proof of concept design, gone through 3D modeling and optimization and final measurements on a prototype built.</p>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Built.jpg" alt="Final prototype" class="img-fluid" /><figcaption>Final prototype</figcaption></figure>
<h2 id="theory">Theory <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-1090MHz-Pillbox-Antenna/#theory">#</a></h2>
<p>Concept and initial design in Antenna Magus (where it's called a probe-fed cheese antenna)</p>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Design.png" alt="Concept in Antenna Magus" class="img-fluid" /><figcaption>Concept in Antenna Magus</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Gain.png" alt="Total gain in Antenna Magus" class="img-fluid" /><figcaption>Total gain in Antenna Magus</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Gain_3D.png" alt="Total gain pattern in Antenna Magus" class="img-fluid" /><figcaption>Total gain pattern in Antenna Magus</figcaption></figure>
<p>Simulation in CST</p>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Simulation_CST.png" alt="3D model and simulation in CST" class="img-fluid" /><figcaption>3D model and simulation in CST</figcaption></figure>
<h2 id="reality">Reality <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-1090MHz-Pillbox-Antenna/#reality">#</a></h2>
<p>Final build dimensions</p>
<ul>
<li>Diameter Dr: 550 mm</li>
<li>Height Hr: 100 mm</li>
<li>Focal depth F: 115 mm</li>
<li>Spacing wire probes Swp: 30 mm</li>
<li>Length feeder probe Lwp: 60 mm</li>
<li>Length reflector Lwr: 100 mm</li>
<li>Wire diameter probes Dw: 3 mm</li>
<li>Sheet metal: calvanized steel, thickness 0.2 mm</li>
<li>Feed probe and reflector: 3mm brass tube</li>
<li>Feed socked: N type flange mount</li>
</ul>
<p><a href="https://www.mictronics.de/img/2021/10/Pillbox_1090_Drawing.PDF">Download drawing</a> for top and bottom sheet.</p>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Bend.jpg" alt="Cut along the dashed line in drawing. Bend along the solid line." class="img-fluid" /><figcaption>Cut along the dashed line in drawing. Bend along the solid line.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Solder.jpg" alt="Soldered from inside. The 100 mm wide reflector sheet goes along the solid line." class="img-fluid" /><figcaption>Soldered from inside. The 100 mm wide reflector sheet goes along the solid line.</figcaption></figure>
<p>See drawing for reference.</p>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Feed_1.jpg" alt="Feed point outside. Reflector probe is soldered on top and bottom sheet." class="img-fluid" /><figcaption>Feed point outside. Reflector probe is soldered on top and bottom sheet.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Feed_2.jpg" alt="Feed point inside." class="img-fluid" /><figcaption>Feed point inside.</figcaption></figure>
<h5 id="impedance-measurement-results">Impedance measurement results <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-1090MHz-Pillbox-Antenna/#impedance-measurement-results">#</a></h5>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Reflection.png" alt="Reflection -23.13 dB @ 1090 MHz" class="img-fluid" /><figcaption>Reflection -23.13 dB @ 1090 MHz</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_VSWR.png" alt="VSWR 1.15 @ 1090 MHz" class="img-fluid" /><figcaption>VSWR 1.15 @ 1090 MHz</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Smithchart.png" alt="Smith chart 48.3 Ohm @ 1090 MHz" class="img-fluid" /><figcaption>Smith chart 48.3 Ohm @ 1090 MHz</figcaption></figure>
<h5 id="gain-measurement-results-at-1090-mhz">Gain measurement results at 1090 MHz <a class="direct-link" href="https://www.mictronics.de/posts/ADSB-1090MHz-Pillbox-Antenna/#gain-measurement-results-at-1090-mhz">#</a></h5>
<p>The directivity gain has been measured using the <a href="http://www.measurementest.com/2010/09/how-to-measure-antenna-gain-part-1-gain_08.html">gain transfer method</a>.</p>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Horizontal.png" alt="Horizontal pattern" class="img-fluid" /><figcaption>Horizontal pattern</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_Vertical.png" alt="Vertical" class="img-fluid" /><figcaption>Vertical</figcaption></figure>
<ul>
<li>Maximum directivity gain 7.93 dBi at azimuth 0° and elevation 0°</li>
<li>Main 3 dB horizontal beam width (elevation 0°): ~27°</li>
<li>Side lobe 3 dB horizontal beam width (elevation 0°): ~99°</li>
<li>Main 3 dB vertical beam width (azimuth 0°): ~128°</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_setup_1.JPG" alt="Gain measurement setup" class="img-fluid" /><figcaption>Gain measurement setup</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_setup_2.JPG" alt="Gain measurement setup" class="img-fluid" /><figcaption>Gain measurement setup</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2021/10/Pillbox_1090_setup_3.JPG" alt="Gain measurement setup" class="img-fluid" /><figcaption>Gain measurement setup</figcaption></figure>
<p>Test setup:</p>
<ul>
<li>Test antenna: <a href="http://old.ainfoinc.com/en/p_ant_h_o.asp">AINFO Octave Horn Antenna LB-OH-650-15-C-NF</a> 1.0-2.0 GHz</li>
<li>Reference antenna: <a href="http://www.schwarzbeck.de/Datenblatt/KRS0460.pdf">Schwarzbeck RS-0460</a>, 0.53 dBi @ 1090 MHz</li>
<li>Test receiver with tracking generator: R&S ESRP7, RF output power 0 dBm</li>
<li>Distance test antennas: 10 m (far field conditions)</li>
<li>Azimuth test range: -110° to 110° @ elevation 0°</li>
<li>Elevation test range: -90° to 90° @ azimuth 0°</li>
</ul>
Readsb statistics in Home Assistant2022-01-23T00:00:00Zhttps://www.mictronics.de/posts/readsb-mqtt-statistics/<p>Readsb statistics can be integrated in <a href="https://www.home-assistant.io/">Home Assistant</a> via <a href="https://www.home-assistant.io/docs/mqtt/">MQTT</a> protocol.</p>
<figure><img src="https://www.mictronics.de/img/2022/01/readsb-mqtt-statistic-hass.png" alt="Example Lovelace dashboard in Home Assistant" class="img-fluid" /><figcaption>Example Lovelace dashboard in Home Assistant</figcaption></figure>
<p>The readsb MQTT client is available in Python3 and C programming language, easy extendable for statistic parameters no yet included. The <a href="https://github.com/Mictronics/readsb-protobuf">readsb protocol-buffer</a> statistic file format is supported as well the JSON format for the <a href="https://github.com/wiedehopf/readsb">ADS-B Exchange version of readsb</a>.</p>
<h2 id="source-code">Source code <a class="direct-link" href="https://www.mictronics.de/posts/readsb-mqtt-statistics/#source-code">#</a></h2>
<p><a href="https://github.com/Mictronics/readsbmqtt">C source code for readsb protocol-buffer format</a></p>
<p><a href="https://gist.github.com/Mictronics/ae9163f480f2b285ee2dd27f4ef6f257">Python3 source code for readsb protocol-buffer and JSON format</a></p>
<p><a href="https://gist.github.com/Mictronics/7dc0c703b721b897d1002943e9aea054">Python3 source code for JSON format only</a></p>
<p>The source code demonstrates how to talk to Home Assistant via MQTT broker, including entity auto discovery.</p>
Baikal server on iRedmail installation with Nginx2023-05-15T00:00:00Zhttps://www.mictronics.de/posts/baikal-iredmail/<p>I was fiddling two days getting the Baikal DAV server running on a fresh iRedmail installation using the Nginx webserver. Finally, solved the Nginx configuration issues and got it working. Here is a step by step howto.</p>
<p>Prerequisit: iRedmail installed and configured on a fresh system. I used Ubuntu Server 22.04 LTS full installation, not minimized.</p>
<p>Baikal installation:</p>
<ol>
<li>Download Baikal from <a href="https://sabre.io/baikal/">https://sabre.io/baikal/</a></li>
<li>Upload to iRedmail server and unpack into <code>/opt/www/dav</code></li>
<li>Make database and config writable for webserver user <code>sudo chown -R www-data:www-data /opt/www/dav/Specific</code> and <code>sudo chown -R www-data:www-data /opt/www/dav/config</code></li>
<li>Create Baikal configuration template for nginx <code>sudo nano /etc/nginx/templates/baikal.tmpl</code>. Add content:</li>
</ol>
<pre><code>#
# Running Baikal as a subfolder on an existing virtual host
#
# Block access to default directories and files under these directories
location ~ ^/dav/(\.ht|Core|Specific|config)($|.*) {
deny all;
return 404;
}
# Block access to default files under top-directory and files start with same name.
location ~ ^/dav/(CHANGELOG|INSTALL|LICENSE|README|UPGRADING)($|.*) {
deny all;
return 404;
}
location ~ ^/dav/(.*) {
root /opt/www;
index index.php;
rewrite ^/dav/.well-known/caldav /dav/dav.php redirect;
rewrite ^/dav/.well-known/carddav /dav/dav.php redirect;
rewrite ^/caldav /dav/dav.php redirect;
rewrite ^/carddav /dav/dav.php redirect;
location ~ ^(.+\.php)(.*)$ {
alias /opt/www;
include /etc/nginx/templates/hsts.tmpl;
include /etc/nginx/templates/fastcgi_php.tmpl;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
</code></pre>
<ol start="5">
<li>Modify available sites configuration <code>sudo nano /etc/nginx/sites-available/00-default-ssl.conf</code>.</li>
</ol>
<pre><code> include /etc/nginx/templates/netdata.tmpl;
include /etc/nginx/templates/baikal.tmpl; <-- Add template
include /etc/nginx/templates/php-catchall.tmpl;
</code></pre>
<ol start="6">
<li>Restart nginx webserver <code>sudo service nginx restart</code></li>
<li>Modify Baikal configuration with correct URI <code>sudo nano /opt/www/dav/config/baikal.yaml</code>. Change base_uri to <code>base_uri: '/dav/html'</code></li>
<li>Access the Baikal installer by browsing to <code>https://yourserver.example.org/dav/html/</code></li>
</ol>
<p>The DAV client URL looks like this <code>https://yourserver.example.org/dav/html/dav.php</code></p>
dbhub.io development setup2023-08-16T00:00:00Zhttps://www.mictronics.de/posts/dbhub-io/<p>Here is how to setup a development environment for <a href="http://dbhub.io/">dbhub.io</a>.</p>
<p><a href="https://github.com/sqlitebrowser/dbhub.io">dbhub.io project on Github</a></p>
<p>First I tried Docker which was a PITA this time, see <a href="https://github.com/sqlitebrowser/dbhub.io/issues/211">issue 211</a>, but ended up with a manual installation on a fresh <a href="https://www.alpinelinux.org/">Alpine Linux</a> <a href="https://dl-cdn.alpinelinux.org/alpine/edge/releases/x86_64/alpine-extended-3.8.0-x86_64.iso">image</a>, based von 3.18 edge.</p>
<p>Built and tested with <a href="https://github.com/sqlitebrowser/dbhub.io">dbhub.io</a> master branch up to commit 5c9e1ab.</p>
<p>Following steps in order to run on the root shell. (initial ALpine Linux login is <code>root</code> without password)</p>
<p>Setting up Alpine Linux and installing packages:</p>
<pre class="language-bash"><code class="language-bash"><span class="token comment">### Used ISO: alpine-extended-3.8.0-x86_64.iso</span><br /><span class="token comment">### https://dl-cdn.alpinelinux.org/alpine/edge/releases/x86_64/alpine-extended-3.8.0-x86_64.iso</span><br />setup-alpine<br />setup-apkrepos<br />apk <span class="token parameter variable">-U</span> upgrade<br />apk <span class="token function">add</span> <span class="token function">nano</span><br /><span class="token function">nano</span> /etc/apk/repositories<br /><span class="token comment">### Uncomment community. Mirrors depending on what you choose in setup-apkrepos</span><br />https://ftp.halifax.rwth-aachen.de/alpine/edge/main<br />http://ftp.halifax.rwth-aachen.de/alpine/edge/main<br />http://ftp.halifax.rwth-aachen.de/alpine/edge/community<br /><span class="token comment">###</span><br />apk update<br />apk <span class="token function">add</span> ca-certificates <span class="token function">curl</span> <span class="token function">file</span> <span class="token function">git</span> go libc-dev <span class="token function">make</span> memcached minio openrc openssl openssl-dev postgresql <span class="token function">yarn</span><br />apk <span class="token function">add</span> rabbitmq-server <span class="token parameter variable">--repository</span> http://dl-cdn.alpinelinux.org/alpine/edge/testing</code></pre>
<p>Add base services to default run level:</p>
<pre class="language-bash"><code class="language-bash">rc-update <span class="token function">add</span> memcached default<br />rc-update <span class="token function">add</span> minio default<br />rc-update <span class="token function">add</span> postgresql default<br />rc-update <span class="token function">add</span> rabbitmq-server default<br /><span class="token function">mkdir</span> /etc/rabbitmq<br />rabbitmq-plugins <span class="token builtin class-name">enable</span> rabbitmq_management<br />rabbitmq-plugins <span class="token builtin class-name">enable</span> rabbitmq_top</code></pre>
<p>Add dbhub user, create required folders and set permissions:</p>
<pre class="language-bash"><code class="language-bash">addgroup dbhub<br />adduser <span class="token parameter variable">-D</span> <span class="token parameter variable">-S</span> <span class="token parameter variable">-s</span> /bin/ash <span class="token parameter variable">-G</span> dbhub dbhub<br /><span class="token function">mkdir</span> <span class="token parameter variable">-p</span> /var/log/dbhub /home/dbhub/.dbhub/disk_cache<br /><span class="token function">chown</span> <span class="token parameter variable">-R</span> dbhub:dbhub <span class="token parameter variable">-p</span> /var/log/dbhub /home/dbhub/.dbhub/disk_cache<br /><span class="token function">chown</span> <span class="token parameter variable">-R</span> dbhub:dbhub /var/log/dbhub /home/dbhub/.dbhub/disk_cache<br /><span class="token function">chmod</span> <span class="token parameter variable">-R</span> <span class="token number">700</span> /var/log/dbhub /home/dbhub/.dbhub/disk_cache</code></pre>
<p>Edit minio service config and change password if desired: (optional)</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">nano</span> /etc/conf.d/minio<br /><span class="token comment">### Set minio password</span><br /><span class="token assign-left variable">MINIO_ROOT_USER</span><span class="token operator">=</span><span class="token string">"minio"</span><br /><span class="token assign-left variable">MINIO_ROOT_PASSWORD</span><span class="token operator">=</span><span class="token string">"minio123"</span><br /><span class="token comment">###</span></code></pre>
<p>Initialize postgresql and rabbitmq servers:<br />
<code>SomeDefaultRandomString01</code> can be changed as desired, has a minimum length tough.</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">su</span> - postgres <span class="token parameter variable">-c</span> <span class="token string">'mkdir -p /var/lib/postgresql/15/data'</span><br /><span class="token function">su</span> - postgres <span class="token parameter variable">-c</span> <span class="token string">'chmod 0700 /var/lib/postgresql/15/data'</span><br /><span class="token function">su</span> - postgres <span class="token parameter variable">-c</span> <span class="token string">'initdb -D /var/lib/postgresql/15/data'</span><br /><span class="token function">su</span> - postgres <span class="token parameter variable">-c</span> <span class="token string">'mkdir /run/postresql'</span><br /><span class="token function">mkdir</span> /run/postgresql<br /><span class="token function">chown</span> postgres:postgres /run/postgresql<br /><span class="token function">su</span> - postgres <span class="token parameter variable">-c</span> <span class="token string">'pg_ctl start -D /var/lib/postgresql/15/data'</span><br /><span class="token function">mkdir</span> <span class="token parameter variable">-p</span> /var/log/postgresql<br /><span class="token function">chown</span> <span class="token parameter variable">-R</span> postgres:postgres /var/log/postgresql<br /><span class="token builtin class-name">echo</span> <span class="token string">'SomeDefaultRandomString01'</span> <span class="token operator">></span> /var/lib/rabbitmq/.erlang.cookie<br /><span class="token function">chmod</span> <span class="token number">400</span> /var/lib/rabbitmq/.erlang.cookie<br /><span class="token function">chown</span> <span class="token parameter variable">-R</span> rabbitmq:rabbitmq /var/lib/rabbitmq/<br /><span class="token function">chown</span> <span class="token parameter variable">-R</span> rabbitmq:rabbitmq /var/log/rabbitmq/<br /><span class="token function">chown</span> <span class="token parameter variable">-R</span> minio:minio /var/lib/minio/<br />createuser <span class="token parameter variable">-U</span> postgres <span class="token parameter variable">-d</span> dbhub<br />createdb <span class="token parameter variable">-U</span> postgres <span class="token parameter variable">-O</span> dbhub dbhub</code></pre>
<p>Add required variables to system environment:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">nano</span> /etc/profile<br /><span class="token comment">### Add env variables</span><br /><span class="token builtin class-name">export</span> <span class="token assign-left variable">DBHUB_SOURCE</span><span class="token operator">=</span>/dbhub.io<br /><span class="token builtin class-name">export</span> <span class="token assign-left variable">GOBIN</span><span class="token operator">=</span>/usr/local/bin<br /><span class="token builtin class-name">export</span> <span class="token assign-left variable">CONFIG_FILE</span><span class="token operator">=</span>/home/dbhub/.dbhub/config.toml<br /><span class="token comment">###</span></code></pre>
<p>Create sqlite build script, set executable and run:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">nano</span> build_sqlite.sh<br /><span class="token comment">### Add</span><br /><span class="token builtin class-name">echo</span> <span class="token string">"Downloading SQLite source code"</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token function">mkdir</span> /sqlite <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token builtin class-name">cd</span> /sqlite <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token assign-left variable">TARBALL</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token function">curl</span> <span class="token parameter variable">-s</span> https://sqlite.org/download.html <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'/<!--/,/-->/ {print}'</span> <span class="token operator">|</span> <span class="token function">grep</span> <span class="token string">'sqlite-autoconf'</span> <span class="token operator">|</span> <span class="token function">cut</span> <span class="token parameter variable">-d</span> <span class="token string">','</span> <span class="token parameter variable">-f</span> <span class="token number">3</span><span class="token variable">)</span></span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token assign-left variable">SHA3</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token function">curl</span> <span class="token parameter variable">-s</span> https://sqlite.org/download.html <span class="token operator">|</span> <span class="token function">awk</span> <span class="token string">'/<!--/,/-->/ {print}'</span> <span class="token operator">|</span> <span class="token function">grep</span> <span class="token string">'sqlite-autoconf'</span> <span class="token operator">|</span> <span class="token function">cut</span> <span class="token parameter variable">-d</span> <span class="token string">','</span> <span class="token parameter variable">-f</span> <span class="token number">5</span><span class="token variable">)</span></span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token function">curl</span> <span class="token parameter variable">-LsS</span> <span class="token parameter variable">-o</span> sqlite.tar.gz https://sqlite.org/<span class="token variable">${TARBALL}</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token assign-left variable">VERIFY</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span>openssl dgst -sha3-256 sqlite.tar.gz <span class="token operator">|</span> <span class="token function">cut</span> <span class="token parameter variable">-d</span> <span class="token string">' '</span> <span class="token parameter variable">-f</span> <span class="token number">2</span><span class="token variable">)</span></span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token string">"<span class="token variable">$SHA3</span>"</span> <span class="token operator">!=</span> <span class="token string">"<span class="token variable">$VERIFY</span>"</span> <span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span> <span class="token builtin class-name">exit</span> <span class="token number">1</span> <span class="token punctuation">;</span> <span class="token keyword">fi</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token operator">!</span> <span class="token parameter variable">-f</span> sqlite.tar.gz <span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span> <span class="token builtin class-name">echo</span> <span class="token string">"Downloading the SQLite source code did not work"</span> <span class="token punctuation">;</span> <span class="token builtin class-name">exit</span> <span class="token number">3</span> <span class="token punctuation">;</span> <span class="token keyword">fi</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token builtin class-name">echo</span> <span class="token string">"Compiling local SQLite"</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token function">tar</span> xfz sqlite.tar.gz <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token builtin class-name">cd</span> sqlite-autoconf-* <span class="token operator">||</span> <span class="token builtin class-name">exit</span> <span class="token number">4</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token assign-left variable">CPPFLAGS</span><span class="token operator">=</span><span class="token string">"-DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_MAX_VARIABLE_NUMBER=250000 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_STAT4=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_MAX_ATTACHED=125 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_ENABLE_SNAPSHOT=1"</span> ./configure <span class="token parameter variable">--prefix</span><span class="token operator">=</span>/sqlite --enable-dynamic-extensions<span class="token operator">=</span>no <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token function">make</span> <span class="token parameter variable">-j2</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token function">make</span> <span class="token function">install</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token builtin class-name">cd</span> <span class="token punctuation">..</span> <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token function">rm</span> <span class="token parameter variable">-rf</span> sqlite-autoconf-* <span class="token operator">&&</span> <span class="token punctuation">\</span><br /><span class="token builtin class-name">echo</span> <span class="token string">"/sqlite/lib:/lib:/usr/local/lib:/usr/lib"</span> <span class="token operator">></span> /etc/ld-musl-x86_64.path<br /><span class="token comment">###</span><br /><span class="token function">chmod</span> +x build_dbhub.sh<br />ash build_sqlite.sh</code></pre>
<p>Create dbhub build script, set executable and run:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">nano</span> build_dbhub.sh<br /><span class="token comment">### Add</span><br /><span class="token builtin class-name">cd</span> /<br /><span class="token function">git</span> clone <span class="token parameter variable">--branch</span> master <span class="token parameter variable">--depth</span> <span class="token number">5</span> https://github.com/sqlitebrowser/dbhub.io<br /><span class="token builtin class-name">export</span> <span class="token assign-left variable">DBHUB_SOURCE</span><span class="token operator">=</span>/dbhub.io<br /><span class="token builtin class-name">cd</span> <span class="token variable">${DBHUB_SOURCE}</span><br /><span class="token function">yarn</span><br /><span class="token function">yarn</span> run babel <span class="token variable">${DBHUB_SOURCE}</span>/webui/jsx --out-dir <span class="token variable">${DBHUB_SOURCE}</span>/webui/js <span class="token parameter variable">--presets</span> babel-preset-react-app/prod<br /><span class="token function">yarn</span> run webpack <span class="token parameter variable">-c</span> <span class="token variable">${DBHUB_SOURCE}</span>/webui/webpack.config.js<br /><span class="token builtin class-name">cd</span> <span class="token variable">${DBHUB_SOURCE}</span>/api<br /><span class="token assign-left variable">PKG_CONFIG_PATH</span><span class="token operator">=</span>/sqlite/lib/pkgconfig go build <span class="token parameter variable">-gcflags</span> <span class="token string">"all=-N -l"</span> <span class="token parameter variable">-buildvcs</span><span class="token operator">=</span>false <span class="token parameter variable">-o</span> /usr/local/bin/dbhub-api <span class="token builtin class-name">.</span><br /><span class="token builtin class-name">cd</span> <span class="token variable">${DBHUB_SOURCE}</span>/db4s<br /><span class="token assign-left variable">PKG_CONFIG_PATH</span><span class="token operator">=</span>/sqlite/lib/pkgconfig go build <span class="token parameter variable">-gcflags</span> <span class="token string">"all=-N -l"</span> <span class="token parameter variable">-buildvcs</span><span class="token operator">=</span>false <span class="token parameter variable">-o</span> /usr/local/bin/dbhub-db4s <span class="token builtin class-name">.</span><br /><span class="token builtin class-name">cd</span> <span class="token variable">${DBHUB_SOURCE}</span>/live<br /><span class="token assign-left variable">PKG_CONFIG_PATH</span><span class="token operator">=</span>/sqlite/lib/pkgconfig go build <span class="token parameter variable">-gcflags</span> <span class="token string">"all=-N -l"</span> <span class="token parameter variable">-buildvcs</span><span class="token operator">=</span>false <span class="token parameter variable">-o</span> /usr/local/bin/dbhub-live <span class="token builtin class-name">.</span><br /><span class="token builtin class-name">cd</span> <span class="token variable">${DBHUB_SOURCE}</span>/standalone/analysis<br /><span class="token assign-left variable">PKG_CONFIG_PATH</span><span class="token operator">=</span>/sqlite/lib/pkgconfig go build <span class="token parameter variable">-gcflags</span> <span class="token string">"all=-N -l"</span> <span class="token parameter variable">-buildvcs</span><span class="token operator">=</span>false <span class="token parameter variable">-o</span> /usr/local/bin/dbhub-analysis <span class="token builtin class-name">.</span><br /><span class="token function">ln</span> <span class="token parameter variable">-f</span> <span class="token parameter variable">-s</span> /usr/local/bin/dbhub-analysis /etc/periodic/15min/<br /><span class="token builtin class-name">cd</span> <span class="token variable">${DBHUB_SOURCE}</span>/webui<br /><span class="token assign-left variable">PKG_CONFIG_PATH</span><span class="token operator">=</span>/sqlite/lib/pkgconfig go build <span class="token parameter variable">-gcflags</span> <span class="token string">"all=-N -l"</span> <span class="token parameter variable">-buildvcs</span><span class="token operator">=</span>false <span class="token parameter variable">-o</span> /usr/local/bin/dbhub-webui <span class="token builtin class-name">.</span><br /><span class="token comment">###</span><br /><span class="token function">chmod</span> +x build_dbhub.sh<br />ash build_dbhub.sh</code></pre>
<p>Install GO debugger:</p>
<pre class="language-bash"><code class="language-bash"><span class="token assign-left variable">GOBIN</span><span class="token operator">=</span>/usr/local/bin go <span class="token function">install</span> github.com/go-delve/delve/cmd/dlv@latest</code></pre>
<p>Create script for easy remote debugging:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">nano</span> debug.sh<br /><span class="token comment">### Add</span><br /><span class="token comment"># Kill the existing running daemons</span><br />rc-service dbhub-webui stop<br />rc-service dbhub-api stop<br />rc-service dbhub-db4s stop<br />rc-service dbhub-live stop<br /><span class="token function">pkill</span> dlv<br /><br /><span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token parameter variable">-c</span> /dev/console <span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span><br /> <span class="token function">chmod</span> o+w /dev/console<br /><span class="token keyword">fi</span><br /><br /><span class="token function">su</span> - dbhub <span class="token parameter variable">-c</span> <span class="token string">'nohup dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec /usr/local/bin/dbhub-webui >>/var/log/dbhub/output.log 2>&1 &'</span><br /><span class="token function">su</span> - dbhub <span class="token parameter variable">-c</span> <span class="token string">'nohup dlv --listen=:2346 --headless=true --api-version=2 --accept-multiclient exec /usr/local/bin/dbhub-api >>/var/log/dbhub/output.log 2>&1 &'</span><br /><span class="token function">su</span> - dbhub <span class="token parameter variable">-c</span> <span class="token string">'nohup dlv --listen=:2347 --headless=true --api-version=2 --accept-multiclient exec /usr/local/bin/dbhub-db4s >>/var/log/dbhub/output.log 2>&1 &'</span><br /><span class="token function">su</span> - dbhub <span class="token parameter variable">-c</span> <span class="token string">'nohup dlv --listen=:2348 --headless=true --api-version=2 --accept-multiclient exec /usr/local/bin/dbhub-live node1 /tmp/node1>>/var/log/dbhub/output.log 2>&1 &'</span><br /><span class="token comment"># Delay long enough for the DBHub.io daemons to start</span><br /><span class="token function">sleep</span> <span class="token number">1</span></code></pre>
<p>See example launch.json for VSC below. How to setup remote Go debugging in VSC see:</p>
<p><a href="https://code.visualstudio.com/docs/languages/go">Go in Visual Studio Code</a><br />
<a href="https://github.com/golang/vscode-go/wiki/debugging#remote-debugging">Remote debugging</a></p>
<p>Copy dbhub configuration into users folder where web application is looking for:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">cp</span> /dbhub.io/docker/config.toml /home/dbhub/.dbhub/config.toml<br /><span class="token function">chown</span> dbhub:dbhub /home/dbhub/.dbhub/config.toml</code></pre>
<p>Edit minio password in web application config: (optional, must match to the one set above)</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">nano</span> /home/dbhub/.dbhub/config.toml<br /><span class="token comment">### Change minio secret to match service config</span><br /><span class="token punctuation">[</span>minio<span class="token punctuation">]</span><br />secret <span class="token operator">=</span> <span class="token string">"minio123"</span><br /><span class="token comment">###</span></code></pre>
<p>Add non-root user and doas (sudo alternative) package (optional):</p>
<pre class="language-bash"><code class="language-bash"><span class="token comment">### Add a non-root user</span><br />adduser dev<br />adduser dev wheel<br />apk <span class="token function">add</span> doas<br /><span class="token function">nano</span> /etc/doas.d/doas.conf<br /><span class="token comment">### Add group</span><br />permit persist :wheel<br /><span class="token comment">###</span></code></pre>
<p>Reboot. Services memcached, minio, rabbitmq-server and postgresql should start:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">reboot</span></code></pre>
<p>Create openrc init scripts to run all 4 dbhub services:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">nano</span> /etc/init.d/dbhub-webui<br /><span class="token comment">### Add</span><br /><span class="token comment">#!/sbin/openrc-run</span><br /><br /><span class="token assign-left variable">supervisor</span><span class="token operator">=</span>supervise-daemon<br /><span class="token assign-left variable">name</span><span class="token operator">=</span><span class="token string">"dbhub-webui"</span><br /><span class="token assign-left variable">description</span><span class="token operator">=</span><span class="token string">"DBHub WebUI"</span><br /><span class="token assign-left variable">command</span><span class="token operator">=</span><span class="token string">"/usr/local/bin/dbhub-webui"</span><br /><span class="token assign-left variable">command_user</span><span class="token operator">=</span><span class="token string">"dbhub"</span><br /><span class="token assign-left variable">command_background</span><span class="token operator">=</span><span class="token string">"true"</span><br /><span class="token assign-left variable">output_log</span><span class="token operator">=</span><span class="token string">"/var/log/dbhub/output.log"</span><br /><span class="token assign-left variable">error_log</span><span class="token operator">=</span><span class="token string">"/var/log/dbhub/output.log"</span><br /><span class="token assign-left variable">pidfile</span><span class="token operator">=</span><span class="token string">"/var/run/dbhub-webui.pid"</span><br /><br /><span class="token function-name function">depend</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> need net<br /> after memcached minio rabbitmq-server postgresql<br /><span class="token punctuation">}</span><br /><br /><span class="token function-name function">start_pre</span><span class="token punctuation">(</span><span class="token punctuation">)</span><br /><span class="token punctuation">{</span><br /> checkpath <span class="token parameter variable">--directory</span> <span class="token parameter variable">--owner</span> dbhub:dbhub <span class="token parameter variable">--mode</span> 0700 /var/log/dbhub<br /><span class="token punctuation">}</span><br /><br /><span class="token function-name function">stop</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> ebegin <span class="token string">"Stopping dbhub-webui"</span><br /> start-stop-daemon <span class="token parameter variable">--stop</span> <span class="token parameter variable">--quiet</span> <span class="token parameter variable">--pidfile</span><span class="token operator">=</span><span class="token variable">$pidfile</span> <span class="token parameter variable">--exec</span> <span class="token string">"timeout 1m pkill dbhub-webui"</span><br /> eend <span class="token variable">$?</span><br /><span class="token punctuation">}</span><br /><span class="token comment">###</span><br /><br /><span class="token function">nano</span> /etc/init.d/dbhub-api<br /><span class="token comment">### Add</span><br /><span class="token comment">#!/sbin/openrc-run</span><br /><br /><span class="token assign-left variable">supervisor</span><span class="token operator">=</span>supervise-daemon<br /><span class="token assign-left variable">name</span><span class="token operator">=</span><span class="token string">"dbhub-api"</span><br /><span class="token assign-left variable">description</span><span class="token operator">=</span><span class="token string">"DBHub API"</span><br /><span class="token assign-left variable">command</span><span class="token operator">=</span><span class="token string">"/usr/local/bin/dbhub-api"</span><br /><span class="token assign-left variable">command_user</span><span class="token operator">=</span><span class="token string">"dbhub"</span><br /><span class="token assign-left variable">command_background</span><span class="token operator">=</span><span class="token string">"true"</span><br /><span class="token assign-left variable">output_log</span><span class="token operator">=</span><span class="token string">"/var/log/dbhub/output.log"</span><br /><span class="token assign-left variable">error_log</span><span class="token operator">=</span><span class="token string">"/var/log/dbhub/output.log"</span><br /><span class="token assign-left variable">pidfile</span><span class="token operator">=</span><span class="token string">"/var/run/dbhub-api.pid"</span><br /><br /><span class="token function-name function">depend</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> need net<br /> after memcached minio rabbitmq-server postgresql dbhub-webui<br /><span class="token punctuation">}</span><br /><br /><span class="token function-name function">start_pre</span><span class="token punctuation">(</span><span class="token punctuation">)</span><br /><span class="token punctuation">{</span><br /> checkpath <span class="token parameter variable">--directory</span> <span class="token parameter variable">--owner</span> dbhub:dbhub <span class="token parameter variable">--mode</span> 0700 /var/log/dbhub<br /><span class="token punctuation">}</span><br /><br /><span class="token function-name function">stop</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> ebegin <span class="token string">"Stopping dbhub-api"</span><br /> start-stop-daemon <span class="token parameter variable">--stop</span> <span class="token parameter variable">--quiet</span> <span class="token parameter variable">--pidfile</span> /var/run/dbhub-api.pid <span class="token parameter variable">--exec</span> <span class="token string">"timeout 1m pkill dbhub-api"</span><br /> eend <span class="token variable">$?</span><br /><span class="token punctuation">}</span><br /><span class="token comment">###</span><br /><br /><span class="token function">nano</span> /etc/init.d/dbhub-db4s<br /><span class="token comment">### Add</span><br /><span class="token comment">#!/sbin/openrc-run</span><br /><br /><span class="token assign-left variable">supervisor</span><span class="token operator">=</span>supervise-daemon<br /><span class="token assign-left variable">name</span><span class="token operator">=</span><span class="token string">"dbhub-db4s"</span><br /><span class="token assign-left variable">description</span><span class="token operator">=</span><span class="token string">"DBHub DB4S"</span><br /><span class="token assign-left variable">command</span><span class="token operator">=</span><span class="token string">"/usr/local/bin/dbhub-db4s"</span><br /><span class="token assign-left variable">command_user</span><span class="token operator">=</span><span class="token string">"dbhub"</span><br /><span class="token assign-left variable">command_background</span><span class="token operator">=</span><span class="token string">"true"</span><br /><span class="token assign-left variable">output_log</span><span class="token operator">=</span><span class="token string">"/var/log/dbhub/output.log"</span><br /><span class="token assign-left variable">error_log</span><span class="token operator">=</span><span class="token string">"/var/log/dbhub/output.log"</span><br /><span class="token assign-left variable">pidfile</span><span class="token operator">=</span><span class="token string">"/var/run/dbhub-db4s.pid"</span><br /><br /><span class="token function-name function">depend</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> need net<br /> after memcached minio rabbitmq-server postgresql dbhub-webui dbhub-api<br /><span class="token punctuation">}</span><br /><br /><span class="token function-name function">start_pre</span><span class="token punctuation">(</span><span class="token punctuation">)</span><br /><span class="token punctuation">{</span><br /> checkpath <span class="token parameter variable">--directory</span> <span class="token parameter variable">--owner</span> dbhub:dbhub <span class="token parameter variable">--mode</span> 0700 /var/log/dbhub<br /><span class="token punctuation">}</span><br /><br /><span class="token function-name function">stop</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> ebegin <span class="token string">"Stopping dbhub-db4s"</span><br /> start-stop-daemon <span class="token parameter variable">--stop</span> <span class="token parameter variable">--quiet</span> <span class="token parameter variable">--pidfile</span> /var/run/dbhub-db4s.pid <span class="token parameter variable">--exec</span> <span class="token string">"timeout 1m pkill dbhub-db4s"</span><br /> eend <span class="token variable">$?</span><br /><span class="token punctuation">}</span><br /><span class="token comment">###</span><br /><br /><span class="token function">nano</span> /etc/init.d/dbhub-live<br /><span class="token comment">### Add</span><br /><span class="token comment">#!/sbin/openrc-run</span><br /><br /><span class="token assign-left variable">supervisor</span><span class="token operator">=</span>supervise-daemon<br /><span class="token assign-left variable">name</span><span class="token operator">=</span><span class="token string">"dbhub-live"</span><br /><span class="token assign-left variable">description</span><span class="token operator">=</span><span class="token string">"DBHub Live"</span><br /><span class="token assign-left variable">command</span><span class="token operator">=</span><span class="token string">"/usr/local/bin/dbhub-live"</span><br /><span class="token assign-left variable">command_args</span><span class="token operator">=</span><span class="token string">"node1 /tmp/node1"</span><br /><span class="token assign-left variable">command_user</span><span class="token operator">=</span><span class="token string">"dbhub"</span><br /><span class="token assign-left variable">command_background</span><span class="token operator">=</span><span class="token string">"true"</span><br /><span class="token assign-left variable">output_log</span><span class="token operator">=</span><span class="token string">"/var/log/dbhub/output.log"</span><br /><span class="token assign-left variable">error_log</span><span class="token operator">=</span><span class="token string">"/var/log/dbhub/output.log"</span><br /><span class="token assign-left variable">pidfile</span><span class="token operator">=</span><span class="token string">"/var/run/dbhub-live.pid"</span><br /><br /><span class="token function-name function">depend</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> need net<br /> after memcached minio rabbitmq-server postgresql dbhub-webui dbhub-api dbhub-db4s<br /><span class="token punctuation">}</span><br /><br /><span class="token function-name function">start_pre</span><span class="token punctuation">(</span><span class="token punctuation">)</span><br /><span class="token punctuation">{</span><br /> checkpath <span class="token parameter variable">--directory</span> <span class="token parameter variable">--owner</span> dbhub:dbhub <span class="token parameter variable">--mode</span> 0700 /var/log/dbhub<br /><span class="token punctuation">}</span><br /><br /><span class="token function-name function">stop</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><br /> ebegin <span class="token string">"Stopping dbhub-live"</span><br /> start-stop-daemon <span class="token parameter variable">--stop</span> <span class="token parameter variable">--quiet</span> <span class="token parameter variable">--pidfile</span> /var/run/dbhub-live.pid <span class="token parameter variable">--exec</span> <span class="token string">"timeout 1m pkill dbhub-live"</span><br /> eend <span class="token variable">$?</span><br /><span class="token punctuation">}</span><br /><span class="token comment">###</span></code></pre>
<p>Make service init scripts executable and add to default runlevel:</p>
<pre class="language-bash"><code class="language-bash"><span class="token function">chmod</span> +x /etc/init.d/dbhub-webui<br /><span class="token function">chmod</span> +x /etc/init.d/dbhub-api<br /><span class="token function">chmod</span> +x /etc/init.d/dbhub-live<br /><span class="token function">chmod</span> +x /etc/init.d/dbhub-db4s<br /><br />rc-update <span class="token function">add</span> dbhub-webui default<br />rc-update <span class="token function">add</span> dbhub-api default<br />rc-update <span class="token function">add</span> dbhub-db4s default<br />rc-update <span class="token function">add</span> dbhub-live default</code></pre>
<p>Finally reboot:</p>
<pre><code>reboot
</code></pre>
<figure><img src="https://www.mictronics.de/img/2023/08/dbhub_io_boot.png" alt="Successful boot with all dbhub.io services" class="img-fluid" /><figcaption>Successful boot with all dbhub.io services</figcaption></figure>
<p>For additional information see also the <a href="https://github.com/sqlitebrowser/dbhub.io/wiki/Local-development-setup">dbhub.io wiki</a> on github and the repo README's.</p>
<p>Example launch.json for remote debugging in VSC:</p>
<pre class="language-json"><code class="language-json"><span class="token punctuation">{</span><br /> <span class="token property">"version"</span><span class="token operator">:</span> <span class="token string">"0.2.0"</span><span class="token punctuation">,</span><br /> <span class="token property">"configurations"</span><span class="token operator">:</span> <span class="token punctuation">[</span><br /> <span class="token punctuation">{</span><br /> <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"dbhub-webui"</span><span class="token punctuation">,</span><br /> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"go"</span><span class="token punctuation">,</span><br /> <span class="token property">"request"</span><span class="token operator">:</span> <span class="token string">"attach"</span><span class="token punctuation">,</span><br /> <span class="token property">"debugAdapter"</span><span class="token operator">:</span> <span class="token string">"dlv-dap"</span><span class="token punctuation">,</span><br /> <span class="token property">"mode"</span><span class="token operator">:</span> <span class="token string">"remote"</span><span class="token punctuation">,</span><br /> <span class="token property">"remotePath"</span><span class="token operator">:</span> <span class="token string">"/dbhub.io"</span><span class="token punctuation">,</span><br /> <span class="token property">"port"</span><span class="token operator">:</span> <span class="token number">2345</span><span class="token punctuation">,</span><br /> <span class="token property">"host"</span><span class="token operator">:</span> <span class="token string">"192.168.178.57"</span><span class="token punctuation">,</span><br /> <span class="token property">"substitutePath"</span><span class="token operator">:</span> <span class="token punctuation">[</span><br /> <span class="token punctuation">{</span> <span class="token property">"from"</span><span class="token operator">:</span> <span class="token string">"${workspaceFolder}"</span><span class="token punctuation">,</span> <span class="token property">"to"</span><span class="token operator">:</span> <span class="token string">"/dbhub.io"</span> <span class="token punctuation">}</span><br /> <span class="token punctuation">]</span><br /> <span class="token punctuation">}</span><span class="token punctuation">,</span><br /> <span class="token punctuation">{</span><br /> <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"dbhub-api"</span><span class="token punctuation">,</span><br /> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"go"</span><span class="token punctuation">,</span><br /> <span class="token property">"request"</span><span class="token operator">:</span> <span class="token string">"attach"</span><span class="token punctuation">,</span><br /> <span class="token property">"debugAdapter"</span><span class="token operator">:</span> <span class="token string">"dlv-dap"</span><span class="token punctuation">,</span><br /> <span class="token property">"mode"</span><span class="token operator">:</span> <span class="token string">"remote"</span><span class="token punctuation">,</span><br /> <span class="token property">"remotePath"</span><span class="token operator">:</span> <span class="token string">"/dbhub.io"</span><span class="token punctuation">,</span><br /> <span class="token property">"port"</span><span class="token operator">:</span> <span class="token number">2346</span><span class="token punctuation">,</span><br /> <span class="token property">"host"</span><span class="token operator">:</span> <span class="token string">"192.168.178.57"</span><span class="token punctuation">,</span><br /> <span class="token property">"substitutePath"</span><span class="token operator">:</span> <span class="token punctuation">[</span><br /> <span class="token punctuation">{</span> <span class="token property">"from"</span><span class="token operator">:</span> <span class="token string">"${workspaceFolder}"</span><span class="token punctuation">,</span> <span class="token property">"to"</span><span class="token operator">:</span> <span class="token string">"/dbhub.io"</span> <span class="token punctuation">}</span><br /> <span class="token punctuation">]</span><br /> <span class="token punctuation">}</span><span class="token punctuation">,</span><br /> <span class="token punctuation">{</span><br /> <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"dbhub-db4s"</span><span class="token punctuation">,</span><br /> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"go"</span><span class="token punctuation">,</span><br /> <span class="token property">"request"</span><span class="token operator">:</span> <span class="token string">"attach"</span><span class="token punctuation">,</span><br /> <span class="token property">"debugAdapter"</span><span class="token operator">:</span> <span class="token string">"dlv-dap"</span><span class="token punctuation">,</span><br /> <span class="token property">"mode"</span><span class="token operator">:</span> <span class="token string">"remote"</span><span class="token punctuation">,</span><br /> <span class="token property">"remotePath"</span><span class="token operator">:</span> <span class="token string">"/dbhub.io"</span><span class="token punctuation">,</span><br /> <span class="token property">"port"</span><span class="token operator">:</span> <span class="token number">2347</span><span class="token punctuation">,</span><br /> <span class="token property">"host"</span><span class="token operator">:</span> <span class="token string">"192.168.178.57"</span><span class="token punctuation">,</span><br /> <span class="token property">"substitutePath"</span><span class="token operator">:</span> <span class="token punctuation">[</span><br /> <span class="token punctuation">{</span> <span class="token property">"from"</span><span class="token operator">:</span> <span class="token string">"${workspaceFolder}"</span><span class="token punctuation">,</span> <span class="token property">"to"</span><span class="token operator">:</span> <span class="token string">"/dbhub.io"</span> <span class="token punctuation">}</span><br /> <span class="token punctuation">]</span><br /> <span class="token punctuation">}</span><span class="token punctuation">,</span><br /> <span class="token punctuation">{</span><br /> <span class="token property">"name"</span><span class="token operator">:</span> <span class="token string">"dbhub-live"</span><span class="token punctuation">,</span><br /> <span class="token property">"type"</span><span class="token operator">:</span> <span class="token string">"go"</span><span class="token punctuation">,</span><br /> <span class="token property">"request"</span><span class="token operator">:</span> <span class="token string">"attach"</span><span class="token punctuation">,</span><br /> <span class="token property">"debugAdapter"</span><span class="token operator">:</span> <span class="token string">"dlv-dap"</span><span class="token punctuation">,</span><br /> <span class="token property">"mode"</span><span class="token operator">:</span> <span class="token string">"remote"</span><span class="token punctuation">,</span><br /> <span class="token property">"remotePath"</span><span class="token operator">:</span> <span class="token string">"/dbhub.io"</span><span class="token punctuation">,</span><br /> <span class="token property">"port"</span><span class="token operator">:</span> <span class="token number">2348</span><span class="token punctuation">,</span><br /> <span class="token property">"host"</span><span class="token operator">:</span> <span class="token string">"192.168.178.57"</span><span class="token punctuation">,</span><br /> <span class="token property">"substitutePath"</span><span class="token operator">:</span> <span class="token punctuation">[</span><br /> <span class="token punctuation">{</span> <span class="token property">"from"</span><span class="token operator">:</span> <span class="token string">"${workspaceFolder}"</span><span class="token punctuation">,</span> <span class="token property">"to"</span><span class="token operator">:</span> <span class="token string">"/dbhub.io"</span> <span class="token punctuation">}</span><br /> <span class="token punctuation">]</span><br /> <span class="token punctuation">}</span><br /> <span class="token punctuation">]</span><br /><span class="token punctuation">}</span></code></pre>
<p>Change the remote server IP as required.</p>
DIY Afterburner Mk2 diesel heater controller2023-08-18T00:00:00Zhttps://www.mictronics.de/posts/afterburner-diesel-heater/<figure><img src="https://www.mictronics.de/img/2023/08/afterburner02.jpg" alt="Afterburner Mk2 DIY - Mictronics version" class="img-fluid" /><figcaption>Afterburner Mk2 DIY - Mictronics version</figcaption></figure>
<p>This is a DIY built aftermarket controller Afterburner Mk2 for the famous chinese diesel heaters, e.g. VEVOR brand.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/afterburner07.jpg" alt="Afterburner Mk2 DIY frontend" class="img-fluid" /><figcaption>Afterburner Mk2 DIY frontend</figcaption></figure>
<p>The Afterburner Mk2 was original designed by Ray Jones. See his <a href="http://www.mrjones.id.au/afterburner/">webpage</a>. The motivation for a DIY design was to avoid any hassle with customs that arise when one tries to import DIY hardware (from Australia or elsewhere) into Europe, especially in Germany.</p>
<p>MY DIY design follows the Afterburner Mk2 schematic that can be found in the <a href="http://www.mrjones.id.au/afterburner/assets/files/UserManual-V3.2.pdf">original user manual</a>. Additional information can be found in the related <a href="https://gitlab.com/mrjones.id.au/bluetoothheater">Gitlab repository</a>.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/afterburner06.jpg" alt="Backend with components from donor boards" class="img-fluid" /><figcaption>Backend with components from donor boards</figcaption></figure>
<p>Following donor boards (from Amazon) have been used for components:</p>
<ul>
<li>AZDelivery 1,3 Zoll OLED Display I2C SSH1106 Chip 128 x 64</li>
<li>AZDelivery HC-05 HC-06 Bluetooth Wireless RF-Transceiver-Modul</li>
<li>AITRIP Pack ESP32 ESP-32S</li>
<li>AZDelivery Real Time Clock RTC DS3231 I2C</li>
</ul>
<p>The rest of the components can be found on Digikey or Mouser.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/afterburner01.jpg" alt="Inside OKW TOPTEC 154F" class="img-fluid" /><figcaption>Inside OKW TOPTEC 154F</figcaption></figure>
<p>The PCB is designed to fit into an OKW TOPTEC 154F (B1065365) housing that was laying around.</p>
<p>Everything works as expected with a diesel heater VEVOR WF5001. However, I had to change the heater control motherboard to one being compatible with the Afterburner Mk2 firmware (blue line protocol). Replacement motherboards are available on eBay, e.g. 235077415445.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/motherboard.jpg" alt="Compatible diesel heater motherboard from eBay" class="img-fluid" /><figcaption>Compatible diesel heater motherboard from eBay</figcaption></figure>
<p>The latest firmware v3.4.13 indicates full functionality, including analog input and GPIO.</p>
<p>Firmware is available for download on a separate <a href="http://www.mrjones.id.au/afterburner/firmware.html">webpage</a>.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/afterburner03.jpg" alt="Firmware v3.4.13" class="img-fluid" /><figcaption>Firmware v3.4.13</figcaption></figure>
<h2 id="debugging-and-setup">Debugging and setup <a class="direct-link" href="https://www.mictronics.de/posts/afterburner-diesel-heater/#debugging-and-setup">#</a></h2>
<p>Debugging and setup is possible web browser.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/browser.jpg" alt="Afterburner Mk2 console in Linux gtkterm" class="img-fluid" /><figcaption>Afterburner Mk2 console in Linux gtkterm</figcaption></figure>
<p>... or via serial console. When using a FTDI USB adapter, make sure it has been <strong>jumpered for 3.3V operation</strong>.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/gtkterm.png" alt="Afterburner Mk2 console in Linux gtkterm" class="img-fluid" /><figcaption>Afterburner Mk2 console in Linux gtkterm</figcaption></figure>
<h2 id="mqtt-setup">MQTT setup <a class="direct-link" href="https://www.mictronics.de/posts/afterburner-diesel-heater/#mqtt-setup">#</a></h2>
<p>Albeit MQTT setup is described in the Afterburner Mk2 user manual it was a bit tricky to setup subscription for the topics.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/mqtt.jpg" alt="Afterburner Mk2 MQTT broker setup" class="img-fluid" /><figcaption>Afterburner Mk2 MQTT broker setup</figcaption></figure>
<p>The setup requires the MQTT brokers IP and port, authentication username and password and the unique topic prefix. The topic prefix was set according to the user manual recommendation.</p>
<p>Subscription to the following topics is then possible:</p>
<ul>
<li><code>AfterburnerF25A18/sts/...</code> = Afterburner status</li>
<li><code>AfterburnerF25A18/JSONout</code> = Afterburner JSON output</li>
</ul>
<p>Afterburner control is possible by publishing to the following topic:</p>
<ul>
<li><code>AfterburnerF25A18/cmd/</code></li>
</ul>
<p>See configuration.yaml 👇 for example topic subscription.</p>
<h2 id="including-into-home-assistant-(hass)">Including into Home Assistant (HASS) <a class="direct-link" href="https://www.mictronics.de/posts/afterburner-diesel-heater/#including-into-home-assistant-(hass)">#</a></h2>
<p>Once MQTT is successfully setup, the Afterburner controller can be included into Home Assistant. Found some examples for <a href="https://gist.github.com/pturner1989/4f78282f36bd4bf7bd3778a47c09fbef">configuration.yaml and automation.yaml</a>.</p>
<figure><img src="https://www.mictronics.de/img/2023/08/hass.jpg" alt="Afterburner Mk2 home assistant integration via MQTT" class="img-fluid" /><figcaption>Afterburner Mk2 home assistant integration via MQTT</figcaption></figure>
<p>Modified to what I am using now:<br />
automation.yaml</p>
<pre class="language-yaml"><code class="language-yaml"><span class="token key atrule">alias</span><span class="token punctuation">:</span> Get Heater Status<br /><span class="token key atrule">description</span><span class="token punctuation">:</span> <span class="token string">""</span><br /><span class="token key atrule">trigger</span><span class="token punctuation">:</span><br /> <span class="token comment"># - platform: homeassistant</span><br /> <span class="token comment"># event: start</span><br /> <span class="token punctuation">-</span> <span class="token key atrule">platform</span><span class="token punctuation">:</span> time_pattern<br /> <span class="token comment"># Matches every hour at 5 minutes past whole</span><br /> <span class="token key atrule">minutes</span><span class="token punctuation">:</span> <span class="token string">"/1"</span><br /><span class="token key atrule">condition</span><span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">]</span><br /><span class="token key atrule">action</span><span class="token punctuation">:</span><br /> <span class="token punctuation">-</span> <span class="token key atrule">service</span><span class="token punctuation">:</span> mqtt.publish<br /> <span class="token key atrule">data</span><span class="token punctuation">:</span><br /> <span class="token key atrule">topic</span><span class="token punctuation">:</span> AfterburnerF25A18/cmd/Refresh<br /> <span class="token key atrule">payload</span><span class="token punctuation">:</span> <span class="token string">"1"</span><br /><span class="token key atrule">mode</span><span class="token punctuation">:</span> single</code></pre>
<p>The <code>AfterburnerF25A18</code> needs to be equal to the topic prefix set during MQTT configuration.<br />
configuration.yaml</p>
<pre class="language-yaml"><code class="language-yaml"><br /><span class="token key atrule">mqtt</span><span class="token punctuation">:</span><br /> <span class="token key atrule">climate</span><span class="token punctuation">:</span><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Van Heating<br /> <span class="token key atrule">action_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/RunState"</span><br /> <span class="token key atrule">action_template</span><span class="token punctuation">:</span> <span class="token punctuation">></span><span class="token scalar string"><br /> {% if value in ("0", "1", "6", "7", "8") %}<br /> off<br /> {% elif value in ("10", "12") %}<br /> idle<br /> {% else %}<br /> heating<br /> {% endif %}</span><br /> <span class="token key atrule">current_temperature_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/TempCurrent"</span><br /> <span class="token key atrule">max_temp</span><span class="token punctuation">:</span> <span class="token number">35</span><br /> <span class="token key atrule">min_temp</span><span class="token punctuation">:</span> <span class="token number">8</span><br /> <span class="token key atrule">modes</span><span class="token punctuation">:</span><br /> <span class="token punctuation">-</span> <span class="token string">"off"</span><br /> <span class="token punctuation">-</span> <span class="token string">"heat"</span><br /> <span class="token key atrule">mode_state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/Run"</span><br /> <span class="token key atrule">mode_state_template</span><span class="token punctuation">:</span> <span class="token punctuation">></span><span class="token scalar string"><br /> {% if value == "1" %}<br /> heat<br /> {% else %}<br /> off<br /> {% endif %}</span><br /> <span class="token key atrule">mode_command_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/cmd/Run"</span><br /> <span class="token key atrule">mode_command_template</span><span class="token punctuation">:</span> <span class="token punctuation">></span><span class="token scalar string"><br /> {% if value == "heat" %}<br /> 1<br /> {% else %}<br /> 0<br /> {% endif %}</span><br /> <span class="token key atrule">precision</span><span class="token punctuation">:</span> <span class="token number">0.1</span><br /> <span class="token key atrule">temperature_command_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/cmd/TempDesired"</span><br /> <span class="token key atrule">temperature_state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/TempDesired"</span><br /> <span class="token key atrule">temp_step</span><span class="token punctuation">:</span> <span class="token number">0.5</span><br /><br /> <span class="token key atrule">sensor</span><span class="token punctuation">:</span><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Status<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_status<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/RunString"</span><br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Error<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_error<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/ErrorString"</span><br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Internal Temperature<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_internal_temp<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/TempBody"</span><br /> <span class="token key atrule">device_class</span><span class="token punctuation">:</span> temperature<br /> <span class="token key atrule">unit_of_measurement</span><span class="token punctuation">:</span> °C<br /> <span class="token key atrule">state_class</span><span class="token punctuation">:</span> measurement<br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Consumption (Total)<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_consumption<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/TotalFuelUsage"</span><br /> <span class="token key atrule">unit_of_measurement</span><span class="token punctuation">:</span> mL<br /> <span class="token key atrule">state_class</span><span class="token punctuation">:</span> total_increasing<br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Pump Rate<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_pump<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/PumpActual"</span><br /> <span class="token key atrule">unit_of_measurement</span><span class="token punctuation">:</span> Hz<br /> <span class="token key atrule">device_class</span><span class="token punctuation">:</span> frequency<br /> <span class="token key atrule">state_class</span><span class="token punctuation">:</span> measurement<br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Fan Speed<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_fan<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/FanRPM"</span><br /> <span class="token key atrule">unit_of_measurement</span><span class="token punctuation">:</span> RPM<br /> <span class="token key atrule">state_class</span><span class="token punctuation">:</span> measurement<br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Glow Plug<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_glowplug<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/GlowCurrent"</span><br /> <span class="token key atrule">device_class</span><span class="token punctuation">:</span> current<br /> <span class="token key atrule">unit_of_measurement</span><span class="token punctuation">:</span> A<br /> <span class="token key atrule">state_class</span><span class="token punctuation">:</span> measurement<br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Glow Voltage<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_glowvoltage<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/sts/GlowVoltage"</span><br /> <span class="token key atrule">device_class</span><span class="token punctuation">:</span> voltage<br /> <span class="token key atrule">unit_of_measurement</span><span class="token punctuation">:</span> V<br /> <span class="token key atrule">state_class</span><span class="token punctuation">:</span> measurement<br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Wifi RSSI<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_wifirssi<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/JSONout"</span><br /> <span class="token key atrule">device_class</span><span class="token punctuation">:</span> signal_strength<br /> <span class="token key atrule">unit_of_measurement</span><span class="token punctuation">:</span> dBm<br /> <span class="token key atrule">state_class</span><span class="token punctuation">:</span> measurement<br /> <span class="token key atrule">value_template</span><span class="token punctuation">:</span> <span class="token string">"{{ value_json.IP_STARSSI }}"</span><br /><br /> <span class="token punctuation">-</span> <span class="token key atrule">name</span><span class="token punctuation">:</span> Afterburner Input Voltage<br /> <span class="token key atrule">unique_id</span><span class="token punctuation">:</span> afterburner_inputvoltage<br /> <span class="token key atrule">state_topic</span><span class="token punctuation">:</span> <span class="token string">"AfterburnerF25A18/JSONout"</span><br /> <span class="token key atrule">device_class</span><span class="token punctuation">:</span> voltage<br /> <span class="token key atrule">unit_of_measurement</span><span class="token punctuation">:</span> V<br /> <span class="token key atrule">state_class</span><span class="token punctuation">:</span> measurement<br /> <span class="token key atrule">value_template</span><span class="token punctuation">:</span> <span class="token string">"{{ value_json.InputVoltage }}"</span><br /><br /></code></pre>
<h2 id="disclaimer">Disclaimer <a class="direct-link" href="https://www.mictronics.de/posts/afterburner-diesel-heater/#disclaimer">#</a></h2>
<p>Credits to Ray Jones for creating this project. 👍</p>
<p>⛔️ I will neither sell or rebuild my project nor otherwise distribute details, schematic, layout etc. so do not ask. ⛔️</p>
UPSIC-1205 on steroids2023-12-03T00:00:00Zhttps://www.mictronics.de/posts/UPSIC-1205-on-steroids/<p>I got myself a <a href="https://www.bicker.de/">Bicker</a> UPSIC-1205 UPS (Uninterruptible Power Supply ) with PSZ-1063 data link module. The UPS device is designed to provide emergency backup power for several seconds to a minute by means of supercapacitors. I'm going to use this UPS in combination with a mini PC running as home server. The idea was to provide backup power to the server for clean shutdown on input power outage.</p>
<p>However, I was looking to cover a longer power outage and keep the home server running until power eventually returns, but still allow a clean shutdown in case power doesn't return in time. So here is my solution:</p>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_1.jpg" alt="Bicker UPSIC-1205 on steroids" class="img-fluid" /><figcaption>Bicker UPSIC-1205 on steroids</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_2.jpg" alt="Bicker UPSIC-1205 on steroids" class="img-fluid" /><figcaption>Bicker UPSIC-1205 on steroids</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_3.jpg" alt="Bicker UPSIC-1205 on steroids" class="img-fluid" /><figcaption>Bicker UPSIC-1205 on steroids</figcaption></figure>
<p>The original UPSIC-1205 design uses four 100F supercapacitors in series connection resulting in 25F total capacity. My upgrade takes four Eaton XL60 supercapacitors with 3000F each, resulting in 750F total capacity. Ths UPS is powered by a 12V/5A SMPS and provides the same voltage and current rating on its output to the home server. Even under emergency power conditions.</p>
<p>Following some measurement results while charging and discharging the UPS.</p>
<h2 id="charging-without-load">Charging without load <a class="direct-link" href="https://www.mictronics.de/posts/UPSIC-1205-on-steroids/#charging-without-load">#</a></h2>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_charge_1.png" alt="Input parameters" class="img-fluid" /><figcaption>Input parameters</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_charge_2.png" alt="State of charge" class="img-fluid" /><figcaption>State of charge</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_charge_3.png" alt="Board temperature" class="img-fluid" /><figcaption>Board temperature</figcaption></figure>
<ul>
<li>Maximum input power: <strong>60.4W</strong> (no output load)</li>
<li>Charging time to 90% SOC for output ON: <strong>00:21:54</strong></li>
<li>Charging time to 100% SOC: <strong>00:23:22</strong></li>
</ul>
<h2 id="discharging-with-5w-load">Discharging with 5W load <a class="direct-link" href="https://www.mictronics.de/posts/UPSIC-1205-on-steroids/#discharging-with-5w-load">#</a></h2>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_discharge_5W_1.png" alt="Output parameters" class="img-fluid" /><figcaption>Output parameters</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_discharge_5W_2.png" alt="State of charge" class="img-fluid" /><figcaption>State of charge</figcaption></figure>
<ul>
<li>Maximum supercapacitor discharge current with 5W load: <strong>0.44A</strong></li>
<li>Discharge time to 10% SOC with 5W load: <strong>01:27:51</strong></li>
<li>Discharge time to 0% SOC with 5W load: <strong>01:37:04</strong></li>
<li>Discharge time to output OFF with 5W load: <strong>01:43:36</strong></li>
</ul>
<h2 id="discharging-with-20w-load">Discharging with 20W load <a class="direct-link" href="https://www.mictronics.de/posts/UPSIC-1205-on-steroids/#discharging-with-20w-load">#</a></h2>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_discharge_20W_1.png" alt="Output parameters" class="img-fluid" /><figcaption>Output parameters</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_discharge_20W_2.png" alt="State of charge" class="img-fluid" /><figcaption>State of charge</figcaption></figure>
<ul>
<li>Maximum supercapacitor discharge current with 20W load: <strong>5.4A</strong></li>
<li>Discharge time to 10% SOC with 20W load: <strong>00:23:39</strong></li>
<li>Discharge time to 0% SOC with 20W load: <strong>00:26:07</strong></li>
<li>Discharge time to output OFF with 20W load: <strong>00:27:55</strong></li>
</ul>
<h2 id="monitoring-server-software">Monitoring server software <a class="direct-link" href="https://www.mictronics.de/posts/UPSIC-1205-on-steroids/#monitoring-server-software">#</a></h2>
<figure><img src="https://www.mictronics.de/img/2023/12/ups-server.png" alt="UPS server web application" class="img-fluid" /><figcaption>UPS server web application</figcaption></figure>
<p>The optional PSZ-1063 data link module allows to set some shutdown parameters on the UPS itself via DIP switches but also provides a RS232 data link for UPS monitoring. Albeit Bicker provides its own software I decided to write one myself that is lightweight in code, extracts the maximum number of parameters, runs as a systemd service under Linux and provides a web application for parameter and status visualization. In addition the software provides also an apcaccess compatible status report for post processing, e.g. in netdata.</p>
<p>The service is constantly monitoring the UPS while running and will shutdown the server in case of power outage, depending on configuration, after a specific delay time or UPS state of charge level.</p>
<p>Source code is available on Github: <a href="https://github.com/Mictronics/ups-server">ups-server</a>.</p>
UPSIC-1205 final setup with Nipogi JK06 fanless mini PC2023-12-21T00:00:00Zhttps://www.mictronics.de/posts/UPSIC-1205_Nipogi_JK06/<p>Final setup of my Bicker UPSIC-1205 that is backup powering a Nipogi JK06 fanless mini PC being a home server.</p>
<figure><img src="https://www.mictronics.de/img/2023/12/upsic-1205_nipogi_jk06.jpg" alt="Bicker UPSIC-1205 powering Nipogi JK06" class="img-fluid" /><figcaption>Bicker UPSIC-1205 powering Nipogi JK06</figcaption></figure>
<p>Power consumption is is less than 4W average on the load side (12V supply). Backup time on power fail more than 1 hour.</p>
<p>See <a href="https://www.mictronics.de/posts/UPSIC-1205-on-steroids/">full description</a> for details.</p>
Sleeve dipole antenna for Meshtastic at 868MHz2024-03-04T00:00:00Zhttps://www.mictronics.de/posts/Meshtastic-868MHz-Antenna/<p>Sleeve dipole antenna for Meshtastic operation at 868MHz, started as proof of concept design, gone through 3D modeling and optimization and final measurements on a prototype built.</p>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Final.jpg" alt="Final prototype" class="img-fluid" /><figcaption>Final prototype</figcaption></figure>
<h2 id="theory">Theory <a class="direct-link" href="https://www.mictronics.de/posts/Meshtastic-868MHz-Antenna/#theory">#</a></h2>
<p>Concept, initial design and simulation in CST.</p>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Sim_3D.png" alt="3D model." class="img-fluid" /><figcaption>3D model.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Gain_3D.png" alt="3D Gain pattern." class="img-fluid" /><figcaption>3D Gain pattern.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Sim_1D.png" alt="Polar pattern." class="img-fluid" /><figcaption>Polar pattern.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Sim_S1.png" alt="S1 return loss." class="img-fluid" /><figcaption>S1 return loss.</figcaption></figure>
<h2 id="reality">Reality <a class="direct-link" href="https://www.mictronics.de/posts/Meshtastic-868MHz-Antenna/#reality">#</a></h2>
<p>Final build dimensions</p>
<ul>
<li>Sleeve length: 79 mm</li>
<li>Sleeve outer diameter: 15 mm</li>
<li>Sleeve inner diameter: 13 mm</li>
<li>Sleeve material: Copper</li>
<li>Semi-Rigid Coax type: UT-141C / SR141CUTP</li>
<li>Semi-Rigid outer diameter: 3.6 mm</li>
<li>Semi-Rigid conductor diameter: 0.92 mm</li>
<li>Semi-Rigid total length: 249 mm</li>
<li>Radiator length: 78 mm</li>
<li>Distance feed socket collar to sleeve: 92mm</li>
<li>Feed socked: SMA type flange mount for UT-141C</li>
<li>Protection pipe outer diameter: 25 mm</li>
<li>Protection pipe inner diameter: 23 mm</li>
<li>Protection pipe length: 260 mm</li>
<li>Protection pipe material: PCV</li>
</ul>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Build.jpg" alt="Final build." class="img-fluid" /><figcaption>Final build.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Feed1.jpg" alt="Semi-Rigid coax feed with flange type SMA socket for UT-141C coax." class="img-fluid" /><figcaption>Semi-Rigid coax feed with flange type SMA socket for UT-141C coax.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Radiator.jpg" alt="Radiator as part of the coax. A 3mm brass flange is used to fix and solder the coax inside the sleeve pipe." class="img-fluid" /><figcaption>Radiator as part of the coax. A 3mm brass flange is used to fix and solder the coax inside the sleeve pipe.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Spacer.jpg" alt="4mm foam spacer keeps the dipole centered inside the protection pipe." class="img-fluid" /><figcaption>4mm foam spacer keeps the dipole centered inside the protection pipe.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Inside.jpg" alt="Dipole inside the protection pipe." class="img-fluid" /><figcaption>Dipole inside the protection pipe.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Feed2.jpg" alt="SMA socket feed." class="img-fluid" /><figcaption>SMA socket feed.</figcaption></figure>
<h5 id="impedance-measurement-results">Impedance measurement results <a class="direct-link" href="https://www.mictronics.de/posts/Meshtastic-868MHz-Antenna/#impedance-measurement-results">#</a></h5>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Tuned.jpg" alt="Tuned to -27dB @ 869 MHz inside protection pipe." class="img-fluid" /><figcaption>Tuned to -27dB @ 869 MHz inside protection pipe.</figcaption></figure>
<figure><img src="https://www.mictronics.de/img/2024/03/868MHz_Dipole_Detuned.jpg" alt="Detuned to -24dB @ 876 MHz when protection pipe is removed." class="img-fluid" /><figcaption>Detuned to -24dB @ 876 MHz when protection pipe is removed.</figcaption></figure>