19 February 2021

Xiegu G90 - backlight for Front panel keypad

There are not many features missing from the Xiegu G90... At least, when is about hardware, in the firmware, there is another story.

When I was replacing the STM32F103 in the front panel, I was asking myself if I can add backlight to the front panel keypad. At that moment I was focused on that repair job and I put the ideea on other shelf.

These days I will get involved into a big project and I will have to let down this kind of PMR (Pimp My Radio)  projects so I thought this is the right time to gave it a chance.

I have around some SMD LEDs and some ideea so, I get to the bench and opened, once more, the front panel assembly.

Xiegu G90 inside exploded view

I did some tests about how the light is diffused in the rubber keypad and I investigated the places where I can put some LEDs.

The space between the PCB and the keypad is none so we need some alteration in the keypad rubber to accomodate the LEDs and the wires.




First try was with the tip of the soldering iron but, to my surprise, nothing had happened.

Then, I tried to use a 3.5mm drill to remove the rubber in an "organised" manner... nothing! The rubber act like rubber and get back into the hole.

Short story: I couldn't found the proper way to make 3mm holes with low risk of destruction.

The problem is that I must embedd not only LEDs but also the wires that goes to them. About the wiring, I had in plan to use 26 Gauge wrapping wire (around 0.5mm) so a proper way to make them too has to be found.

Here is the optimal position for a bunch of wide angle SMD LEDs to diffuse the light into the keypad.

NOTE 1: the botom line of keypad is already illuminated by the backlight from the LCD. Not very bright but enough to be seen into the dark.

NOTE 2: the colour of the LEDs has to be different than the two LEDs for Function and CW decoder because the light will be conducted in those too and will cause them to appear lit.





18 February 2021

Custom ATMEGA328p board

 There is a time when an Arduino is too big and has useless features.

An ATMEGA328p on a breadboard, using internal clock at 8 MHz with a common Arduino Bootloader has to be made.

ATMEGA328 datasheet.

Some references here, notes to myself but also usefull (maybe) for others.

Pin map:



The Reset circuit should be a resistor from RST pin to Vcc and a 0.1uF capacitor from RST to whatever....



17 February 2021

Xiegu G-90 Audio Gain for quiet nights

 I use to listen to CW to train the reception but not always I am not so willing to use the headphones. Sometime, late at night when I am working at some projects the sound can be heard in the bedrooms and I already had some complaints about this.

On Xiegu G90, the minimum audio level is still too loud for this and some faint signals need to keep the RF Gain at higher settings so something about the audio has to be done.

The audio volume is digitally defined into the audio codec in the Main unit and even I sent the issue to Xiegu, nothing has been done yet (FW 1.77).

Therefore, I felt I must do it myself...

The audio amplifier is made around a wellknown LM386 in SOIC package, not the best for thermal dissipation, if you ask me...

LM386 is a very versatile audio power amplifier designed to be used in portable applications. 

It feature a wide supply voltage range, between 4V and 12V (some versions from 5V to 18V), and can deliver 125 mW on 8 Ohm speaker with 0.2% distorsion.

Because it is designed for minimum external parts, it has an internal fixed value resistor (1.35 kOhm) for an amplification factor of 20.

Internal schematic of LM386:




This internal resistor can be bypassed with an external network to achieve higher gain (up to 200 or 46db) and Xiegu put there a 10uF capacitor and a 100 Ohm in series.

Sidenote: I found a nice online gain calculator for LM386.

The values used by Xiegu in G90:


According to the formula, the Gain is 124.5.

After tweaking with some Rext values, I replaced the original 100 Ohm with a 300 Ohm for a Gain of 76.

Now, the audio is pretty nice, the first step of volume settings is just where it should be for a quiet night.

Audio circuit, PCB layout in Xiegu G90:


Yeah, in the picture is the original resistor. I didn't take a picture after the mod :-( 

I played a lot there with various values for resistor and capacitor then i remind to take a picture. Well... please forgive me :-)


31 December 2020

