Tuesday, September 20, 2016

Fleming's Both Hands Rule!

Good afternoon everyone, so I think today is a good day to write about something kind of confusing which is Fleming's Left hand rule and his right hand rule. These rules are just mnemonic or you can call them memory technique to remember the directions of current, magnetic field and motion in both motor and generator.

So first things first remember this;

1. Fleming's Left-hand rule is used for electric motors.
2. Fleming's right-hand rule is used for electric generators.

Now let's talk about how to apply these rules, starting with left-hand or the motor hand.

As we are talking about motor the current and the magnetic field will be given but the force direction will be unknown. If a current carrying wire is subjected to a magnetic field in a perpendicular fashion then the wire will feel a force which is perpendicular to both the direction of current and magnetic field. So we are talking about 3 axis here, if you set say the field and current to x and y axis respectively then the motion will be in z axis. Things are a bit complicated without any visual representation.

Here is a left hand diagram where

Thumb or F is the force vector or the thrust on the conductor or motion of it. 
Fore finger or B represents the direction of magnetic field or flux density.
Second finger or I represents the direction of current.

Let's move on to the right hand rule now.

For generators however the motion and the field is given we need to know the direction of current. So thing is if we subject a moving conductor in a magnetic field we will get current which is both perpendicular to the two applied causes. Again let's look at a visual representation.

In here

The thumb is the motion of the conductors.
Fore finger is the magnetic field.
Second finger is the direction of current.

So that's a brief description of Fleming's left and right hand rules.

For more info visit the wiki links.

Left hand.
Right hand.

You can also read my other posts here.

Index to my blog.

Monday, September 5, 2016

Raspberry Pi Starter Kit

Good evening everyone. Hope you guys are doing great. So currently single board computers are very popular and getting more more and more popular day by day. Truth to be told there are huge amount of legitimate reasons behind their popularity. If you are however new to all these then this post might help you out. In this specific post I will be focusing on Raspberry Pi and I will go into the reason why in a few moments.

Like I was saying if you are new to this whole single board computer thing I would say start with Raspberry Pi as it has been here for quite a long time so you will get more support. Now let's take a look at what you are going to need to properly work with Raspberry Pi in many different scenarios. So couple things are common for all scenarios, let's start with them.

1. You will obviously need a Raspberry Pi, as for September 2016  I would suggest getting either a Pi 2 or Pi 3.

Raspberry Pi 3

Raspberry Pi 2
Let me give you a bit more info on this single board computers. Both of them are ARM based and have a lot of similarities but the newer one has couple more tricks up its sleeve.

System on Chip:

RPi2: BCM2836 Quad Core ARM Cortex-A7 900MHz with VideoCore IV 250MHz
RPi3: BCM2837 Quad Core ARM Cortex-A53 1200MHz with VideoCore IV 300MHz

Audio and Video Output:

HDMI supports 1080p video with audio.
3.5mm TRRS jack for Stereo Audio and Composite Video.


RPi2:  10/100Mbps Ethernet Port via an USB to Ethernet Adapter on-board.
           4 USB 2.0 Port.
           1 HDMI, 1 3.5mm TRRS Jack.
           40GPIO Pins,
           Camera Interface(CSI)
           Display Interface(DSI)
           MicroSD Card Slot for Loading Operating system.
RPi3:  10/100Mbps Ethernet Port via an USB to Ethernet Adapter on-board
           Bluetooth 4.1Classic, Bluetooth LE, Wi-Fi 2.4GHz 802.11n Standard.
           4 USB 2.0 Port.
           1 HDMI, 1 3.5mm TRRS Jack.
           40GPIO Pins,
           Camera Interface(CSI)
           Display Interface(DSI)
           MicroSD Card Slot for Loading Operating system.

5V 2A(Recommended) via Micro USB.

So the major difference here is the Improvement on the CPU side as frequency is bumped from 900MHz to 1200MHz and also the GPU sees a little improvement. The big advantage here is the fact that Raspberry Pi 3 comes with Wi-Fi and Bluetooth. Next thing we need is microSD card to load operating system.

2. MicroSD cards.

