Modify Arduino 5v relay module to work from 3.3v

I am implementing a power-off function for my Ender 3 using OctoPi. For that, I need a relay and I happened to have one.

Relay module I had
Relay module I had

Unfortunately, after connection relay to Raspberry Pi GPIO pin, the relay was always on and not listening to any commands from OctoPi.

It appears this module was designed for 5v logic levels and Raspberry Pi works with 3.3v logic levels.

After investigating relay one can see that its circuit is:

Original schematics of relay module
Original schematics of relay module

For JC817C forward voltage Vf=1.2V and forward current If=20mA

For Raspberry Pi output high (when VDD is 3.3V) is VO=2.3V 17mA

So, it seems that the output of Raspberry Pi is not enough to drive JC817C.

To solve this I decided to remove optocoupler from the module and connect the input pin directly to Q1 transistors base.

Modified relay module
Modified relay module
Relay module with optocoupler replaced by resistor
Relay module with optocoupler replaced by a resistor

To connect the output pin to a transistor you should limit output to appropriate current. You can do that by choosing the appropriate resistor value.

I calculated it like that.

From S8050 (J3Y) transistors datasheet:  DC current gain hfe ~ 120

From relay datasheet: Rrelay=70Ohm Vrelay=5V so calculated Irelay=Vrelay/Rrelay=5/70=71mA

Let’s choose Ic=100mA

To turn it on, we must have ~ Ib=Ic/120=100mA/120=833uA ~800uA

Vbe usually is ~0.7V

R9 voltage would be Vr9=Vinput-Vbe=3.3V-0.7V=2.6V


So I chose 3K resistor.



Removing supervisor password (SVP) on ThinkPad T42

Recently received two ThinkPad T42 laptops ( some company decided to upgrade its IT and were giving away them almost for free ). After turning them on got an 271 error and later was prompted to enter password.

It seems battery was dead on both of those laptops and when its dead, real time clock goes bananas and you are asked for supervisor password to set the clock again ( if supervisor password was set ).

Offcourse nobody knew anything about what password it was. So had to figure it out myself how to solve this situation.

On ThinkPad T42 SVP password is stored on EEPROM chip 24RF08. One thing that sometimes work and was reported by many T42 users is to short pins 3 and 4 of 24RF08, procedure:

  • Short pins 3 and 4 of 24RF08, keep them short
  • Tun on ThinkPad
  • Press F1 to go to BIOS
  • If asked for password press enter
  • Go to Security – Passwords – Supervisor password
  • Release shorted pins
  • Enter new password, save and reboot.

Then go to BIOS again and disable SVP password by entering the password you just saved.

Like they say – “it worked on my two t42 machines” 😉

ThinkPad T42 removing SVP
ThinkPad T42 removing SVP
ThinkPad T42 removing SVP
ThinkPad T42 removing SVP

ZX Spectrim 128 +3 composite video output and drive belt replacement

Did some work on ZX Spectrum 128 +3 I have. One thing was I wanted to make it work with small “TFT Color monitor” (for a car rear view). This monitor has a composite video input.

First I tried using CSYNK and GND signals for a composite video input. You get the video but it was terrible quality. It seems that “The 128 ZX Spectrums including the +3 (and +2A, +2B) have audio sound modulated onto the video, which reduces the clarity of the composite signal that is available at the modulator input.”(1).

Then I found this document – “Video fixes and video cables
for all ZX Spectrum 128K models”. There is a chapter on Creating composite video-out on a +2A / +2B / +3:

“Although the ZX Spectrum 128K heat sink model and the grey ZX Spectrum +2 have a composite video-out signal on pin 1 of the RGB connector, the ZX Spectrum +2A, +2B and +3 are missing this feature.
Instead of the composite video signal they have a dangerous 12V on pin 1 that will seriously damage your TV or monitor!
But you can add the composite video signal yourself, with the same fairly simple circuit as that is integrated on the heat sink model and +2.
The steps:
1. First remove the 12V from pin 1 by removing resistor R44 (should be the same for +2A, +2B and +3, and very close to the RGB connector).
2. Add this circuit:”

