Category Archives: Consumer Electronics

I like Android and BlackBerry. I also like smart consumer electronics. What is “smart”? Well, anything that makes your life easier would be smart… isn’t it?

Installing a router and routing basics

Modem, Router and Modem-Router combination

The term routing has been in used long before the Internet age. In the past, routing refers to distribution of mail or landline (traditional) phone calls through mail sorting centers or telephone switching centers. Today, a router is an electronic networking device that acts as the “middle guy” between two or more data lines from different devices. A router manages the packets (data) migration between computers within the local area network (LAN) and provides distributed Internet (Wide Area Network) access to the local clients.

There are differences between a router and a switch. A router assigns individual identification tags for each unit in the LAN known as internal IPs through a method called Dynamic Host Configuration Protocol (DHCP). DHCP help each individual unit to communicate properly with the rest of the units in the LAN and on the Internet (WAN). A network switch connects data lines from one single network for another without routing. A switch is often used in conjunction with a router to add additional physical ports or wireless connections to a network. A switch must obtain DHCP IP addresses from a router within the same network to work because switches do not have the DHCP engine.

Modem is a unit that converts signals from the WAN and transcribes into LAN format for internal use. It is the main communication hub between your home and the Internet Service Provider (ISP). It is usually provided by the ISP and sometimes contains a built-in router. If your modem has more than one LAN connection, then it must have an internal router. Without a router and its’ DHCP capabilities, you would not be able to connect more than one unit to the modem.

If you want to use a separate router with these modem-router combination units, you have to remove the routing capabilities of the unit. You can do this either by contacting your ISP or by following instructions on your specific model. A router is connected to the (or a) LAN port of your modem.

You may ask what is DHCP? DHCP is like a local address assignment office. When you paid for your Internet connection, usually the cable or telephone company assigns you an IP address known as the external IP. Each computer/network unit requires a unique IP address to communicate with other network equipment. But almost every household and business has more than one computer/network unit. The DHCP creates local addresses to separate each computer/network unit while maintaining the connection to outside world using just single IP address; the external IP. Another way to look at this is the router’s DHCP is like an intercom internal telephone exchange; one main phone number with multiple extensions. Each computer/network unit has their own internal IP (just like a telephone extension), but all units can be reach though a single Internet connection to the outside world. You cannot use a one Internet connection with a single IP to connect several units without a DHCP system.

Parts of a Router

Most consumers are not interested in internal hardware of networking equipment. However, it is important to have a familiarity with at least the external parts of a router in order to make an informed purchasing decision. The following diagram shows the basic parts; the WAN (Internet) port, LAN (local) ports, reset switch and the WPS push button. Depending on the type of router, the location of these may differ. Generally the WAN port is coloured or marked differently from the LAN ports. The reset button is usually a pinhole button where you need a pin/pen tip to press it.

Above: Two images of a D-Link router and a Linksys router. 1. WPS button and it is usually pops out of the back surface. 2. LAN ports. Typically there are four ports on consumer grade routers. 3. WAN (Internet) port where the ISP connection is attached. 4. Rest button and unlike the WPS it is usually a pinhole button. This prevents accidental hard resets. Click on images to enlarge versions.

WAN port: The connection from your modem provided by your ISP will connect to this port via a CAT5e or CAT6 network cable (regular computer network cable).

LAN ports: Any computer or device can be connected to one of these ports. Usually only about four to five LAN parts are provided by the router manufactures. You may increase the number of LAN ports by attaching a network switch. A network switch can be used to increase the number of LAN ports from 4 to 50+. For a general home use with a family of four, I would recommend a simple 4 or 6 port switch or router.

WPS button: This is a standard secure WIFI connection method. If a device is equipped with the WPS (Wifi Protected Setup) button or software and a compatible wireless card, it can be connected to the wireless LAN by pressing the buttons on both units. Please follow the instructions on your specific router and the device for configuration.

Rest button: There are several things that can be obtained from the reset button. As the name implies, it can be used to reset the router to factory settings. Additionally, some router will allow the users to even rest set the router firmware all the way back to the original version. Depending on the router if you hold down the reset button for a short period, generally it will result in a factory default. If you hold the button for more than five seconds of so, it may reset the whole unit back to the original factory setting.

Installing a Router

Consumer routers currently in the market are usually plug-and-play type units. Manufactures includes quick install guides for faster setup. Depending on the manufacture and the quality of the product, a router can be as simple as just a DHCP server with few basic features all the way up highly customizable unit with as complex as VPN configurations (higher price units have more features). For home use I recommend a simple basic router. But if your house is large (eg. over 1500 sqft) or the wireless connection is not reaching every corner of the house, you should invest in a high-end router.