As they are inexpensive I would suggest you to buy about 4 of them, 16GB of capacity and Class 10 in speed specification. That way you can keep one or two stable operating system ready in hand to use and maybe one or two more for experimenting.

3. A good power adapter.

To power up the device properly a good quality power supply is needed with a good micro USB cable. Personally I use phone chargers and they work just fine. I would suggest getting at-least 2A one but if you plan on using portable Hard drive or something I would recommend getting a 3A one. (Although keep in mind that the combined current output of all four ports are 1.2A)

4. Ethernet cable or Wi-Fi dongle:

Depending on which method you use, you might need an Ethernet cable, a CAT5e would be enough or you can opt for a USB Wi-Fi dongle for RPi2 but for the RPi3 it has built in Wi-Fi. If you are plan on using network attached storage however I would recommend using the Ethernet port as it will provide more consistent speed and better latency.

5. HDMI Cable and 3.5mm splitter:

For connecting with TV or monitor I would recommend using HDMI as it is better and easier to configure as oppose to the composite output, however if you still want to use that you can use another 4 pole to two 3 pole converter. The one that will work with Android or apple devices will also work here to. What it will do is just take in the A/V signal and give out separate stereo audio and composite video. In case of using the same jack with laptop's combo port or phone you will get stereo audio out and microphone in. Don't fall for the HDMI cable money trap though, 5$ one worked exactly like a 50$ one.

6. USB flash drive.

If you are plan on using NAS or Media Center or maybe RetroPi gaming setup, you might need this. Don't bother with USB3.0 however because ports on Raspberry Pi2/3 are of USB2.0 standard.

7. An analog game controller.

If you plan on using RetroPi this is a must for you. You can get either the wired one or wireless one.

8. (under construction)

Tuesday, August 30, 2016

Setting up DHCP address reservation

Good afternoon everyone, in this brief post I will talk about how you can enable DHCP address reservation on your router. For demonstration purpose I'm using a TP-Link router which is very common but any other brand of router should have the similar option too.

Before getting into how to do it let's discuss DHCP. It stands for Dynamic Host Configuration Protocol and as it's name suggests it is an network protocol used on Internet network protocol. This protocol is controlled by a DHCP server to dynamically distributes network parameters such as IP addresses. So it drastically reduce the workload for the network engineer who is in charge with deploying a network. If DHCP wasn't available network engineer or the person who is setting up the network has to manually assign IP addresses to all the devices but with DHCP the server itself assigns IP addresses to devices automatically. Connect a new device and it will get a new IP automatically, you don't have to do anything. If you think about depleting IP addresses then lease time will help you with that. Unused IP addresses will be re-cycled via this. DHCP server leases IP for certain set period of time, if after that time the device no longer needs the IP it will be assigned to some other device. So it's all well and good right then where is the point of reserving certain IP?

Here is the thing, if you are running a network attached storage or IP TV or media center then DHCP might not be ideal as it will change the IP address over time. Say if you configure your phone to get certain data from certain IP, if that IP changes it will no longer get that data, you will have to enter the new IP. Now if you completely turn off DHCP then again you have to manually set all the IP addresses for different devices. Hence DHCP address reservation. In this method what is done is simply reserve certain IP address to certain MAC address or device address so that that IP won't be given to anyone. This ensures that certain devices will always get certain IP addresses. For example I always reserve IP address for my Raspberry Pi so that I can easily SSH into them. Let's look at the procedure then.


1. Get into the router via the web based interface, for different router it might be different for example
Tp-link can be accessed with or tplinklogin.net
SMC can be accessed with

After that login with the username and password, it should be written under the router or on the box if you haven't changed it yet.

2. After getting into the router you will be greeted with this page where you should find something like DHCP. We need to get into that too

3. Now getting into DHCP we will find the options for turning it on or off. Default it should be enabled and we want to keep it that way.

4. Next we need to go to the DHCP Client list to get the MAC address for our client. If you can't determine the device from the client name, for example it is very tough to determine android devices so in that case you might want to gather the IP address or MAC address from the device itself. Keep that MAC address in mind to assign the IP address that you want to assign. Remember the lease time I was talking about? Look carefully and you will see some devices have their IP address with lease time, after the expiration either those IP addresses will be renewed or given to some other device if needed. Those with the Permanent lease time are reserved.

