Saturday 11 March 2023

Capacitor calculation at the input and output of the DC-DC converters.

 What is the need for the capacitor at the input and output of the DC-DC converters?

The first objective in selecting input capacitors is to reduce the ripple voltage amplitude seen at the input of the module. This reduces the RMS ripple current to a level that can be handled by bulk capacitors. Ceramic capacitors placed right at the input of the regulator reduce ripple voltage amplitude. Only ceramics have the extremely low ESR that is needed to reduce the ripple voltage amplitude. These capacitors must be placed close to the regulator input pins to be effective. Even a few nano henries of stray inductance in the capacitor current path raise the impedance at the switching frequency to levels that negate their effectiveness. Large bulk capacitors do not reduce ripple voltage. The ESR of aluminum electrolytic and most tantalums are too high to allow for effective ripple reduction. Large input ripple voltage can cause large amounts of ripple current to flow in the bulk capacitors, causing excessive power dissipation in the ESR parasitic. To reduce the RMS current in the bulk capacitors the ripple voltage amplitude must be reduced using ceramic capacitors. As a general rule of thumb, keeping the peak-to-peak ripple amplitude below 75 mV keeps the RMS currents in the bulk capacitors within acceptable limits.

How to calculate the capacitor for value Ceramic capacitor?

To determine the amount of ceramic capacitance required to reduce the ripple voltage amplitude to acceptable levels is given by equation.


Example for the ceramic calculation


Converting Vpp to Vrms 

75mVpp = 22mVrms

Ohm's law can be used to determine the ripple current throw the 35mohm to the ESR input buck Converter.
22mV/35mohm = 628mA

so the buck converter power dissipation can be given as = 13.8mW

The calculation for the Output buck capacitor
Given 
Current = 1A
dV = 0.3V (Ripple Voltage)
dt = 250us

C = I/(dV/dt) = 1/(0.3/250us) = 833.34mF
C = 833.34uF

As an alternative, we can also calculate the capacitance with the current and capacitor charge equation.
I = Q/t ---- (1) ; 
Q = CV ---- (2);

Using (1) we get Q
Q = 1*250us = 250uC

Now using (2)
C = 250us/0.3
C = 833.34uF






                                                                        


Tuesday 21 April 2020

UART in LPC2148

In this article, I'm going to interface LPC2148 with the HC-05 Bluetooth model.
I am using the UART0 of LPC2148 for communication with the Bluetooth terminal HC-05.
So I am connecting Pin0.0(Tx) of LPC2148 with Rx of HC-05 and Pin0.1(Rx) of LPC2148 with Tx of HC-05.
as to check output I am connecting LED on Pin0.29, Pin0.30, Pin0.31 as according to comment I will turn LED on and off.
In the below picture, I am using the Arduino UNO board just to power HC-05.



to get the Program click here.

Tuesday 27 August 2019

Bluetooth Home Automation

It is the Bluetooth operated Home Automation System. In which you can switch ON or OFF home appliances by using Bluetooth.
As shown in the above image it is the wiring chat of the circuit that is required. It consists of 1) Power Supply Circuit.
2) Microcontroller Atmega328p.
3) Bluetooth module HC05.
4) Electromagnetic switch (Relay).


Download "Bluetooth terminal (BT) App" from Playstore. Once it is Install Pair it with "HC05" now as the controller has been programmed such that once "BT" send "0" it will turn "ON" "Relay A". If "1" is send from "BT" it Will turn "OFF" "Relay A". Similarly if "3" is send from "BT" it will turn "ON" "Relay B" turn "OFF" by sending "4".
So once BT sends any signal it will be Detected by HC05 and given to microcontroller which will magnetize or demagnetize Relay according to Program.

Saturday 20 April 2019

AC Fan speed control using Raspberry Pi and HC-05

In this article I have Control the speed of FAN using bluetooth and Raspberry Pi.

Using Android Mobile we can control the Speed of Fan. I have programmed Raspberry Pi such that
If i send "0" by Bluetooth terminal, FAN will turn OFF.
If i send "1" by Bluetooth terminal, FAN will maintain the 30% speed of its maximum Speed.
If i send "2" by Bluetooth terminal, FAN will maintain the 50% speed of its maximum Speed
If i send "3" by Bluetooth terminal, FAN will maintain its maximum Speed.

Hardware requirement :-
1) HC-05 Bluetooth Module
2) Raspberry Pi
3) Triac
4) Jumper Wire
5) 1K Ohm Resistor
6) 100 Ohm Resistor
7) MOC3021 Opto Isolator.

HC-05 is the bluetooth Module used for the bluetooth Communication between Mobile Device and Raspberry Pi.

Triac is use to control the current.

Circuit Diagram :-





In the above circuit 
Transmitter of HC-05 is connected to the Receiver of Raspberry Pi.
Receiver of HC-05 is connected to the Transmitter of Raspberry Pi.
Vcc of HC-05 is connected to +5V DC
Gnd of HC-05 is connected to Ground 
Output is taken from Pin Number 11 of Raspberry Pi. Pin11 is operated as PWM.


Program for speed Control


Friday 22 March 2019

Four way traffic light control using Raspberry Pi

