الخميس، 24 ديسمبر 2015

Versatile 555 Schmitt Trigger /Logic Inverter /Level Translator

More undocumented applications for the 555 ‘oscillator:’ Not all applications oscillate as we will see. Most are knowledgeable about common CMOS logic inverters and Schmitt triggers such as the 74HC04 and 74HC14 respectively that come six in a DIP-14 package. Often, some sections are left over and can be used for future enhancements, etc. However, what do you do when only one additional inverter or increased output drive or signal level translation is required? This is where the ubiquitous 555 once again comes to the rescue.

Schematics
555 Schmitt Trigger Logic Inverter Level Translator
(555 Schmitt Trigger Logic Inverter Level Translator)
555 Level Translator Test Circuit
(555 Level Translator Test Circuit)
Inverter
The 555 is inherently an inverter. If the threshold inputs (pins 2 & 6) are tied together, they may be used collectively as the input with pin 3 being the output.
Schmitt trigger
Since the two thresholds (1/3 Vcc & 2/3 Vcc) are widely separated, they make a very good Schmitt trigger. You may recall that Schmitt triggers are often good at cleaning up noisy AC signals by separating the desired signal from the lower amplitude noise content. It is also extremely useful in converting a slow changing input voltage signal into a truly digital output (1 or 0), and without troublesome oscillation at the thresholds.
Input thresholds
1/3 Vcc & 2/3 Vcc are not always compatible with TTL logic levels. One clever way of making it compatible is to adjust the voltage at pin 5. For instance, setting pin 5 to 2.5V sets the upper threshed (“1” level) to 2.5V, and the low threshold (“0” level) to 1.25V thus making it TTL compatible. This may be accomplished via a simple voltage divider. By making its Thevenin resistance much lower than that of the internal divider (inside the 555), manufacturing tolerances are swamped thus making the voltage repeatable from device to device.
Input impedance
Input impedance is high and lends itself well to a simple R-C input filter that helps reject noise and prevent against potential ESD damage in applications where the input wiring is exposed to the real world environment.
Output drive capability
CMOS logic is hard put to source a 5mA output –It does better at sinking, but pales compared to the 100mA source /sink capability of the 555.
Range of power supply voltage
Vcc for the 74HC series is generally rated for 3 to 5V. The 555 can support up to 15V and can be mixed with 4000 series CMOS devices.
Open collector level translator
Pin 7 is an open collector output that can be applied as an interface to either higher or lower voltage logic devices –all that is required is the addition of a pull-up resistor that is tied to the secondary Vcc. Note that this is VERY undocumented and may not always work as expected, so please test and use common sense before going off the deep end in any design –especially, since the addition of a discrete MOSFET such as the 2N7000 will always do the job (with the addition of yet another inverter because the common source connection itself inverts the signal). Note that all of the 555 devices that I tested worked OK, including the CMOS TLC555. To test this feature, I constructed a simple test circuit and took oscillographs of the signals.
Pin 7 output discontinuity
While one device, an old SG555 worked acceptably, the oscilloscope displayed a discontinuity in the negative transition –See oscillograph. All the others were clean. This type of discontinuity or bounce in the output signal can raise havoc in high speed digital logic. In this case, the CD4013 D Latch is quite slow and forgiving.

الخميس، 17 ديسمبر 2015

Arduino & Raspberry Pi Camera Interface

