Adjustable Buck regulator with Low Ripple voltage

The LM2576-Adjustable Buck regulator using LM2576- Adj series are monolithic IC that provides all active functions for a step-down(buck) switching regulator. The output voltage is adjustable from 1.23 v to 37 v and are capable of driving 3 am. Load with excellent line and load regulation

It requires minimum number of external components.

Below are 2 version of it.

Fig 1 – LM2576-Adjustable Buck regulator output of 5V

LM2576-Adjustable Buck regulator 1

Fig 2 – LM2576-Adjustable Buck regulator output of 1.2v to 35 v

LM2576-Adjustable Buck regulator 2

If you want to voltage regulator circuit using LM78XX IC click here.

Lighting LED Using Raspberry Pi and Python

Lighting LED using Raspberry Pi

To lighting LED using Raspberry Pi we first need Python GPIO. In my previous post on Raspberry pi we have installed raspbian. Next thing is to start experimenting on it. In this post we will see how you can setup your pi to run Python and create your first Project.

As a first step we need to make sure that we have Python GPIO library installed and working. To do so follow the following steps.

Installing The Python GPIO Library

Python should already be installed in your Raspberry Pi. Next step would be to install GPIO library.


If you have the latest version of Raspbian then most likely Rpi.GPIO is pre-installed. You just need to update your library using the following commands.

sudo python
import RPi.GPIO as GPIO

To update the library use following commands.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install rpi.gpio

Alternate way to install Python GPIO Library:


Important: You must be a superuser to run scripts that control the GPIO pins on your RPi. If you are using the IDLE IDE to write your Python scripts, be sure to launch it as a superuser.

Your first Project – lighting up a LED

Parts Required:

  1. Raspberry Pi 2 ( you can use Pi 3)
  2. A small LED( any colour, I have used RED)
  3. 1 100 ohm resistance
  4. Some wires/connectors
  5. Breadboard

At first we will start with lighting the LED with 3.3v pin of Raspberry Pi. For this use the following Schematic:


  • Pin 1 (+3.3 volts) should go to the longer leg of your led. This pin provides a steady supply of 3.3v. Unlike the GPIO pins on your Pi, this pin is not programmable, and cannot be controlled by software.
  • Attach the shorter leg of the led to the resistor. Finally, attach the other end of the resistor to Pin 6 (- GND) on your Pi

If everything goes well, LED should light up when turning on the Raspberry Pi.

Next, we will make this LED to blink by using the GPIO pin 4( or board Pin 7). For this we will write small piece of code in Python.

Launch idle IDE as superuser(root).

sudo idle

type following into the code window and save the file as

import RPi.GPIO as GPIO 
import time
GPIO.setmode(GPIO.BCM) ## Use BCM pin numbering
GPIO.setup(4, GPIO.OUT) ## Setup GPIO Pin 7 to OUT
while True :

Make connections as shown below:

lighting LED using Raspberry Pi

To run the code press ctrl+f5. You show now see LED blinking with a delay of 5 sec. That’s it for now. We will see some complex code in next post.

Raspberry Pi 2 Pinouts

In my earlier blogs I have shown you how to install the OS and use it. Now we are ready to start building the projects. To do so we first need to understand what each pin does. The diagram below shows raspberry pi 2 pinouts and what each pins can do.

rapberry pi 2 pinout 1

Raspberry Pi 2 pinout figure 1

In order to understand pin number, make sure to have your pi oriented as shown in the figure. Now look at the centre two columns on the chart. These shows the Physical Pin number. The outer two columns of the chart show you the bcm numbering. The numbering system that you use depends on how you configure things in the software. There are 2 numbering sachems. One is BCM(Broadcom)

which is more common and will be using for most of the projects and the other is  WiringPi. The picture below shows WiringPi numbering.

raspberry pi2 pinout 2

