Archive for April, 2013


We used a Microchip PIC24FJ64GA002 28pin SOIC microcontroller (IC1) in this project. The power pins have 0.1uF bypass capacitors to ground (C1,2). The 2.5volt internal regulator requires a 10uF tantalum capacitor (C20). The chip is programmed through a five pin header (ICSP). A 2K pull-up resistor (R1) is required for the MCLR function on pin 1. Read more about this chip in our PIC24F introduction.

An inexpensive MAX3232CSE RS232 transceiver (IC2) interfaces the PIC to a PC serial port. This chip replaces the expensive through-hole MAX3223EEPP+ used in the previous version of the Bus Pirate. The serial interface will work with a USB->serial adapter.


I know how to build a big digit but how the heck did you control that much current with such few ICs and such few control lines? Ahh, I’m glad you asked. Here are some fun pointers about how to control large numbers of seven segments LEDs.

Now if you’re not a hardware person, get ready for some technical jargon.

A PIC 16F877A has quite a few I/O pins (around 32). But if you start doing the math, you see just how limited we are.

6 digits * 7 segments = 42 channels

Sure, we could find a microcontroller that has 42 available I/O pins, but there’s got to be a better way! This is actually an age-old problem. Turns out there are chips out there! The 74HC4511 is the magical chip that takes a Binary-Coded-Decimal (BCD) input and outputs the correct pins to create that binary number on a seven-segment display.

Okay, so we go from seven lines down to four, big deal? There is a latch on the 74HC4511. This latch allows us to share the 4-bit bus with all the channels, and then just toggle the latch pin on the digit we need to talk to. Maybe a schematic will help:


You can see four Control lines. This is the BCD bus. There is also six Driver lines. These Driver lines activate the latch on each ‘channel’.

U6 is the 74HC4511. U7 is a ULN2003A. JP1 is the RJ45 jack. Just stick with me a bit longer!

The ULN2003A is a high-current Darlington array. Darling what? This IC has seven channels. Each channel can control up to 500mA. When 1B goes high, current is allowed from the ‘1C’ input to ground.

So when the Num1_f pin goes high, current flows from RAW, through the LED Light Bars in the big digit, into 1C, and then out through GND. This may seem a little bit odd at first. Maybe this will help:

Okay so now for the chain of events.

The PIC parses out the GPS time from NMEA sentences coming out of the Lassen iQ receiver at 4800bps.
The PIC decides that the time is 6:45:33, so a ‘3’ needs to be displayed on channel 1.
A binary three (0b.0011) is put onto the bus.
Driver1 is pulled low, then driven high. Because all other driver lines are kept high, the other drivers ignore this bus data.
The 74HC4511 for channel 1 sees this binary number, notices that it’s been latched, and then outputs the correct segments to light up a three. Segments A, B, C, D, and G go high.
The ULN2003A detects these lines (Num1_a, b, c, d and g), goes high and allows current to sink through 3C, 4C, 5C, 6C, and 2C.
The LED Light Bars inside the digit (located farthest to the right) light up the correct bars to display a three.

It’s really pretty slick. The system is completely scalable. To add another seven-segment display requires only one additional I/O pin for another DriverX line. The PIC 16F877A could control as many as 28 digits. Have you ever seen 28 digits next to each other? How about 18″ wide and on a wall? That’s really huge.

That’s it! Sorry the tutorial ended up being so long. This project took about two weeks of cutting and figuring out how to best create the digits. The firmware took about an hour and hardware layout took about three (we’ve used most of the basic components before). Let us know what you think.

OPA2277UA is a sub package of OPA2277,If you need see the description,please click OPA2277 .If you need OPA2277UA’s datasheet,please download it from below.  

Series: –
Manufacturer: Texas Instruments
Amplifier Type: General Purpose
Type: –
Number of Circuits: 2
Max Output Power x Channels @ Load: –
Output Type: –
Voltage – Supply: –
Features: –
-3db Bandwidth: –
Operating Temperature: -40°C ~ 85°C
Mounting Type: Surface Mount
Package / Case: 8-SOIC (0.154″, 3.90mm Width)
Supplier Device Package: 8-SOIC
Gain Bandwidth Product: 1MHz
Packaging: TubeAlternate Packaging
Voltage – Supply, Single/Dual (±): 4 V ~ 36 V, ±2 V ~ 18 V
Slew Rate: 0.8 V/µs
Current – Output / Channel: 35mA
Current – Input Bias: 500pA
Voltage – Input Offset: 20µV
Current – Supply: 790µA

