18 octombrie 2024

LoRa APRS with Meshtastic DevBoard

After I played a little with my Meshtastic Development Board I previously made (and write about) I decided it will be nice to give it a try into LoRa APRS.

This raise some issues about how different modules are connected to the GPIO's of the ESP32 in my configuration.

I was directed by some early adopters in Romania to the CA2RXU web flasher where I found that the Tracker FW can be loaded into a pretty good selection of boards.


But, what board from those would be compatible with my one? Hmmm.... this would require some research!

First, I had to go to CA2RXU's excellent repository and find some clues about pin mapping; how the LoRa transceiver is connected to the ESP32 on various boards in order to choose the proper version of the already compiled FW from the web flasher tool...

Yes, I could compiled it myself but, apart from being a brave ham, I like to cut corners because I'm a lazy one!

Using the already compiled FW will be a good "investment" because I can keep up with the future versions without going to the compiling process everytime a newer version is released.

Flashing the LoRa APRS I-Gate was easy and I already had one working on my bench but the tracker is a different animal because it needs the GPS input to really be usefull as a "tracker"!

So, I land onto the GitHub page of the project and searched for anything that could hint to my problem. Soon I found boards_pinout.h where various ready-made boards are described.

LoRa module is tied to the ESP32 using this diagram:

MISO > D19

MOSI > D27

NSS/CS > D18

SCK > D5

RST > D23

DIO0 > D26

so I searched for this particular definition.

I found two of them that could suit my needs.

First was the TTGO T-Beam family that catched my eye. Almost all of them have the LoRa transcever connected as I needed.

The main problem with the newer versions of the BOARD (!!!) have the battery management circuit APX192 and this is used for informations about the battery voltage.

 


Well, my board is reading the voltage with ESP32's ADC so, using the firmware could cause some problems. Or not. I don't want (yet) to explore the full code to see how APX192 is integrated into the workflow therefore I choose an early version, of T-Beam FW, the 0.7.

 
I connected the GPS Tx to GPIO 12 as defined into the code but, to my surprise, a message on the small LCD told me that there is no GPS data incoming.
Scratched my head a few hours... Everything was right on the HW side but no GPS valid frames and a suggestion to reset it. Well, that was not an option because I was sure my GPS junk was OK because I previously tested on Meshtastic and it performed like expected!

Left the things like that at around 2AM and next morning I was eager to see the schematic of the TTGO TBeam 0.7... Where the heck that GPS Tx was tied to ESP32?
The schematic is hard to find but a picture of the board told the whole story!
The GPS Tx was connected to GPIO 34!!!

Well well, you little TBeam prick, gotcha! I connected the GPS Tx to GPIO 34 and, voila! that message dissapeared and soon a fix was achieved!

Looking into the code I saw that another board had the same pinout definitions on LoRa TRX with some minor variations.

OK, so, what else do I need to look for? 
The Battery ADC..
 
Most of them are at GPIO 35 which is the same as my dev board so, "cheked".
 
Button? 
Well, I might be a nice feature but I think I can use the tracker without it after I tested the programming interface (web based) -most of them are on GPIO's that are not available on my board...

So? I think we are good with GPS and LoRa Trx working properly!

The next step was to play a little bit with the firmware for other boards and found one that fits well:
TTGO_T_LORA32 V2.1
 
 
 
The blue LED connected to GPIO 15 is there to show me when the tracker is transmitting because I intend to use it without the OLED display; that was just to see how the things works..
 
The battery voltage is not correct, it should indicate 4.2V but this is due to the voltage divider that have different resistors than the TBeam original board for which the FW was written. Yeah, Yeah, I know, I can change the ratio by replacing one resistor... I will think about it, I promise!
 

 
73!
 


08 octombrie 2024

Heltec V3 versus LilyGo LoRa T V2 comparision table

These are two LoRa development boards and both are good for Meshtastic networks.

 

LilyGo:

Heltec T3 V2:

 

Key Takeaways

  • Heltec V3 is a better choice if you need better power efficiency and are working on battery-powered IoT applications because the SX1262 LoRa chip consumes less power than the SX1276.
  • LilyGO LoRa32 V2.1 is a good option for projects that don’t need extreme power efficiency but want to use a well-supported and reliable LoRa chip like the SX1276.
  • Both boards offer similar OLED display capabilities using I2C, but the GPIO pin assignments differ, so check compatibility when switching between them.

 

A very quick reference chart for two LoRa modules, the Heltec V2 and LilyGo T V2 (T is with the OLED already mounted).