Yes,we learned that we can take mobile phone camera modules from almost all mobile phones to inteface them with our advanced hobby electronics projects just as with any other standard add-on modules. Since this calls for an appropriate microcontroller, it is better to use Arduino or Raspberry Pi microcontroller as a utile platform.
Raspberry Pi camera
Recently I’ve received a Raspberry Pi camera board. The camera, comes with a ribbon cable already attached to it,is a small size (25mm x 20mm x 9mm) board where a fixed focus 5MP camera module is attached. Part number of the camera module (from OmniVision) is OV5647. At the heart of the OV5647 camera module is a 1/4” color CMOS QSXGA (5 megapixel) image sensor with OmniBSI ™ technology. This Raspberry Pi camera module can be used to take high definition video, as well as stills photographs. It is easy to use for novices, but has plenty to offer advanced users looking to expand the knowledge.
raspberry pi camera
(raspberry pi camera)
Raspberry PI comes with two first-rate connectors on board. One is between Ethernet and HDMI, and the other is near GPIO. The one closer to Ethernet connector is Camera Serial Interface (CSI ). This CSI is directly connected to the Raspberry Pi GPU which can process images without ARM intervention.
Camera Serial Interface
(Camera Serial Interface)
While connecting the camera module to the CSI port (located behind the Ethernet port) of the Raspberry Pi board,ensure that camera cable is inserted in right way, ie the blue strip in the flexible cable is towards the Ethernet (LAN) port. Once you are connected,enable the camera software, test the camera and try using it with Bash or Python. As I am a newbie in the Raspberry Pi world, I haven’t drudged enough into all features and capabilities of my borrowed Raspberry Pi (and the camera module). If you want to leap into the future of amazing possibilities, have a look at the documentation: http://www.raspberrypi.org/help/camera-module-setup/
The Raspberry Pi camera board transfers data through an extremely fast camera serial interface (CSI-2) bus directly to the system-on-chip (SoC) processor. It does this through a 15-pin ribbon cable, also known as flexible flat cable (FFC), and connects to the surface mount ZIF 15 socket in the Raspberry Pi board. As you may noted, the camera module on this official Raspberry Pi camera board is identical to the camera modules (ccd imagers) found in many mobile phones.
camera  data transmission interface
Luckily, most of the mobile phone cameras are not only MIPI compliant but also CSI compliant (see the first part of this article). The 15-pin Raspberry Pi CSI interface connector pinout is also included here to help you to keep proceed with your tinkering ideas. Note that, in Raspberry Pi, there are two flexible Flat Cable (FFC) connectors (S2 & S5). S2, near to the micro USB connector, is the Display Serial Interface (DSI). It allows low-level interfacing with LCDs and other displays with Raspberry Pi. It is a 15-pin surface mounted flexible flat connector, providing two data lanes, one clock lane, 3.3V and GND. S5, located between LAN and HDMI connector is the MIPI Camera Serial Interface 2 (CSI-2) connector for camera modules. It is a 15-pin surface mounted flat flexible connector, providing two data lines, one clock lane, bidirectional control interface compatible with I2C, 3.3V and GND. The data transmission interface in CSI is unidirectional differential serial interface with data and clock signals (the physical layer of this interface is the MIPI Alliance Standard for DPHY).
Arduino camera
Adding a camera to your Arduino UNO is not very difficult, because ArduCAM ™ Shield is infront of you. You can find a good tutorial on ArduCAM here: http://www.arducam.com/tutorial/. This tutorial will demonstrate how to use the ArduCAM shield on Arduino UNO board, aim the point and press a snapshot button you will get a BMP picture saved on the SD/TF card!
arduino camera arducam
ArduCAM shield hardware integrates all the necessary components to interface with camera modules. User only need a extra support camera modules and a TF/SD card to start image capture. The ArduCAM shield includes a ArduChip which handle complex timing between MCU and LCD, Camera, FIFO. It exports a standard SPI serial interface and can be interfaced with wide range of microcontrollers. Further, ArduCAM shield includes two sets of pin out, identical in function. One is Arduino standard, it can be well mate with standard Arduino boards like UNO, MEGA2560, Leonardo and DUE etc. The other one is alternative port which can be connect to any platform like Raspberry Pi. After the great success of ArduCAM shield Rev.B, the ArduCAM team now released a more powerful ArduCAM shield Rev.C with amazing new features. This revision supports camera modules including OV7660, OV7670, OV7675, OV7725, OV2640, OV3640, OV5642 and MT9D111.
(Tinker Hint: 16-pin camera connector in Nokia mobile phone 7380)
(Tinker Hint: 16-pin camera connector in Nokia mobile phone 7380)
Did You Know? CMOS image sensor interface divided into two classes, one is DVP (Digital Video Port) interface, the other is MIPI Mobile Industry Processor Interface. The main difference between DVP and MIPI is that DVP is parallel interface and the MIPI interface is high speed differential serial interface. MIPI interface provide higher data band width than DVP interface and support higher resolution and frame rate.
camera modules
Image sensor is usually cheap and you can buy them for as little as $5.00 on eBay. However, when it turn into a “microcontroller-compatible camera module”, the finished board costs a lot more. In conclusion, I would have to say that it is worth spending time and effort to make your own camera modules, because the experience of reverse engineering and hacking is really interesting (at least for me). This is just a starting point, as promised I will come back with useful updates in near-future!

Mobile Phone Camera Interface Primer – 1

Today almost every mobile phone contains a camera. In principle, mobile phone camera is a sensor/camera module designed for use across a range of mobile phone handsets and accessories. It embeds high quality still camera functions and also supports rich video. For these camera modules designed to work with any host with a standardized camera interface, separate hardware accelerator device (coprocessor) can be integrated in the mobile phone system to run the associated image processing algorithms in hardware where the baseband cannot support this processing load.