Typically a router can be installed by:

    1) Plug-in the Internet cable and at last one wired LAN computer.
    2) Turn on the power to the router and wait for few seconds (refer to specific manufacture instructions).
    3) Open a web browser on your LAN connected computer and either type in the router’s internal IP address or in “smart routers” the web address provided by the manufacture.
    4) Follow the “quick setup” or “automatic setup” or “plug-n-play setup” (each manufactures will have a different term to describe easy setup feature) to configure the router.
    You will have Internet with DHCP at the end of the Step 4. If that fails, do not immediately reboot the router. Instead wait few minutes (~10 min) because sometimes it takes more time than what manufacture stated to complete the initial setup. If there is still no connection, then reboot the router by physically disconnecting-reconnecting the power supply to the router.

Configuring a Router or Routing system of a modem


Simply plug-in the computer to a LAN port using a CAT5e or CAT6 cable. For wireless, use either the provided password by the manufacture or the new password you have created. Make sure to pick the wireless network name or SSID you have created during the setup of the router to find your network.

IP/Network Cameras

IP or network cameras are becoming popular due to lower prices. They are used as a deterrent against crime, baby monitors, pet monitors or simply for fun. While the “smart” IP cameras will allow you to view the live feed from anywhere in the world using a mobile application, you can also get direct access to most of the IP cameras from your web browser. To do this, you should reserve the internal IP of the camera using DHCP reservation in your router. Otherwise, every time the router reboots (power failures, etc) a new internal IP will be issued to the device. By reserving the internal IP, you can use the same internal IP to access the camera from any web browser by entering the internal IP address.

The DHCP reservation feature can be found in several places in the firmware (router software) depending on the routers’ model number and the manufacture. Please refer to the user manual or call the 1-800 helpline if you are uncomfortable with changing router configurations manually.

An example of a typical DHCP Reservations Table with three devices with reserved internal IPs.
An example of a typical DHCP Reservations Table with three devices with reserved internal IPs.

Network Attached Servers (NAS)

Similar to IP cameras, I highly recommend DHCP reservation for NAS servers. However, just like the IP cameras, most NAS server manufactures will allow you to access the home server using a mobile application or a web program regardless of the internal IP address. Additionally, if the NAS server is properly setup with a device name, regardless of the internal IP address, you can connect to the NAS server using the device network name. The IP cameras can also be setup with network names hence eliminating the need for the DHCP reservation. But in the long run, I highly recommend both network names and DHCP reservations for NAS servers and IP cameras. It makes it easier to troubleshoot problems in the future.

Network Printers

I do not recommend manual installation of network printers. Use the software provided by the manufacture to install the printer through a LAN connection. Most companies like Brother, Cannon and HP have excellent software tools to help you install (map) the printer to your home computers. You do not need a DHCP reservation for this type of installation because the printer software will look for the printer name/ID and the MAC (Media Access Control) address for connection.

Frequently asked Questions

How often should a router be replaced? A typical consumer grade router should last for at least one year with heavy usage (large downloads and uploads with heavy bandwidth usage). Some routers can last for five to six years. But the technology is changing at a rapid rate; hence to keep up with the technology and the increasing speed of the Internet, I would recommend changing the router biennially.

Do I need a router? Please consider investing in a router:

    -If you have more than one computer or network device (such as network printers, etc) and you only have one single LAN port available on your modem
    -If your modem comes with a routing capabilities but with limited number of LAN ports
    -If you need wireless (WIFI) connections, which is not provided through a ISP modem-router combination
    -If the range of the wireless (WIFI) provided by the ISP modem-router is small or the signal strength is weak
    -If you are planning an advanced LAN network (such as hosting file servers, multiple IP cameras, etc)

I recommend buying 10/100/1000 Mbps or gigabit routers and networking devices for both consumers and businesses. I do not know why companies still manufacture 10/100 Mbps units. Routers and switches are cheap and gigabit units will benefit you especially with the higher internal file transfer rates.

How much should I spend? If you are living in a small apartment or a condo, there is no point of buying a high-end top of the range router. The prices increase with the wireless range, the strength of the signal and the processor/hardware capabilities of the unit.

