Friday, May 14, 2021

Program Blue Pill with CKS32F103C8T6 using UART

 I needed a Blue Pill for a project. Got a few on ebay, but I couldn't find genuine STM32 ones in Europe. So I got ones with the compatible CKS32F103C8T6 chip.

I have never programmed a Blue Pill of any kind, so I don't really know how it is supposed to work. Programming with ST's UART tool didn't work for me, it didn't like the identity of the board. I instead got success using stm32flash, which can be found here https://sourceforge.net/projects/stm32flash/ .

I used  some generic USB-to-UART cable, which identifies as being "Prolific USB-to-Serial". Make sure that the UART dongle works by doing a loop test.

To program the chip on the Blue Pill, follow these steps:

  1. On Blue Pill set jumper for"boot 0" to 1.
  2. Connect UART GND (black) to G on Blue Pill
    UART 5V (red) to 5V on Blue Pill
    UART RX (white) to A9 on Blue Pill
    UART TX (green) to A10 on Blue Pill
  3. From command line, run:
    stm32flash -g 0x8000000 -b 115200 -w gd32f1_generic_boot20_pc13.bin COM4
    where COM4 is whatever com-port the UART has attached to, and the bin-file is whatever bin-file you want to upload.
    There seems to be some problem with paths and stm32flash, so I run everything from the same folder.
  4. On Blue Pill set jumper for"boot 0" to 0.
  5. Push reset button on Blue Pill.
  6. Done! 

Tuesday, March 30, 2021

ABC80, Saving and loading programs using soundcard

As a cheap and quick way to get going, using an ABC80 (by Swedish Luxor), you can use a pc with a soundcard to save and load programs, like you normally would do using a tape station.


1 Cable

You need a cable with a 3.5mm audio, stereo plug in one end, and a 5 pin DIN in the other end. The cable should be wired like shown in the image:
 

Cable should be connected like this 

2 Audacity

I use Audacity as audio software on the PC. I'm sure there are plenty of other programs that are usable.
Set up audacity like in the images:
  • Mono sound
  • Set inputs and outputs so you hear output in a pair of headphones, and inputs so a mic gets picked up by the soundcard
  • Max levels on record and playback

 3 Save

  1. Enter a program in the ABC80. For example
    10 print "Hello world!"
  2. Insert 3.5mm audio plug into mic jack and DIN-connector in ABC80
  3. Start recording in audacity
  4. In the ABC80, enter:
    save cas
  5. Watch the waveform get recorded. 
  6. When the waveform ends, stop recording. 
  7. Delete the whitespace before and after the waveform.
  8. Save as .WAV-file.
Saving waveform in Audacity

4 Load

  1. Load wave file in audacity
  2. Insert 3.5 mm audio plug into headphone jack on PC and DIN-connector in ABC80.
  3. On ABC80, enter load cas
  4. Start playback in Audacity
  5. When the program has finished loading, ABC80 will give a new prompt or an error message
  6. list or run the program
Loading program from audio file in Audacity

Good Luck!




Friday, March 27, 2020

Amiga 500 PSU repair

I have an Amiga 500 PSU which is a bit unstable. Sometimes my Amiga 500's don't start when using this PSU.




I measured the voltages of the PSU (when connected to the Amiga) and the 5V rail was a bit low, and slowly rising. When the voltage was under 4.8, the Amiga wouldn't start. So in order to troubleshoot, I started with drawing a schematic of the PSU. The schematic is a work in progress, I change it as I find errors, so the best version is at GitHub: https://github.com/archstanton1862/A500-PSU .



So, in accordance to the schematic references, I measured the parts that are involved in the 5V regulators feedback: 5V reference was 5.008V, excellent in other words.
5V R2 = 1.500k
R4 = 4.702k
Internal reference R1 = 1.498k
R5 = 4.700k
These resistors show signs of getting hot, so I measured them swell.
R6 = 179.8
R8 = 179.9