Or these camera modules can be directly connected to a baseband or multimedia processor. No dedicated coprocessor is required in the second configuration because the image processing is done in software (or hardware) within the baseband processor. Ofcourse, you can take these cameras from mobile phones and inteface them yourself with your advanced hobby electronics projects just as with any other standard add-on modules. However, good knowledge in popular camera interface techniques is a prerequisite to proceed with your succeeding dream project.
MPC-1
Behind The Camera Interface
Because the companies that make mobile phone cameras and the companies that make the application processors are usually different, there is a need for standardization of the camera/application processor interface. MIPI (mobile industry processor interface) Alliance has been on top of this, and the main connection is a fast serial interface known as CSI (camera serial interface).
The mobile phone handset industry had a need for a standard interface to attach camera subsystems to a host device, such as an application processor. In response, MIPI developed CSI2 several years ago. The Camera Working Group – develops and maintains camera serial interface and supporting documents – released the CSI-2 v1.0 specification in 2005. The group produced CSI-3, a next generation interface specification based on the MIPI foundation of UniPortM, in 2012.
CSI-2 consists of a DPHY and a CSI-2 transmitter at the camera and receiver on the application processor. The DPHY provides the physical interface, and the transmitter and receiver cover encoding, packing, error handling, lane distribution, assembly of image data stream, etc. However, the increasing pixel count and frame-rate is driving the need for even higher bandwidth, hence CSI-3. CSI-3 has a new MPHY, and each MPHY has a bandwidth of up to 6Gb/s per lane, with up to 4 lanes. The next level up is the Unified Protocol layer (UniPro). This defines a unified protocol for connecting devices and components designed to have high speed, low power, low pin count, small silicon area high reliability and so on.
CSI-2: The “Camera Serial Interface2 Specification” defines an interface between a peripheral device (camera) and a host processor. The host processor (baseband, application processor) here denotes the hardware and software that performs essential core functions for telecommunication or application tasks. Two high-speed serial data transmission interface options are defined. The first option – referred to in this specification as the “DPHY physical layer option” – is a unidirectional differential interface with one 2-wire clock lane and one or more 2-wire data lanes. The physical layer of this interface is defined by the MIPI Alliance Specification for DPHY. The second high-speed data transmission interface option, -referred to in this specification as the “CPHY physical layer option”- consists of one or more unidirectional 3-wire serial data lanes, each of which has its own embedded clock. The physical layer of this interface is defined by the MIPI Alliance Specification for CPHY. The Camera Control Interface (CCI) for both physical layer options is a bidirectional (SDL-SDA) control interface compatible with the I2C standard.
csi 2
CSI-3: This interface technology is much easier to implement in both hardware and software than the existing technologies. CSI-3 is a new standardized data and control interface between the camera subsystem and the host device. Note that, within a camera subsystem, various components such as a RAW camera sensor, an SoC (system – on a – chip) camera, or a multi-chip camera module can be connected to each other using a proprietary interconnect, or CSI-3.
csi 3
The VX6953CB Camera Module
The VX6953CB 5.1 megapixel EDOF (Extended depth of field) camera module (from ST) is designed for use across a range of mobile phone handsets and accessories. It embeds high quality still camera functions and also supports HD video. VX6953CB produces raw Bayer 5 Mpixel images at 15 fps in RAW10, and supports the CCI control as well as CCP 2.0 and CSI-2 (D-PHY v1.0 compliant) data interfaces. As stated, the VX6953CB has both CCP2.0 and MIPI CSI-2 video data interfaces selectable over the camera control interface (CCI).
The image data is digitized using an internal 10-bit column ADC. The resulting pixel data is output as 8-bit, 10-bit or 10-8 bit compressed data and includes checksums and embedded codes for synchronization. The interface conforms to both the CCP 2.0 and MIPI CSI-2 interface standards. The sensor is fully configurable through a CCI serial interface. The module is available in a SMOP (small optical package) type package measuring 6.5 x 6.5 x 4.6 mm. It is designed to be used with a board-mounted SMIA65 (standard mobile imaging architecture) socket or flex cable.
VX6953CB Camera Module
Pinout and pin description of VX6953CB camera module, as viewed from the bottom of the module, is shown below. In the pinout table, note that pads T1-T8 are ST Test Points.
Since only a minimal list of external components is required, the VS6953CB features allow straight forward integration into custom-designs. VS6590 is another near-similar camera module from ST, but with only 0.5 Megapixel resolution (800Hx600V)and CCP 1.0 serial video interface.
  • CCP → CCP stands for Compact Camera Port, the interface standard for portable cameras, developed by SMIA (standard mobile imaging architecture) -an organization promoting the standardization of mobile phone (cellphone) interfaces.
  • CCI → This is usually a two or three-wire interface used to control the sensor module. Though named differently by different vendors (e,g. Serial Camera Control Bus, SCCB by Omni Vision), it usually confirms to the I2C standards (defined by Philips).
  • SMIA → SMIA (Standard Mobile Imaging Architecture) is an imaging architecture especially suitable for mobile application use. The scope of SMIA covers a raw bayer output image sensor head: It specifies housing, mechanical interconnection, functionality, register set and electrical interface
In the next figure, you can see the camera wiring in a Nokia 2700C (Nokia 2700c2 RM-561) mobile phone circuitry. In the schematic diagram, the 12-pin camera connector is labelled as X3300. The camera module can be safely removed from this connector/socket using a special “Nokia Camera Remover Tool”, available as a service accessory. For more details, refer the official service documentation/service schematics published by NOKIA™.
Nokia 2700C camera wiring
Note!
This article is based on an ongoing R&D work, now live @ TechNode PROTOLABZ. Although it is a commercial project,the project will be solely published (sometime later) in electroschematics.com
(R&D @ TechNode PROTOLABZ)
(R&D @ TechNode PROTOLABZ)
Referenced Documents (including but not limited to):
  • MIPI Alliance Standard for Camera Serial Interface 2 (CSI-2) v1.0
  • MIPI Alliance D-PHY Specification (v00-90-00)
  • High-Speed interface Technology for Image Data Transmission (FIND Vol.26)
  • Camera Sensor Driver Development and Integration (PATH PARTNER)
  • SMIA 1.0 Introduction and Overview (NOKIA & ST)
  • Arasan’s White Papers & Articles
Part 2 → Mobile Phone Camera and Arduino/Raspberry Pi

الأربعاء، 16 ديسمبر 2015

Delayed Automatic Power OFF

This circuit is build with the 555 IC and will automatically turn off the power after 20 minutes. You can use the circuit to turn off the porch light after you lock the house or similar other uses.

The 555 timer is operated as a monostable and a momentary push on S1 switch makes the output go high which triggers the triac and makes power available in the socket.
The IC output goes low again when C2 has charge up to 2/3 of the supply voltage. This process takes about 20 minutes. C2 should have low leakage otherwise it will charge very slowly and in cases of excessive leakages may not charge to full value at all. Power supply for the timer is provided by half wave rectifier D1, voltage dropping resistor R1, zener diode D2 and filter capacitor C1.