zx spectrum +3 composite video mod
zx spectrum +3 composite video mod


Perfect packaging :)
Perfect packaging 🙂

And here is the result:

zx spectrum +3 composite video mod
zx spectrum +3 composite video mod






Sony Ericsson that have tx-rx connection

Sony Ericsson that have tx-rx connection:

A2618s, A2618sc, A2628s, A2628sc,
F500, F500i,
J200c, J200i, J300a, J300c, J300i,
K300a, K300c, K300i, K500c, K500i, K506c, K508i, K600, K608i, K700, K700c, K700i,
P800, P802, P900, P908, P910a, P910c, P910i,
R300d, R300LX, R300z, R310s, R310sc, R320s, R320sc, R380e, R380sc, R380s, R380WORLD, R520LX, R520m, R520mc,
S700c, S700i, S710a,
T200, T202, T20e, T20ec, T20s, T20sc, T238, T28s, T28sc, T28z, T28WORLD, T290a, T290c, T290i, T292a, T29s, T29sc, T300, T306, T310, T312, T316, T39m, T39mc, T60c, T60d, T608, T60LX, T610, T61c, T61d, T616, T618, T61LX, T61z, T628, T62u, T630, T637, T65, T68, T68i, T68ie,
V600i, V800,
Z1010, Z500a, Z502a, Z600, Z608, Z800i.

for J200i, J210i, J300i, K300i, K700, K700i, S700, S700i, F500, F500i, K500, K500i, T616, T628, T637, P800, P802, P900, P908, P910, T200, T202, T226, T226s, T230, T238, T290, T292, T300, T302, T306, T310, T312, T316, T20, T28, T29, T36, T39m, T39mc, R520, R520m, R520mc, T65s, T60c, T62u, T68i, T68m, T68mc, T68ie, z1010, T100, T102, T105, T106, T66, T600, R600, R600s, R600sc, A2618, A2628, A3618, Z200, Z300, Z500i, Z600, Z608, Z1010, S700, V600i, V800
Name Direction Description
1 ATMS Audio to mobile
2 AFMS/RTS Audio from mobile/RTS (connected to GND in cable?)
3 CTS/ONREQ CTS/Mobile Station On REQuest (connected to GND in cable?)
4 data in Data to mobile (Rx). (Tx for K300i)
5 data out Data from mobile (Tx). (Rx for K300i)
6 ACC in Accessory control to mobile. Used as Rx in some models (i.e. T68) for flashing.
7 ACC out Accessory control from mobile/handsfree sense. Used as Tx in some models (i.e. T68) for flashing.
8 AGND Audio signal ground + 0V reference
9 flash Flash memory voltage + Service (shorted to pin 11 in service cable)
10 DGND Digital ground
11 Vcc DC + for battery charging + External accessory powering

Pinout by Cruiser team:

Pin Signal Description

CTMS stands for Control To Mobile Station; CFMS stands for Control From Mobile Station; DTMS stands for Data To Mobile Station; DFMS stands for Data From Mobile Station

Standard cable is Sony Ericsson DCU-11


The (Tx)&(Rx) are reverse for K300i model, you must connect CTS & DGND together on board and connect the common wire to CTS(Pin3) in phone connector. If your cable is working fine then dont change it.

Making an adjustable “lab” power supply from scrap

Had an old power supply board lying around that was ripped from dead/old printer. PSU model is CZ57PSE EPSON


To make it work one should connect PSC line to ground.

Schematics of similar power supply:

CZ57PSE schematics
CZ57PSE schematics

To regulate output, made an adjustable voltage regulator using LM2575 that was ripped of some dead router or something similar:


Finished power supply in a box:

Regulated power supply
Regulated power supply
Regulated power supply
Regulated power supply
Regulated power supply
Regulated power supply
Regulated power supply
Regulated power supply

ESP12E dev kit “cant autodetect firmware, because proper answer not received.”