5. Now let's move on to the final part the Address reservation, in here you will see any existing one that is already configured or you can add/modify/delete any entry.

6. As I already have couple devices configured to have same IP address all the time those devices are already listed here. If you are doing it for the first time you will see an empty table. To add a new entry you simply click Add new and put in the MAC address and IP address and done. You might want to restart the router afterwards.

So that's how easy it is got enable DHCP address reservation and saves a lot of time finding IP addresses of devices. Now for an example I will always reach my Raspberry Pi 2 at

Hope it has helped.

Read my other posts here.

Friday, August 26, 2016

Learn English - Euphemisms

Good morning everyone and in this particular post I will talk about Euphemism and it's usage with couple examples.

So what is Euphemism? 

To simply put it is something to replace certain harsh or offensive words with something mild or less unpleasant. So basically it substitutes harsh, offensive, direct words or words that has negative stigma attached to it to something softer in order to avoid offending people or over inflate the importance of some words. It can be a word or two or an expression. Honestly I'm not a big fan Euphemisms, I like to call things whatever it is in most cases but in this day and age it is very easy to offend people, so it is better to learn about an alternate way of expressing your mind. Hopefully this hasn't offended anyone yet. To me personally it is not about showing disrespect or something because I think someone can be disrespectful inside even if they use a milder word but someone can be respectful and yet call spade a spade. Now Let's take a look at couple examples that are very common.



Death, instead of blatantly saying someone has died we can use something different like

Passed away,
Meet someone's maker,
Six feet under,
Didn't make it,
Negative patient outcome etc.


Toilet, many people feels shy using this word so they use something else like

Little boy's room,
Rest room,
Wash room,
Lady's room,
Go and see a man about a dog,
Powder your nose,
Spend a penny etc.


Unemployed, it is a bit harsh to say someone is unemployed so we can use

Laid off,
Between jobs etc.


Handicapped or Disabled, again rude to use such terms and about the word disabled they are really not disabled so it is better to use something like this

Mentally challenged,
Physically challenged,
Differently-able etc. 


Fat, again some people consider this word to be rude so the following words can be used instead

Full figured,
A few extra pounds,
Let himself go,
Big boned,
Chubby etc.


Stolen(or cheap product), often times we can buy very cheap products from something like a black market that we know might have been stolen, we don't say stolen we say the following words,

Fell off the back of a truck,
Get off the truck etc.


Used, in car dealership using the term used kind of decreases the value of the good so they instead use

Previously enjoyed.


Getting pregnant, some people feel shy to admit it or say anything about it so they use different terms like

Bun in the oven,
Knocked up(some people actually consider this to be even more negative).


Jail, it is not pleasant to say someone is in the jail rather the following term is used.

Correctional facility.


Genocide, I don't have any problem with this word rather I would say it is better to use this because softening it might undermine the severity of what happened. We know examples of genocide like Armenian Genocide of First World War, Jewish genocide on Second World War, Genocide on Bangladeshi people on 1971 etc. and these were really severe so again I don't see any point of using anything else but people use the term

Ethnic cleansing.


Prostitution might sound taboo and people use

Turn a trick.


Accidental death, which often times happen specially during war time or invasion time like now and lot of time civilian casualty happens and rather than using accidental death media or government  usually uses

Collateral damage.


To fire someone might not sound good so instead of saying that we can use

Letting someone go.


Euthanize is to kill someone(usually animal) to lessen their suffering. In a terminal case where the animal usually a pet is going to die anyway and suffering greatly they are instead euthanized and people don't like to call it this so they say

Put to sleep,
Pull the plug.


Homeless, instead of saying homeless it is polite to use

On the streets.


Abortion might sound harsh or saddening to some people so they use

Pregnancy termination.


Pornography might offend some people so use

Adult entertainment.


Liquor, wine and beer might offend people too so instead use

Adult beverage.


Prostitute, some people use

Comfort woman although I don't agree with this because this word was used during world war 2 and comfort women were the girls that were forced into sex slavery by Japanese people so not really prostitutes.