Automatic Turn OFF Power Circuit Schematic

automatic turn off power schematic

Versatile 555 Schmitt Trigger /Logic Inverter /Level Translator

More undocumented applications for the 555 ‘oscillator:’ Not all applications oscillate as we will see. Most are knowledgeable about common CMOS logic inverters and Schmitt triggers such as the 74HC04 and 74HC14 respectively that come six in a DIP-14 package. Often, some sections are left over and can be used for future enhancements, etc. However, what do you do when only one additional inverter or increased output drive or signal level translation is required? This is where the ubiquitous 555 once again comes to the rescue.

Schematics
555 Schmitt Trigger Logic Inverter Level Translator
(555 Schmitt Trigger Logic Inverter Level Translator)
555 Level Translator Test Circuit
(555 Level Translator Test Circuit)
Inverter
The 555 is inherently an inverter. If the threshold inputs (pins 2 & 6) are tied together, they may be used collectively as the input with pin 3 being the output.
Schmitt trigger
Since the two thresholds (1/3 Vcc & 2/3 Vcc) are widely separated, they make a very good Schmitt trigger. You may recall that Schmitt triggers are often good at cleaning up noisy AC signals by separating the desired signal from the lower amplitude noise content. It is also extremely useful in converting a slow changing input voltage signal into a truly digital output (1 or 0), and without troublesome oscillation at the thresholds.
Input thresholds
1/3 Vcc & 2/3 Vcc are not always compatible with TTL logic levels. One clever way of making it compatible is to adjust the voltage at pin 5. For instance, setting pin 5 to 2.5V sets the upper threshed (“1” level) to 2.5V, and the low threshold (“0” level) to 1.25V thus making it TTL compatible. This may be accomplished via a simple voltage divider. By making its Thevenin resistance much lower than that of the internal divider (inside the 555), manufacturing tolerances are swamped thus making the voltage repeatable from device to device.
Input impedance
Input impedance is high and lends itself well to a simple R-C input filter that helps reject noise and prevent against potential ESD damage in applications where the input wiring is exposed to the real world environment.
Output drive capability
CMOS logic is hard put to source a 5mA output –It does better at sinking, but pales compared to the 100mA source /sink capability of the 555.
Range of power supply voltage
Vcc for the 74HC series is generally rated for 3 to 5V. The 555 can support up to 15V and can be mixed with 4000 series CMOS devices.
Open collector level translator
Pin 7 is an open collector output that can be applied as an interface to either higher or lower voltage logic devices –all that is required is the addition of a pull-up resistor that is tied to the secondary Vcc. Note that this is VERY undocumented and may not always work as expected, so please test and use common sense before going off the deep end in any design –especially, since the addition of a discrete MOSFET such as the 2N7000 will always do the job (with the addition of yet another inverter because the common source connection itself inverts the signal). Note that all of the 555 devices that I tested worked OK, including the CMOS TLC555. To test this feature, I constructed a simple test circuit and took oscillographs of the signals.
Pin 7 output discontinuity
While one device, an old SG555 worked acceptably, the oscilloscope displayed a discontinuity in the negative transition –See oscillograph. All the others were clean. This type of discontinuity or bounce in the output signal can raise havoc in high speed digital logic. In this case, the CD4013 D Latch is quite slow and forgiving.
Will 555 applications ever be exhausted? NO!

الثلاثاء، 15 ديسمبر 2015

Remote AC Power Control by Android Application with LCD Display

The project is designed to control AC power to a load by using firing angle control of thyristor. Efficiency of such power control is very high compared to any other method.
Remote operation is achieved by any smart-phone/Tablet etc., with Android OS, upon a GUI (Graphical User Interface) based touch screen operation. The project uses zero crossing point of the waveform which is detected by a comparator whose output is then fed to the microcontroller. The microcontroller provides required delayed triggering control to a pair of SCRs through opto isolator interface. Finally the power is applied to the load through the SCRs in series. This project uses a microcontroller from 8051 family which is interfaced through a Bluetooth device, which receives signal from Android application device for increasing or decreasing the AC power to the load. A lamp is used in place of an induction motor whose varying intensity demonstrates the varying power to the motor. The varying power results in variation in speed of the motor.
The project can be further enhanced by using direct 230 volt supply instead of 12 volt AC to the bridge rectifier for achieving higher voltage control for charging number of batteries in series.
Complete project information- Remote AC Power Control by Android Application with LCD Display

Project Description

Based on the principle of firing angle control of two thyristors connected in anti parallel is fed for the output from an embedded microcontroller circuit having LCD display. The firing angle is remotely controlled to get reduced load power in steps.
Figure:1 Remote AC Power Control by Android Application with LCD Display

Figure 1  Remote AC Power Control by Android Application with LCD Display

Figure:2 Remote AC Power Control by Android Application with LCD Display

Figure 2  Remote AC Power Control by Android Application with LCD Display

Figure:3 Block Diagram

Fire Fighting Robot Remotely Operated by Android Applications