After flashing NodeMCU dev kit to latest build could not connect to it with ESPlorer, error was – “cant autodetect firmware because proper answer not received.”.

It was because baud rate was changed in later firmware, after setting the baud rate to 115200 all was fixed.


Making old webcam to work on Windows 10

Was investigating some old Fujitsu Siemens Webcam for some project, but it did not work on Windows 10 – windows did not recognize and did not have any drivers for it.

Hardware ID in device manager shows:


Searching by vendor and PID did not help.

On PCB of the webcam, I found that it is SN9C120 + S0I766

Finally searching by SN9C120 that this may be same as HP Basic Starter Camera. That led me to this Microsoft Update page where finally I have found working* driver. This driver installed on Windows 10 without problems, but Camera app was still not working.

On the internet found some general app written on .NET 3.5 for camera capture and finally that was working fine.

If windows update site is not available, you can find the driver here.

*UPDATE good app to test web cam –

PSU mounting – fan facing up or down

My two cents rant about PSU fan facing up or down when it is mounted in the bottom of the case when talking about semi fan less power supplies.

Facing up:

Heat goes up. When PSU fan is off, all that little heat will go up directly to the GPU.

When PSU fan is on, you are cooling PSU with a warmer air from inside of the case.

Facing down:

When PSU fan is off. Heat goes up. But between PSU circuit board and GPU you have PSU metal case acting as heat sink, so in theory it should not heat GPU so much. But, in theory, heat should accumulator faster in PSU case itself and PSU fans should start spinning sooner.

When PSU fan is on. You are taking cooler air from outside that should cool PSU faster. Considering PC case has some gap from the floor and air intake holes.

And plus. If You have water cooling and it is mounted somewhere above, and one day it fails, in this case You probably wont have water dripping through Your supplies fan hole directly in to the high voltage circuitry, at least immediately…

My verdict – bottom mount power supply should be facing fan down.


In real life the difference should be minuscule if we talk about full or mid size PC cases. Some tests on the web show that fan facing down makes PSU few degrees cooler. Some show no difference at all. So decision can be made even by overall aesthetics i.e. in what position everything looks better.


MasterWatt 650W coil whine when loaded by graphics card

Cooler Master – MasterWatt 650W 80+ Bronze Certified Semi-Modular ATX Power Supply is whining like a bitch when loaded by Gigabyte 1070 G1.

When I installed Gigabyte 1070 G1 to my PC and started testing it with various benchmarks and games noticed unpleasant sound from PC case that was related to what was happening on screen (FPS, brightness etc ).

Got worried that that is video card as you cannot exactly determine source of sound when everything was in case. Google tough me that this is probably combination of coil whine and bad luck or as it called “coil whine lottery” – even with same brand sometimes you can get it.

As my first suspect was graphic card, started googling and trying different things to get rid of it: overclock, under clock gpu, change some power settings in bios, limit frame rate. But nothing helped.

Then i decided to try to identify source of the sound more precisely. I took PSU out of case, connected it outside and suddenly realized that sound source was not from GPU (gpu was totally silent) but from PSU itself.

When idle or stress testing just CPU, RAM, SSD or integrated video – PSU is super silent (I did all those test when I was waiting for GPU to arrive – PSU was super silent).

But when you just stress test Gigabyte 1070 G1 (or even just start any game), it load power supply some much that it literally start whining.

That whining is not very terrible with closed case, but still unpleasant to hear and I really do not want to have it in my PC setup. Call me perfectionist with this matter.

So, bad luck for me with this one, changing Cooler Master MasterWatt to other brand now.

Not sure what I will do with this Cooler Master, I cannot return it, probably they even will not accept it for warranty, will have to figure out something. Or maybe I just will open it (then definitely warranty void) and will try to figure out if there is an easy fix – some hot glue on a coil etc. And later use it as a spare or make a lab power supply from it.

So, Cooler Master – MasterWatt 650W 80+ Bronze – thumbs down.

Cooler Master MasterWatt 650w - thumbs down
Cooler Master MasterWatt 650w – thumbs down