i have a raspberry pi connected with two ds18b20 temperature sensor.
-sensor1 is fixed on the outside of my garage (distance 20m from raspberry pi)
-sensor2 is just connected in a breadboard near the raspberry pi.
Everything is working well.
I decided to add sensor3 located outside and from 20m from the raspberry pi.
Now when i type :
cd /sys/bus/w1/devices
if find this:
c0-40a000061005 c2-246056869800 c2-247056869000 d0-008000001000 w1_bus_master1
instead of :
28-.....
28-.....
28-.....
each sensor ref should be start with 28-.....
what is happening with my sensors?
If unplugged the sensor1, then everything is well
if i unplug the sensor3 and let only sensor1 and sensor2 everything is well.
Which modification do we have to do when sensor are located far from the raspberry pi?
thank you
That means that the 3rd sensor doesn't have a 4.7kOhm or 10kOhm resistor between VCC and the OUT wire (black/red one if you have 4wire DS18B20).
Just connect that resistor and it will work , I had the same problem . I spent weeks to find such an easy solution. And if you get the same code after you connected the resistor , that means you didn't connected it properly.Hope will help you
Related
I use this library over SPI to control some RGB Leds.
When using the Raspberry Pi 3, I have to set cpu_freq=250 on /boot/config, as far as I've understood, it has something to do with the bluetooth device running on the default serial port.
Now, using the Raspberry Pi Zero W I'm algo having to set that flag.
My questions is, what is the correct cpu clock for both Pi 3 and Zero W, and am I slowing my Pi performance by setting this flag?
Does anyone know of a good alternative to the DHT22 for temperature and humidity sensing on the Raspberry Pi?
The DHT22 works great, but the wire length can only be a few feet long before you start running into problems. I want to connect a temp/humidity sensor at about 15 feet away.
You can use some of 1-wire sensors, for example temperature>DS18B20 humidity>DS2438 or some else.
You can read more about 1-wire specification here
I am working on the new Raspberry Pi 3 B+ board in a bare metal environment (32-bit). I have a working USB driver for the older Pi 1 boards. From what I understand, the Pi 1 and the Pi 3 B+ have the same USB host controller (Synopsis DesignWare 2.0 USB Host Controller; or dwc for short), yet the USB driver that works on the Pi 1 does not work for me on the Pi 3 B+ (or the Pi 3 B either).
After going through some debugging messages, I found that the problem is that when the DWC is enumerating the devices, it will try to read the device descriptor of, what I am guessing is, the on-board USB hub/ethernet device (LAN7515), but it will return a transfer error, and then therefore is unable to enumerate the device.
My question is why does this happen? If the Pi 1 and the Pi 3 have the same host controller then it should, in theory, at least be able to properly enumerate a device.
If someone can point me in the right direction as to why this happens, it would be greatly appreciated.
Thank you in advance.
The Pi3 is having an alignment issue because some of the USB structures are not natively aligned and they are packed. It generally requires inserting some pack and alignment attributes "attribute((packed, aligned(1)))" on some of the structures that are unaligned.
The rule goes
uint16_t* pointers must be reading/writing align 2 addresses
uint32_t* pointers must be reading/writing align 4 addresses
So a struct like this is misaligned.
struct BadStruct __attribute__((__packed__)){
uint8_t a;
uint16_t b;
};
I am working on a robotic project and encountering difficulties in controlling two Dc motors. Anyway, I am using raspberry Pi 3 and Dual Channel 10A DC Motor Driver to drive two DC motors (Dual shaft self-locking DC worm gear motor). I am using the driver to drive bigger motor capacity and make them work as a servo motor. I managed to send signal and run the motors but I can't stop them running. Please any help, I would be thankful.
Import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12,GPIO.OUT)
pwm=GPIO.PWM(12,100)
pwm.start(20)
time.sleep(1)
pwm.stop()
In fact, I have little knowledge on controlling the motors.. if you can guide me or show me good reference I will also be grateful .
I'm trying to talk via I2C to the gyro sensor MPU6050 which sits on a GY 521 board. But i can't get the device being detect.
I tested another i2c device (EEPROM) and got the device address detected. So i guess it has to be a hardware problem.
As far as i could find out:
RPi has a 1.8k pullup resistor on SDA and SLC already on board
my GY 521 also has also a pullup resistor (2.2k) on each line on board
Could the resistors be the problem? A good resistor value in sum would be around 5k on each line?
(The wiring should be ok, there are a lot of instructions around the net and i've checked it multiple times. I use 5v on the GY521 since it has a voltage converter)
Any help appreciated!
The problem was bad soldering.
For the record:
Using the RPi pullups in combination with the breakout board pullups works for me.