Late kinda sounds harsh so use

Chronologically challenged.


To have Sex sounds aggressive to some people so use

Sleep together,
Go all the way.


Short, don't say someone is short which might offend that person instead use

Vertically challenged.


Maid, the person who works at home can be called

Domestic engineer.


Ugly can be derogatory so use

Appearance deficit.


A place where chance of getting mugged is high can be referred to as

Vibrant area of town.


Lazy can be harsh too so use a bit more polite

Couch potato.


Stripper is a person who usually dance or performs naked so use

Exotic dancer.


Elderly, rather than saying it better say

Senior citizen.


Poor also might sound rude so use

Economically challenged.


Unwanted call is kind of a call to or from wrong person and can be said

Courtesy call.

These are some very common one that you might hear regularly so hope this has helped.

Read my other posts here.


Sunday, July 24, 2016


If you go out to visit someplace or go on camping a torch will be very handy right? You can use a mobile phone flash for the job but it will be much more comfortable to use an actual torch and it will be more fun if you can make one for yourself right? This post is about making your own LED torch.

Components needed:

1. Integrated circuit: MAX660.
2. Capacitor: 1*22uF and 1*100uF, better to get tantalum type capacitor.
3. Diode: 3*1N4148, LED: 3*High brightness LED.
4. For power use 2*AA Cells.
5. Enclosure for circuit, battery and reflector for LED.
6. Don't forget to put a switch between source and circuit that will serve the purpose of turning on/off.

Circuit Diagram:

 How it works? 

The first question that you might ask is why do we need an Integrated circuit for this! LED can be used directly with a power source, maybe limiting the current via a resistor will be enough and yes you are correct but in this arrangement of constant current provided by the MAX660 integrated circuit that is in voltage Inverter mode will be able to drive them at constant brightness.

So simply we are powering the LED via two AA cells, typically 1.5V per cell for non rechargeable one. You can use rechargeable cells too but probably disposable Alkaline cells will be better suited for this purpose. You might want to read why is that!

Like I mentioned above MAX660 will provide a constant current which in this case is 100mA is enough to drive multiple LED which is done in this circuit.

I forgot to add a switch to this circuit, you can just add it between Bat+ and Pin 8 of the integrated circuit.


1. MAX660 Datasheet
2. LED Driven in constant Current
3. My other posts.

Main Line Powered LED Pilot Lamp

Good evening everyone, it has been a long time since I wrote anything on hobby electronics, so I thought about restarting it with a simple AC main line powered LED pilot lamp circuit.

There is not much to write about this circuit so I will try to go a bit deeper and explain how the whole thing is working. First let's think about where this circuit can be used. You can use it with any electrical outlet that does not have one, yes you can use Neon Lamps too but if those lamps are hard to come by I think LED pilot lamp will be a great substitute for that.

So what do we need for this?

1. A small circuit board to assemble, or you can just solder everything to one another.
2. One 0.1uF 400V non polar capacitor, it might read 104 in front of it.
3. 1kohm 1/4W Resistor.
4. 1N4004 diode.
5. LED

That's all!

Circuit Diagram:

Not much to talk right? So let's talk about it in details.

How it works? 

Simply the capacitor is dropping the voltage and the resistor is limiting the current. The diode 1N4004 is performing two crucial tasks here. First one is it is limiting the maximum reverse voltage across the LED and the second one is it is providing a path for the negative half cycle so that the capacitor can pass current in both direction. During positive half cycle it will pass through the LED and for the negative one like I mentioned above the diode will be used. If you want to work with lower input voltage just increase the value of the capacitor and that's pretty much it!


This circuit is not really isolated from the AC main line so do not touch any part of the circuit while in operation.

Hope it will help! Happy Experimenting!

You can read my other posts here.

Friday, July 22, 2016

SLi, Everything you need to know

Good evening everyone, today again slightly different topic and kinda written in brief and it is about SLI. Hope you will enjoy it.

What is SLI?