The project is designed to develop a fire fighting robot using android application device for remote operation. The robotic vehicle is loaded with water tanker and a pump which is controlled over wireless communication to throw water. An 8051 series of microcontroller is used for the desired operation.
At the transmitting end using android application device, commands are sent to the receiver to control the movement of the robot either to move forward, backward and left or right etc. At the receiving end three motors are interfaced to the microcontroller where two of them are used for the movement of the vehicle and the remaining one to position the arm of the robot. Remote operation is achieved by any smart-phone/Tablet etc., with Android OS, upon a GUI (Graphical User Interface) based touch screen operation. The android application device transmitter acts as a remote control that has the advantage of adequate range, while the receiver have Bluetooth device fed to the microcontroller to drive DC motors via motor driver IC for necessary work. A water tank along with water pump is mounted on the robot body and its operation is carried out from the microcontroller output through appropriate signal from the transmitting end. The whole operation is controlled by an 8051 series microcontroller. A motor driver IC is interfaced to the microcontroller through which the controller drives the motors.
Further the project can be enhanced by interfacing it with a wireless camera so that the person controlling it can view operation of the robot remotely on a screen.
Complete information about project - Fire Fighting Robot Remotely Operated by Android Applications

Project Description

The project is designed to develop a fire fighting robotic vehicle using motors those are interfaced to a microcontroller through remotely operated commands to it by touch screen based user friendly GUI on any smart phone with Android applications. The robotic vehicle is loaded with water tanker and a pump which is also controlled remotely too pump the water on the fire.
Figure:1 Fire Fighting Robot Remotely Operated by Android Applications

Figure 1  Fire Fighting Robot Remotely Operated by Android Applications

Figure:2 Fire Fighting Robot Remotely Operated by Android Applications

Figure 2  Fire Fighting Robot Remotely Operated by Android Applications

Figure:3 Block Diagram

Remote Operated Domestic Appliances Control by Android Application

The project is designed to operate electrical loads using an Android application device. The system operates electrical loads depending on the data transmitted from the Android application device. Operating conventional wall switches is difficult for elderly or physically handicapped people. This proposed system solves the problem by integrating house hold appliances to a control unit that can be operated by an Android smart-phone/Tablet etc.
Remote operation is achieved by any smart-phone/Tablet etc., with Android OS, upon a GUI (Graphical User Interface) based touch screen operation, interfaced to the microcontroller of 8051 family. The program on the microcontroller serially communicates with Bluetooth device to generate respective output based on the input data (sent from Android application device) to operate a set of relays through a relay driver IC. The loads are interfaced to the control unit through the relays. The system can be used in existing domestic area for either operating the loads through conventional switches.
The power supply consists of a step down transformer 230/12V, which steps down the voltage to 12V AC. This is converted to DC using a Bridge rectifier. The ripples are removed using a capacitive filter and it is then regulated to +5V using a voltage regulator 7805 which is required for the operation of the microcontroller and other components.

Project Description

The project is designed to operate electrical loads using relays interfaced to a microcontroller through remotely operated commands to it by touch screen based user friendly GUI on any smart phone with Android applications.
Figure:1 Remote Operated Domestic Appliances Control by Android Application

Figure 1  Remote Operated Domestic Appliances Control by Android Application

Figure:2 Remote Operated Domestic Appliances Control by Android Application

Figure 2  Remote Operated Domestic Appliances Control by Android Application

Figure:3 Block Diagram

8-bit Bin to 256 /1 of 256

A long time ago when a parallel printer port was the standard, i was thinking how to get the most led's on a 8 bit interface. And came up with a simpel way to demultiplex. It can be used with dip-switches or any other 8 bit interface like a usb i/o interface. I made a 256 run light using two 74hct193 and a 74hct132. The resistor can/need to be matched by what type of led's and power you use. Parts are still available in Europe, for the usa don't know , but i think no problem. I just hooked it up an Arduino, via an 74hc595. Works fine, programing is not so hard as i thought. Never used a micro controler before.

Project Description

I made a compact disign by using 2 standard PCB’s, 16 BC557AP and two 74154N ‘s
Figure:1 Circuit diagram

Figure 1  Circuit diagram

Figure:2 Front

Figure 2  Front

Figure:3 Back

Figure 3  Back

I just hooked it up an Arduino, via an 74hc595.
Works fine, programing is not so hard as i thought.
Never used a micro controler before.
Figure:4 Hooked to an Arduino

Figure 4  Hooked to an Arduino

الاثنين، 14 ديسمبر 2015

Working of 555 Timer as an Astable Multivibrator

As shown in the diagram below timer 555 works in astable mode along with the internal circuit described in the block. There are three resistors named R inside it and all have equal values.

Circuit Diagram of 555 Timer in Astable Multivibrator Mode:

Figure:1 555 Timer as an Astable Multivibrator - Circuit Diagram

Figure 1  555 Timer as an Astable Multivibrator – Circuit Diagram

Description:
Pin 2 of the 555 is the trigger input. If the voltage at pin 2 is<1/3 of Vcc, the flip flop switch to a low state of the output of the lower comparator. The output stage has an inverting action. In other words, output at 555 high when flip-flop output is low.
Now imagine if the power supply is first connected to the astable circuit. Timing capacitor is discharged at the starting. The output in 555 is high and voltage is 0V at pin2. With the help of resistor R1 and R2 and capacitor C starts charging. Note that C is also connected to pin 6, which is the threshold input of 555 timer.
Get remaining detailed explanation about the working of 555 Timer as an Astable Multivibrator in ElectronicsHub.Org site.

Dummy Alarm using 555 Timer

Have you ever seen or heard about Dummy Alarm? Now we are explaining you about Dummy Alarm. It is almost similar to an alarm, where as it flashes high power red LEDs for every 5 seconds.

Project Description

The main principle of the circuit is to flash an LED for every 5 seconds. The circuit consists of 7555 timer IC as main component.

