What did you repair today ?

nsaspook

Joined Aug 27, 2009
16,405
Now it's time to build the power signal generator test unit with a 8-bit controller.
The PIC18F14Q41 will the controller used because it has some nice analog functions.
https://www.microchip.com/en-us/pro...erals/integrated-analog/operational-amplifier
https://www.microchip.com/en-us/pro...dent-and-analog-peripherals/integrated-analog
8-bit DAC for sine wave generation
Digitally controlled OP amp for signal buffering and level control.

Using a simple 8-bit uint8_t sine table with a indexing loop we generate the analog signal in a timing loop of ASM nop instructions and volatile variables to stop optimization.
C:
    while (true) {
        Nop();
        Nop();
        Nop();
        Nop();
        Nop();
        Nop();
        DAC2_SetOutput(sine_wave[sine_index = sine_index + (uint8_t)sine_skip]);
    }

// sine.h
#define sine_skip    4

const uint8_t sine_wave[256] = {
  0x80, 0x83, 0x86, 0x89, 0x8C, 0x90, 0x93, 0x96,
  0x99, 0x9C, 0x9F, 0xA2, 0xA5, 0xA8, 0xAB, 0xAE,
  0xB1, 0xB3, 0xB6, 0xB9, 0xBC, 0xBF, 0xC1, 0xC4,
  0xC7, 0xC9, 0xCC, 0xCE, 0xD1, 0xD3, 0xD5, 0xD8,
  0xDA, 0xDC, 0xDE, 0xE0, 0xE2, 0xE4, 0xE6, 0xE8,
  0xEA, 0xEB, 0xED, 0xEF, 0xF0, 0xF1, 0xF3, 0xF4,
  0xF5, 0xF6, 0xF8, 0xF9, 0xFA, 0xFA, 0xFB, 0xFC,
  0xFD, 0xFD, 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF,
  0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xFE, 0xFD,
  0xFD, 0xFC, 0xFB, 0xFA, 0xFA, 0xF9, 0xF8, 0xF6,
  0xF5, 0xF4, 0xF3, 0xF1, 0xF0, 0xEF, 0xED, 0xEB,
  0xEA, 0xE8, 0xE6, 0xE4, 0xE2, 0xE0, 0xDE, 0xDC,
  0xDA, 0xD8, 0xD5, 0xD3, 0xD1, 0xCE, 0xCC, 0xC9,
  0xC7, 0xC4, 0xC1, 0xBF, 0xBC, 0xB9, 0xB6, 0xB3,
  0xB1, 0xAE, 0xAB, 0xA8, 0xA5, 0xA2, 0x9F, 0x9C,
  0x99, 0x96, 0x93, 0x90, 0x8C, 0x89, 0x86, 0x83,
  0x80, 0x7D, 0x7A, 0x77, 0x74, 0x70, 0x6D, 0x6A,
  0x67, 0x64, 0x61, 0x5E, 0x5B, 0x58, 0x55, 0x52,
  0x4F, 0x4D, 0x4A, 0x47, 0x44, 0x41, 0x3F, 0x3C,
  0x39, 0x37, 0x34, 0x32, 0x2F, 0x2D, 0x2B, 0x28,
  0x26, 0x24, 0x22, 0x20, 0x1E, 0x1C, 0x1A, 0x18,
  0x16, 0x15, 0x13, 0x11, 0x10, 0x0F, 0x0D, 0x0C,
  0x0B, 0x0A, 0x08, 0x07, 0x06, 0x06, 0x05, 0x04,
  0x03, 0x03, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01,
  0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03,
  0x03, 0x04, 0x05, 0x06, 0x06, 0x07, 0x08, 0x0A,
  0x0B, 0x0C, 0x0D, 0x0F, 0x10, 0x11, 0x13, 0x15,
  0x16, 0x18, 0x1A, 0x1C, 0x1E, 0x20, 0x22, 0x24,
  0x26, 0x28, 0x2B, 0x2D, 0x2F, 0x32, 0x34, 0x37,
  0x39, 0x3C, 0x3F, 0x41, 0x44, 0x47, 0x4A, 0x4D,
  0x4F, 0x52, 0x55, 0x58, 0x5B, 0x5E, 0x61, 0x64,
  0x67, 0x6A, 0x6D, 0x70, 0x74, 0x77, 0x7A, 0x7D
};
We don't need the full 8-bits to create a usable signal and it needs to be at least 9 kHz so we index by 4 for analog data steps.

Using MCC, we do a quick setup of DAC2
1716347806749.png
Config our DAC ref voltage for the analog level we need.
1716347832158.png
Config the OPA for the analog signal buffer output gains input/outputs we need. We can program the gain resistor ladder using a GPIO interrupt so we don't need to poll during our frequency timing loop.
1716347883008.png
The result is a usable signal (we can stop, start and adjust in amplitude) to feed a audio amplifier for the resonant magnetic wireless coupling loop.
1716347777101.png
What's left is to make a power, signal and HID interface prototype board and to tidy up a simple button/led user interface for a project box.
1716348074560.png
Then design a custom PCB instead of using one of my old designs made for serial protocol conversion.
 

joeyd999

Joined Jun 6, 2011
6,390
...generate the analog signal in a timing loop of ASM nop instructions and volatile variables to stop optimization.
Or, NCO + DMA to eliminate the code entirely.

