Improving code using getters and setters in Python

Posted on Wed 04 December 2019 in Electronics

As I was migrating blog posts from my wordpress website to pelican based static website, I noticed an old python code written for communicating and controlling a Princeton Instruments Acton SP2150i Monochromator.

As I looked at the code, I noticed methods in the class such as get_nm() and set_nm(). I …


Continue reading

Did I turn off the stove...ESP8266

Posted on Sat 08 October 2016 in Electronics • Tagged with ESP8266, IOT

My wife and I have a good meal and leave the house. After 20 minutes or so, we are in the car and I ask my wife, did we turn off the stove?

My wife answers…you were the last one to cook. What to do now? Go back home …


Continue reading

Doorbell with NRF24L01 and Arduino

Posted on Fri 29 May 2015 in Electronics

My current apartment does not have a doorbell (Its strange but it is true). I went ahead and built a doorbell using two arduino pro-minis and two NRF24L01 transceivers. The melody to be played when a guest presses a button can also be controlled. I have four melodies programmed in …


Continue reading

Airtel tune on arduino

Posted on Thu 21 May 2015 in Electronics • Tagged with Arduino

For my doorbell project, I needed some melodies to be played on arduino. One can takes notes of a melody and write a corresponding arduino code.

I like airtel tune and wanted to play it with arduino. I got the notes from https://www.youtube.com/watch?v=3m5j5UIRqQc

Here …


Continue reading

Controlling Rigol Dp832 with python

Posted on Fri 08 May 2015 in Electronics • Tagged with Instrumentation, python

DC power supplies are very handy for electronic projects. They help to apply bias/voltage to a device. Controlling it by a computer by a program is helpful in advanced projects where timing and accurate control is an issue.

I got my hands on a RIGOL DP832 which is three …


Continue reading

Hacking Weighing Scale to Upload Weight to Plotly using Raspberry Pi

Posted on Sat 11 April 2015 in Electronics • Tagged with python

I have been interested in monitoring and keep track of my weight. In the past, I have used different phone apps to track my weight. They work reasonably well, but I was thinking of reading weight data directly from my weighing scale and upload the data to an online database …


Continue reading

Controlling Newport 1918 Power Meter with Python

Posted on Sat 04 April 2015 in Electronics

Optical power meters in-conjunction with a detector are used to measure power from a laser source or monochromatic output.

At work, we use Newport 1918 power meter. This power meter comes with its own software. However, I was interested in controlling this instrument with python.

I wrote a python module …


Continue reading

Controlling SP2150i monochromator with Python/PyVisa

Posted on Fri 19 September 2014 in Electronics

Monochromator is used in optics research where a narrow bandwidth of light is required to be illuminated on a sample. I work with Princeton Instruments Acton SP2150i and needed a python program to control it.

I found the manual here and on page 9-10, I saw the serial commands for …


Continue reading

van der Pauw correction factor

Posted on Sun 08 January 2012 in Electronics

The van der Pauw Method is a technique commonly used to measure the Resistivity and the Hall Coefficient of a sample. A correction factor goes into calculating the resistivity as described in van der Pauw paper. A iterative method is generally used to calculate the correction factor and this correction …


Continue reading