Wednesday, August 29, 2018

Simple Delay Circuit

This will be a short brief post about a simple delay circuit using Capacitor and Transistor. It might not be very useful in real world scenarios but awesome for understanding some basic functionality.

Brief Description:

So this circuit will be a simple circuit that even when turned off it will stay on for couple seconds or so(depending on components). In a calling bell this circuit can be used where the bell will ring for couple more seconds even after releasing the momentary switch.


Component values are already on the diagram. Make sure to use a capacitor that has twice the voltage rating of supplied voltage. In this case 25V capacitor should be fine.

How it works?

Working of this circuit is very simple, when the momentary switch SW is pressed current flows from the power source to charge up the capacitor as well as provides current to turn on the Transistor via the base resistor. This in turn turns on the LED.

But when the SW is released the energy stored in the capacitor gets discharged via the transistor keeping it on for some more time and keeping the LED on for that time.

That LED can be swapped out for Relay and use this circuit for doing something else.Increasing the Capacitor value will increase the amount of time the circuit will stay alive after power being cut off.


Visit my full blog.

Wednesday, August 8, 2018

Firefox on Raspbian.

This will be a very short post about installing Firefox on Raspberry Pi.


To install Firefox open up terminal and type in

sudo apt-get install firefox-esr


1. Read my posts on RPi.
2. Visit my full Blog.

RPi NAS Drive Without Additional Storage

In one of my previous posts I have written about how you can share an USB drive on Network that is connected with a Raspberry Pi effectively making a Network Attached Storage. In this post I will show another way of making making a NAS, this time I will be sharing the SD card of the Pi. 

SD card is very cheap now so it is easy to get a good capacity one at a bargain and Raspbian Operating system doesn't take that much of a space. 8GB card is enough but people often use higher capacity ones, like in this project I will be using a 32GB card. For Raspbian only that is a waste of space. So let's use some of that storage to make it a NAS. Granted speed might become an issue here but for this project as I'm using a RPi 2 that has 100Mbps Network, even a 40MBps Read-20MBps write card will be fast enough to do the job. 


1. Raspberry Pi. I would suggest getting either RPi2 or RPi3.

2. Network with Internet access, wired network preferred.
3. Good Power Supply. I have got a 5V 2A for this project.
4. Reliable and Fast Micro SD card, I'm using a Samsung 32GB here.


1. Working version of Raspbian.

In this case I will be using my desktop to SSH into the Pi, you can directly use the Raspbian OS if you so desire.


1. Make sure your OS on Pi is fully updated. To do so use 

sudo apt-get update 
sudo apt-get upgrade

2. Next We will install Samba, which is the piece of software needed to share file over the network.

sudo apt-get install samba samba-common-bin

3. Now we need a folder that will be shared across the network. But we need to make one that has a sticky bit(1) so that it does not get deleted by accident and we will also need read write execute(777) permission on that folder, so we need the 1777. This folder can be located in any where, in this case it is on the root file system.

sudo mkdir -m 1777 /share

4. Next stop configuring the samba share to make it visible on the network. to do so type in

sudo nano /etc/samba/smb.conf

At the very bottom of this configuration file we need to add

Comment = RPi NAS
Path = /share
Browseable = yes
Writable = yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes

This will make sure that anyone on the network can view and execute what is on this share.

5. Now we need to add an user and put a password, you can use the default password if you want to but it won't be that secured, for personal usage on your personal network default password is fine. We need to type 

sudo smbpasswd -a Pi

Put the new password and user Pi will be added.

6. In the last step we will make sure that Samba starts running as soon as Pi turns on to do so we need to type 

sudo /etc/init.d/samba restart

7. Restart the Pi and see if you can find it on the network from other systems. I am happy to report that it works fine on both Android and Windows.

I'm getting around 10MBps speed on transfer, which is pretty much the maximum RPi 2 can get on Network so no complain there.

Wednesday, August 1, 2018

Capacitor Start vs Capacitor Run Motor

A Study on the Humble Table Fan

I was planning to write on split-phase and capacitor start/run motor for a very long time so I guess this will be a good starting point for that.

Let's start with a simple 3 Speed Table fan. The way this type of motors work is pretty interesting but simple enough. We can not make an induction motor that starts on a single phase(without any modification to the original 3 phase induction motor design). So if we need to run a motor on single phase we somehow need another phase, hence comes the split phase where we literally split the phase in two to get the motor started and running. I will write about split phase and capacitor start/run motor on a separate post so not getting into much details on that. 

So in a table fan motor we split the phase with a capacitor to get another phase which is powers the starting or the auxiliary winding. Simple enough but what what intrigued me is the speed control and how it is done. I looked for diagrams online before cracking open one and found out a diagram showing use of different length of primary Stator winding. Also another fact that the capacitors of these type of fans are dying like cockroaches this days. On a 220-240V supply line, a 400V rated capacitor won't last long. So one easy thing to do is measure the voltage across the capacitor, if this diagram is correct, no matter the speed it is running at, the capacitor should always see the same voltage(unless the primary winding voltage induces something on the starting winding or something) but apparently it was not the case.

So these are the findings, and the weird thing about this is the voltage across the capacitor. No wonder even 400V rated(which probably is like a 300V one) capacitors were going boom. This also confirms the whole thing is not as simple as the first diagram eluded to.