Hot answers tagged

24

If you think about what is happening you have a very hostile environment for electronics (moisture - sometimes large amounts, soil PH and electrical current induced electrolysis) The Hookup Guide for the SparkFun Soil Moisture Sensor includes the following: One commonly known issue with soil moisture senors is their short lifespan when exposed to a ...


23

Yes, this is normal for a DC drive configuration. You're effectively setting up an electrolysis experiment where the copper atoms on the positive electrode are being ionised, transported via the soil's water content across to the negative electrode where they are being deposited and returning to being copper atoms. This explains why the negative electrode ...


16

The short answer is yes. The pull up resistor ensures a valid logic level when the pins are switching from input to output, you won't melt anything but it may not function correctly. so you should add a 4.7K - 10KΩ resistor between the Data pin and the VCC pin. This tutorial froim Adafruit has a schematic and some info on logging your data.


16

I had the same problem with Pi B+ and solved it by adding a line to /boot/config.txt. Add the following to the bottom: dtoverlay=w1-gpio,gpiopin=4 found the solution at: www.raspberrypi-spy.co.uk


12

The HC-SR04 can only be run with 5v(scroll down to specs). However, you can easily fix your problem if you have a breadboard. Assign one row as the 5v "rail" and attach as many sensors as needed. EDIT: How to use breadboard. Basically, the two long rows on the each side of the board can be used as rails for power supply. Just make sure you keep your 5v rail ...


10

