This project is a 7 segment LED display module that can be driven using SPI protocol, so it needs only 3 pins of your mcu to drive 4 x LED displays. It's based on MAX7219 LED display driver.
Seven segment LED displays are very popular for displaying numeric information because they are very attractive and readable from a far distance and wider viewing angle.
The downside is they are resource-hungry. For example, it requires 12 I/O pins of a MCU to drive a 4-digit seven segment display using a standard time-division multiplexing technique.
Here I present a serial seven segment LED display module that can be used with any MCU using a 3-wire SPI interface. This particular display has four digits (0.40 size) and two colon segments (to support time display) display.
The main controller of this display module is MAXIMs MAX7219 driver chip. Included on-chip are a BCD decoder, multiplex scan circuitry, segment and digit drivers, an 8×8 static RAM to store the digit values, and a 3-pin SPI interface to receive the display data from the host MCU.
The segment current for all LEDs is set through only one external resistor. However, the device also provides a digital control of the display brightness (16 steps from minimum to maximum) through an internal pulse-width modulator.
The seven segment module used in this project is LITE-ON, Inc.s LTC-4727JS module, which has LED segment arrangement and pin configuration as shown in figure below.
The interface between MAX7219 and the LTC-4727JS LED module is shown below. The common cathode terminals (Digit 1, Digit 2, Digit 3, and Digit 4) of LTC-4727JS are connected to D3, D2, D1, and D0 pins of MAX7219 driver chip, respectively. The common cathode pin (4) of L1, L2, and L3 LED segments goes to D4 pin of MAX7219. So, in order to turn on L1, L2, and L3 segments, D4 digit select pin of MAX7219 should be active. The display is powered with 5V applied to its VCC pin. Resistor R1 defines the constant current through the LED segments.
click on schematic for full resolution
Parts List
This display module can be easily interfaced with Arduino using the LedControl library. Heres an example that displays numbers 1 through 4 and activates the L1, L2, and L3 segments. The SPI interface pins DIN, CLK, and LOAD of MAX7219 are driven by Arduino digital I/O pins 7, 6, and 5 respectively in this example. However, the LedControl library allows customization of these pins.
3D PCB rendering
- MAX7219 datasheet: http://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf
- Arduino LedControl library: http://playground.arduino.cc/Main/LedControl
- PIC12F683 and MAX7219 interface: http://embedded-lab.com/blog/?p=4935
- Buy 4-digit MAX7219 based displays: https://www.tindie.com/products/rajbex/spi-4-digit-seven-segment-led-display/
- Buy 8-digit MAX7219 based displays: https://www.tindie.com/products/rajbex/spi7segdisp856-kit-eight-digit-serial-spi-seven-segment-led-display-red/
|
Sunday, 24 August 2014
Serial 4-digit seven segment LED display
Charger for mobile phones
Description
|
Most mobile chargers do not have current/voltage reguLation or short-circuit protection. These chargers provide raw 6-12V DC for charging the battery pack. Most of the mobile phone battery packs have a rating of 3.6V, 650 mAh. For increasing the life of the battery, slow charging at low current is advisable. Six to ten hours of charging at 150-200mA current is a suitable option. This will prevent heating up of the battery and extend its life. The circuit described here provides around 180mA current at 5.6V and protects the mobile phone from unexpected voltage fluctuations that develop on the mains line. So the charger can be left on over night to replenish the battery charge. The circuit protects the mobile phone as well as the charger by immediately disconnecting the output when it senses a voltage surge or a short circuit in the battery pack or connector. It can be called a middle man between the existing charger and the mobile phone. It has features like voltage and current regulation, over-current protection, and high- and low-voltage cut-off. An added speciality of the circuit is that it incorporates a short delay of ten seconds to switch on when mains resumes following a power failure. This protects the mobile phone from instant voltage spikes. The circuit is designed for use in conjunction with a 12V, 500mA adaptor (battery eliminator). Op-amp IC CA3130 is used as a voltage comparator. It is a BiMOS operational amplifier with MOSFET input and CMOS output. Inbuilt gate-protected p-channel MOSFETs are used in the input to provide very high input impedance. The output voltage can swing to either positive or negative (here, ground) side. The inverting input (pin 2) of IC1 is provided with a variable voltage obtained through the wiper of potmeter VR1. The non-inverting input (pin 3) of IC1 is connected to 12V stabilised DC voltage developed across zener ZD1. This makes the output of IC1 high.
After a power resumption, capacitor C1 provides delay of a few seconds to charge to a potential higher than of inverting pin 2 of CA3130, thus the output of IC1 goes high only after the delay. In the case of a heavy power line surge, zener diode ZD1 (12V, 1W) will breakdown and short pin 3 of IC1 to ground and the output of IC1 drops to ground level. The output of IC1 is fed to the base of npn Darlingtontransistor BD677 (T2) for charging the battery. Transistor T2 conducts only when the output of IC1 is high. During conduction the emitter voltage of T2 is around 10V, whichpasses through R6 to restrict the charging current to around 180 mA. Zener diode ZD2 regulates the charging voltage to around 5.6V. When a short-circuit occurs at the battery terminal, resistor R8 senses the over-current, allowing transistor T1 to conduct and light up LED1. Glowing of LED2 indicates the charging mode, while LED1 indicates shortcircuit or over-current status. The value of resistor R8 is important to get the desired current level to operate the cut-off. With the given value of R8 (3.3 ohms), it is 350 mA. Charging current can also be changed by increasing or decreasing the value of R7 using the I=V/R rule. Construct the circuit on a common PCB and house in a small plastic case. Connect the circuit between the output lines of the charger and the input pins of the mobile phone with correct polarity.
Download
|
Remote Control Circuit Through Radio Frequency Without Microcontroller
Description
This is a simple type remote control by using RF communication without microcontroller. In this project a remote has been designed for various home appliances like television, fan, lights, etc. It gives lot of comfort to the user since we can operate it by staying at one place. We can control any of the appliances by using this remote within the range of 400 foots. In this project consist of two sections, transmitter (remote) and receiver section. Whenever we are pressing any key in the remote it generates the corresponding RF signals, and these signals are received by the receiver unit. ASK transmitter and receiver is used as transmitter and receiver. HT12E, HT12D encoders and decoders are used in this electronic circuit. The block digram of the whole circuit is given below.
Remote Section
In remote section consist of an encoder (HT 12E) and a ASK transmitter. The encoder generates 8 bit address and 4bit data. We can set the address by using the DIP switch connected in A0 to A7 (pin 1 to 8 ) encoder. If we set an address in the remote section, the same address will be required in the receiver section. So always set same address in transmitter and receiver. Whenever we press any key in the remote the encoder generates corresponding 4bit data and send this data with 8bit address by using ASK transmitter. The transmitting frequency is 433MHz. The transmitter output is up to 8mW at 433.92MHz with a range of approximately 400 foot (open area) outdoors. Indoors, the range is approximately 200 foot.
Receiver Section
At the receiver section ASK receiver is present. The receiver also operates at 433.92MHz, and has a sensitivity of 3uV. The ASK receiver operates from 4.5 to 5.5 volts-DC, and has both linear and digital outputs. It receives the datas from the transmitter. Then the decoder (HT 12D) decodes the date and it will enable the corresponding output pin (pin 10,11,12,13). Each output pins are connected to separate flip flops. The output of encoder will change the state of the flip flop. So its output goes to set (high) from reset (low) state. This change makes a high signal in the output of the flip flop. This output signal is not capable to drive a relay directly. So we are using current driver, SL100 transistor act as the current driver. The appliance is connected to 230V AC through the relay and the appliance will start. The relay will be re-energized when the same switch is pressed in the remote. This is because we are pressing the same switch in the remote control. The output of the decoder again goes to high so this signal will again change the state of the flip flop. So, the relay gets re-energized and the appliance goes to OFF state.
Components Used
IC | HT 12D | 1 |
CD 4017 | 4 | |
LM 7805 | 2 | |
TRANSISTOR | BC 558 | 4 |
SL 100 | 4 | |
RESISTOR | 180 K | 4 |
1 K | 4 | |
560 E | 4 | |
39K | 1 | |
1M | 1 | |
CAPACITOR | 100nF | 4 |
100MFD/16V | 4 | |
LED | RED | 4 |
DIP SWITCH | 2 | |
PUSH TO ON SWITCH | 4 | |
ASK TRANSMITER | 433MHZ | 1 |
ASK RECEIVER | 433MHZ | 1 |
Telephone operated remote
Description.
The circuit given below is of a telephone operated DTMF remote. The circuit can be used to switch up to 9 devices using the keys 0 to 9 of the telephone. Digit 0 is used to switch the telephone system between remote switching mode and normal conversation mode. IC KT3170 (DTMF to BCD decoder) is used to decode the DTMF signals transmitted over the telephone line to corresponding BCD format. IC 74154 ( 4 to 16 demultiplexer) and IC CD4023 (dual D flip flop) is used to switch the device according to the receive DTMF signal.
The operation of the circuit is as follows. After hearing the ringtone from the phone at receiver end, press the 0 button of the remote phone. The IC1 will decode this as 1010.The pin 11 of IC2 will go low and after inversion by the NOT gate in IC3 it will be high. This will toggle the flip flop IC5a and the transistor Q1 will be switched on. This will make the relay K1 ON. The two contacts C1 and C2 of the relay K1 will be closed. C1 will form a 220 Ohm loop across the telephone line in order to disconnect the ringer from the telephone line (this condition is similar to taking the telephone receiver off hook).C2 will connect a 10KHz audio source to the telephone line in order to inform you that the system is now in the remote switch mode. Now if you press 1 on the transmitter phone, the IC1 will decode it as 0001 and the pin 2 of IC2 will go low. After inversion by the corresponding NOT gate inside IC3, it will be high. This will toggle flip flop IC5b and transistor Q2 will be switched ON. The relay will be energized and the device connected through its contacts gets switched. Pressing the 1 again will toggle the state of device. In the same ways Keys 2 to 9 on the transmitter phone can be used to toggle the state of the device connected to the channels O2 to O9. After switching is over, press the O key on the transmitter phone in order to toggle the flip flop IC5a to de-energize the relay K1.The 200 Ohm loop will be disconnected from the line, the 10 KHz audio source will be removed and the telephone receiver will be ready to receive new calls.
Circuit diagram.
The operation of the circuit is as follows. After hearing the ringtone from the phone at receiver end, press the 0 button of the remote phone. The IC1 will decode this as 1010.The pin 11 of IC2 will go low and after inversion by the NOT gate in IC3 it will be high. This will toggle the flip flop IC5a and the transistor Q1 will be switched on. This will make the relay K1 ON. The two contacts C1 and C2 of the relay K1 will be closed. C1 will form a 220 Ohm loop across the telephone line in order to disconnect the ringer from the telephone line (this condition is similar to taking the telephone receiver off hook).C2 will connect a 10KHz audio source to the telephone line in order to inform you that the system is now in the remote switch mode. Now if you press 1 on the transmitter phone, the IC1 will decode it as 0001 and the pin 2 of IC2 will go low. After inversion by the corresponding NOT gate inside IC3, it will be high. This will toggle flip flop IC5b and transistor Q2 will be switched ON. The relay will be energized and the device connected through its contacts gets switched. Pressing the 1 again will toggle the state of device. In the same ways Keys 2 to 9 on the transmitter phone can be used to toggle the state of the device connected to the channels O2 to O9. After switching is over, press the O key on the transmitter phone in order to toggle the flip flop IC5a to de-energize the relay K1.The 200 Ohm loop will be disconnected from the line, the 10 KHz audio source will be removed and the telephone receiver will be ready to receive new calls.
Circuit diagram.
Notes.
- Assemble the circuit on a good quality PCB.
- Use 6V DC for powering the circuit.
- A simple NE555 based oscillator can be used as the 10 KHz audio source.
- All IC’s must be mounted on holders.
- The section drawn in red must be repeated eight times (not shown in circuit).
- In certain countries circuits like this cannot be connected to telephone line.I do not have any responsibility on the legal issues .
IC’s used in this project.
KT3170
The IC KT 3170 used here is a low power DTMF receiver IC from Samsung. The IC is fabricated using low power CMOS technology and can detect all the 16 standard DTMF tones. The DTMF signal received will be decoded to a BCD output for switching applications.
74154
74154 is a 4 line to 16 line decoder from national semiconductors. It decodes a 4 bit input code into one of 16 mutually exclusive outputs. Maximum supply voltage is 7V and normal power dissipation is around 175mW.
CD4049
CD4049 is a CMOS hex inverter from Texas Instruments. Each of the IC contains six NOT gates. Maximum supply voltage possible is 20V and each gate can drive up to two TTL loads.
CD4013
CD4013 is a CMOS dual D filp flop. Each flip flop has independent data, reset Q, Qbar, clock and set pins. The maximum possible supply voltage is 15V and the IC has high noise immunity.
KT3170
The IC KT 3170 used here is a low power DTMF receiver IC from Samsung. The IC is fabricated using low power CMOS technology and can detect all the 16 standard DTMF tones. The DTMF signal received will be decoded to a BCD output for switching applications.
74154
74154 is a 4 line to 16 line decoder from national semiconductors. It decodes a 4 bit input code into one of 16 mutually exclusive outputs. Maximum supply voltage is 7V and normal power dissipation is around 175mW.
CD4049
CD4049 is a CMOS hex inverter from Texas Instruments. Each of the IC contains six NOT gates. Maximum supply voltage possible is 20V and each gate can drive up to two TTL loads.
CD4013
CD4013 is a CMOS dual D filp flop. Each flip flop has independent data, reset Q, Qbar, clock and set pins. The maximum possible supply voltage is 15V and the IC has high noise immunity.
Transistor intercom circuit.
Description.
Here is a simple but effective intercom circuit that is based fully on transistors.The circuit is based on a three stage RC coupled amplifier. When the pushbutton S2 is pressed, the amplifier circuit wired around T1 & T2 becomes an astable multivibrator and starts producing the ringing signals. These ringing signals will be amplified by the transistor T3 to drive the speaker. When the push button S2 is released the circuit will behave as an ordinary amplifier and you can talk to the other side through it.
To construct a two way intercom, make two identical copies of the circuit given below and connect it according to the given connection diagram. The stand by current consumption of this circuit is around 20mA.
Circuit diagram with Parts list.
Connection diagram.
Notes.
- Assemble the circuit on a good quality PCB.
- Use 9V PP3 battery for powering the circuit.
- The Mic M1 can be condenser micro phone.
- Use push to ON type push button switch for S2.
- Use a slide switch for switch S1.S1 can be used to power the circuit.
Model Railroad Controller with Presence Detector
Railroads are a big part of the history. They take us back to an earlier time where once trains were the fastest way to cross a huge land. Model Railroading could take you back to those more good old times, and it is a greatest hobby. Probably,you have already noticed that this will be one of the most rewarding and relaxing hobby that you will ever experience. Model train shows are very common, and you can watch the excitement of visitors when their eyes glued to the moving locos. Perhaps, you are now busy with the set up process of your own model railroad show!
Okay, when you prepare your railroad layout for a public event you may not want the train to run continuously but only when someone is there to enjoy it. This simple “Model Railroad Controller” circuit activates the train on a loop of track so that it goes around for a finite time when a visitor is approching, and always returns to the departing point where it waits patiently for the next visitor.
In this simplest method, a slight modification in the existing track wiring is necessary as indicated in the track layout shown below. Here, the train power is always connected to the main loop,but the stop block (departing point) is normally unpowered, and controlled by the railroad controller electronics.
Hope you start with a pre-packaged train set. The starter set almost always include a power supply along with the track and train. Most two-rail track systems use DC (Direct Current); one rail is positive, the other is negative (ground). The power supply polarities can be reversed to change the direction of the train. Make sure you are getting the right type of power supply for your layout. Connect the railroad power supply unit to your modified track as shown here.
What’s next? Just follow the schematic circuit diagram to build your own model railroad controller unit (which is nothing but a “LASER Beam Trip Sensor” based visitor detector), and connect the finished circuit to port J1. You can use the existing railroad power unit or an independent power source to energize the controller block.
In case of a visitor detection, the controller will apply power to the stop block and the train will move. The controller circuit also ensures (with the help of the relay contacts) that the stop block remains in the power-up state until the train exits the stop block (otherwise the train may not move enough to pick up power beyond the isolated track), and the stop block is in power-down mode thereafter. For this second task, an ordinary reed switch (N/O type) lies between the tracks is connected to the main controller circuit. When the train passes over the reed switch a magnet that is pasted at the bottom of its frame activates the reed switch and this toggles the controller circuit to remove power from the stop block.
When it comes to an exhibition hall, LASER triggering is more precise than a PIR sensor. The laser is pointed at an LDR (Cds cell) and when the beam is broken, the electro-magnetic relay activates and stays activated as long as the beam is broken. The laser card/head module can be located at probably greater than 20 feet from the LDR and will work in fairly bright ambient light. Compact LASER card / HEAD (5VDC) modules are now widely available; thanks to Sparkfun, DX and eBay!
Note: The explanations for the circuit presented here cannot hope to cover every situation on every layout. For this reason be prepared to do some experimenting to get the results you want. The true inspiration for this project was derived from a future advanced project the designer intend to build in near future!
Subscribe to:
Posts (Atom)