Trick to protect the RJ45 connector tab

 Many transceivers have RJ45 connectors on the microphones and many of them broke at transport or even in the storage box when searching for stuff.

I do have a well equipped laboratory with all kind of stuff, including the proper tools to repair a broken RJ45 but... I do have a problem with colours! Yeah, I barely can distinguish between red and green, at least the red and the green used in wiring. And in resistor code. Traffic light pose no problem, I can see that green and that red so, no worry with me on the streets at the same time with you, HI.

So, I thought myself it's better to prevent than to cure (this came with the age, probably) so I searched for a quick, cheap and reliable solution to protect that little shit tab.

An ideea popped out from the void and here I am, making protective caps from some piece of heatshrink tube.

Find a suitable HS tube, put the connector inside it; the HS tube has to overpass the tab with around 3mm not more!

Then gently apply heat observing the molding. When it wrap the connector stop heating and cut the useless part outside the connector.

After that, gently move the HS tube to extract the connector.

And this is all... 

I suggest to use a dummy RJ45 or some kind of ethernet cable as a jig. 

Do not heat the HS tube with the real RJ45 inside, you may mess it up and cry a lot.








20 December 2020

HiRes pictures from the XIEGU G90 transceiver

 Here are some pictures of the PCBs in the Xiegu G90 transceiver.

The Main unit.

        Control board.


RF Front End Bandpass Filters 

As far as I can identify, there are 10 bandpass filters switched with PIN diodes. Far away from the schematic!

 


 

 

PA RF Board


Reverse voltage protection detail



NTC (Negative Temperature Coefficient resistor) problem
There is a serious gap between the NTC which compensate the bias for the temperature increase and the PA RF transistor case. This is one potential cause for premature failure in the final stage especially in TX intensive modes like FT8.
The solution is to gently bent the pins of the NTC to make physicall contact between them and apply a small blob of thermal silicone GLUE, not usual paste.
This will prevent a future gap due to vibrations or shocks and will increase the mutual temperature transfer thus an adequate bias voltage. 

Before:


After:




Schematic (work in progress)

-I removed the schematic as I found error in the AIC3204 area and I must redraw it. I will find a way to have it updated.






19 December 2020

Xiegu G90 External Speaker modification

I like to hack the radios to add new features or to enhance the features already existing.

After playing a while with the G90 I found necessary to have an external speaker because the internal one, altough really loud, it lacks low frequency response.

Trying to connect an external communication speaker gone nowhere because the signal was too weak.

I do have some amplified speakers but I don't want to complicate the setup so, more gain was needed.

Therefore, I opened the Main unit of the radio and start looking inside.


To my surprise, the audio is routed from the LM386 audio power amplifier to the internal speakerphone or to external headphones  with a nice SMD relay. 

When the signal is going to the outside world (a.k.a) Headphones, a 100 Ohm resistor is in series with the HP which explain the low signal. 

I replaced that with 3 10 Ohm in paralell to have some sort of

load in case we shortcircuit the HP Jack. And this is very probable because the signal is going to the tip and to the ring of a stereo 3.5mm Jack. 

This is made to accommodate the usual Stereo Headphones every Chinese ham can buy from Shenzen.

Now the radio has external speaker without too much trouble. 

Because I am using modified Kenwood HS-5 Headphones the audio level is OK.


73 de Adrian yo3hjv @ December 2020

Xiegu G90 - reflashing Bootloader into Front panel microcontroller

After inspecting the Main unit of a brand new Xiegu G90 transceiver for some mods with the Front panel removed, the radio got into a fatal failure.

Symphtomes:

After separating the Front panel from the Main unit and reconnect it, the front panel shows: "Comm Lost" in red and no feedback from the panel to the Main unit was possible.

Hardware investigations showed 0 (zero) Ohm (Shortcircuit) between the Main unit (Tx UART) to Front Panel (Rx UART). Removing the Front panel, the shortcircuit was still present on DB9 pin#3. After breaking apart the Front panel case, the DB9 pin # 3 was traced directly to PA10 – USART 1 Rx on STM32F103RCT6 (LQFP64) microcontroller.