When should I add a network switch? If your wired network expand to the point where you no longer have enough wired LAN ports on the router, then buy a 10/100/1000 Mbps switch. Because most families now have NAS servers for family pictures, movies, music and other media, invest in gigabit routers and switches, which will improve the internal data transfer rates. Any network equipment that handles up to 1000 Mbps will not provide the full capacity throughput to the Internet due to Internet (ISP) speed limitations. (I don’t know any Canadian company that offer 1000 Mbps Internet speeds at this time).

Updating Electrical Components

Last year I published an article on home electrical wiring basics. When I looked back at that document, I realized that I have missed several aspects of electrical wiring. This article will complement the previous by expanding the subject matter.

What can you do without professional help?

In Calgary, Canada, the municipal laws allow the home owners to replace devices from the home electrical system. Additionally, the laws also allow home owners to undertake small renovations (without adding or removing new walls or electrical/plumbing fixtures) without any professional help. However, if you decided to add a new electrical outlet, then you must get proper permits from the City Government. Please do not take this as a legal advice. Contact your municipal or other regulatory body for information on allowed modifications to your electrical system.

Electric shock alert

For the purpose of replacing traditional electrical fixtures with automated (or networked) fixtures with same certification, in municipalities you do not need a permit. It is like just replacing a light switch with another light switch. But if you are unfamiliar with electrical work do not attempt to replace electrical fixtures. Contact a professional electrician for help. I, Sanuja Senanayake or the site will not take any responsibility for any personal injury or property damage.

Not all switches can be replaced

In North America, the home electrical circuits are composed of several types of wires. Each type plays a different role in maintaining the current flow from the main box to the electrical fixtures. These wires are not interchangeable nor can be easily replaced. The type of wires in a typical household can be summarized as:

Hot Wire = Black; carries the electrical potential from the main box to the unit
Common/Neutral Wire = White; carries the return current back to the main box
Ground Wire = Copper (no coloured casing) or Green; used for grounding the circuit for protecting from electrical shock, overloads, lightning, etc.
Returns = usually white but check with a multimeter; also called “Runner(s)” used for light fixtures or such switch circuits.

Not all traditional switches can be converted to automated or remote (“smart”) control switches. Almost all smart switches require constant power. This is achieved using the Common Wire and the Hot Wire. While almost all electrical switches and receptacles will have a Hot Wire, not all of them will have a Common Wire. Especially for light fixtures, I found that some boxes in my house had Runners instead of a Common Wire. This can be a major problem for home automation enthusiasts.

If you have switches without a Common Wire, you have two options. The easiest one is to buy plug-and-play smart switch. For example, you can buy a Z-wave electrical screw-in lamp socket ON/OFF Module (Eg. Everspring AN145). The only downside is that the light switch itself must always be at ON position in order for the smart switch to work. This is however the safest and the cheapest way to fix the Common Wire problem. There are other modules for appliances and equipment that plug into wall receptacles (Eg. Evolve LDM/LPM-15). They are very easy to use and acts like mediator between the unit and the fixture.

The alternate option is to route a Common Wire from a nearby electrical box within the same circuit. The key is the Common Wire must be from the same electrical circuit as the unit that you will be replacing. Use the proper gauge white (cover) wire for the routing. Instead of routing a single wire, I recommend using a cable (lowest possible would be two wire cable) for added durability and protection. You can clip the extra wire on both ends and may be used for future electrical needs.

Common Wire is routed between two switches.
Common Wire is routed between two switches.

You can see the patches on the dry wall. I had to create few opening to route the wire within the wall. I also drilled holes on three vertical studs to pass the wire. Therefore I only used metal clips near the second switch to hold the wire to the stud.

Typical Electrical Switch

Following is a diagram of typical electrical writing for a light switch. Electricians may have wired your house differently. Please use due diligence and trace each cable and wire to what it is connecting. I found so many “questionable” circuits.

You can search online for electrical diagrams, but as mention above, make sure your circuit is wired properly. Do not always trust the colour of the wire, but trace each wire.

Very Important Points

Please us common sense when replacing electrical fixtures. If you are replacing an outdoor receptacle, make sure you have adequate weather projection for the new unit. It is also very important to either use an outdoor rated fixture or install an outdoor cover/box. Electricity and water should never mix and inadequate protection from environment may result in electrical fires or major malfunctions in the circuit.

If you are replacing a fixture on a critical circuit, make sure your new smart fixture does not interfere with the normal operations of the circuit. For example, if you are replacing a switch on a circuit that also provides power to your home security system, make sure the switch will not adversely affect the security system’s power.