Feature Heltec V3 LilyGO LoRa32 V2.1
Microcontroller ESP32 (dual-core, 240 MHz) ESP32 (dual-core, 240 MHz)
Flash Memory 8MB 4MB
OLED Display Yes (0.96 inch, 128x64 pixels, I2C) Yes (0.96 inch, 128x64 pixels, I2C)
OLED SDA (I2C) GPIO 4 GPIO 21
OLED SCL (I2C) GPIO 15 GPIO 22
LoRa Chip SX1262 SX1276
LoRa Frequency Bands 868MHz / 915MHz 868MHz / 915MHz
LoRa SPI MISO GPIO 19 GPIO 19
LoRa SPI MOSI GPIO 27 GPIO 27
LoRa SPI SCK GPIO 5 GPIO 5
LoRa SPI CS GPIO 18 GPIO 18
LoRa RESET GPIO 14 GPIO 23
LoRa DIO0 GPIO 26 GPIO 26
LoRa DIO1 GPIO 35 GPIO 33
Power Management Better low-power modes with SX1262 Good, but SX1276 consumes more power
Antenna U.FL connector for external antenna Spring-type antenna (can be replaced)

30 septembrie 2024

Meshtastic ESP_32 DevBoard

Everyone know MESHTASTIC!

It is the promise of a new communication meaning over long distances and without any infrastructure needed.




Somethink preppers love!

This communication system has two important features that make it particularly effective for facilitating message communication over long distances:
-LoRa type modulation;
-Self-configuration of devices in a MESH network.
 

I will not go into details, Google is your friend and you will learn everything about LoRa modulation and MESH networks.


In this post I want to talk about how I made my own devices, using cheap modules available on various sites in China.

Things are not so simple; you need some knowledge in electronics to deal with the ready made modules on the market or you can order some 100% finished products. Then you need to program them but that's pretty straightforward as it can be done via a web flashing tool that work with Chrome browser.

But if you are a BRAVE HAM like I am and you already have some modules in the junk box, you may want to make it more flexibile from more basic components.

First, the ESP-32 to SX-1278 module (LoRa Transceiver) is this:


Pretty straightforward; the LoRa TRX communicate with ESP32 via SPI interface.

As we're gonna use the already compiled firmware "Meshtastic DIY", I used the connection from that firmware:

MISO > D19

MOSI > D27

NSS/CS > D18

SCK > D5

RST > D23

DIO0 > D26

But, if I was going to design the board, I must do there something to have some features for future experiments...

So, a number of GPIOs were provided.

A special circuit to activate or deactivate the GPS to save some power was added; the special High-Side switch circuit AP2151 was put into design.

Because, sometime, the circuit is not available, U3 can be tied to 3V3 to keep GPS permanently powered.


Then, two 18650 LiIon battery holders were provided, and a TP4056 module to charge them.


 

Some users complained about unstable operation when the voltage of the battery drop beyond 3V so, a watchdog circuit was added. This monitor the voltage of the battery and, if the voltage drop under 3V (or any other voltage of the user's choice), the ESP32 will be kept into RESET mode until the battery is recharged.

The circuit of choice was TLV840MADL30DBVRQ1.

 

 

What other features the board have?

Well, maybe I want to have an external antenna; the SX1278 module came with some kind of short antenna at the end of a thin coaxial pigtail but an external one increase the range of the radio link.  I sometime want to use SMA antennas but to be able to use BNC ones if I want to!

Being a BRAVE but sometimes UNDECIDED ham, I provided the PCB for both kind of connectors. Just a small cut-and-solder of that coaxial and the problem is solved!


 

The GPS of choice ISN'T a uBlox but the but, when designing the PCB, the footprint of the Neo6M was satisfactory to allow installation of several types.


What other feature? Well, a voltage divider to measure the battery voltage, I2C connectors provided for an OLED and for a BME80 pressure/temperature monitor and, of course, a lot of GPIOs spreaded all around the board but some grouped together for some sort of a future expansion board on pogo pins...

In the development process, I ordered the PCB's with some componentes mounted directly in China.

I hoped to solve three problems simultaneously: make the PCBs, buy the components and, if they have to come together, they'd better come mounted on the board! But the count at the fair doesn't match the count at home so, when I received the first version of the PCB, I realized that I had made some major mistakes, which could only be corrected by redesigning it. So, I redesigned it, changed its color from black to blue, made it thinner, from 2mm to just 1mm and ordered it without the components mounted because I was going to transfer them from the V1 boards to the V2 boards...


Then, after I had done the transfer on all ten boards, I realized that in the selection process I had ordered the wrong circuit... AP2141 instead of AP2151. The difference? Well, the former commands the GPS when the command pin is grounded and the later, correctly, commands the GPS when it receives the positive voltage command. So I've hit the wall again...

Fortunately (remember?) I provided a hardware mean to permanently power the GPS... :-)



Next comes replacing that circuit, then will be another hassle...

That's when ham radio bravery goes out after midnight, that's when I get these ideas! 

You can find all the relevant documentation on my Github repository.

LE:

Farnell was very fast and the correct AP2151 is now installed on all boards and everything is performing as expected!

Cheers!


28 august 2024

Kenwood TH-D74 battery indicator and some battery measurements

 During the years of use of my Kenwood TH-D74 I noticed that the battery indicator is a little bit confusing.

I never knew precisely how much "juice" I had in the battery from what the radio show on the LCD indicator.