A higher current than usual was observed on the Power supply ammeter (around 100mA increase over the usual consumpition) and the chipset was hotter than usual.

A small cut was made on the PCB right near the uC to confirm the problem is on the chipset itself and that was confirmed by measuring it with a DMM the resistance between Pin # 43 and Pins#18, 31, 47, 63.

A replacement STM32F103 was ordered from Reichelt.

 

1.       Some  pre-requisites;

a.       Digital Multimeter

b.      Fine tip tweezers

c.       Various type of screwdrivers

d.      Magnifying  glasses and microscope

e.      Hot air soldering/desoldering station

f.        Fine tip soldering iron

2.       Must have:

a.       Desoldering braid

b.      Soldering flux

c.       4 pin male header straight in line 

d.      ST-Link V.2. A clone will do the job very well. 

e.      Some Dupont wires (female-to-female ones)

f.        A PC with 1 free USB 2.0  port.

g.       Antistatic wrist strap band.

3.       Software needed:

a.       STM32 ST-Link Utility - STSW-LINK007

b.      STM32 Cube Programmer   

I will not insist in dismantling the Front panel; it involves a lot of small screw and need a lot of attention to get to the bare PCB.



ATTENTION:

Please observe the ESD protection measures and wear the antistatic wrist strap; connect it to the GND of the Front panel PCB and use an ESD protected soldering iron.

There are some connectors there; the ones with flexible ribbon work by lifting the darker clips with the tip of the tweezer on both sides of the ribbon. Do not insert the tweezer between the ribbon and the locker!

The wired connector for the BAND UP/DOWN and MODE UP/DOWN has to be pulled from the PCB connector. Be gently with it!

Please, be carefull with the LCD and REMOVE IT before you start the work on changing the STM32F103! Put it in a small bag and forget about it untill you finished the job.

Use proper screwdrivers and keep track of the screw you removed.

I will not enter into details on how to work with LQFP SMDs but, when you are removing  the STM32F103 use plenty of Flux. 

Clean the PCB pads. Inspect them with a microscope or good magnifier for problems.

Carefully  place the new STM32F103 on the PCB paying attention to the pin numbering.

Clean the PCB with isopropillic alcohool. Better if you have an ultrasonic cleaning bay.

Now, it is time to take care about the connection to the ST-Link.

Near the RJ45 microphone connector there is a marked place for 4 pins in a single row. That is the SWD connector and there you must place a proper connector. I used a male connector but can me a female one.

Looking from the back of the PCB (opposide to the rotary encoders) and with the RJ45 connector on the right side, the 4 pins are on the lower right side and, from the left to the right they are:  Vcc (3.3 V),  SWDIO,  SWCLK and GND.




In the first stage, we will use the voltage supplied by the ST-LINK SWD (3.3V).

The Front panel is not connected to the Main unit!