I won't go much into details here with all those technical terms of how it works but to put simply this is a GPU technology developed and used by Nvidia to utilize more than one GPU in a single system to boost the performance. For two cards alternate frame rendering can be used where one GPU renders the odd frames other one renders the even frames thus increasing the overall throughput. Although SLI was first used by 3DFX on their Voodoo2 cards but that SLI meant Scan Line Interleave and SLI used by Nvidia means Scalable Link Interface.

3DFX Cards in SLI configuration

What Do you need? 

1. Multiple SLI capable GPU.

2. SLI enabled motherboard.

3. SLI Bridge.

4. SLI enabled operating system.

5. Proper drivers and applications.

Nvidia GTX980 2 Way SLI on an Asus X99 board.

Gains and advantages: 

1. Substantial performance increase.

2. It might be the case when you already have the best card and you want more performance out of your system you have no choice but to add in another card.

3. Chances are you are running a card from older generation and price of your card has dropped as with the release of new generation it always happens. You can either get a new card from new generation or add in a same card and get more performance out of it.

4. You can easily hit higher frame rates or better quality with SLI, there are games at this time that would even put the best card out there in good amount of stress.

5. Show off and bragging rights, don't deny it many people use SLI just for this. You will get huge scores in benchmarks.

Limitations and disadvantages:

1. Video RAM won't add up which means two 4GB card won't give you 8GB of video memory instead it will give you 4GB. The reason being each card has to store the same data so eventually the total effective memory stays the same.

2. Not all tittles support SLI and many of the games are optimized for taking full advantages of it. So many games will just run on a single card. For example Company of Heroes does not even support SLI, so when I played this game with my SLI setup only one card was essentially taken all the load.

3. Performance does not scale up that much, two cards do not necessarily guarantee 200% performance and three of them won't give you 300% and as more and more cards are added the scaling goes down even further and latest generation of 1000 series cards actually have a lot of things regarding SLI but it is ideal to use only two of them.

4. You will need a SLI capable motherboard that will be slightly costly and as you add in more cards PCI express link width will decrease in most cases. Let me remind you that most common AMD and Intel desktop processors only have 16 PCI Express lanes. For example the Core i7 6700k has 16 lanes. So for single card it will be 16X but if you add in another card the link speed will go down to 8X, adding a third card will decrease the link speed to 4X for two of them. For single moderately powerful card 8X bus speed is enough but for high end card you might loose a little performance for decrease of Bandwidth. However for 28/40 lane Intel Extreme processors you can add up multiple cards without loosing that much bandwidth.

5. A much beefier power supply is needed, preferably one with SLI certification. Personally I use one with a single 12V Rail that can provide good amount of current on it because that way I don't have to worry about balancing the load. To learn more about this you can check this post.

6. Only same Graphics Processing Card can be used together. For example you can use two GTX980 together but not one GTX980 with a GTX970. You can however use different manufacturer. I have used Gigabyte Card with MSI card, as long as they have the same Graphics processing unit you can use them together. DirectX 12 supposed to solve this issue but let's see how things turn out.

7. Cards with aftermarket cooler might make the inside of the case hotter as these cards tend to exert heat inside the case. Blower style reference cards are better in this regard as they blow heat out of the case. Moreover top card might run hotter in many cases as it will get less air due to the close proximity of another card.

8. In poorly optimized games it might result in stuttering which drastically decreases the overall gaming experience. You will see that the game is running at a very high frame rate but frame time will be so different that the game won't be enjoyable any more. For example I had this issue with Far Cry 4 and Call of Duty Advanced Warfare with my SLI setup.

9. Many CUDA enabled software won't be able to use both cards at the same time. In that case a single card would have been better.

Final thought:

So if you are out for shopping a new card buy the absolute best you can get for your budget. It is not wise to spend on two moderately powered cards over a powerful one. Think about it in this way, if you want to accommodate multiple cards you will be using SLI enabled motherboard and high end power supply unit rather you can just go with a single GPU and a slightly cheap board which will actually give you more performance for the money.

But like I said earlier, if you want the absolute best and even the single card in the market is way below your maximum capability, by all means go ahead and add another one and if you want to get a older generation card to pair with your existing one rather than buying a new generation card, you can do that too.

That's pretty much it, good day everyone.

Visit my full blog here.