Another issue is heat. Since all network connected smart switches have antennas to broadcast and receive data, they produce heat. In fact, you can feel the heat on some switches. It is not a problem as long as you provide adequate ventilation. To do that, you should increase the depth and size of the electrical box. I have used 3 unit boxes for 2 switches just to add more room. With additional wires such as Common Wire and Ground Wire running directly to each smart switch, it also provide room for wire management.

When replacing a 60 W (watts) fixture, use a 60 W smart fixture. Do not use a fixture with lower energy rating. Using a lower wattage rated unit may result in electrical fires.

Before closing the electrical boxes with their covers, make sure all the wires are properly installed and nothing is lose. Use insulated tools such as rubber handle screw drivers. Ground yourself to avoid static discharge. Do not leave open electrical boxes or wires for long period (Eg. Overnight) even if the circuit is shut off from power.

If you are unsure of something or uncomfortable with electrical work, please contact a professional.

Choosing a thermostat

In most parts of the developed world, we live in houses that are at least ten years old (or often older). Hence homeowners spent their money on home improvements. One of the easiest ways to renovate your house is to replace the old units with new ones. Today I am going to discuss a simple item found in every Canadian household; the thermostat.

Good old days

Thermostats in the past are based on mercury switches. The temperature and humidity information is passed to the furnace, air conditioner and humidifier from a mechanical leaver inside the thermostat. Today, the same task can be done either electronically or electrically without the use of mercury or mechanical parts. Almost all modern thermostats operate by sending electrical signals via two circuits built in to the controller and the receiver on the other end.



With electronic controllers, you can buy thermostats from several different manufactures. Additionally there are many models even from the same manufacture. This is expected because modern units are not limited to manual controls. Depending on the type of the unit, you may be able to control the temperature and other aspects either remotely or via an automated system.

When purchasing a unit, here are few pointers to think about;
How old is your current furnace/heater, air conditioner and humidifier?
What are the types of input controls in your current units (can it take an electronic signal)?

If your units are old enough to replace, it may be time to replace them with a modern cutting-edge units. This way you can use any thermostat to control them. If you have an older unit, then make sure you have the right configuration for whichever the thermostat you want to install. For example, if you are missing a specific wire required for an electronic automated thermostat, you may either have to add an additional circuit box in between the controller and the heading/cooling unit or you may have to opt in for a traditional older thermostat. This is where the return policy of the store will help you out! However, you can avoid retuning an item by doing your research before you buy one.


There are several technologies in the consumer market. Most of them are proprietary technologies made by companies like Nest and Honeywell. Others have little more flexibility with built in standards like Z-wave, which can be used along with any Z-wave controller.

Most “smart” thermostats can be connected to your LAN (home network) and ultimately to the Internet. You can control these thermostats from computers and mobile devices in addition to physical controls. You can create accounts and enforce restrictions on who can control what. You can create schedules or in some thermostats can learn from your behavior and automatically create schedules for you (eg. Nest). You can create relationships between the thermostat and other units in the house. For example, you can connect a Z-wave thermostat to your front door sensor. Then you can set it up so that if the front door is opened between 4-6 PM, the temperature will increase from 19 C to 21 C. This way, when you come back from work, the house will be warmed up in few minutes. With the electronic and Internet age, the possibilities to make your house a home with technology are endless.

So when you are ready to buy a thermostat, ask yourself what do you want to do with it. Do you simply want to control the temperature? Or do you want to control the temperature via a computer in the house or mobile device or anywhere in the world? Of course, how much will you be spending?

Proprietary or Independent

Personally, I prefer flexible options because it limits dependencies. If you have a Nest thermostat, for your remote controls you will depend on the Nest network. Any issues there including technical or otherwise (like free to paid service), must go through Nest company. Contrast this with a Z-wave unit like Honeywell VisionPro Thermostat, in which the remote control is done through your home LAN and Internet connection. To me, it is no brainier; Z-wave is better for independence.

Here are some key things about proprietary verses the Z-wave based thermostats (or any other equipment). With proprietary technologies you get much better security and reliability. Since millions of others also use the same network and technology, you will provide with cutting edge support for your thermostat. It is also easier to setup a Nest thermostat than to setup a Z-wave thermostat for most people. However, you will be giving up your personal information such as “Away from home time/temperature” to a server somewhere in the world. Since you are one of millions of others on the same network, you may be vulnerable to cyber security issues. Additionally, you have no control over the network itself. While it may be reliable and secure, if the company responsible for the network decided to charge you for the remote service, you have no choice but to pay (or stop using the remote features).


