Other
Well, here’s how: The 12V solenoid controlled fluid valve. Simply connect a fluid source to the fluid input then once the 12Vdc is applied the fluid will start to exit until the 12Vdc signal is removed.
If your signal is 5V , then you can use relay 5Vdc to control the 12Vdc from your microcontroller.
Specifications
- Voltage: 12V DC
- Rated Power: 5W
- Pressure: Max 8 Bar
- Operation model: Normally closed
- Port Size: 1/2''
- Fluid temperature: 0-100
- Usage: water and low viscosity fluids
- Flow characteristics: 0.2Bar>1.5L/min 1Bar>7L/min 3Bar>12L/min 8Bar>20L/min;
What's in the box?
1 x Water Solenoid Valve
Please note:
The actual valve size in the unit is smaller than the port size as you will find with most taps.
The 1/2" 2 way, 90 Degree, 2 port 12 V DC NPT Normally Closed Electric Solenoid Valve converts electrical signals to pneumatic functions as part of a larger system that allows users to interlock, isolate, and connect individual units of a larger operation.
DC 12V Electric Solenoid Valve 1/2 Inch Hose Magnetic Water Air Inlet Flow Switch
Specification:
Material | Metal Plastic |
Color | As per picture |
Voltage | DC12V |
Rated Power | 5W |
Pressure | 0.02- 0.8Mpa |
Interface Modes | 1/2'' Hose |
Working Time | 5 hours at once (Max) |
Insulation Class | E |
Fluid Temperature | 0-90°C |
Size | L*W*H/75*60*45mm/2.95*2.36*1.77'' |
Inner diameter | 14mm/0.55'' |
External diameter of thread | 20mm/0.78'' |
1 x Electric Solenoid Valve
Please note:
The actual valve size in the unit is smaller than the port size as you will find with most taps.
The Adafruit 4-Channel I2C 12-Bit ADC is a high-precision ADC and features the ADS1015 chip, which provides 12-bit precision at 3300 samples/second over I2C. The chip can be configured as 4 single-ended input channels, or two differential channels. As a nice bonus, it even includes a programmable gain amplifier,with up to x16, to help boost smaller single/differential signals to the full range. We like this ADC because it can run from 2V to 5V power/logic, can measure a large range of signals and its super easy to use. It is a great general purpose 12 bit converter.
- Wide Supply Range: 2.0V to 5.5V
- Low Current Consumption: Continuous Mode: Only 150µA Single-Shot Mode: Auto Shut-Down
- Programmable Data Rate: 128SPS to 3.3kSPS
- Internal Low-Drift Voltage Reference
- Internal Oscillator
- Internal PGA
- I2C Interface: Pin-Selectable Addresses
- Can run from 2V to 5V power/logic
- Measures a large range of signals and is super easy to use.
- 12-bit precision at 3300 samples/second over I2C.
- Configurable as 4 single-ended input channels, or two differential channels.
- Includes a programmable gain amplifier, up to x16, to help boost up smaller single/differential signals to the full range.
- Breakout Board equipped with ferrites to keep the AVDD and AGND quiet
What's in the box?
1 x Adafruit 12-Bit ADC
Tutorials
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
What's in the box?
1 x 10-bit ADC 8 Channel IC
Resources
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.
root@raspberrypi:/# lsmodModule 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:
root@raspberrypi:/# 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:
root@raspberrypi:/# modprobe spidev
The command should just complete without returning an error. Validate the list of modules:
root@raspberrypi:/# 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.
root@raspberrypi:/# cd /home root@raspberrypi:/home# git clone git://github.com/doceme/py-spidev root@raspberrypi:/home# cd py-spidev/ root@raspberrypi:/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.
root@raspberrypi:/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 adcoutwhile True: for adcInput in range(0,8): print "ADC(", adcInput,")=", readadc(adcInput) time.sleep(1)
To execute the script
root@raspberrypi:/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
Specifications
- Name: Aviation Connector Plug
- Item: GX16-8 Pin Male & Female Connector
- Model: GX16-8
- Rated current: 5A
- Interface type: AC / DC
- Material: Zinc alloy
- Shape: Round
- Diameter: 16mm
- Pin Quantity: 8
What's in the box?
1 x GX16-8 Pin Male & Female Connector
Specifications
- Model: PJ-392
- Size(LxWxH): Approx. 22.5mmx 8mm x 8mm/ 0.89x3.15x3.15"
What's in the box?
1 x Stereo Headphone Audio Video Jack Socket
DESCRIPTION
With a slip ring assembly, your electronics can now twist and turn safely. Add wheel encoders, 360 degree sensors, rotating LEDs, rotors and more! We've seen a lot of people DIY slip ring's out of desperation but no longer, simply pick up one of these to solve any rotation needs you have.
Inside the plastic tube is a gold plated slip ring for 6 wires. There are six color coded wire sets made of 26 AWG and no matter how you twist the assembly, they will remain in continuity. Each of the wire sets can carry up to 2A at up to 240VAC or 240VDC. There's a 44mm (1.7") diameter flange with mounting holes to make it easy to attach or you can cut it off with a hacksaw and drill/machine as you wish it seems to just be ABS plastic. Rated to rotate up to 300 RPM (but you can probably go faster if you don't mind a reduced life and/or noise).
Note: Wire colors may vary.
TECHNICAL DETAILS
Rated voltage: 240VAC/240VDC
Rated current: 2 Amp
6 x 6" long 26 AWG wires
What's in the box
1 x Slip Ring with Flange - 22mm Diameter-6 Wires
Solenoid valves are efficient and durable providing a cost effective and reliable method of controlling water flow in a wide range of uses; from irrigation, where they are suitable for watering large areas such as sports grounds, municipal gardens, agricultural and small gardens, to applications in water-saving devices, water treatment and general industry.
Specifications
- Material: PP
- Voltage: about 12V DC
- Rated power: about 5W
- Operation model: normally closed (N/C)
- Pressure: about 0.02 - 0.8Mpa
- Port size: about G3/4
- Fluid temperature: about 0-100 degrees Celsius
- Usage: water and low viscosity fluids
- Flow characteristics:
- about 0.02Mpa>2L/min;
- about 0.10Mpa>10L/min;
- about 0.30Mpa>16L/min;
- about 0.80Mpa>28L/min
What's in the box?
1 x Solenoid valve
Please note:
The actual valve size in the unit is smaller than the port size as you will find with most taps.
- 1