Monday, 8 February 2021

QRP Labs QCX Mini - Part 3: a portable powerpack

The QCX Mini! An amazingly small and versatile mini CW - only transceiver for amateur radio. Read all about it here:

QRP Labs Kits website

The kit is really nice out of the box, but there's always room for modifications. Some are necessary, some are just nice-to-haves or just plain silly (as always, I'll leave it up to you to categorize this article).

A portable power supply

Having a portable transceiver is nice, but it will not do much good if the battery isn't equally portable. Here's a quick description of my solution to this.

What type of battery to use?

To achieve optimal portability we will need a compact battery pack that is easy to charge and has a good capacity to weight ratio. RC planes and model cars make use of very compact batteries, but these generally require a special charger with balancing connector.

Fortunately battery packs exist with built-in balancing boards. While more expensive, these are much easier to connect and charge. The extra costs are offset by the fact that they can be charged with a normal adapter.

The parts

It's simple really. This is all you need:


I've settled for a 2600mAh Li-Ion battery pack from Ansmann, a German supplier of high quality batteries. I'm sure other suppliers exist, but this one is readily available here in Europe. Why this one? Well, because it includes all this:

  • Balancing logic to properly charge each individual cell
  • Charge controller, to allow charging from a standard Li-ion charge adapter
  • Electronic short-circuit protection, resets automatically after next charge cycle
  • High voltage (overcharge) protection
  • Low voltage (discharge) protection

So, adding a fuse holder, switch and DC socket and some time leads to this:


Perfect! At 100x82x27mm the enclosure is a bit larger than the QCX Mini (but not much) so they can be stacked op top of each other. The battery pack supplies 14.4 Volts and even a bit more when freshly charged,  so if you have a version 1 QCX mini please make sure to apply the regulator mod first!

(Don't know what that is about? Please check this article)

The QCX Mini draws less than 90mA @14.4Volts even with the backlight on, and less than 1A on key down, so 2600mAh will keep the Mini happy for a long time; certainly more than a day of normal use. 

Parts List:

  • Battery pack: Ansmann 4INR19/66 4-cell Li-Ion (Conrad no 2250358)
  • Fuse holder: Conrad no 533769 or equivalent
  • Switch: Conrad no 703486 or equivalent
  • Metal enclosure: EBay 143844704460 (or search for 'Extruded Aluminium Project Box')
  • Charger: 16.8Volt / 1Amp Li-Ion charge adapter (AliExpress, Ebay or local supplier)

 

Any comments on this article? Need more details? Please drop me a line below!

QRP Labs QCX Mini - Part 2: Adding Cooling

The QCX Mini! An amazingly small and versatile mini CW - only transceiver for amateur radio. Read all about it here:

QRP Labs Kits website

The kit is really nice out of the box, but there's always room for modifications. Some are necessary, some are just nice-to-haves or just plain silly (I'll leave it up to you to categorize this particular mod).

Cooling the RF finals

The QCX Mini is advertised as a 5-Watt transceiver and this goal can definitely be achieved on a 12 Volt power supply, especially if you follow Hans Summer's video tutorial here:

Hans Summers: Tuning up your QCX+

A bit of tweaking yielded just over 5 Watt @12 Volts. However, increasing the power supply voltage to 14.4 Volts (standard output for a LiFePo4 battery pack) then saw an increase to over 7 Watt! The RF power amplifier did start to run a bit hot though. And as usual, that's when my OCD decided to take over. What if there was a way to improve the cooling?

Let's dig in shall we?

The RF power amp is designed around three BS170 MOSFETS, held down by an M3 bolt and washer. First I decided to just add a second (larger) washer on top, and add some heat sink paste to improve heat conduction. Like this:


While this will probably help a bit, it didn't look like a worthwhile improvement. Hmm, I wonder if there are cooling solutions small enough to fit on top of the transistors?
But of course there are!


BGA heat sinks can be as small as 14x14x6mm, almost (but not quite) small enough to fit in the QCX Mini. A couple of the fins will need to be removed or filed down, and it needs a 3mm center hole.
I also reshaped the bottom somewhat to improve thermal contact with the transistors:


