Controlling Rigol Dp832 with python

DC power supplies are very handy for electronic projects. They help to apply bias to a devicve. 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 channel (two 30V and one 5V) power supply and is programmable through SCPI commands. The device can be controlled by USB and rs232 (optionally by LAN). SCPI commands can be sent to the instruments using VISA interface. I used Python and pyvisa module to communicate with it. I wrote a class Read More …

Hacking Weighing Scale to Upload Weight to Plotly using Raspberry Pi

I have been interested in monitoring and keep track of my weight. In the past, I have used phone apps for this purpose, works OK but I was thinking of reading weight information using some microcontroller from my weighing scale and upload the data to an online database. That means that microcontroller should connect to my wi-fi connection at home and upload the data. I have seen some projects online that use an arduino for this purpose. They use arduino to serially send information to computer. The information on the computer can be potentially sent to an online database. One Read More …

Controlling Newport 1918 Power Meter with Python

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 made a class for this instrument . If you are interested you can download it at my  Github repostitory . This python module contains higher level functions to communicate with Newport 1918 power meter on a Windows computer. It uses python ctypes to access methods in the Newport’s usbdll.dll driver. For connecting the hardware to the Read More …

Controlling SP2150i monochromator with Python/PyVisa

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 various functions (such as changing filters, moving the grating, etc). To control the instrument with my windows computer, I followed these steps: 1) Connect a usb cable between SP2150 and a computer I used the port “USB” and not the “USB hub”. 2) Installing the monochromator drivers and Monocontrol software: Turned on Read More …