From few days I was learning Raspberry Pi. So in this article i have made small traffic light control project using Raspberry Pi B+ Model. This is the four way signal so A,B,C,D are the name of respective ways. And i have also made Circuit schematic for real time Operation of Same. So has divided in two parts.
1)Prototype Circuit Model
2)Real time circuit Schematic

1) Prototype Circuit Model
  • Hardware requirement :-

1)Raspberry Pi B+ Model.
2)Bread board.
3)RED, GREEN, YELLOW LED's.
4)Jumper Wires.
5)100 Ohm resistors.
  • Schematic:-

In the above image as there are total 12 LED's, 3 for each way Red, Yellow, Green.
100 Ohm Resistor is use to limit the current in the LED to safe value and All the cathode terminal of LED is connected to common ground.
RED light of A is connected to pin no 7
YELLOW light of A is connected to pin no 11
GREEN light of A is connected to pin no 13
RED light of B is connected to pin no 15
YELLOW light of B is connected to pin no 29
GREEN light of B is connected to pin no 31
RED light of C is connected to pin no 33
YELLOW light of C is connected to pin no 35
GREEN light of C is connected to pin no 37
RED light of D is connected to pin no 40
YELLOW light of D is connected to pin no 38
GREEN light of D is connected to pin no 36
  • Program from operation is

import RPi.GPIO as GPIO #include GPIO library
import time #include Time library
GPIO.setmode(GPIO.BOARD) #Raspi mode set as board mode
GPIO.setup(7,GPIO.OUT) #making pin number 7 as output pin for RED of 'A' way
GPIO.setup(11,GPIO.OUT) #making pin number 11 as output pin for YELLOW of 'A'
GPIO.setup(13,GPIO.OUT) #making pin number 13 as output pin for GREEN of 'A'
GPIO.setup(15,GPIO.OUT) #making pin number 15 as output pin for RED of 'B'
GPIO.setup(29,GPIO.OUT) #making pin number 29 as output pin for YELLOW of 'B'
GPIO.setup(31,GPIO.OUT) #making pin number 31 as output pin for GREEN of 'B'
GPIO.setup(33,GPIO.OUT) #making pin number 33 as output pin for RED of 'C' way
GPIO.setup(35,GPIO.OUT) #making pin number 35 as output pin for YELLOW of 'C'
GPIO.setup(37,GPIO.OUT) #making pin number 37 as output pin for GREEN of 'C'
GPIO.setup(40,GPIO.OUT) #making pin number 40 as output pin for RED of 'D'
GPIO.setup(38,GPIO.OUT) #making pin number 38 as output pin for YELLOW of 'D'
GPIO.setup(36,GPIO.OUT) #making pin number 36 as output pin for GREEN of 'D'
while 1: #to make while loop infinite
GPIO.output(13,1) #making pin number 13 high
GPIO.output(15,1) #making pin number 15 high
GPIO.output(33,1) #making pin number 33 high
GPIO.output(40,1) #making pin number 40 high
time.sleep(20) #delay of 20 seconds
GPIO.output(11,1) #making pin number 11 high
GPIO.output(29,1) #making pin number 29 high
time.sleep(5) #delay of 5 seconds
GPIO.output(31,1) #making pin number 31 high
GPIO.output(7,1) #making pin number 7 high
GPIO.output(13,0) #making pin number 13 low
GPIO.output(15,0) #making pin number 15 low
GPIO.output(11,0) #making pin number 11 low
GPIO.output(29,0) #making pin number 29 low
time.sleep(20) #delay of 20 seconds
GPIO.output(29,1) #making pin number 29 high
GPIO.output(35,1) #making pin number 35 high
time.sleep(5) #delay of 5 seconds
GPIO.output(15,1) #making pin number 15 high
GPIO.output(37,1) #making pin number 37 high
GPIO.output(33,0) #making pin number 33 low
GPIO.output(35,0) #making pin number 35 low
GPIO.output(29,0) #making pin number 29 low
GPIO.output(31,0) #making pin number 31 low
time.sleep(20) #delay of 20 seconds
GPIO.output(35,1) #making pin number 35 high
GPIO.output(38,1) #making pin number 38 high
time.sleep(5) #delay of 5 seconds
GPIO.output(33,1) #making pin number 33 high
GPIO.output(36,1) #making pin number 36 high
GPIO.output(40,0) #making pin number 40 low
GPIO.output(35,0) #making pin number 35 low
GPIO.output(38,0) #making pin number 38 low
GPIO.output(37,0) #making pin number 37 low
time.sleep(20) #delay of 20 seconds
GPIO.output(38,1) #making pin number 38 high
GPIO.output(11,1) #making pin number 11 high
time.sleep(5) #delay of 5 seconds
GPIO.output(40,1) #making pin number 40 high
GPIO.output(38,0) #making pin number 38 low
GPIO.output(11,0) #making pin number 11 low
GPIO.output(7,0) #making pin number 7 low
GPIO.output(36,0) #making pin number 36 low
2)Real time circuit schematic.
  • Hardware requirement :-

1) Raspberry Pi B+ Model.
2)MOC3021 Optocoupler.
3)BT139 Triac.
4)Resistors.
5)Bulbs.
In the above schematic there is optocoupler MOC3021 used for the isolation of Raspberry Pi from Main AC supply and Triac BT139 is the used as switch to turn ON and OFF different colour bulbs.