Circuit Diagram of Dummy Alarm using 555 Timer:

Figure:1 Dummy Alarm Circuit Diagram

Figure 1  Dummy Alarm Circuit Diagram

Circuit Components:
555 Timer IC.
Resistors R1, R2, R3.
Capacitor C1.
High power Red LED.
Battery.
ON/OFF switch
As we mentioned earlier that the LEDs flash for every 5 seconds, we can use it in timing applications.
We can also use it in cars for security purpose. Whenever any theft is detected in the cars, it starts flashing for every 5 seconds.
The 7555 timer IC has 8 pins. First pin is connected to ground. Pin 2 and Pin 6 are shorted and connected to the positive terminal of the capacitor. Negative terminal is connected to the ground. A resistor of 10k is connected to the positive terminal of the capacitor.
Are you interested to get detailed information about this circuit design, working and other information? Then read the post – Dummy Alarm using 555 Timer.

Police Lights Using 555 Timer

Here is an interesting project named police car lights designed using 555 timer. This circuit simulates the police car lights by alternate flashing.

Project Description

This circuit simulates the police car lights by alternate flashing. This circuit flashes red LEDs for three times and blue LED’s for three times. This flashing action performs continuously. This circuit uses 555 timer and a decade counter. Here, 555 timer runs in astable mode. Decade counter 4017 counts the incoming pulses that is for first pulse Q0 becomes high and for second pulse Q1 becomes high and so on again for 10th pulse Q0 state becomes high.
Police Lights Circuit using 555 Timer:
Figure:1 Circuit Diagram

Figure 1  Circuit Diagram

Circuit Components:
  • NE555 timer
  • 4017 decade counter
  • 1n4148 diodes – 6
  • 1 k Resistor(1/4 watt) – 1
  • 22 k Resistor(1/4 watt) – 1
  • 470 ohm Resistor(1/4 watt) – 8
  • 2.2 uF Electrolytic capacitor(16V) – 1
  • Blue LED’s – 2
  • Red LED’s – 2
  • 9 V battery – 1
  • Connecting wires
555 Timer Based Police Lights Circuit Design
555 Timer. Here 555 Timer runs in free running mode. It produces pulses whose width can be varied. 2nd and 6th pins are shorted to allow triggering after every cycle. 4th pin is connected to Vcc to avoid sudden resets.
4017 Decade Counter. It is a 10-bit counter with ten decoded outputs. It counts the incoming pulses. The supply voltage range is -0.5 to +22 V. The high pulse on the reset pin clears the count to zero. The speed of operation of this IC is up to 10 MHz. The output states (Q0, Q2, Q4) are ORed to flash the blue LED’s 3 times and the states Q5, Q7 and Q9 are ORed to flash the red LED’s 3 times.
Based on the output of 4017 IC, two transistors (NPN) switches the LED’s ON and OFF. Resistors R3, R4, R5, R6 are used to protect the LED’s from high voltage.
After connecting the whole circuit, apply power to it. Now observe the LEDs carefully. You will find that red led’s flashes 3 times and blue led’s flashes 3 times and this process repeats.
Are you interested to get detailed information about this project? Read More…

Timer Alarm Circuit

This circuit is a type of alarm system in which different values of resistors are used to adjust the triggering time of its buzzer. The design has fewer components than a conventional timing circuit. The circuit is supplied by a 9V DC source. The S1 is a switch that controls the supply. The S2 serves as a triggering switch in order to start the timer. The 500kΩ, 1MΩ, 1.5MΩ and 2.2MΩ resistors are the set values to acquire 5, 10, 15 and 20 minutes intervals of time in order to produce alarm. The capacitors controls the delay of timing. The 555 IC is used as pulse generator and main component for the timer. The design is suitable for fixed timing applications. It is cheap and easy to build.

Project Description

Figure:1 Timer Alarm Circuit 1

Figure 1  Timer Alarm Circuit 1

Figure:2 Timer Alarm Circuit 2

Figure 2  Timer Alarm Circuit 2

This is a basic application of 555 timer. It is used as part of the timing circuit in which it varies time interval with respect to the value of resistance given. It is useful for simple application where fixed timing is needed.
The complete design is provided at
link-> http://schematics.com/project/timer-alarm-circuit-14342/

الأحد، 13 ديسمبر 2015

Industrial Power Control by Integral Cycle Switching

The project is designed to achieve integral cycle switching, a method to remove whole cycle, cycles or portions of cycles of an AC signal. It is a well-known and old method of controlling AC power, especially across linear loads such as heaters used in electric furnace. However the concept of achieving the cycle stealing of voltage waveform by use of microcontroller can be very precise as per the program written in assembly / C language so that the actual time-average voltage or current experienced at the load is proportionately lower than the whole signal if applied to the load. In place of a linear load to be used in the output, a series motor or lamp can be used to verify the output. One side effect of utilizing this scheme is an imbalance in the input current or voltage waveform as the cycles are switched on and off across the load.
In this project we are using comparator for zero crossing detection which is fed as an interrupt to microcontroller of 8051 family. Here the microcontroller delivers the output based on the interrupt received as the reference for generating triggering pulses. Using these pulses, we drive the opto-isolators for triggering the TRIAC to achieve integral cycle control as per the input switches interfaced to the microcontroller. A lamp is provided in this project in place of a motor for demonstration purpose.
Further this project can be enhanced by using feedback mechanism to automatically maintain desired output to the load by appropriate cycle stealing.