C:
void DMA_start(void)
{

    DMA1SSA = (uint24_t) da_sin_tab;                    //Source Address:  Sin Sound Table
    DMA1SSZ = DAC_SINTABLE_SIZE;                        //Source Size:     32
     
    DMA1DSA = (uint16_t) &DAC1CON1;                     //Dest Address:   DAC1
    DMA1DSZ = 1;                                        //Dest Size:       1

    DMA1CON1 = INIT_DMA1CON1;
    DMA1SIRQ = INIT_DMA1SIRQ;                           ////NCO Interrupt triggers transfer

    //Set PRLOCKED bit to grant memory access to DMA
    INTCON0bits.GIE = 0;
    PRLOCK = 0x55;
    PRLOCK = 0xAA;
    PRLOCKbits.PRLOCKED = 1;
    INTCON0bits.GIE = 1;

    //Enable & Start DMA transfer
    DMA1CON0 = INIT_DMA1CON0;
}
 
Last edited:

nsaspook

Joined Aug 27, 2009
16,405
Or, NCO + DMA to eliminate the code entirely.

C:
void DMA_start(void)
{

    DMA1SSA = (uint24_t) da_sin_tab;        //Source Address:  Sin Sound Table
    DMA1SSZ = DAC_SINTABLE_SIZE;          //Source Size:     32
  
    DMA1DSA = (uint16_t) &DAC1CON1;                      //Dest Address:   DAC1
    DMA1DSZ = 1;                             //Dest Size:       1

    DMA1CON1 = INIT_DMA1CON1;
    DMA1SIRQ = INIT_DMA1SIRQ;
  

    //Set PRLOCKED bit to grant memory access to DMA
    INTCON0bits.GIE = 0;
    PRLOCK = 0x55;
    PRLOCK = 0xAA;
    PRLOCKbits.PRLOCKED = 1;
    INTCON0bits.GIE = 1;

  
    //Enable & Start DMA transfer
    DMA1CON0 = INIT_DMA1CON0;
}
+1

Bravo, the original application of that board used DMA for several functions of RS232 IN/OUT conversions and SPI displays.

I'm mainly using old school cpu wasting delay loops because the application is a dumb One Trick Pony.
 

nsaspook

Joined Aug 27, 2009
16,405

nsaspook

Joined Aug 27, 2009
16,405
Looks good as the wireless system signal generator, time to wrap it up.
1716406100983.png
RC filtered output.
1716406152256.png
Transport car operating voltage @90% amp power.

1716406208339.png
Blue C2: Signal generator output.
Yellow C1: Sony amp output.
Shows signal delay phase shift.
1716406418231.png
FFT of C1 Sony amp output from matching coil signal monitor loop using the PIC18 signal generator.
 

MrChips

Joined Oct 2, 2009
34,984
Repaired a Karcher WV50 window power vacuum.

1716577673781.png

The internal lithium 18650 battery was not charging higher than 3.2V.
Water got inside and corroded a trace on the PCB. You would have thought that the manufacturer would have used conformal coating on the board.
 

Thread Starter

Externet

Joined Nov 29, 2005
2,650
Repaired my vulgar GE microwave oven. Bad door latch microswitch replaced.
Failure of that by arcing its contacts or blown fuse from fractions of a millisecond are from opening the door instead of ending cycle.
No downtime cooking as I keep the huge mid seventies Radarange Touchmatic in the basement as emergency backup, still working like a champion 50 years after. :
1716579283270.png
Enough steel and chrome to make a Honda recycling it...;)
 

MisterBill2

Joined Jan 23, 2018
27,901
Trying to repair but may replace: The hydraulic door closer on a business partner's take-out restaurant. It has many "adjustment screws" with no markings, and it seems also to have lost some oil.
Aside from that also trying to diagnose a HEATHKIT "SW7800" Receiver. It makes sounds like it is receiving but does not pick up anything. Among other projects.
 

MrChips

Joined Oct 2, 2009
34,984
Hamilton Beach SC42 slow cooker

Symptoms: no signs of life, no heat, no display. The LED display should show OFF when the unit is plugged in.

Found shorted 470μF/16V capacitor in the low voltage supply. Capacitors don't like being hot.
Replaced with 470μF/35V capacitor.
Strangely, there is no fuse nor thermal circuit breaker in this unit.
Hamilton Beach SC42.jpg
 
HEATHKIT "SW7800"
According to www.findchips.com they have them for 16 dollar 1+ 12 dollar 4+ at quest components.
MC1496G metal 10 pin can
they also come in 14 pin ceramic (3 dollar) and SOIC case (0.5 dollar) versions.

https://mirror.unpad.ac.id/orari/library/library-sw-hw/community-broadcasting/datasheet/mc1496.htm
here they compare the connections.
The MC1496P are doubled balanced modulator-de- modulators - Wide frequency response up to 100 MHz
Heathkit SW-7800 Shortwave Rebuild: http://schmitzplace.com/Johns_Electronics_04.htm
(Seems a lot of work if you do it this thorough, on his site I)
https://forums.radioreference.com/threads/heathkit-sw-7800-questions-suggestions.261810/
they say something about the quality of the receiver.
Better supply:
Good Luck with it.
 

Thread Starter

Externet

Joined Nov 29, 2005
2,650
On an old house from 1940, repaired a twist mechanical trough-the-door rustic victorian doorbell. Adapted a missing bronze knob and shaft, made a square shaft, threaded it to secure the knob, threaded to hold at the bell end; It works. :)

1716994178033.png
Image from similar borrowed from the web.
Edited: Something is in doubt. It is held to the door with bronze philips screws... I think they were not invented yet then.
 
Last edited:

Ian0

Joined Aug 7, 2020
13,207
Desoldered a 48-pin through-hole connector from a PTH pcb. Both connector and pcb are resuable. (My colleague can now put the correct connector in the correct pcb)
 
Top