龍卷風

狂風掃葉 葉落歸根

Controlling stuffs using Bluetooth

Posted by doc on April 14, 2021

Posted in General | Leave a Comment »

Brightness

Posted by doc on April 10, 2021

There is an imbalance of perceived brightness with different colour LED being turned on which requires manual adjustment. For example when red colour is alone, the is relatively dimmer than yellow colour when red and green are on simultaneously. Because the later represents two light sources.

Thus I have fine tuned the later and reduced their power output to around 50% of their original duty cycle. And I did that for the rests too.

Now the brightness from different colours are quite even.

When all three colours are lit, the duty cycle can be reduced even further to 33%.

But there is another problem, the perceived brightness level is not linear in relation to the duty cycle. The relationship is rather a logarithmic one, which can be quite complicated,

Another more accurate way is to derive a method to directly measure the brightness using a lux meter and map out the relationship between power and brightness. One may find out that each colour may have its own graph, and combination of colour may have other graphs.

Even so, lux doesn’t directly reflect on the brightness perceived. A brighter blue LED may appear dimmer than a green one due to subjective perception of human eye.

Posted in General | Leave a Comment »

Got my vaccination date

Posted by doc on March 26, 2021

Waiting for my vaccine call.

I shall not miss their call.

Got my vaccination appointment.

Posted in General | Leave a Comment »

Active Noise Cancellation

Posted by doc on March 23, 2021

The best part of the best ANC is to enable you to enjoy the music at its 10% volume in a noisy environment.

Especially the bass.

Posted in General | Leave a Comment »

Joule Thief simulation

Posted by doc on March 22, 2021

Posted in General | Leave a Comment »

10 years LED Flasher simulation

Posted by doc on March 22, 2021

Posted in General | Leave a Comment »

Ferric chloride

Posted by doc on March 22, 2021

In order to etch my own printed circuit board, I bought some ferric chloride.

The seller instruction is to dissolve 40g in 110.5ml of water.

To concoct 1 molar solution of FeCl3, according to its molecular weight, one will need 162.2g for every 1L of water.

So with 100ml, 16.22g is needed.

40/110.5*100/16.22 = 2.232mol.

Posted in General | Leave a Comment »

Number of Wires.bas

Posted by doc on March 22, 2021

Rem W is the diameter of the wire in mm
Rem W = 0.35
Input “Diameter of wire in mm”,W

Rem H is the diameter of the hole in mm
Rem H = 8
Input “Diameter of hole in mm”,H

Input “Length per winding in mm”,L

Print “Winding calculator by Dr Liew”
Print “March 7th, 2021”
Print

Print “Diameter of wire = “;W;”mm”
Print
Print “Diameter of hole = “;H;”mm”
Print
Print “Length per winding = “;L;”mm”
Print

Rem t is the height of triangle
t = W/2

Rem A is the area of the hexagon
A = 2*sqrt(3)*(t^2)

Print “Area of hexagon = “; A;”mm²”
Print

Rem B is the area of the hole
B = 3.14159265354*((H/2)^2)

Print “Area of hole = “; B;”mm²”
Print

Print “Number of wires = “; int(B/A)
Print

Print “Length of wire required = “; int(B/A)*L;”mm”

Posted in General | Leave a Comment »

Winding a Toroid

Posted by doc on March 22, 2021

A ferrite core is prefered. A metal nut doesn’t really work. Magnetic property is just not the same.

More turns equal more Henry value of the coil.

But given the size of the hole, how to calculate roughly how many times a wire of given size can pass through it?

So first, we need to convert each round wire into a hexagon in order to fill up the gaps in between them.

Each hexagon will be composed of six equilateral triangles.

Each equilateral triangle will have a height of W/2.

The area of each equilateral triangle is then calculated.

Multiply the area of equilateral triangle by six will be the area of each hexagon.

The area of the hole H will can be obtained easily.

Divide the area of the hole with the area of one hexagon will give you a rough idea of how many wire can pass through said hole.

The thickness and the height of the cylindrical core will tell you the length of each winding. Multiply this with the number of times the wire can pass through will produce the total length of the wire needed.

But with more winding, the length of the wire each turn will increase. So you may need to take this into consideration if there is a very big hole to be filled.

Again, this is just a rough calculation, accuracy is more than enough for small projects.

Posted in General | Leave a Comment »

LED Blinker/Flasher

Posted by doc on March 22, 2021

Another simple LED blinker using 1 NPN and 1 PNP transistor.

Posted in General | Leave a Comment »