Project Description

This is project is based on embedded systems and is more helpful to EEE Students to complete their engineering. This project is designed to achieve integral cycle switching, a method to remove whole cycle, cycles or portions of cycles of an AC signal.
Figure:1 Industrial Power Control by Integral Cycle Switching without Generating Harmonics

Figure 1  Industrial Power Control by Integral Cycle Switching without Generating Harmonics

Figure:2 Industrial Power Control by Integral Cycle Switching without Generating Harmonics

Figure 2  Industrial Power Control by Integral Cycle Switching without Generating Harmonics

Figure:3 Block Diagram

Figure 3  Block Diagram

https://www.youtube.com/watch?time_continue=51&v=WnTuFAtravE

20 W Power Factor Corrected, Non-Isolated, TRIAC Dimmable LED Driver



This document describes a non-isolated, high power factor (PF), TRIAC dimmable LED driver designed to drive a nominal LED string voltage of 96V at 210 mA from a high line input voltage range of 195 VAC to 265 VAC (50 Hz typical). The LED driver utilizes the LYT4326E from the LYTSwitch-4 family of ICs. The topology used is a single-stage non-isolated buck boost that meets constant current regulation, and dimming requirements for this design.

Project Description

Figure:1

Figure 1 

This document describes a non-isolated, high power factor (PF), TRIAC dimmable LED driver designed to drive a nominal LED string voltage of 96V at 210 mA from a high line input voltage range of 195 VAC to 265 VAC (50 Hz typical). The LED driver utilizes the LYT4326E from the LYTSwitch-4 family of ICs. The topology used is a single-stage non-isolated buck boost that meets constant current regulation, and dimming requirements for this design.
Figure:2

Figure 2 

Features
  • Single-stage power factor correction combined with constant current (CC) output
  • Fast start-uptime(< 200 ms) –no perceptible delay
  • High efficiency > 85 % at 230 VAC
  • PF > 0.9at 230VAC
  • Output short-circuit protected with auto-recovery
  • Auto-recovering thermal shutdown with large hysteresis
Read More…

Arduino-Digital Light Meter


Project Summary

A light meter is a very useful device that finds applications in hospitals, schools, factories, parking lots, passageways, and many more to measure and maintain adequate lighting levels. It is also useful in photography to set an accurate exposure for the camera. This project describes a simple Arduino-based digital light meter, which is capable of measuring the ambient light intensity ranging from 0-65535 Lux. The output is displayed in both Lux and Footcandles.

Project Description

Hardware The BH1750FVI sensor is used to measure the incident light intensity. BH1750FVI is a digital light sensor IC that directly provides calibrated output in Lux. It can measure ambient light intensity ranging from 0 to 65535 Lux. The sensor output can be accessed through an I2C interface. For displaying the result, a MAX7219-based serial 8-digit seven segment LED module is used. MAX7219 allows you to control 8 common cathode seven segment LED displays with only 3 I/O pins from a microcontroller. Figure 1 shows the wiring of the sensor and the display module to the Arduino board.
Figure:1 Arduino connections

Figure 1  Arduino connections

A tact switch connected to Pin 2 of Arduino operates in interrupt mode and is used to toggle the output between Lux and Footcandles. The complete project setup is shown in Figure 2. The sensor and tact switch are soldered on a general-purpose prototyping board, which plugs onto the Arduino Uno using male headers. Using a proto-shield would be much easier to build the hardware of this project.
Figure:2 Complete setup of the project

Figure 2  Complete setup of the project

Software The LedControl library is used to interface the MAX7219-driven seven segment LED display module to Arduino. The sensor data is read using the Wire library. The sensor is configured for a measurement resolution of 1 Lux. The measurement and output display are both refreshed every second. Click here to download the full Arduino Sketch
Output
The sensor should be faced directly toward the light source that is to be measured. The default unit of display is Lux. Press the Mode switch to toggle between Lux and Footcandle units. Figure 3 shows the light meter displaying output in Footcandles (Fc).

Figure:3 Digital light meter in action

Figure 3  Digital light meter in action


More details can be found at the Author’s personal page.

4 Band Resistor Calculator


Calculate the resistance of a 4 band resistor

Resistance Calculator

Choose Type

4 Band Resistor

resistor
1st Digit
2nd Digit
Multiplier
Tolerance
Black
0
x1
Brown
1
1
x10
± 1%
Red
2
2
x100
± 2%
Orange
3
3
x1K
± 3%
Yellow
4
4
x10K
± 4%
Green
5
5
x100K
± 0.5%
Blue
6
6
x1M
± 0.25%
Violet
7
7
x10M
± 0.10%
Grey
8
8
x100M
± 0.05%
White
9
9
x1G
Gold
÷ 10
± 5%
Silver
÷ 100
± 10%

Outputs

Resistance: 
5.60k ohms
 
Tolerance: 
± 5%
 

Introduction

A resistor is a perhaps the most common building block used in circuits. Resistors come in many shapes and sizes this tool is used to decode information for color banded axial lead resistors.

4 Band Description

The number of bands is important because the decoding changes based upon the number of color bands. There are three common types: 4 band, 5 band, and 6 band resistors. For the 4 band resistor:
Band 1 – First significant digit.
Band 2 – Second significant digit
Band 3 – Multiplier
Band 4 – Tolerance

Resistance Value