HI, I’m working on a circuit that uses two 555 timers. At the electronics store, they gave me a handful of 555 chips, I only noticed the difference when I finished my circuit: the R1 value is shorted out, my R2 value is 150 Ohms, and the electrolytic cap is 10 uF. (see the schematic with R3, D1 and D2 replaced with a single piezo speaker).

ImageThe thing is, if I put in the 555 chip marked LM555CN, it appears to be ‘always on’. But, if I use the Texas Instruments chip marked NE555P, the circuit works as expected, that is, it generates an annoying screech on a piezo speaker. What is the difference between these two seemingly identical chips? Is it a quirk in the TI chip that it works when R1 is just shorted out? And lastly, is there a way around this problem other than me sitting at the electronics store picking out the TI chips?

Also note – the piezo speaker doesn’t have any oscillator in it, that is, when you apply raw power to it, it just clicks once and sits there, that’s why I have the second 555 timer, and it’s not an option to change out the speakers at this point.

MAX232CSE line driver/receiver

The MAX232CSE line driver/receiver is intended for all EIA/TIA-232E and V28/V24 communications interfaces, particularly applications where ±12V is not available. These parts are especially useful in battery-powered systems, since their low-power shutdown mode reduces power dissipation to less than 5μW. The MAX232CSE uses no external components and are recommended for applications where printed circuit board space is critical.
MAX232CSE absolute maximum ratings: (1)Supply Voltage (VCC): -0.3V to +6V; (2)V+: (VCC – 0.3V) to +14V; (3)V: +0.3V to +14V; (4)Input Voltages; (5)TIN: -0.3V to (VCC – 0.3V); (6)RIN (Except MAX220): ±30V; (7)RIN (MAX220): ±25V; (8)TOUT (Except MAX220): ±15V; (9)TOUT (MAX220): ±13.2V; (10)Output Voltages; (11)TOUT: ±15V; (12)ROUT: -0.3V to (VCC + 0.3V); (13)Driver/Receiver Output Short Circuited to GND: Continuous; (14)Storage Temperature Range: -65℃ to +160℃; (15)Lead Temperature (soldering, 10s): +300℃.
MAX232CSE features: (1)For Low-Voltage, Integrated ESD Applications MAX3222E/MAX3232E/MAX3237E/MAX3241E/MAX3246E: +3.0V to +5.5V, Low-Power, Up to 1Mbps, True RS-232 Transceivers Using Four 0.1μF External Capacitors; (2)For Low-Cost Applications MAX221E: ±15kV ESD-Protected, +5V, 1μA, Single RS-232 Transceiver with AutoShutdown.

This is one application circuit of LM324N,If you need more circuits,please download LM324N’s pdf datasheet.


Standard Arduino boards use FTDI’s FT232RL to interface with computer’s USB port. Since FT232R is just a USB to UART converter, it is possible to build an Arduino compatible USB interface using other USB to UART chips.

One such alternative is Silicon Labs‘ CP2102. I particularly like this USB to UART transceiver because very few extra components are required for it to work. As an added benefit, this chip is also cheaper than the ubiquitous FT232R. Of course, there are also a few trade offs. First of all, CP2102 does not provide a bit bang interface (the X3 pins on the Arduino board on the other hand can be used for bit bang operations, but the X3 pins are not soldered with header pins by default and thus for the average users no bit bang support should not be an issue). Secondly, CP2102 does not have the configurable general purpose I/O pins to drive the TX/RX LEDs. There are other minor differences as well (for instance the maximum transmission speed for FT232R is 3Mbps while CP2102 tops at 1Mbps. Both chips are more than adequate for the maximum 115,200 baud rate supported in Arduino environment), but they do not affect the performance in our application of interfacing with Arduino.