That's better! Add some new thermal paste and refit, using the original bolt and a smaller washer:


And yes, it really does fit in the very limited space available under the display board:

Will it make a difference?

This whole exercise was meant only to satisfy my curiosity really. I don't know if it will make a difference in the long run; I don't even know if cooling these transistors is even necessary or effective. But at least I've given them all the care and attention I was able to think up. I will still keep a number of BS170 in stock though, just in case...

Any comments on this article? Need more details? Please drop me a line below!

Sunday, 7 February 2021

QRP Labs QCX Mini - Part 1: replacing the 5 Volt regulator

Many folks in the amateur radio community may already have heard of the latest wonder from QRP Labs: The QCX Mini! An amazingly small and versatile mini CW - only transceiver for amateur radio. Read all about it here:

QRP Labs Kits website

Nice! So why this article? You definitely don't need another 'putting together the QCX Mini' article; there's enough of them already and the official building instructions are high-quality; they leave nothing to chance.


The story of the fragile QCX Mini Voltage regulator

Although most builders seem to have had no problems so far, some have reported failure of the 5Volt voltage regulator. When this part fails, all 3.3Volt and 5Volt parts will receive the full power supply voltage. Needless to say this causes the magic smoke to escape from many parts inside, some of which are very small and hard to reach and replace...

There's fixes, and then there's fixes

The cause was quickly identified by Hans Summers, the owner of QRP Labs and designer of this kit. It appears that a inadequate capacitor was placed on the board by the manufacturer, leading to excessive ringing when power was interrupted in quick succession. The fix was to add a capacitor over the regulator power input like this:


This takes care of the issue without having to replace SMD parts. The diodes in the picture were added by me. They are a pair of 5.6 Volt zeners that will hopefully act as a 'crowbar', tripping the power supply fuse if the output voltage ever rises to dangerous levels.

You do have a fuse in the power supply line, right? RIGHT???

The problem with this?

It still leaves the original AMS1117 regulator in place, which has a maximum input voltage of 18 Volts (absolute maximum input). This left me a bit uncomfortable, as I was planning to use a 4-cell LiFePo battery which puts out over 15 Volts when freshly charged. That's a bit too close for comfort for me.

Several QCX Mini builders have therefore replaced the AMS1117 with a more sturdy / reliable part, usually of the 78M05 variety. The 78M05 is available in SOT223 and TO252, both of which will fit with minor modifications. I only had the bigger brother in stock unfortunately, the 7805 in TO220F. But hey, proper tools will make everything fit :)


Done! A bit more tweaking was necessary to make the 7805 fit:


The pin layout for 78xxx type regulators is different from the AMS1117, so to make the part work the connections will need to shift to the left:


 The leftmost pin is then connected to the original input protection diode:


Last but not least, a 1uF tantalum capacitor is added across the input pins (the 7805 requires at least 330nF according to the datasheet). The original SMD cap (C38) I've removed as it apparently was rated for 10 Volts so why take the chance?

And it all fits! More importantly, the 7805 has a 35 Volts maximum input voltage, which is enough to end my worries.

Do you need to do this?

Absolutely not! Many builders are using the QCX mini with only the recommended extra 10uF capacitor fitted and as far as I know that's working fine. Also, only the first batch of Mini's will benefit from this mod. Later revisions will have an 78M05 fitted as standard.
This article was created as a guide only for OCD sufferers. Like me :)

Are you missing anything in this article? Need more details? Please drop me a line below!

Building a Collinear antenna for the Things Network DIY Gateway

Although the DIY GPA antenna built in 2018 was working just fine, there's always room for improvement (or at least I think so). For details on the original build you can have a look here:

Building an outdoor TTN gateway GPA antenna

As this was supposed to be another one-afternoon build, I was looking around for a similar design, suitable for placement in the same location. One of those designs is the Collinear antenna. The advantages are more gain and compact design, and it's perfectly suited for a PVC enclosure for easy weatherproofing.

So how to build it?

A Collinear antenna is not as easy a build as the DIY GPA. A number of calculators and designs are available on the Internet, but after trying a number of them, using the original GPA antenna as a base, none of these seemed to yield acceptable SWR on my NanoVNA antenna analyzer:
 


 So I went back to basics and used an online calculator and example from Jeroen Steenman:

Collinear Dipole Antenna Design Calculator

He describes a very simple design, with quarter-wave radials, which of course is very much like the original GPA so most of the GPA antenna parts can be re-used. Sweet!
So now the final design looks something like this:


Following the calculator results, the collinear antenna is built using three identical half-wave radiators, separated by two quarter-wave length coils. After a bit more tweaking I was able to get the SWR for this antenna below 1:1.2 for 868Mhz.

End result:

And back to its old position on the roof:


Wrapping up...

Although I was indeed able to finish this build in one afternoon, I highly recommend having an antenna analyzer on hand when trying out this build. The length of the radiators as well as the size and diameter of the coils really require millimeter precision to get an acceptable SWR (and any mismatch will probably also negatively affect the radiation pattern, although I cannot measure this so time will tell).

The white PVC pipe also affects the tuning a bit, so final measurements should be done with the antenna mounted in the PVC pipe! Yeah, I found out the hard way :)

Want more details?

For more details on this build please leave a comment below!

Sunday, 29 November 2020

Nissan Skyline R34 GTT remote locking & alarm

So what's it like to own a Skyline?

I'm not gonna lie: the R34 Skyline is a car that I've lusted after for years, and seeing this beauty in my garage never fails to put a smile on my face!

The downside

Constant worries! Theft risk was apparently not much of a problem when this car was produced. Although the car does have central locking, Nissan didn't think it was necessary to fit an alarm system. How different is that situation now, with people constantly taking pictures of the R34 on the streets and in parking lots. To stop myself from having to look outside every five minutes one of the first things that needed to be added was a decent alarm system.
NO, I'm not going to share details on the alarm for this car, LOL. However, one of the things I needed to find out was how to link the alarm's central locking feature to the car's existing electronics. The way to do this is described below; hopefully it will help others in the future.


The challenge

The wiring diagram clearly shows the lock / unlock connections that need to be used to add the new remote locking signals coming from the alarm unit (pins 10 and 11 on the original Remote Locking module). Pulling these pins low (e.g. to ground) will activate the lock/unlock function.

The issue with this? When using these pins, only the driver's door will lock/unlock with the new remote! Something clearly needs to be changed to also make the passenger door work.

 

A simple solution

Luckily the fix for this problem is an easy one. First, locate the Remote control entry module mounted next to the steering column:


Remove the board from its plastic case:

The only change that will need to be made is to bridge the two diodes located in the top right corner of the picture above. Here's a detailed picture of the diodes:


That's it! The diodes separate the signals for the doors; without these the alarm remote will work as expected, locking and unlocking both doors.

 

Did this help you? Please let me know

Please feel free to leave a comment below if you have any questions about this change. Also, I'd like to hear from you if this article was helpful to you!

Friday, 4 May 2018

Building a TTN gateway

Following a Things Network meeting in my hometown, I decided to try and move things forward by donating a Raspberry Pi / IMST 880A - based gateway to the guys from Zuid-West TV . They have access to a number of high locations in the area, and are currently building a nice metal cabinet with an internal power supply, which will then be installed on top of one of the highest buildings in Bergen op Zoom. More on that later!
However, in the meantime my original TTN gateway in Roosendaal had suddenly gone very quiet. As it turns out, the gateway range is suddenly limited to about 10 meters! Clearly something is amiss here? It seems that the internal RF receiver has given up, something that cannot be easily repaired and needs to be looked at by the Things Network team.
As there is no way to predict how long this will take, I've quickly built myself a new gateway, based on the proven Raspberry Pi and IMST IC880A board...

A quick 'n dirty gateway build!


So here's what you need to build yourself a multichannel gateway:

The main parts shown in the picture are a Raspberry Pi 2, the IMST IC880A concentrator board, an adapter board to connect the two, and a small housing to put the gateway into. Quite easy, no? Well, that depends on how fancy you want your gateway to be. I just needed it to be simple and reliable, so here's what I did:

