Saturday, July 23, 2016

DIY LED Torch

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.


Resource:

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!


WARNING:

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.

Tuesday, July 19, 2016

Why does Bangladesh Import academic books?

Good evening, so I came across this interesting discussion so I think it is worth sharing!


Let's talk about O/A level books first.

As far as I’m concerned they have to stick to the regulations of IGCSE and most O/A level books that I have seen might be from India but they are not written by Indians rather most of them are written by probably Europeans. So probably even if any Bangladeshi person writes a book on O/A level topics won’t be accepted as a textbook and students have to buy the ones that are suggested by the curriculum. This is a standard they want to maintain or maybe even a monopoly so won’t accept anything else.


Look at school and college level books, they are pretty much the same as O/A level books only difference being O/A level books have more topics but SSC/HSC level books go much deeper into any certain topic and these books(SSC/HSC) are written solely by Bangladeshi writers, you probably won’t find any SSC/HSC book written by anyone else, even the ones that are in English so apply the same thing to O/A level, it is easy to understand Bangladesh has to import them. You probably will get pirated O/A level books in Bangladesh too, printed locally.


*Now what is wrong with Bangladesh’s publication industry?

Nothing is wrong, they act the same way as any other publication industry, quality is not the concern, profit is so they will publish anything that sales better no matter what the quality is and then again for artistic point of view everything is relative.


*Don’t Bangladesh has quality writers?

Question to this answer actually lies within the answer of your next question so let me tackle both at the same time.


*Don’t Bangladeshi people buy books?

This is a broad question because you were talking about Academic books but now this question also applies to general class too. The simple answer is no, most Bangladeshi people don’t want to buy books anymore and they read much less than they once read at a time and you can guess the reason too, there are more ways of entertainment available this days, you have huge amount of TV channels, radio channels, social networking sites, YouTube etc and Bangladesh has moderately high speed internet this days so people passes time on them more than anything. Look at the modern generation, they rarely read a book and what can you do they have grown up with these technological wonders and we all know how they can impact attention. There was a time when people bought a lot of books. Book fairs had huge amount of sell, libraries had too but now people just visit those places and if you don’t have an audience no one’s gonna create what a small minority might demand. You probably won’t get to live by the earning from writing a book so it is better to do something else and think about it more and more generations are distancing themselves from books so who is going to write them?

On academic level however it is even more painful, most people will go to KFC or Pizza hut and spend thousands on food, they will buy pricey dresses, pricey cosmetics but when it comes to buying books they will look for free digital copy, not all of them of-course but most of them will do it and can’t fathom this. Many private universities solely depend on presentation files and often times people print them or use any device to read them so the market is shrinking, if you write something and no one buys that you won’t write anymore.

Although luckily we have some good books written by teachers from University of Dhaka, I can give one good example, math books like Linear Algebra, a good book written by Prof. MD. Abdur Rahman of dept. of mathematics. I will hope view of Bangladeshi people will change and then Bangladesh can import less and it will eventually fuel other teachers to write something.

Hope it has given you something to think about. 


Monday, July 18, 2016

Q:1 Non Rechargeable Batteries, why do we still use them?

Good evening everyone, this is another new segment where I try to write about question or queries that I was asked and think they are worth writing about. So the very first post is about batteries, rechargeable versus non rechargeable. In this day and age where rechargeable cells are very common why do we still use one time use ones? If you have this question too let's see if I can answer that.


Collection of non-rechargeable AA cells
NiMH AA cells being Charged


Most devices that we use today are powered by rechargeable cells and it is understandable why because even if the rechargeable one will cost you more money to get it will cover that up with it's ability to be used for many times. Even if you have to buy a charger for it and charging will cost you some electricity bill yet your money will be saved because you will be able to charge them and use them for moderately long period of time.


Both rechargeable and non-rechargeable cells have their usage and most of the time in different scenarios. So let me mention some of those scenarios where non-rechargeable cells might perform better and then explain why.
  1. In low drain devices like Infrared Remote Controller, Electronic Calculator, Wall clocks or different other similar gadgets non-rechargeable cells are better. Lets think about the wall clock, you know those clocks that run on single AA cell. If you put a normal AA cell that might cost 1/8th of a dollar it probably will run for a year, put an Alkaline one that might cost you 1/2 dollar and it will run for around 3 years so where is the point of even putting a pricey rechargeable cell! Same thing is true for other products that I have mentioned.
  2. Electronic devices that are hardly used and might sit on the shelf for a long time and you might need them to work right away, in this case Disposable cells will be much better suited.
  3. One thing to remember is the NiMH cells have a nominal voltage of 1.2V where standard non rechargeable ones have 1.5V so in many cases the rechargeable one might be considered to be low in voltage even though it has good capacity left.
  4. Charging NiMH is a bit tricky so you will need a good charger so ultimately you will have to invest a good amount of money if you want to use rechargeable cells as oppose to non-rechargeable ones.