The first 4 bands make up the resistance nominal value. The first 2 bands make up the significant digits where:
black – 0
brown – 1
red – 2
orange – 3
yellow – 4
green – 5
blue – 6
violet – 7
grey – 8
white – 9
The 3rd band or multiplier band is color coded as follows:
black – x1
brown – x10
red – x100
orange – x1K
yellow – x10K
green – x100K
blue – x1M
violet – x10M
grey – x100M
white – x1G
gold – .1
silver – .01
An example of a resistance value is:
band 1 = orange = 3,
band 2 = yellow = 4,
band 3 = blue = 1M
value = 34*1M = 34 Mohm

Resistance Tolerance

The fourth band is the tolerance and represents the worst case variation one might expect from the nominal value. The color code for tolerance is as follows:
brown – 1%
red – 2%
orange – 3%
yellow – 4%
green – .5%
blue – .25%
violet – .1%
gray – .05%
gold – 5%
silver – 10%
An example calculating the range of a resistor value is:
If the nominal value was 34 Ohm and the 4th band of the resistor was gold (5%) the value range would be nominal +/- 5% = 32.3 to 35.7

السبت، 12 ديسمبر 2015

PIC Microcontroller Intro – Tutorial #3

This chapter, like its predecessor, focuses both in hardware and software related to PIC microcontrollers. In the second part, we made an attempt to blink one LED through a PIC microcontroller PIC12F675 with the help of a pre-processed (hex) code. Here, we are going to learn more about writing our own code for such a simple LED project.

What is a compiler? Compiler is a program that decodes instructions written in a higher order language and produces an assembly language program. MikroC is a best compiler for beginners as it contains built in functions for most of the commonly used tasks. You can download a trial/limited version of MikroC from here (http://www.mikroe.com/mikroc/pic/). Note that, this trial version is limited to 2K of program words, but is sufficient for most of our learning applications.
First of all, you should install the downloaded MikroC PRO For PIC in your PC and open it. Now click on Project and then New Project. In the New Project Wizard window, click Next, enter Project name, Project Folder, Device Name (microcontroller) , Device Clock (clock frequency), and click Next (here we use PIC 16F877A microcontroller with 8MHz crystal). At this time just click Next in the Add Files to Project window.
Click Next in Library Manager after selecting Include All (default) in Include Libraries, click Finish to complete the New Project Wizard. This will open the editor window where you can enter the code.
What is next? Enter the code (shown at the end of this paragraph), Save it and then Compile it by clicking Build (or Ctrl+F9). This will generate a hex file in your project folder. You need to burn this hex file into the PIC16F877A microcontroller using your PIC programmer, as done earlier. Finally, finish the hardware as per the wiring diagram included here.
wiring diagram
This time, the microcontroller is PIC16F877A! VDD and VSS of PIC Microcontroller is connected to +5V and GND respectively, and the 8MHz crystal is used to provide necessary clock for the microcontroller. Two 22pF capacitors stabilizes the oscillations of the crystal. One Red LED is connected to the one PORTB pin and a 1K Ω resistor is connected in series with it to limit the operating current of the LED.
Our code for PIC 16F877A microcontroller blinks the connected LED with a delay of 1 second. Okay, but how? What is behind this little code?
  1. void main()
  2. {
  3. TRISB.F0 = 0;
  4. while(1)
  5. {
  6. PORTB.F0 = 1;
  7. Delay_ms(1000);
  8. PORTB.F0 = 0;
  9. Delay_ms(1000);
  10. }
  11. }
TRIS stands for TriState, which determines the direction of each GPIO pin. Output pins of a PIC Microcontroller is divided in to different PORTS containing a group of GPIO (General Purpose Input Output Pins). Logic 1 at a particular bit of TRIS register makes the corresponding pin Input and Logic 0 at a particular bit of TRIS register makes the corresponding pin Output. And, PORT register is used to read data from or write data to GPIO pins. Logic 1 at a particular bit of PORT register makes the corresponding pin at Logic-High (H) state and Logic 0 at a particular bit of PORT register makes the corresponding pin at Logic-Low (L) state, if that pin is an Output pin (TRIS bit is 0).
TRISB.F0 = 0;→ Makes 0th bit of PORTB (PORTB0 or RB0) Output while(1)→ An infinite loop
PORTB.F0 = 1;→ Makes 0th bit of PORTB at Logic-High state
PORTB.F0 = 0;→ Makes 0th bit of PORTB at Logic-Low state
The Delay_ms (const unsigned long a) is a built in function of MikroC PRO which provides a delay of ‘a’ milliseconds. The variable ‘a’ must be a constant of type unsigned long integer. Okay, now our code is well-defined!
  1. void main()
  2. {
  3. TRISB.F0 = 0; // PORT B0 as output
  4. while(1) // Infinite Loop
  5. {
  6. PORTB.F0 = 1; // LED connected at RB0 ON
  7. Delay_ms(1000); // 1 Second Delay
  8. PORTB.F0 = 0; // LED connected at RB0 OFF
  9. Delay_ms(1000); // 1 Second Delay
  10. }
  11. }
PIC16F877A 40-pin Enhanced Flash Microcontroller
(PIC16F877A: 40-pin Enhanced Flash Microcontroller)
If you are in doubt, follow this wiring diagram to learn how to connect your PIC Kit 2 programmer with the PIC16F877A microcontroller. Also refer Part-2 of this tutorial!
PIC Kit 2 programmer

Twitter Delicious Facebook Digg Stumbleupon Favorites More