Water meter pulse outputs are typically open drain. This means they are pulled to ground to signal a pulse and float high to an external voltage. As a quick check change the following two lines. GPIO.setup(FLOW_SENSOR, GPIO.IN, pull_up_down = GPIO.PUD_DOWN) to GPIO.setup(FLOW_SENSOR, GPIO.IN, pull_up_down = GPIO.PUD_UP) and GPIO.add_event_detect(...


9

There are a few things in addition to the pi itself that are required, and if you do not already have them, you would want a kit that includes them. Generally these are appropriately priced, but depending on what is available to you it may also be easier to buy them separately: Micro SD card. You can get these with an operating system pre-burned, but do ...


8

First, lets check the characteristics of the MCP3008 again: Single supply operation: V_dd = 2.7V to 5.5V All Inputs and Outputs < V_dd + 0.6V (this should include V_ref) 200 ksps max. sampling rate at V_dd = 5V 75 ksps max. sampling rate at V_dd = 2.7V So powering the MCP3008 with the Pi's 3.3V it would be out of spec to apply 5V to V_ref. It is also ...


8

The following code will scale to multiple sensors. If you want all triggers to be at exactly the same time then connect the same GPIO to each of the triggers. Use that GPIO for the last sonar's trigger. Give all the other sonars the trigger None. It should work unless you have a silly number of sensors on the same trigger. #!/usr/bin/env python # srte....


8

Yes, it's normal. One electrode (the anode) will oxidise. That said, it shouldn't happen so quickly. I guess you have the sensor powered constantly. That means you always enable corrosion. What you can do it so make sure there is current running to the sensor only when you take a reading from it. This will pause corrosion in between the measurements, and ...


8

You could have the Raspberry Pi behave like a WiFi access point (using hostapd and dnsmasq, introductory documentation from the Foundation is here) with a static IP and then have the ESP8266 join the hosted network and send the data to the Pi's IP address. The advantages are that you can also connect to the Pi from a PC or mobile device if you need to and it'...


7

It seems necessary for reliable readings. I started my project without pull up resistor and the humidity measurement started dropping down. It may start correctly but deterioate later. Since I was using pigpio module, I enabled internal pull up resistor as below: pi.set_pull_up_down(gpio, pigpio.PUD_ON) The gpio refers to your data pin.


7

An LM35 is not a 1-wire sensor. Its output is an analogue voltage proportional to the temperature. The Pi has no analogue inputs or outputs. You will need to use an ADC to read the sensor.


7

For the analog sensors such as the photoresister and the hall effect sensor (and most likely others as suggested in the comments), you can supply them with 3.3V and still have them work correctly. They should act as a simple variable resistance in the presence of an external influence. Hopefully the following image will illustrate for a photoresister; (...


6

Logic levels are detected by input pins. The difference between an input pin and an output pin is that an output pin has a specific voltage applied to it. An input pin does not, and when not connected to anything, it is in a high impedance, aka. a "floating", state which essentially means the voltage fluctuates randomly. This is the third state in 3-state ...


6

lrwxrwxrwx 1 root root 0 2016-02-19 22:24 thermal_zone0 -> ../../devices/virtual/thermal/thermal_zone0 lrwxrwxrwx 1 root root 0 2016-02-25 17:31 /sys/class/thermal/thermal_zone0/subsystem/thermal_zone0 -> ../../devices/virtual/thermal/thermal_zone0


6

Connecting the DS18B20 to the Ethernet port would either not work or the effort to make it work (even if it was possible) would be excessive for someone starting out with a Raspberry Pi. As you state, cut off the RJ45 and connect the sensor with the black wire to ground, the red wire to the 3V3 pin and the blue or yellow (some are blue and some are yellow) ...


6

You need a TDS (Total Dissolved Solids) meter (aka EC/PPM meter) for measuring the nutrient content in your water, and you should also have a pH meter for maintaining a proper alkaline/acid level. I did a quick search, and here's a link for each of the above meters, and how to integrate them to the RPi. They are brand-specific, so you'll have to do your own ...


6

Linear for the win! y = (slope * x) + intercept is the classic linear formula, in your case, x=sensor, y=bars, so the formula becomes bars = (slope * sensor) + intercept ... and you have two data points of this formula, sensor@750, and sensor@3750 equation 1: 0 = (slope * 750) + intercept equation 2: 250 = (slope * 3750) + intercept ... lets rearrange ...


6

Short answer YES. The GPS module uses Serial = Yes you can do that with a Raspberry Pi https://www.raspberrypi.org/documentation/configuration/uart.md The RFID module uses SPI = Yes you can do that with a Raspberry Pi https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md And for the question about "How", there are a ton of ...


6

I2C is a bus system and allows you to connect multiple sensors to the same pins. The master system (the Pi) lets the sensors know who should respond by placing that sensor's address on the bus. In your case you can connect all the sensors I2C SDA pins to the Pi's SDA pin and all the sensors I2C SCL pins to the Pi's SCL pin. Note you can also connect all the ...


5

I use a 10K pull-up from pin 2 (DATA) to pin 1 (VCC), and always use 3V3 to pin 1. On 5V the sensor heats up a few degrees celsius. Also, pay attention to nearby heatsources (laptop, your breath, power supplies) when testing/calibrating the sensor.


5

There is BrickPi+ helps you connect LEGO sensors and motors to the Raspberry Pi and replaces the MINDSTORMS Brick. http://www.dexterindustries.com/brickpi/


5

I found this Raspberry Pi water level meter - should answer the question is there water or not , but also a level indicator , like a measuring cup. 12" eTape Liquid Level Sensor https://www.adafruit.com/product/464


5

The link you give is to the soil sensor which is not an Arduino. Did you mean to ask whether you could use the soil sensor with the Pi? Yes you can but to get analogue results you'd need to add an ADC (I2C or SPI based ADCs are commonly available and will work with the Pi.) If you did mean to link to an Arduino then yes you can use an Arduino with the Pi. ...


5

From the given project description I'll jump for: Yes, it seems reasonable that a RaspberryPi can handle this project. Accelerometers and gyroscopes can be connected via the GPIO pins and the computational power is certainly sufficient to process speech - especially for something as limited as in this task "click". Instead of repeating content here I'll give ...


5

The sensor datasheet will tell you the permitted input voltage range. Although you will get results by powering the HC-SR04 from 3V3 the results will not be reliable. If you want accurate readings you need to power from 5V. See this post. 3V3 5V There is no reason not to power more than one device from a 5V pin. If you have a breadboard just connect ...


5

The DS18B20 is a digital sensor using the Dallas 1-wire protocol. If you just want to get figures to play with you could, as you say, connect an ADC and twiddle a pot. However a simpler, and perhaps more useful, source of data is the SOC (System on a Chip) temperature. The following C snippet will print the SOC temperature. void get_SOC_temp() { FILE *...


5

You could: utilize a couple of USB to serial adapters like this one. you could use a microcontroller that has multiple serial ports (e.g. arduino mega) to gather the data and transfer it to the Pi, or you could get a serial to I2c or spi adapter that connects to the GPIO pins. More info can be found in this thread.


5

You can repeat this schematic, assigning a GPIO port for each lane. The HAL sensor will require a magnet on the car, however, on my testing the magnetic field from the engine was enough to trigger the circuit, as a bonus, you will have a visual feedback. The OH090U have an internal circuitry to avoid false and multiple switching when the magnetic ...


Only top voted, non community-wiki answers of a minimum length are eligible