Step 1:  Install the STM32 ST-Link Utility - STSW-LINK007 (https://www.st.com/en/development-tools/stsw-link007.html). Follow the instructions for registering the account on the ST webpage.

Start the program; Connect the ST-Link to the PC. Select ST_LINK > Firmware update.






Close the program.

Step 2: Install the STM32 Cube Programmer (https://www.st.com/en/development-tools/stm32cubeprog.html#get-software). 

Run it.


Step 3: Disconnect the ST-Link from the PC then reconnect ST-Link to PC.


Step 4: Connect DuPont female-to-female wires to GND, SWDIO, SWCLK and 3.3v on the ST-Link and then to the SWD pins on the PCB.





Step 5: CHECK AGAIN THE WIRING!

Step 6: On the STM32Cube Programmer, read the STM32F103 to check the connection. You should see a lot of FFFF's (here is an already programmed STM chip).


Step 7: On the STM32Cube Programmer, load the Bootloader .bin.

           BROWSE to select the file>


                   Check for the START address for writing the BL. Should be 0x0800000. Select "Verify programming".
            "Start programming"



The bootloader should be now programmed into the microcontroller.


Step 8:     DISCONNECT THE ST-LINK SWD!

This ends the first stage.

After this, carefully connect the DB9 connector to the Front panel.

Connect the Main unit to a power supply with 13.4 V.

Connect the DB9 cable to both Main unit and Front panel unit and proceed to normal FW update procedure as described on the Xiegu website (1.74 final).



Special thanks to Simon SA7SSE!

Thanks Konrad Beckman for SWD pinout: https://twitter.com/kbeckmann/status/1286574402268798977

and for G90 tools to extract the firmware: https://github.com/OpenHamradioFirmware/G90Tools

Maybe you want to see my findings about the hardware of this radio: https://github.com/yo3hjv/XIEGU-G90/wiki

 A nice lecture about good practice in ESD protection:

https://www.st.com/resource/en/application_note/cd00004479-emc-design-guide-for-stm8-stm32-and-legacy-mcus-stmicroelectronics.pdf

The former and the new STM32 chip:


The happy G90 with replaced LEDs:



Adrian YO3HJV @ December, 2020

 

 

13 December 2020

RTL-SDR gain steps

 It was hard to find the gain steps for a NOOELEC SDR therefore i will put them here:

RTL2832U

 

NOOELEC

Generic SDR

49.6

49.6

48

48

44.5

44.5

43.9

43.9

43.4

43.4

42.1

42.1

40.2

40.2

38.6

38.6

37.2

37.2

36.4

36.4

33.8

33.8

32.8

32.8

29.7

29.7

28

28

25.4

25.4

22.9

22.9

20.7

20.7

19.7

19.7

16.6

16.6

15.7

15.7

14.4

14.4

12.5

12.5

8.7

8.7

7.7

7.7

3.7

3.7

2.7

2.7

1.4

1.4

0.9

0.9

0

0



03 December 2020

Shack dual time Clock with POS VFD

A few years ago I came around a nice POS Vacuum Fluorescent Display.

The model I have is CD7220 and it is designed to show information about a customer purchasing  in a nice blue-green colour onto a Vacuum Fluorescent Display with 2 rows and 20 columns.

I put it on my bench and gave it a long look seeing on it's two rows a lot of possible things. From clock to some informations extracted from CI-V from my ICOM radios, various configurations scrolled in my imagination.

I started to search for some documentation and found the datasheet then started to look inside to see how it was interfaced with the POS cashier machine.

The VFD is interfaced via RJ45 connector and from the signal perspective, a HIN232 circuit handle the conversion between RS232 serial COM port to TTL UART. Basically, this circuit is a clone of Maxim's MAX232 RS232<>TTL level convertor.

To drive the VFD I choosed a small Arduino NANO; the RTC is a DS1307.

The backup battery, a rechargable Li cell was dead and I replaced with a 5 V/4F capacitor. This is enough to keep the time for some time when power is off.

Because the circuits in the VFD need 24V, I put inside a DC/DC boost convertor so I can power the board with anything above 5V and below 24V.  Yeah, I know, this is too big for this project but this was laying on my junk boxes here... You can use any boost DC/TS that can sustain 5W in a close box for extended periods of time.

The RTC module is connected to Arduino via I2C.

To set the RTC actual Time and Date I used the example that came with the DS1307 library; just upload it into the Nano and start Serial monitor.

After setting the Time and Date as above, use the code provided on the Github, insert the correct UTC offset for your region and then upload the code to Arduino.

The code is commented and it is self explanatory; before you upload it, check the correct offset for UTC. 




24 November 2020

Xiegu G90 firmware programming serial cable

 Ta daaaaaaa.....

This is the schematic of the Xiegu G90 firmware programming serial cable!

A simple FTDI USB<>TTL chip and a stereo cable with a 3.5mm Stereo audio jack. Simple and efficient.

The TTL level is 3v3.


Here is the schematic:



Most viewed posts in last 30 days