ISP programming of the (tr)uSDX – more on SPI

ISP programming of the (tr)uSDX (trusdx) showed that filtering on the MOSI pin in that kit distorted the MOSI signal significantly and suggested a workaround (reducing SCK rate) for reliable programming.

Some correspondence prompts a little more information on the nature of the ATmega328P ISCP signals.

The line protocol used is actually SPI, quite a common protocol.

ISP uses SPI MODE 0 (CPOL=0, CPHA=0), shift out on the falling edge of SCK, and capture input on the rising edge.

Let’s look at a three channel capture of SCK, MOSI and MISO of a AVRDUDE / USBasp driving an Arduino Nano.

The capture shows SCK at around 750kHz rate, the default (-B1) rate for AVRDUDE in this setup. Continue reading ISP programming of the (tr)uSDX – more on SPI

(tr)uSDX – review of the directional coupler ADC design

I noted some online discussions where some people had troubles with the displayed forward and reverse RF power  values, and the calculated SWR.

Some of the reports indicate non-zero RF power values displayed when the transmitter is off, symptoms which direct diagnosis in the first instance to review of the ADC input circuit.

This article reviews the hardware design based on documents as published at the date of this article.

ATmega328P datasheet

Let’s start by reviewing some relevant parts of the ATmega328P datasheet.

Above is a simplified schematic of the ADC pin input circuit. Note the current sources IIH and IIL. Continue reading (tr)uSDX – review of the directional coupler ADC design

Sontheimer coupler – transformer issues – an alternative design – FT37-43

Sontheimer coupler – transformer issues discussed problems with the Sontheimer coupler in a recently published QRP transceiver ((tr)uSDX / trusdx), suggesting that the core loss in transformer T2 was excessive.

This article presents an alternative design for the transformer for a coupler for a 5W transmitter.

The above circuit is from (Grebenkemper 1987) and is an embodiment of (Sontheimer 1966). In their various forms, this family of couplers have one or sometimes two transformers with their primary in shunt with the through line. Let’s focus on transformer T2. It samples the though line RF voltage, and its magnetising impedance and transformed load appear in shunt with the through line. T2’s load is usually insignificant, but its magnetising impedance is significant and is often a cause of: Continue reading Sontheimer coupler – transformer issues – an alternative design – FT37-43

Sontheimer coupler – transformer issues – an alternative design – FT23-43

Sontheimer coupler – transformer issues discussed problems with the Sontheimer coupler in a recently published QRP transceiver ((tr)uSDX / trusdx), suggesting that the core loss in transformer T2 was excessive.

This article presents an alternative design for the transformer for a coupler for a 5W transmitter.

The above circuit is from (Grebenkemper 1987) and is an embodiment of (Sontheimer 1966). In their various forms, this family of couplers have one or sometimes two transformers with their primary in shunt with the through line. Let’s focus on transformer T2. It samples the though line RF voltage, and its magnetising impedance and transformed load appear in shunt with the through line. T2’s load is usually insignificant, but its magnetising impedance is significant and is often a cause of: Continue reading Sontheimer coupler – transformer issues – an alternative design – FT23-43

ESP WiFi relay project – update #1

ESP WiFi relay project – preview previewed a WiFi controllable relay board using commonly available low cost hardware from sources like eBay and Aliexpress.

The stimulus for the project is a remotely WiFi controllable relay for reset function in a remote controlled ham station, basically to recover operation of some system element by bouncing the power.

The information presented here applies to development v0.2.

Features:

  • support typical multi channel relay boards;
  • ESP8266 and ESP32 firmware versions;
  • WiFi credentials programmable via a captive web interface;
  • DHCP or static IP;
  • mDNS responder;
  • flexible configuration stored as json file in on-board LittleFS file system;
  • optional authentication to secure remote access.

 

Above is a ESP12F_Relay_30A X2_V1.1 relay board (~$20 inc shipping) deployed for field testing. This board has a switched mode power supply on board and will run on 7-28VDC. In this application, the AC circuit is wired through the NC contacts, and the relays are operated to break the power. Normal operation is with the relays released, and current consumption @ 13.8V is 30mA. Continue reading ESP WiFi relay project – update #1

WriteOptiBoot.bat

I have lots of projects across a range of microcontroller architectures where reliably programming a new instance of the target is required.

Using an IDE to compile and load, eg traditional / common use of the Arduino IDE, is not a path to that reliability.

A better approach is to save compiled binaries, and have a saved method of programming the chip, binary application code, EEPROM if needed, and hardware settings such as fuse bits, options etc.

Let’s look at an example,  a cmd file or bat file to program certain Arduino architecture boards with a customised Optiboot bootloader. Continue reading WriteOptiBoot.bat

USBasp – hints

The USBasp is a really useful and quit inexpensive ISP programmer that suits AVR 8 bit microcontrollers.

This article offers some hints on buying and using the USBasp.

There are lots of sellers of these on eBay, Aliexpress etc… but there are traps in buying them. I recall buying the USBasp with cable for less than $5, but they are more like double that now… or more. Continue reading USBasp – hints

ISP programming of the (tr)uSDX

I noted some online discussions where some people had troubles using an ISP programmer to program the MCU.

I do not have a (tr)uSDX (trusdx), but inspection of the schematic does hint what those users are doing wrong.

Loading the SCK, MOSI and MISO lines risks problems with operation of the SPI protocol used, but the effect depends to some extent on the driver, length and type of interconnecting cable etc.

Here are some measurements of a USBasp driving an Arduino board with 5V Atmega328P 16MHz chip using about 200mm of ribbon cable… AND the MOSI line is loaded with a 0.01µF capacitor (as in the (tr)uSDX schematic).

As mentioned, ISCP uses an SPI protocol and the capture above uses blue for SCK and cyan for MOSI. Continue reading ISP programming of the (tr)uSDX

Switching times in Class-E RF power amplifiers

Class-E RF power amplifiers have become quite fashionable in ham radio in the last decade or two.

One of, if not the main contribution to efficiency in a Class-E RF amplifier is the operation of the active device in switching mode where it is either not conducting, or conducting hard (saturated, with very little voltage across it). Both of these are very low dissipation conditions, but in the transition between these states there is significant current and voltage present, the product of which gives significant instantaneous power… so the idea is to make this transition very fast so that the average power is low.

This article discusses effect of slowed switching times on PA efficiency.

Above is a circuit above is from (Sokal 2001) which explains the amplifier and gives guidance on selection of components. Continue reading Switching times in Class-E RF power amplifiers

FNIRSI FNB48 USB meter – cable resistance measurement

The FNIRSI FNB48 USB meter is a flexible USB power meter that incorporates a facility to measure the resistance of a USB cable. The tested unit uses firmware v2.50.

The operation also needs a constant current load of 0.5 – 1A (for most cables).

The method is: Continue reading FNIRSI FNB48 USB meter – cable resistance measurement