1: Put the concentrator and adapter board together
I wanted my gateway to be as compact as possible, so I've soldered the concentrator directly onto the adapter board. I also cut off the original micro-usb connector from the adapter, because it would not fit in my compact housing. However, the adapter also comes with headers which can be used to plug in the concentrator so it is removable.

2: Connect the adapter to the Raspberry Pi
My housing has slots to hold a pcb board, so I've cut a blank board to size and mounted the gateway on it using 5mm plastic spacers. This way no screws are visible from the outside, which is a bonus :)

3: Slide the gateway assembly in the slots

4: Add power supply connections
 Although it is possible to connect the power supply directly, I much prefer to use a proper power connector. I also added an LED, and made a cutout for the network connector, which makes it look like this:
Wiring power to the board was done by connecting power directly to pins 21 (+VDD) and 22 (GND) of the concentrator board. The adapter will then also power the Raspberry Pi, keeping the number of wires to a minimum.

 5: Put it all together
The other end has the SMA connector, which connects to the IMST board. Removing this end will also allow access to the SD card:
The end result looks like this!

Installing software and registering the gateway


Now that the gateway is finished, you will need to install and configure the whole thing of course. Instead of describing this whole process, I'm going to be lazy and refer you to the excellent walk-through put together by the Things Network Zurich group:

From zero to LoRaWAN in a weekend


They've done a very good job in describing the whole installation, which will result in a fully functional gateway. Great work guys!

Parts list


IMST IC880A concentrator board
Raspberry Pi (preferably v2, but v3 will also work)
Adapter board (I used the one from Hackables.cc)
U.Fl to SMA pigtail
5V / 2A adapter (I used a Raspberry Pi adapter)
A suitable housing (mine is a Hammond 1455K1202)
Power connectors
Some nuts, bolts and spacers (depends on the housing used)

Tuesday, 10 April 2018

Building an outdoor TTN gateway GPA antenna

After playing around with a number of TTN nodes, we quickly discovered that having an indoor antenna on the gateway is not ideal. An outdoor antenna should yield far better results, especially because I do have access to my own rooftop which is about 11 meters high. Commercially available high quality antennas are quite expensive however, so it had to be something simple and DIY.

The DIY way

Luckily for me, several articles have been published already on building TTN antennas. The 868Mhz frequency also means that small and cheap antennas can be built without the need for special or exotic materials. The DIY GPA design described by Lex Bolkesteijn on The Things Network seemed like an excellent starting point, with clear instructions and a good amount of pictures:


So, after a visit to a couple of local parts shops I ended up with this:



The steps below describe the building process. As you can see, I tried to make this GPA antenna as weatherproof as possible, even though it is just an experiment. It will probably turn out to be the first of a long line of antenna experiments, but as long as it is on my roof it will need to be able to function in all kinds of weather so why not be thorough?

First, put together the GPA following the instructions in the original article:


Then, cut the antenna to the correct size and attach the N-type connector:

 

The result looks something like this:




Last step: put the new antenna up on the roof.

I opted for a wall-mounted bracket so the whole thing would be easily accessible. The DIY GPA now looks like this, about 12 meters high:



Results


So far, so good! The gateway sure seems to pick up a lot more traffic with the new outdoor antenna, although how much of this effect can actually be contributed to the GPA design remains a guess, as just putting the antenna outside will have had a positive effect also. Next step is of course to build a different design (probably a co-linear) and compare. Stay tuned!

Parts list

Antenna:
2mm copper wire (50cm is enough)
crimp-type eyelets (4x)
PVC end caps and tubing (available at the local DIY shop)
3mm x16 screws and nuts (4x)
4mm x13 screws (4x)
N-connector chassis mount
N-connector for Aircell-7 cable
SMA-connector for Aircell-7 cable
Aircell-7 cable (keep this as short as possible!)

Installation:
Wall mount (I used a satellite dish mount)
Clamps (2x)
Galvanized pipe (I used 28mm central heating pipe)
8mm Screws and plugs (4x)

I was able to build the entire antenna for around 65 Euros. Keep in mind however that the installation materials, cable and connectors were much more expensive than the actual antenna...

Friday, 2 March 2018