Here is the schematics for using CP2102 with ATmega328p (the circuit below is compatible with the Arduino IDE):
if you compare the above circuit with the official Arduino Duemilanove board you will see that the interfacing portions (RXD, TXD and TDR) are virtually identical.

Since CP2102 comes only in QFN-28 packaging, some people might find it slightly harder to deal with than TSSOP. Using the prototyping method I mentioned a few months back though, it is fairly straightforward to use the chip on a standard perf-board nevertheless. No special tools or stencils are needed. The following picture shows the USB to UART converter portion of the Arduino, which can be used to replace the FT232 break out board. I chose to break out the converter so that I could use it in other projects that require serial connections.

If you are running Linux, you do not need any third-party device drivers. All recent Linux kernels support CP210x via the usbserial kernel module. Once connected, you should be able to use dmesg and see these messages:

    [ 8333.572512] usb 8-2: new full speed USB device using uhci_hcd and address 3
    [ 8333.744748] usb 8-2: configuration #1 chosen from 1 choice
    [ 8333.785114] usbcore: registered new interface driver usbserial
    [ 8333.785161] USB Serial support registered for generic
    [ 8333.785221] usbcore: registered new interface driver usbserial_generic
    [ 8333.785222] usbserial: USB Serial Driver core
    [ 8333.792419] USB Serial support registered for cp210x
    [ 8333.792460] cp210x 8-2:1.0: cp210x converter detected
    [ 8333.920011] usb 8-2: reset full speed USB device using uhci_hcd and address 3
    [ 8334.076745] usb 8-2: cp210x converter now attached to ttyUSB0
    [ 8334.076760] usbcore: registered new interface driver cp210x
    [ 8334.076762] cp210x: v0.09:Silicon Labs CP210x RS232 serial adaptor driver

If you are running Windows, you will need to install the royalty-free driver from Silicon Labs directly.

Under Linux, CP210x shows up as a a ttyUSB device. You can use the Arduino IDE to program your ATmega328p’s just as you would with an official Arduino. Serial communication via the serial monitor works the same way as well. Like the official Arduino, the above circuit also automatically resets whenever you upload a program.

The following picture shows this Arduino compatible circuit in action.


An ATmega64 is used for the controller. The MCU has an external memory interface, it benefits the applications that require a certain memory. The waveform data is loaded from a memory card and stored it to the wavetable located in the 256 Kbit external memory. The wavetable, 16 bit word, 8192 samples and two channels, fits to the entire memory. The system clock is supplied from DAC. The frequency exceeds maximun allowable working frequency of the MCU, however it works with no problem.


The figure shows the MAX773 connected to provide 100-V output at 10 mA, with 24-V to 28-V input. Figure shows the calculations for selecting the RSHUNT vaLue. RSHUNT should be selected so that ISHUNT is greater than 1 mA, but less than 20 mA. If the calculated shunt regulator current exceeds 20 mA, or if the shunt current exceeds 5 mA, and less shunt-regulator current is desired, use the circuit of Fig. This provides increased drive and reduced shunt current when driving N-FETs with large gate capacitances. Use an ISHUNT of 3 mA. This provides adequate biasing current for the circuit, although higher shunt currents can be used. Notice that the shunt regulator is not disabled in the shutdown mode, and continues to draw the calculated shunt current. To prevent the shunt regulator from drawing current in the shutdown mode, place a switch in series with the shunt resistor.See Fig. for component suppliers.


MAX773 MUR115 SI9420DY 2N2222A 2N2907A

Dual or bridge power audio amplifier portable radio cassette players can be built using the TEA2025B/D. This monolithic integration circuit has features such as supply voltage down to 3V, thermal protection, high channel separation, low switch ON/OFF noise and etc.
Above diagram shows the TEA2025 stereo application (powerdip) circuit schematic. The components that may be used for building such this circuit – according to the TEA2025 datasheet, are described as follows:

1. C1,C2 0.22uF
2. C3 100uF
3. C4,C5 100uF
4. C6,C7 470uF
5. C8,C9 0.15uF
6. C10,C11 100uF.