Now let’s think about why. Well the very first reason is self discharge rate of NiMH is much higher than non-rechargeable Alkaline cells. The AA Alkaline cells that I bought last year comes with an expiry date of 2022 and I know for fact that they will even work after that time but NiMH will need to charged up occasionally.

For low drain device it might even be the case where the current that the device drains is smaller than the self discharge rate so really not suitable for low drain devices and if for devices that are just kept for emergency like a flash light if you just keep that like for couple years chances are the NiMH cells will just discharge fully and won’t work when you will need it.

NiMH dumb chargers might not be that pricey but they are not good for the cells and might overcharge and cause them to fail prematurely to avoid this you will need a smart charger and usually those smart chargers cost much more than dumb ones.

Another important thing to remember is the environmental impact, yes primary cells(or non rechargeable cells) might be the the bigger contributor to this although the use of mercury is no longer prohibited so environmental impact is not that severe and as I was saying earlier if an AA Alkaline can power a wall clock for 3 years that impact is really negligible although we should be careful while using these cells, stopping unnecessary usage will be eventually be better for everyone.

Note:

Notice that I have spoken mostly about NiMH, why is that? Because in places where lithium ion or lead acid batteries are used it is very hard to replace them with non-rechargeable ones as the cost will go up significantly for example in mobile phone or laptop or uninterruptible power supplies but for NiMH in low drain application you might even get better value using non-rechargeable cells.

Hopefully this small discussion has given you something to think of.

Visit the Index page of my blog for more posts.

Friday, June 10, 2016

Getting Started with Hobby Electronics - 1

Good afternoon everyone, I was planning to write this post for a very long time now, but didn't quite got my thoughts together to compile this so let me try another time. I will be writing this as a series and first one obviously is the introduction.

To whom this post might concern:

1. Someone who is trying to get into hobby electronics.
2. Someone who is already into it but not sure what to do.
3. Someone who is facing difficulty.
4. Just to get the idea what it is all about.

Why? 

Well, this probably is the most common question that we get is why do you need to be an electronic hobbyist? The simple answer is, it is a hobby, I don't need a reason to have this hobby, simple. Although it is pretty much the same as any other hobby but it might be somewhat beneficial in your day to day life too. Electronics hobbyists usually don't have to rely on electricians for normal day to day needs regarding electrical equipment and stuffs. An electronic hobbyist can many of his/her domestic problems associated with electrical or electronic items just fine. So it is obvious that hobby electronics is a pretty fun thing to do and also very useful.

I do understand that hobby is a thing that we do to distract ourselves from the normal monotonous work that we do so often times we don't worry about the gains from hobbies and it should be this way but almost every hobby that I know will help you with something. If you collect stamp it is pretty sure that you know something about many countries that other people do not know about. This knowledge pretty much comes free and it might help you one day, same thing applies for electronics hobby too. It will help you in many ways but that is not the primary purpose.

How about some more examples?

I probably can think of thousands upon thousands of examples of how this hobby can help you in your day to day life but let's just start with some normal examples.

1. Say your 2 years old router is not working, none of the indicator lights are glowing but you need internet very badly, what can you do? Well you are in luck if your hobby is electronics, measure the output voltage of the adapter of the router. Probably it has died so not putting anything on the output lead. Okay so probably the problem is identified, now you can look closely at the adapter or router it should say the working voltage of it. Assume 9V 0.6A which is very common. Now with your skill and simple components like the 7809 regulator you can make a power supply under 10 minutes and you are good to go to run the router again.

2. Your phone needs charging but no electricity, although you have a sealed lead acid battery and couple other components. What can you do? Well make a simple circuit that puts out 5V from the input 12V, maybe a 2576 regulator based circuit and done, charge your phone with that! You need to charge your lead acid battery? No problem you can do that later too maybe with a 317 integrated circuit and some other components!

3. How about some automation? A remote control to turn on your lights or fans? Sounds good right and you can make that happen with some development board too, not that complicated either!

4. Ceiling fan running slow? Chances are the capacitor has gone bad, replace it, if you are a hobbyist it will be a very simple thing to do, no need to call for assistance of other people and it might take only 3-4 minutes.

