 |
op de voet van de defecte 64HC11 nu een Nano die moet het ook kunnen doen 15MIP's..
|
Deze tuner lag hier al een poosje. Alle IC's defect door 230V AC op de 12V .. Met een simpele 10 cent suppressor achter de glaszekering.. was er niets gebeurd, nu leek het total-loss, Uit nieuwsgierigheid alle 8 IC's vervangen. De hardware lijkt allemaal weer te werken. Er was geen zichtbare schade behalve wat roet sporen bij de geëxplodeerde glaszekering. Wel is er een diode beveiliging tegen verkeerde polarisatie, Maar dat helpt niet tegen 230V AC...
Intern ziet het er prima uit, hoge kwaliteit componenten en lijkt deze SGC230 sterk op de Stockcorner maar SGC heeft SMD techniek . De behuizing is waterdicht, voor maritiem gebruik geschikt.
Smart-tuner SGC manual heeft het over 200W max. Stockcorner noemt 1kW pep met op het oog gelijkwaardige componenten. De spoelen lijken ook c.a. 4cm doorsnede.
De processor 68HC11 was ook vernield. SGC bestaat niet meer , een geprogrammeerde 68HC11 of firmware is niet meer te krijgen. Vast en zeker is er ergens in de USA nog wel een PC van de firma waar de software op staat, maar absolute radiostilte van SGC.
Met het Arduino tuner programma van K3NG zou er misschien een redding mogelijk zijn.
K3NG stuurt de relais met I2C MCP23008 8bit I/O extenders.
De SGC gebruikt 3x UCN5841 8 poort shift registers en die werken met het 74HC595 example in Arduino
Het afstem principe van de SGC230 is een pi netwerk C-L-C
om van de 50Z naar meestal hogere impedanties van een te korte draad of verticaal te kunnen afstemmen. Ingang C is 0- tot 6420 pF L=0 tot max 63.75uH C-out 0 tot 775pF 6kV 10kv en 6kV condensatoren.
De UCN5841 driver heeft de 8 uitgangen handig aan een zijde van het IC zodat een PCB ontwerp gemakkelijker is de printsporen naar de relais lopen netjes parallel.
Er zijn 19 schakelbare componenten met 26 relais. 7 zijn dubbel geschakeld aan de antenne kant waar de hoogste spanningen op kunnen treden. Deze SGC230 is bedoeld voor draadantennes, end fed hoge impedantie HiZ of verticale te korte antennes voor de werk frequentie. K3NG maakt in de tuning onderscheid tussen Low Z en high Z tuning. Ik vermoed dat daarmee word bedoeld dat er ruwweg 2 tuning situaties zijn zoals SGC aangeeft op de afbeeldingen hier boven. High Z is een te korte antenne waarbij de uitgang C 0 moet zijn, bij de low Z is de antenne te lang tov de gebruikte golflengte en dan worden de ingang C niet gebruikt. Hoe dat precies in de K3NG software is verwerkt moet ik nog bestuderen.
Een uitdaging is het om K3NG software aan te passen op de andere relais het is vrij gecompliceerd maar netjes modulair geprogrammeerd.
K3NG heeft een To Do list waar ook iets over het gebruik van shift registers voor relais aansturing word genoemd maar er word niet meer aan gewerkt de laatste jaren lijkt het.
Na flink wat puzzelwerk heb ik het nu zover dat de relais weer worden aangestuurd.
En de software reageert op het serial M commando , manual start tuning, wel eerst NL & CR optie aanzetten! bij de serial monitor, zonder dat gebeurt er niets... Maar de aansturing loopt nog niet goed synchrone. K3NG heeft diverse debug functies in de software o.a. "P " dat geeft periodiek het overzicht van swr en de ingeschakelde L en C waarden maar de ingeschakelde waarden komen dus niet overeen met de relais. Het debuggen van software in de Aduino IDE kan alleen door debug functie features in te schakelen in de software. Verwend als ik ben aan de VB6 IDE met interpreter mode debug opties breakpunt watch-point is dat wel behelpen..
Ik zou voor een tuner de voorkeur geven voor Omron G2 met dubbel wissel 16A contacten zodat de L in rust kortgesloten kunnen zijn en bij de hoge spanning C's kunnen 2 contacten in serie. Dat scheelt in rust vermogen , geen 8 relais continue aan en er zijn dan 19 relais ipv 26 nodig.
De hardware map voor Len C moest ook worden aangepast. K3NG werkt met een command register Maar informatie over het hoe en waarom van het command_register en tuning programma functies kan ik niet vinden. De relais worden via dit command register aangestuurd het is 56 bytes lang maar voor de aansturing worden slechts 2 bytes gebruikt lijkt het, Functies van de andere bytes heb ik nog niet kunnen vinden. Deze bytes zijn Ascii codes b.v. relais nr 12 is een 2 bytes code 31hex en 32hex K3NG maakt daar 12 decimaal van door byte waarde - 30hex de ascii tabel offset er af te trekken.
Dat doet de functie byte p = (get_command_buffer_two_byte_number());...
in VB6 is dat simpel p=int("12") = 12 decimaal..
SGC230 gebruikt 12V relais met alleen maak contacten dus de L aansturing moet in de software omgekeerd worden. In bypass moeten de 8 L relais aan staan.
update 30-4-2024
Na wat experimenteren .. de serial monitor stond niet op CR + LF en dan werken de debug functies niet...
Het aansturen van de relais met de UCN5841 lijkt goed. relay test is ok alle relais worden keurig op volgorde aangestuurd.
K3NG gebruikt een "command_buffer" dat word door de tuning software gevuld met commando's om C of L in- of uit te schakelen.
De C en L in- en uitschakel commando's zijn in arrays in de tuner hardware gedefinieerd.
Op deze manier kunnen componenten gemakkelijk worden aangepast.
Hieronder een kopie uit de tuner hardware configuratie voor C en L voor de SGC230
// Capacitor definitions C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11
const unsigned int capacitor_values[] = { 100, 200, 400, 800, 1620, 3200, 25, 50 , 100 , 200, 400 }; // capacitor values in pF
char* capacitor_activate_macros[] = {"!00","!01","!02","!03","!04","!05","!16","!17","!18","!19","!20"}; // macros to activate capacitor relays
char* capacitor_deactivate_macros[] = {".00",".01",".02",".03",".04",".05",".16",".17",".18",".19",".20"}; // macros to deactivate capacitor relays
byte capacitor_status[] = {0,0,0,0,0,0,0,0,0,0,0};
#define CAPACITORS 11
#define TOTAL_CAPACITOR_VALUE 7095 pF // 6320 + 775p
const unsigned int inductor_values[] = { 250, 500, 1000, 2000, 4000, 8000, 16000 ,32000 }; // inductor values in nH
char* inductor_activate_macros[] = {"!08","!09","!10","!11","!12","!13","!14","!15"};; // macros to activate inductor relays reverse deactivate is activate L
char* inductor_deactivate_macros[] = {".08",".09",".10",".11",".12",".13",".14",".15"}; // macros to deactivate inductor relays reverse close is deactivate L
//char* inductor_activate_macros[] = {".08",".09",".10",".11",".12",".13",".14",".15"};; // macros to activate inductor relays reverse deactivate is activate L
//char* inductor_deactivate_macros[] = {"!08","!09","!10","!11","!12","!13","!14","!15"}; // macros to deactivate inductor relays reverse close is deactivate L
//byte inductor_status[] = {1,1,1,1,1,1,1,1}; //reverse contact
byte inductor_status[] = {0,0,0,0,0,0,0,0};
#define INDUCTORS 8
#define TOTAL_INDUCTOR_VALUE 63750 nH
//
Met debug: command_buffer aan zie ik !3 en !4
Dat betekend relais 4 en 5 , C 800p en C 1620p Die worden inderdaad aangestuurd.
Maar bij de gesimuleerde SWR 1: 1.0 zou er geen enkele C ingeschakeld moeten zijn.
Ik zie ook alleen ! activate macro's geen . de-activate commando's.
De tuner reageert wel op het verhogen van gesimuleerde SWR. Maar slechts eenmalig, bij verlagen van SWR reageert de tuner niet. Bij uit/in schakelen van Serial monitor is er een reset waardoor alle relais worden aangestuurd.
De L relais moeten aan staan zodat L's overbrugd zijn , 0 uH in neutrale toestand.
Ik kan de aansturing macro's omkeren zodat de L relays omgekeerd werken.
Maar het lijkt er nu op dat de inhoud van het door K3NG gebruikte command buffer niet klopt.
En dat is vreemd want op dat punt is de software niet gewijzigd enkel de 4 regels waar de I2C aansturing gebeurd zijn vervangen door shift register aansturing.
En ook nog de configuratie van L en C is aangepast naar SGC die heeft 11 C's ipv 8
Dus ik zit met een impasse, werkt de originele K3NG software wel goed?
Het tuning deel van de software met selectie van L en C is pittig
dat bevat nagenoeg 0 commentaar dat is wel een uitdaging...
Bovendien zag ik daar nog een to do aanwijzing , dus nog niet klaar?
Het is onduidelijk , ik zou toch denken dat het toch gewoon moet werken.
Maar ik heb nog geen enkele reactie op mijn bericht op Github tot nu.
We zoeken verder en wachten op reacties van amateurs die K3NG software gebruiken.
AI translation:
At the base of the defective 64HC11, I’ve now placed a Nano — it should be able to handle the job at 15 MIPS. This tuner had been sitting here for a while. All ICs were destroyed due to 230V AC being applied to the 12V input. A simple 10-cent suppressor behind the glass fuse could have prevented it. Now it seemed total loss.
Out of curiosity, I replaced all 8 ICs. The hardware appears to be working again. No visible damage except for some soot near the exploded fuse. There is a diode for reverse polarity protection, but that doesn’t help against 230V AC...
Internally, it looks excellent — high-quality components. The SGC230 strongly resembles the Stockcorner tuner, but SGC uses SMD technology. The housing is waterproof, suitable for maritime use. The SGC manual mentions 200W max. Stockcorner claims 1kW PEP with seemingly similar components. The coils also appear to be about 4 cm in diameter.
The 68HC11 processor was also destroyed. SGC no longer exists, and a programmed 68HC11 or firmware is no longer available. Surely somewhere in the USA there’s still a PC from the company with the software, but SGC remains completely silent.
With the Arduino tuner program from K3NG, a rescue might be possible. K3NG uses I2C MCP23008 8-bit I/O extenders to control the relays. The SGC uses 3x UCN5841 8-port shift registers, which work with the 74HC595 example in Arduino.
The tuning principle of the SGC230 is a pi network (C-L-C) to match 50Ω to usually higher impedances from a short wire or vertical antenna.
The UCN5841 driver has all 8 outputs conveniently on one side, making PCB design easier. The traces to the relays run neatly in parallel. There are 19 switchable components with 26 relays. Seven are double-switched on the antenna side, where the highest voltages occur.
This SGC230 is intended for wire antennas, end-fed high impedance (HiZ), or verticals that are too short for the working frequency. K3NG distinguishes between Low Z and High Z tuning. I suspect this refers to the two tuning situations SGC shows in its diagrams:
How this is implemented in K3NG’s software still needs study. Adapting the K3NG software to the different relays is a challenge — it’s quite complex but modularly programmed. K3NG has a To Do list mentioning shift register support, but development seems to have stalled.
After some puzzling, I’ve got the relays responding again. The software reacts to the serial M command (manual start tuning), but you must enable NL & CR in the serial monitor — otherwise nothing happens. The control isn’t yet fully synchronized.
K3NG includes debug functions like "P", which periodically shows SWR and activated L and C values. But the displayed values don’t match the actual relays. Debugging in the Arduino IDE is limited — no interpreter mode, breakpoints, or watchpoints like in VB6.
For a tuner, I’d prefer Omron G2 relays with double-throw 16A contacts, so inductors can be shorted at rest, and capacitors can use two contacts in series. That saves idle power — no need for 8 relays to stay active. Only 19 relays would be needed instead of 26.
The hardware map for L and C had to be adjusted. K3NG uses a command register — 56 bytes long, but only 2 bytes seem used for relay control. The other bytes’ functions remain unclear. Relay 12, for example, uses two ASCII bytes: 31h and 32h. K3NG converts this to decimal 12 by subtracting 30h (ASCII offset).
In VB6, that’s simply: p = int("12") = 12 decimal.
SGC230 uses 12V relays with normally open contacts, so L control must be inverted in software. In bypass mode, the 8 L relays must be ON.
🔄 Update April 30, 2024
After some experimenting… the serial monitor wasn’t set to CR + LF, so debug functions didn’t work. Relay control via UCN5841 seems fine. Relay test is OK — all relays activate in sequence.
K3NG uses a "command_buffer" filled by the tuning software with commands to switch C or L on/off. These commands are defined in arrays in the tuner hardware config. This makes component adaptation easy.
Example from the config:
const unsigned int capacitor_values[] = {100, 200, 400, 800, 1620, 3200, 25, 50, 100, 200, 400};
char* capacitor_activate_macros[] = {"!00", "!01", "!02", "!03", "!04", "!05", "!16", "!17", "!18", "!19", "!20"};
char* capacitor_deactivate_macros[] = {".00", ".01", ".02", ".03", ".04", ".05", ".16", ".17", ".18", ".19", ".20"};
Same for inductors:
const unsigned int inductor_values[] = {250, 500, 1000, 2000, 4000, 8000, 16000, 32000};
char* inductor_activate_macros[] = {"!08", "!09", "!10", "!11", "!12", "!13", "!14", "!15"};
char* inductor_deactivate_macros[] = {".08", ".09", ".10", ".11", ".12", ".13", ".14", ".15"};
With debug: command_buffer shows !3 and !4, meaning relays 4 and 5 → C800p and C1620p. These are indeed activated. But with simulated SWR 1:1.0, no C should be active. Only activate macros are visible — no deactivate commands.
The tuner responds to increasing SWR, but not to decreasing. Resetting the serial monitor triggers all relays. L relays must be ON to short inductors → 0 µH in neutral state. I can invert the macros so L relays behave accordingly.
But it seems the command buffer content isn’t correct. That’s strange, since the tuning part of the software wasn’t changed — only the I2C control lines were replaced with shift register control, and the L/C config was adapted to SGC (11 Cs instead of 8).
So I’m stuck. Does the original K3NG software even work properly? The tuning logic is tough — almost no comments, and there’s still a To Do note. It’s unclear. I’d expect it to just work. But I haven’t received any response to my GitHub post yet.
We keep searching — and wait for feedback from amateurs using K3NG software.
Comments