The STM32 LoRa Discovery kit: adding sensors

(Playing with the X-NUCLEO-IKS01A2)

So, now that the STM32 board is up and running, it's time to start doing something with it. Luckily for me, the friendly folks at the STMicro stand also put a sensor expansion board in my hands. This X-NUCLEO-IKS01A2 board (what's in a name) carries a number of sensors, as well as extension connectors and such:

Key Features (taken from the STMicro website)

  • LSM6DSL MEMS 3D accelerometer (±2/±4/±8/±16 g) and 3D gyroscope (±125/±245/±500/±1000/±2000 dps)
  • LSM303AGR MEMS 3D accelerometer (±2/±4/±8/±16 g) and MEMS3D magnetometer (±50 gauss)
  • LPS22HB MEMS pressure sensor, 260-1260 hPa absolute digital output barometer
  • HTS221: capacitive digital relative humidity and temperature
  • DIL24 socket for additional MEMS adapters and other sensors
  • Free comprehensive development firmware library and example for all sensors compatible with STM32Cube firmware
  • I²C sensor hub features on LSM6DSL available
  • Compatible with STM32 Nucleo boards
  • Equipped with Arduino UNO R3 connector
  • RoHS compliant 
The board communicates through I2C and libraries can of course be downloaded from the website.

Let's send some data!


 As with the LRWAN1 board, it really pays off to read at least part of the documentation included in the library. After setting up I2C and configuring the library to use the correct addresses, it is pretty easy to create a compact payload for LoRa transmission:

BSP_sensor_Read( &sensor_data );

temperature  = ( int16_t )( sensor_data.temperature * 100 );

pressure     = ( uint16_t )( sensor_data.pressure * 100 / 10 );
humidity     = ( uint8_t )( sensor_data.humidity );
batteryLevel = ( uint8_t )(HW_GetBatteryLevelInMilliVolts( ) / 100);
lightLevel   = ( uint8_t )(HW_GetLightLevelRaw( ));
soundLevel   = ( uint8_t )(HW_GetSoundLevelRaw( ));

(Full source code available on request)

The lightLevel and soundLevel values are not taken from the included sensors. Because the NUCLEO boards include Arduino-style headers, I decided to stick an Arduino breadboard on top, and included (analog) sensors for sound and light, which are read by two ADC channels. So now the whole contraption looks like this:

Now to find a use for the remaining accelerometer sensors... Any ideas? Please let me know!

Sunday, 4 February 2018

Getting started with the STM32 LoRa Discovery Kit


After having done a number of embedded projects using the Microchip processors and development stack, I figured it was about time to try something else for a change. Fortunately I was able to attend the first TheThingsNetwork developer conference in the Netherlands, where I was given an ST Microelectronics B-L072Z-LRWAN1 Discovery board. This board contains everything you need to get started in the world of LoraWAN. The STMicro site lists the following specs:

Key Features
  • CMWX1ZZABZ-091 LoRa® module (Murata)
    • Embedded ultra-low-power STM32L072CZ Series MCUs, based on ARM® Cortex® -M0+ core, with 192 Kbytes of Flash memory, 20 Kbytes of RAM, 20 Kbytes of EEPROM
    • USB 2.0 FS
    • 4-channel,12-bit ADC, 2xDAC
    • 6-bit timers, LP-UART, I2 C and SPI
    • Embedded SX1276 transceiver
    • LoRa® , FSK, GFSK, MSK, GMSK and OOK modulations
    • +14 dBm or +20 dBm selectable output power
    • 157 dB maximum link budget
    • Programmable bit rate up to 300 Kbit/s
    • High sensitivity: down to -137 dBm
    • Bullet-proof front end: IIP3 = -12.5 dBm
    • 89 dB blocking immunity
    • Low RX current of 10 mA, 200 nA register retention
    • Fully integrated synthesizer with a resolution of 61 Hz
    • Built-in bit synchronizer for clock recovery
    • Sync word recognition
    • Preamble detection
    • 127 dB+ dynamic range RSSI
  • SMA and U.FL RF interface connectors
  • Including 50 Ohm SMA RF antenna
  • On-board ST-LINK/V2-1 supporting USB re-enumeration capability
  • USB ST-LINK functions:
  • Board power supply:
    • Through USB bus or external VIN /3.3 V supply voltage or batteries
  • 3xAAA-type-battery holder for standalone operation
  • 7 LEDs:
    • 4 general-purpose LEDs
    • A 5 V-power LED
    • An ST-LINK-communication LED
    • A fault-power LED
  • 2 push-buttons (user and reset)
  • Arduino Uno V3 connectors
  • ARM® mbed (see http://mbed.org
 Nice! Sounds like the perfect opportunity to start in the world of STMicro ARM processors (More info can be found on the STMicro website).

So now: how to get it to work? Although there were several workshops on this subject during the conference, there weren't many people that actually got the board to work and connect. The instructors did their best, but the STMicro development stack just isn't as straightforward to install and set up as Arduino's. Each workshop left us struggling with a multitude of drivers to install, accounts to set up and a confusing number of choices on Development tools. A quick Google search revealed that we were not alone in this; countless discussions on forums are describing the same experience. Once home, I decided to take some time to find out what actually needs to be done to get the board to work and do a small tutorial, so here it is!

Prerequisites

 

For this writeup I am going to assume that you already have a TheThingsNetwork account, and are familiar with LoraWAN. If not, please go to the TheThingsNetwork website and create an account (it's free), and read up on LoraWAN and TTN (This link is a good start).
Before downloading from the links below, you will also need to create an STMicro account (Click here). You will need it to access the downloads on their website.

What to get?

 

STLink driver
The Discovery board comes with a built-in ST-LINK programmer / debugger, for which you will need a driver. This can be downloaded here. Please install this FIRST, before plugging in the Discovery board.

I-CUBE-LRWAN (LoRaWAN software expansion for STM32Cube)
This package contains all libraries and demo projects. It can be downloaded here.

KEIL MDK
In this tutorial I've decided to use the Keil MDK IDE. You can download it here. Please take the time to create an account and register your version of MDK (it's free for STM32F0 and STM32L0 series processors). You will need to have a license in place to be able to successfully build the demo application.

Putting it all together

 

Set up communications
Once the driver is installed, you should be able to start communicating with the Discovery board. The board comes pre-loaded with firmware which will send the DevEUI, AppEUI andAppKey over a serial connection. So, let's make this happen!
First, Connect the board and then open your Device Manager. Your board should be listed in the ports list:

On my system the board COM port is COM5. Open a serial monitor program (I used the serial monitor in the Arduino IDE) and select COM5. Now press the Reset button on the board and something like this will appear:

Register your device
Now go to console.thethingsnetwork.org and register your device on the TTN. Never done this before? Not to worry; TheThingsNetwork has an excellent tutorial right here.
The DEVEui will need to be entered during registration; the AppEui and AppKey will be generated during device registration. These we will need to enter in our project.

Enter the keys in your Project
Now it's time to open the demo Project in Keil MDK. Start the program and open the demo project (Project -> Open Project...) located in the I-CUBE package you have downloaded. There is a separate demo project for each Discovery board and tools stack, which leads to a quite complicated directory structure. This is what it should look like:

ICUBEDIR\Projects\Multi\Applications\LoRa\End_Node\MDK-ARM\B-L072Z-LRWAN1

Load the project file and build it to make sure that all components are OK.
Now it's time to enter the keys. This needs to be done in the file commissioning.h, which is located in the directory Lora\End_Node_inc:


Open the file in MDK and enter the AppEui and AppKey. Do not alter the DevEui; this is not used in OTAA activation. Save the file.

Build the Project and update the Discovery board
Now Rebuild the Project. If the build is successful, you will be able to load the generated firmware into the Discovery board. Use menu Flash -> Download to update the firmware in your device and then press the Reset button on the board.

Done!
The serial monitor should now list something like this:

That's it! Your device is now joined and will start sending data to the TTN network. You can of course monitor this in the TTN console.


Next steps?

 

Getting the device to work is only the first step of course. You will now need to take it further by adding sensors and modifying the code to make it do what you have in mind. Good luck, and please leave feedback below if you found this tutorial useful!