5. Need to change blown fuses? Depleted batteries? Damaged lamps? Well you can do any of them with relative ease. Someone who doesn't have this hobby can do it too so it will be even easier for you.

6. How about building a small Network attached storage that will download and store your favorite series which you can watch from any device you want? Well you are in luck, you can use any small single board computer to do this.

7. How about making a small amplifier? You can use either Bluetooth or standard wire with it to get the audio from the source!

You can think of infinite number of examples too but I will just stop here and hope that my point has gone across. Proper tools and necessary knowledge can make your life a lot easier and we regularly face this issues so no harm knowing I guess.

One thing to keep in mind though yes you can buy these stuffs or service but the main thing is the fun, making something brings a lot of pleasure and this pleasure will be multiplied when you will see the things that you make are working properly and helping you with something!

That is pretty much what I wanted to say as introduction, I hope I have got your attention so in the next couple posts I will be focusing on:

1. The hardware that is needed, both mandatory and optional.
2. Some circuit theories that might be helpful.
3. Conclusion.

Resource:

1. Index page of my blog!



Thursday, June 2, 2016

Tight VNC Server On Raspberry Pi

Good morning everyone so according to my plan I was experimenting with the Raspberry Pi and trying to document as much as possible but the process is still pretty slow but here is a small bit of that. So we know Raspberry Pi is a single board computer that has its own Video output but what if you don't want to use it and you are not happy with the SSH either then a virtual network computing might come handy. So this post is about how you can set up VNC and use it on raspberry pi. 


First of all what do we need?

1. The obvious one which is a Raspberry Pi, I'm using the Pi 2 model B. 





2. Next we need something to power up the Pi. I'm using my good old phone adapter from Asus. You can use whatever you have on hand but make sure it is from a reputable brand.



3. You need to connect the Pi to the network where the other system is connected in order to make this happen. Probably you can connect a Pi directly with your system and it will still work but it is much convenient to use a router or something. I'm just using my home router to connect with both my computer and Pi 2 via Ethernet cable. You can use wired or wireless network, no problem.


4. We need some software like Putty and Tight VNC for the computer which I will get more into in procedure section. These software are free and download links will be on the resource section.

So let's begin!


First let's talk about the connection.

I'm guessing you are running the latest version of Raspbian. So just plug in the network wire and power it up. In case of Wireless, make sure to connect to the network that you will be using and done.


Procedure:

1. Make sure your computer is also connected to the same network and get the IP address of your Pi. To do this you can check the router's client list. In my case it is 192.168.0.103. 




One important Tip here, if you have to frequently use SSH to login and you need the IP often and you don't want to turn off the DHCP of your router then what you can do is reserve the IP address against that MAC address. This way your Pi(or any other device) will always have the same IP as long as that MAC address matches.

There is another easy way however, just type ifconfig directly on the Terminal of Raspbian or via Putty and you will get the IP address. (Although if you already have the IP to connect via Putty why would you need the IP one more time right?)

 



As I'm using Pi 2, I only have the wired Ethernet, if you use Pi 3 or an USB Wi-Fi dongle you might get one more option of eth1 and make sure you use the proper IP. 

2. Now that we have the IP address we will move on to Putty and login.

Default User : pi 
Default Password: raspberry



Okay so we are in!

3. Make sure your Pi is fully updated, if not type in the following commands and update the pi.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Now when the upgrade process is finished let's start installing the VNC server. To do so type in

sudo apt-get install tightvncserver



So mine was already installed and updated. For you just install it.

4. Now to enter the password type in tightvncserver and hit enter.



It is nothing that complicated either, for the first time you need a password that viewer computer has to put in to see. I keep it at default raspberry.

5. Now let's start a full high definition session on display 1. Remember when your Pi boots up it has already started a display at display 0, so you have to use display 1. To do so type in

vncserver :1 -geometry 1920x1080 -depth 24



You can probably use 32bit depth but I tried using it and didn't work so 24bit is fine. 


6. Now download and install tight VNC viewer on your computer and launch it. 




Important thing to remember is the :1 part, if your pi starts broadcasting at display 2, you have to use :2 for that. Anyway after launching Tight VNC viewer, type in the IP with display number and hit enter. Next enter the password that you set up earlier. Click okay and done, now you should view through the network and work on it. Let me show you an example.



So that's pretty much how you can set the whole thing up. There are much to it actually like turning off the display at 0 because remember display 1 and display 0 are not showing the same thing. You can also set up tight vnc server to start at the boot, the way that I have shown will require you to start each time you boot up the pi.

Anyway that's pretty much it, let me add the useful links down below.


Resources: 


Good luck and happy experimenting!