Installation is very simple assuming you have all the right wires. In other words, as long as you have a compatible heating/cooling unit, you can install the thermostat by yourself. I found the programming the thermostat is harder than the actual installation process. But it is just me!

Cloud computing: a blessing and a curse

Right after the DOT-COM bubble began to shrink, a new concept of computing called cloud computing gave hope to a dying breed. It boosted the profits of entirely Internet based companies like Dropbox Inc. and opened the market for new Internet based companies. The next big step for this technology is the “smart home” which also referred to as “connected home”.

Continue reading Cloud computing: a blessing and a curse

How to build a basic antenna

We use wireless devices to send and receive information without worrying about physical obstacles. In the old days, most consumer grade wireless devices such as mobile phones, routers and RC controllers came with large antennas. Today some manufactures decided to go with internal or built-in antennas. This is not always beneficial to the consumer. For example, if you have a weak signal in an area, it would be difficult to change the position of the antenna because; you do not know where is it in the casing and you may not be able to place the device in a position. The solution is to add a external antenna.

Antenna Theory

This is a very specialized area of engineering and physics. In fact, I do not think that I am qualified or educated enough to go into details on antenna theory. Likely, an experienced Engineer has posted all the details here. If you need extensive information on how antennas work, that is the best place to start.

For our purpose of building a home made antenna, we only need few details from basic physics. This is because I will introduce you to a basic antenna design.

Antenna Length

All radio equipments comes with details on specific frequencies in which the data is transmit. We can use that information to build a whip antenna (single wire). The length of the antenna itself (“the exposed wire”) depends on the frequency of the device. To calculate the length, we take the speed, c in which the wave propagate (travel) and divide that by the rated frequency of the particular device.

The formula for length (actually it is the wavelength) is, l = c/f and since most waves travels close to the speed of light in a vacuum, we can assume that c = 2.998 x 108m/s. Now we know two unknowns (frequency is taken from a published documentation of the device), we can calculate the required length. For example, if I were to build an external antenna to my Vera home automation controller with the f = 908 MHz, I would have to build an antenna that is about 33.02 cm in length. But generally we do not built at full wavelength. Instead, most antennas use either 1/2 or 1/4 of the wavelength. As long as the antenna length is within those multipliers, it will work fine.

Antenna length difference due to wavelength difference between 2.4 GHz vs 900 MHz
Antenna length difference due to wavelength difference between 2.4 GHz vs 900 MHz

If you hate calculations, search for a online calculator. Make sure you are using the right calculator because depend on the type of antenna, the information is varies.

Build it

Once you have calculated the required length, you may use a piece of coaxial cable (with the copper core) to build your antenna. Strip the outer cable (ground plane) to expose the inner core copper wire. The length of the exposed core must be the exact same length as what we calculated for our antenna length. Let’s say we want a 908 MHz antenna. Then the core wire should be exposed exactly 33.02 cm or close to that. The length of the rest of the cable will not effect your wireless signals. But longer the cable, higher the impedance hence may even weaken the signal.

There are several choices on how to connect the other end to the device’s circuit board. I recommend against soldering directly onto to the PCB. Instead, use a pigtail connector or a wire. Some PCBs come with removable antenna wires (“clip ons”). They are usually U.fl connectors. Yes you can buy them online (cheap) with all the connectors and wires attached. If your board does not have removable connectors, you can solder a wire between the board and the pigtail connector. By keeping the antenna wire itself separate from the PCB, you now have greater flexibility in future modification.

If you do have removable connections between the PCB and the antenna wire, then it is most likely a U.fl type connector. Read more about other types of connectors here.

If you are building a GSM (~ 900 MHz) antenna, order something like, SMA female straight to U.fl/IPX Pigtail cable. The other option is to take the PCB connector from an old router (regardless of wifi frequency) and use a RP-SMA connector type antenna. Note that RP-SMA is the type that comes in 99% of all WiFi routers with external antennas. However, most GSM based antennas such as ~ 900 MHz requires a SMA female connector.

Most consumer products with antennas do not come with a good ground plane connection. You can connect a wire between the antenna lead and any of the socket plates (Example of a socket plate is highlighted by B on the following image) for a good ground connection. Make sure you clean the socket plates before attaching the ground wire.

Internal view of D-Link LAN Switch.
Internal view of D-Link LAN Switch.

Special note: if you are an electronics enthusiast in Calgary, try MRO for supplies. I am not affiliated with them nor promote them. However, I was able to find most electronics parts such as ICs, resistors, transistors, antenna parts, etc over there.