The first idea I had was to replace the output transistor. It was difficult to find the exact replacement , so I ordered a D45H11G (instead of the original D45H2). This did not change the faulty behaviour.





Finally I tried swapping the regulator IC, SG3524,  to a new one. I didn't think this would work, but actually it did. Voltage in a running Amiga 500 was measured to 4.93V and this was enough for stable activity.

PSU with replaced regulator IC (SG3524)



Sunday, March 22, 2020

Amiga 500 Floppy Panasonic JU-257A606P modification

I modified a couple of floppy drives (Panasonic JU-257A606P) to work in an Amiga 500. I found a description of how this is done here http://eab.abime.net/showthread.php?t=30944 , but one of the drives had a different version PCB than the one in the link. So I figured out how to modify that one as well, and for reference I am showing the necessary steps below:



Wednesday, July 31, 2019

EPSON SMD-400 Repair - Amiga 500 Floppy Drive





The old Amiga 500 I got had a non working floppy drive. The span up, abnormally fast, and then stopped. When there was no disk in the drive, the magnetic head twitched back and forth, which I think is normal behaviour.


First thing to try is changing electrolytic capacitors. To get to the caps, the drive's disk tray needs to be dismantled. It took me a while to figure it out, but its done like this:

Mounting bracket and casing of drive has been removed (easy). If you need to use force, you are doing it wrong.




Step 1.
Remove lock-screw and spring, marked in the first image.
Push the disk ejection button to release the upper disk holder mechanism. Push it forwards-downwards to release it.






Step 2.
Remove springs marked in second image.
Push disk eject mechanism forward to release it.






Step 3.
Replace the five caps, marked C08, C09, C10, C11 and C05. I used EMLF160ADA100MD73G as replacement caps.

After this the drive works as expected again.

Caps removed



New caps in place


Saturday, July 20, 2019

Amiga 500 power supply repair

I bought a cheap Amiga 500 as non functioning. I knew that the power supply was non-functioning, so I started there.

Amiga 500 PSU
The inside looked OK, but there where several signs of somebody tampering with it.
The bottom part of the PCB had some funny looking solderings with a lot of gunky-looking flux residue.


Bottom side of PSU PCB. Some gunky looking flux residue can be seen to the bottom right, top right and top left.
The board is marked 871, 6L78, A 500.
When I removed the strange looking solder I discovered that one of the pads to the transformer didn't have a connection at all! Maybe it was loose and I sucked it into the solder sucker.

Anyway, I soldered some wire to the transformer and touched up the bad looking solder joints, and the PSU worked nicely after that.

Repaired transformer connection behind the fuse



Transformer pads with solder removed. Pad with no connection to it to the right of the large mounting hole in the middle.



I made a note of the electrolytic capacitors on the board, so that I can order new ones and recap it.


No capsC(uF)U(V)diam (mm)
322255
147006.315
23302510
147002516

When I have recapped the PSU, I will properly clean off all the old flux.


Monday, February 8, 2016

40m Ham radio receiver using a NE602

I've been building a circuit I found in "Experimental methods in RF design". It's a 40m AM/SSB/CW receiver using a NE602. I've been doing some experimentation to get the receiver working, especially with the local oscillator. In the book, they recommend a toroid wound coil, but I couldn't get that to oscillate. Finally I made an air wound coil, which worked. But since the coil was wound "mid air", it picked up even the smallest vibration in the surroundings, leading to a very unstable oscillation. I solved it by shoving a roll of paper inside the coil. I also worked some on getting the antenna input filter better matched.
It receives between 6.9 and 7.4MHz, but it hasn't got a lot of selectivity, which I will try to solve somehow. Also, I want to interface the LO to a frequency counter, so I need to build a buffer amplifier to not load down the oscillator.
Here are some images of the receiver and the schematics so far:
Receiver circuit board. Antenna input, with attenuator pot seen to the left. Tuning caps on the right.
Receiver with shielding in place. Tuning knobs to the left.
Receiver diagram.