IC and Sockets

IC and sockets
Sort By:  
DIP28 ATmega328P-PU MCU IC Chip With Arduino UNO Bootloader (2A4 Arduino IC)
Core version: UNO
XTL: Outside 16MHZ
Working voltage: 5V

Note:

Suitable for Arduino UNO R3 and Arduino 2011 UNO development board.
R55.90  Inc VAT
10-bit ADC (SPI) MCP3008 - 8 Channel ( 3A4 10-bit ADC 8 Channel)

The Raspberry Pi is a great computer but there's just one thing that most hardware hackers will find missing: a few inputs for connecting analog sensors. This is where the MCP3008 chip comes in handy, with eight 10-bit channels accessible over SPI. Thanks to the Raspberry Pi's SPI interfaces and its two 'Chip Select' pins available off of the main GPIO connector, the problem is solved.

Features

  • 10-bit resolution
  • ± 1 LSB max DNL
  • ± 1 LSB max INL
  • 8 input channels
  • Analog inputs programmable as single-ended or pseudo-differential pairs
  • On-chip sample and hold
  • SPI serial interface (modes 0,0 and 1,1)
  • Single supply operation: 2.7V - 5.5V
  • 200 ksps max. sampling rate at VDD=5V
  • 75 ksps max. sampling rate at VDD=2.7V
  • Low power CMOS technology
  • 5 nA typical standby current, 2 µA max.
  • 500 µA max. active current at 5V
  • Industrial temp range: -40°C to +85°C

Applications

  • Sensor Interface
  • Process Control
  • Data Acquisition
  • Battery Operated Systems

How-To

The following sample assumes that you're running the latest official Raspbian distribution, that you're logged in as root and that you haven't yet customized Raspbian to use SPI from a Python script. By default, the kernel module managing SPI communications is not loaded on Raspbian, so let's ensure that the 'spidev' device is available.

[email protected]:/# lsmod
Module                  Size  Used by  
snd_bcm2835            12808  0  
snd_pcm                74834  1 snd_bcm2835  
snd_seq                52536  0  
snd_timer              19698  2 snd_seq,snd_pcm  
snd_seq_device          6300  1 snd_seq  
snd                    52489  5 snd_seq_device,snd_timer,snd_seq,snd_pcm,snd_bcm2835  
snd_page_alloc          4951  1 snd_pcm  

If 'spidev' device is not listed, we need to remove it from the kernel module 'blacklist' so that it's automatically loaded on the next boot:

[email protected]:/# nano /etc/modprobe.d/raspi-blacklist.conf  

Put a hash character in front of the 'blacklist spi-bcm2708' statement and save the file:

#blacklist spi-bcm2708  

then, manually load the SPI device:

[email protected]:/# modprobe spidev  

The command should just complete without returning an error. Validate the list of modules:

[email protected]:/# lsmod  
Module                  Size  Used by  
spi_bcm2708             4401  0  
spidev                  5136  0  
snd_bcm2835            12808  0  
snd_pcm                74834  1 snd_bcm2835  
snd_seq                52536  0  
snd_timer              19698  2 snd_seq,snd_pcm  
snd_seq_device          6300  1 snd_seq  
snd                    52489  5 snd_seq_device,snd_timer,snd_seq,snd_pcm,snd_bcm2835  
snd_page_alloc          4951  1 snd_pcm  

The 'spidev' device should now be available.

Next, install the 'git' package. It will be needed to install other packages from Github.

apt-get install git-core  

Install the 'python-dev' package. It will be needed to compile the 'py-spidev' package.

apt-get install python-dev  

Download and compile the 'py-spidev' package.

[email protected]:/# cd /home  
[email protected]:/home# git clone git://github.com/doceme/py-spidev  
[email protected]:/home# cd py-spidev/  
[email protected]:/home# python setup.py install  

At this point, SPI is available from Python 2.7. Assuming that you have wired the MCP3008 to the Raspberry Pi's SPI bus using CE0 as the 'chip select' pin, you can read all eight analog inputs using the following Python script.

[email protected]:/home# nano adc.py  

Paste the script below in the editor and save it.