Also you can notice that some of the pins are multi-purpose. For example pin3 and 5 can be GPIO pins, or they can be configured for I2C. Similarly, 8 and 10 can be General purpose or can be Tx and Rx. Also note that the GPIO pins are analogous to your digital input/output pins on Arduino.



Raspberry Pi 2 pinout figure 2



AC LED Light

Circuit Diagram for AC LED Light

AC LED Light

Resistor=240v -( Number of LEDs *3.3)/0.015 A
        =240 - (41*3.3)/0.015 A
        =7000 Ohms

Either use 6.8k or 7.1 K with power rating of 7-10 watt or 4*2.1 k 2watt

Suggested Layout for AC LED Light



  • Take any old CFL lamp and cut open it. Remove the circuit out and use it as a back case.
  • Make holes for the led as shown in the suggested layout. Fit the led’s in it and solder it in series.
  • Solder the bridge and resistor as shown above in the ac led light circuit.
  • You can use any plastic or wooden plate used in electrical wiring readily available in electrical shops.

Note: If input AC voltage is 120, adjusted the resistor value using the formula given above.

Making a big LED Lamp

This project uses 12 v dc  power supply with 18 LEDs. Also, instead of having series resistor for each LED, the LEDs are grouped in series of 3 LEDs.



Solar mobile charger circuit

Solar mobile charger circuit using LM7805


solar mobile charger circuit

C1 and C2 – 4700 µf

This circuit is self explanatory. It uses solar panel to convert light energy to electrical energy to charge your mobile. It uses 5v regulator IC 7805 to provide constant current of 5v. Resistor R2 limits charging current to safer level.

Note: if your panel is rated less that 1.5 A then R2 is not required.

Components required for this project are listed below:

  1. Solar panel ( 5v 5 watt)
  2. Diode 1N4007
  3. IC 7805
  4. C1,C2 – 4700µf
  5. RED LED
  6. R1 – 1K
  7. R2 – 47 ohm
  8. USB female socket


Buy electronic components online in India

There are many online sites from where to buy electronic components online in India. Some of the most popular ones are listed below. My favourite is, and

Below are sites which I have tested and are good.


Below are sites which I have not tried but are good to go


Aliexpres,Amazon, and Element14 delivers all over the world. You can use these to buy electronic components from all over the world. If you want something very quick then go for Amazon.

Remote controlling Raspberry Pi

Remote controlling Raspberry Pi using SSH

Enable SSH in raspberry pi using the command raspi-config


From window machine use putty to connect to Raspberry Pi

From Linux Machine or Mac use terminal to connect

eg: ssh

Remote controlling Raspberry Pi using VNC

Step 1

Install tightvncserver on Raspberry Pi.

sudo apt-get install tightvncserver

Step 2

Start the server tightvncserver 

It will prompt to enter password.

Step 3

Start the server from terminal

eg: vncserver:0 -geometry 1920×1080 -depth 24

Step 3

From linux or windows machine connect using the IP address

If you do not have VNC client installed on your machine do is as mentioned below.

On a Linux machine install the package xtightvncviewer:

sudo apt-get install xtightvncviewer


Raspberry Pi with 3.5 inch touch Screen

Raspberry Pi with 3.5 inch touch screen will enable you to make a handheld computer. Its very cheap and easy to configure. Details of assembling Raspberry Pi with 3.5 inch touch screen is outlined below.

Raspberry Pi with 3.5 inch touch

What are the materials required for Raspberry Pi with 3.5 inch touch project?

  1. Raspberry Pi 2 B
  2. 3.5 inch SainSmart touch Screen( you can also buy Adafruit touch screen or Waveshare)
  3. SD card for loading the Raspbian OS

Steps 1

Connect the touch display with the Raspberry Pi GPIO pin either by directly mounting over it or connecting to GPIO connector.

Step 2

Install the Raspbian OS image as mentioned in my earlier post. Change the default output from HDMI to DSI using raspi-config command. After that you may need to calibrate the touch.

or You can download the image from the SainSmart website and install on the SD card.

For more details on how to install Raspbian click here.