Saturday, September 7, 2019

Setting preferred units in Eagle CAD to metric or imperial

If you want to set Eagle CAD to display units in either metric or imperial, there is a simple command to do this.
SET Interface.PreferredUnit n
where n can be:
0 - the default value. Eagle decides if will display metric or imperial
1 - imperial
2 - metric

To change current units in Eagle CAD, simply paste the command in the command line, replace the n with your preferred value and press enter. To confirm that it worked, open the DRC window.

Changing from metric units to imperial in Eagle CAD
Imperial units in Eagle CAD DRC window

Changing from imperial units to metric in Eagle CAD
Metric units in Eagle CAD DRC window



Monday, August 19, 2019

How to build a zener and LED diode tester using a 555 timer DIY

If you have a bunch of salvaged Zener diodes you need a quick way to sort them. In this article I describe how to build a simple test equipment that can be used to measure the breakdown voltage of a Zener diode. It can also be used to test LEDs and their color, since sometime a color LED can look white when not lit. This Zener tester is powered from a 9V battery so it doesn't involve dangerous mains voltage and can measure diodes up to 90V with the help of a 555 timer boost converter. 

I also use it for checking for burned LEDs in a mains light bulb.

Zener and LED diode tester

Thursday, June 27, 2019

How water flows inside a washing machine

I had a broken Indesit WIE 107 washing machine and I was curious to know how water is distributed to 3 containers with only 2 solenoid valves and so I took it apart.

Washing machine water inlet distribution box teardown


Washing machine water inlet distribution box teardown
Top side (original)

Washing machine water inlet distribution box teardown
Top side (with markers)

Monday, December 31, 2018

ESP8266 library for EFM8 microcontrollers - Server mode

In previous article ESP8266 library for EFM8 microcontrollers was presented the ESP8266 module and how can be interfaced with a microcontroller in client mode. This article covers ESP8266 in server mode and how to send commands to ESP8266 over the internet.

Of course this is not a real web server although with an SD card whole HTML pages could be served. The purpose of this library is to extract queries from a URL requested by a client. This way for example you could change color and brightness of an RGB led using a color wheel in a phone app or control home appliances from anywhere in the world.



Saturday, December 8, 2018

ESP8266 library for EFM8 microcontrollers

ESP8266 is a low-cost serial to Wi-Fi module that is very popular among electronics hobbyists. It can be used to connect a microcontroller to internet over Wi-Fi. The things you can do with it are numerous. You could monitor and log various sensor data like atmospheric pressure, temperature and humidity together with geo locations on websites like thingspeak.com. Or you could retrieve information from internet such as weather, number of subscribers on YouTube, send tweets with your microcontroller, send email notification if your plants get dry, etc.


Thursday, July 12, 2018

AVR EEPROM Library | ATmega328P

Sometimes some data needs to be saved after the microcontroller is powered off. Say you have a rotary encoder to set audio volume. When the user sets the volume, the value is stored in SRAM but when the power goes off, the memory content is lost. In this cases you would use the EEPROM memory to store data. AVR devices have three types of memory:
  • Flash memory - for the program code
  • SRAM memory - also referred as data memory (volatile memory)
  • EEPROM memory


EEPROM stands for Electronically Erasable Read-Only Memory and is a non-volatile memory, meaning that unlike RAM, it will hold the stored information even after power is removed, much like an USB flash drive. Here can be stored settings and data that can not be hard coded, usually taken by the interaction with a user. Keep in mind that the EEPROM has a lifespan of 100,000 writes - reads are unlimited - so is not a good idea to write to this memory every second or even every few seconds.

Normally, to make use of the EEPROM memory, you would have to read the datasheet and implement some read/write functions using some registers. But fear not - the AVR-GCC compiler comes with prebuilt routines making things much easier.

Friday, July 6, 2018

How to tin your PCB using plumber's paste | Homemade PCB

The last step in making your own printed circuit board (PCB) is tinning. Tinning is important because copper oxidize very fast, leading to an ugly look, hard to solder pads and over longer time, breaks in traces.

When you order PCB's from a manufacturer, the pads look all nice a shiny. I was looking for a way to achieve this at home and I found one. It doesn't involve strong chemicals, it's cheap and it only takes a few minutes.


Example of homemade PCB tinning
Example of homemade PCB tinning

DIY PCB tinning at home using plumber's paste
PCB after tinning

PCB before tinning