import spidev  
import time    
spi = spidev.SpiDev()  
spi.open(0,0)    

# read SPI data from MCP3008 chip, 8 possible adc's (0 thru 7)  
def readadc(adcnum):
          if ((adcnum > 7) or (adcnum < 0)):
                  return -1
          r = spi.xfer2([1,(8+adcnum)<<4,0])
          adcout = ((r[1]&3) << 8) + r[2]
          return adcout

while True:
          for adcInput in range(0,8):
                  print "ADC(", adcInput,")=", readadc(adcInput)
          time.sleep(1)  

To execute the script

[email protected]:/home# python adc.py  

Sample output using a 10K Ohm trimpot connected to the ADC's pin 3 and all other pins pulled down to ground using a 10k resistor.

ADC( 0 )= 0  
ADC( 1 )= 0  
ADC( 2 )= 0  
ADC( 3 )= 507  
ADC( 4 )= 0  
ADC( 5 )= 0  
ADC( 6 )= 0  
ADC( 7 )= 0  

Credits go to Jeremy for his work on the 'py-spidev' Python module which makes working with the MCP3008 straight forward. Alternatively, checkout wiringPi's SPI functions if you prefer using a 'C' API.

Related Tutorials & Samples

R39.90  Inc VAT
NE555P 555 Timer DIP-8 TEXAS (1A5 NE555P Timer IC)
The NE555P are precision timing circuits capable of producing accurate time delays or oscillation. In the time-delay or monostable mode of operation, the timed interval is controlled by a single external resistor and capacitor network. In the a stable mode of operation, the frequency and duty cycle can be controlled independently with two external resistors and a single external capacitor. The threshold and trigger levels normally are two-thirds and one-third, respectively, of VCC. These levels can be altered by use of the control-voltage terminal. When the trigger input falls below the trigger level, the flip-flop is set, and the output goes high. If the trigger input is above the trigger level and the threshold input is above the threshold level, the flip-flop is reset and the output is low.
  • Timing from microseconds to hours
  • A stable or monostable operation
  • Adjustable duty cycle
  • TTL compatible output can sink or source up to 200mA

Applications

Clock & Timing, Consumer Electronics, Aerospace, Defence, Military, Embedded Design & Development

R5.95  Inc VAT
28 Pins IC DIP 2.54mm Wide Integrated Circuit Socket Adaptor (28 pin socket double row)
Specifications:

Color: black
Number of pins: 28 pins (14pins / row x 2 rows)
Pin length: 2.9mm
Pitch: 2.54mm
Row to row distance: 7.62mm
Dimension: 35 x 10 x 8mm (L x W x H)
Contact termination through hole
Contact type dual wipe contact

Package includes:

1 x 28 Pins IC Sockets
R15.03  Inc VAT
2.54mm 8 Pin IC DIP Integrated Circuit Socket (8 pin IC socket)
Specifications:

Color: black
Number of pins: 8 pins
Pin length: 2.9mm
Pitch: 2.54mm
Row to row distance: 7.62mm
Dimension: 10mm x 10mm x 8mm (L x W x H)
Contact termination through hole
Contact type dual wipe contact

Package includes:

1 x 8 Pin IC sockets
R1.90  Inc VAT
16 Pins 2.54mm DIP Straight Plug Double Row Circular Hole IC Socket (16 pin IC socket)
Package includes:

1 x Circular hole 16 pin IC socket
R6.90  Inc VAT
74HC595N DIP-16 8 Bit Shift Register IC (3A4 74HC595N IC Shift Register)
Specifications:

74HC 595N IC
Bits: 8
Pin: 16
Logic family: HC
Logical function: shift register
Output type: 3-State
Propagation delay time: 285ns
Operating supply voltage (Typ): 2.5V / 3.3V / 5V
Operating temperature: -55°C ~ 125°C
Operating supply voltage (Min): 2V
Operating supply voltage (Max): 6V


Integrated circuit with small size and light weight, high reliability for improving the reliability of equipment.

Package includes:

1 x 74HC595N 8 bit shift register IC
Need more pins to control that LED matrix?
R5.04  Inc VAT
Per Page      1 - 7 of 7
  • 1