So, being a brave ham I decided to put some clips on the battery contacts and make some measurements and correlate them with that little icon on the upper right side of the screen.

 

Under 7.2V:

 

7.2V - 7.4V 



7.4V - 8.0V


8.0 V - 8.4V

Between 7.2 and 7.3V, the battery indicator is changing the colour from red to green.

The observation was made with the voltage going from 8.4V to 5.5V - the lowest voltage for which the radio is still working.

Having the radio already connected to my smart power supply, I thought it is the right occasion to make some measurements for the current draw in various configurations.

Here they are...

-GPS OFF

-Battery Save OFF

-SQ ON

-TNC OFF

VFO A: 160 mA

VFO B: 168 mA

VFO A + VFO B: 205 mA

VFO A + VFO B, SQ ON, vol@1/2: 270 mA

FM Radio ON: 210 mA

SD Rec ON:  +15 mA

GPS ON: +30 mA

TNC ON: +~ 2mA

What about when transmitting?

Well, here they are, also:

EL (Extra Low)

VHF: 465 mA

UHF: 401 mA

L (Low)

VHF: 775 mA

UHF: 708 mA

M (Medium)

VHF: 1060 mA

UHF: 990 mA

H (High)

VHF: 1868 mA

UHF: 1920 mA

I want to stress out that these values are determined against my radio and can vary on others.

21 iulie 2024

Switched Mode Power Supply for Battery replacement in R-105m, R-108m, and R-109m radios

I do have an old Soviet "green radio" R-109m which can cover 21.5 to 28.5 MHz which makes it pretty attractive for playing in the field spooking CB-users :-) 

But, a big problem on those old radios are the batteries; they used two sets of NHK-14 each consisting in two batteries in series to get + and - 2.4V.

Since I got this radio I used a simple common ground divider and a 6V/6Ah Lead battery but the big problem is easy to spot: the battery will be quick depleted by the current that goes through the resistors.

(this schematic is from here: https://www.greenradio.de/e_schalt.htm).

I tried to find on Chinese sites a module that can convert a voltage between 9-15V to +/- 2.4V with common ground  but I couldn't find one and I did this through an extensive period of time, around 10 years.

So, being a brave ham, the next logical step was to make my own power supply...

While doing one with linear regulators like LM317 / LM337 could solve the job, the power dissipation would make them unsuitable, being just an expensive version of resistor board I tried first.

Another solution would be to use one LiIon/LiPo cell per each power line (one for positive, one for negative with common ground) but those cells have +4.2V when full charge and that could be too much for the transistor-based DC/DC converter that is built in in these radios! 

I now that first hand, I took out the smoke from a few of them when I was in the army!

 

If we take a look at the internal SMPS of this radio, we see that there is no feedback loop to regulate the output; the engineers assumed that only the proper batteries will be used.

Also, the voltage from the batteries is going to various places in the radio so the positive and negative rails will have different currents so each one must be maintained under 2.4V.

So, with the help of a few nice people that offered some valued advices, I made my first Switched Mode Power Supply from scratch.

Of course, the first iteration didn't get too well; ita failed to keep both voltages well regulated when I draw a bigger current on one of the lines, so I had to made a second one.

This time, everything went perfect!

 The PCB's looks awesome. I ordered 5 pcs.!

 
 I made three of them because I have two hams here that want this too...
 
It fits.

... and it's works too!



Next step will be to make a proper case to put the fuse, the switch and so on.

Some specs:

-Frequency: 50 KHz (+/- 5%)

-Tested input supply voltage: 7.5 to 17V.

-Input recommended voltage: 10 to 17V.

-Current draw when no load attached: 4mA

-Observed efficiency: better than 90%.

-Output voltage (settable): +/- 1.4V to +/- 5V.

-Max, Output current: 2x 2.5A  for short periods, 2x 1.5A sustained.

I did some tests at 100 KHz and it is working well too and, by choosing the right capacitors, a +/- 12V can be achieved without any problems, making it a nice power supply for other old "green radios".

Important thing is that now, I can power my military radio from a large range of batteries, from RC LiIon packs to car battery!

Here is the temperature after some time in a stress test.

Input: 13V

Current: 2.5A.

No radiators.  


By choosing the right wiring of the transformer and cooling, the SMPS can be used to power a broader range of radios with higher current or higher voltage (with right capacitors in the secondary circuit).

All relevant documentation is on Github.

Waiting for the case, I bent an aluminium strip and made a little radiator and did some stress test for a longer time.

Gate signal in blue trace and Drain signal in yellow trace.

Powered by 13.2V and 2.5A on each rail in respect to the common ground, I let it run for 2 hrs.

The only problem was the smell from the resistors...

Here are some thermal camera pics:

Overall:
 

Load:

Transistors:


Diodes:

 
Chokes:




So, after a painfull process of learning some elements of CAD I did some sort of a case, and sent it to a small factory to cut the aluminium and bend it on some machines...
And i wait, and I wait but finally, today they came!

 






Most viewed posts in last 30 days