Can I connect a piface control and display board as well as a DS18B20 thermometer to my Pi? They both seem to need GPIO pin4
Can I connect a piface control and display board as well as a DS18B20 thermometer to my Pi? They both seem to need GPIO pin4
I assume you mean GPIO 4 rather than GPIO P1 Header physical pin 4 (which is a second 5V supply).
My documents do not show any alternative functions for GPIO 4 (alternative function examples would be I2C or serial ports).
I checked the piface document,
http://www.piface.org.uk/assets/docs/PiFace-Relay-Plus_getting-started.pdf
and it appears to use I2C to drive expansion ports and the add-on PiFace Relay+ has 4 general purpose input output (GPIO) pins in addition to LEDs and relay drivers all accessed by I2C.
The product allows for several boards to be stacked by using different I2C addresses. This should mean that the GPIO 4 pin is not used by piface and is accessible on the pins provided by piface for stacking additional boards.
If piface blocks access to GPIO4 in some way, change the software for the thermometer to address one of the piface general purpose input output (GPIO) pins.
Thank you for your response.
Yes, I do mean GPIO4, not pin 4
It's the Piface control and display board I am wanting to connect, not the Piface relay board.
I have tried to change the GPIO which the thermometer uses in the config file (dtoverlay=w1-gpio,gpiopin=6) but to date not successfully.
Hi Joe,
I misunderstood the available documentation and assumed that Control and Display was an alternative plug-in module to piface.
The display is almost certainly using I2C. It is a standard display unit and probably driven by an equivalent to one of these I2C interfaces. ,
IIC/I2C/TWI/SPI Serial Interface Board Module for Arduino 1602 LCD Display 5V | eBay
Don't use these with the Raspberry Pi. They are supplied without the components required to boost the 3.3V of the I2C connections to 5v to drive the display.
I suspect that the IR detector, buttons and navigation of the Control and Display use I2C expansion as well, but there is practically no information I can find about the electronics involved and there is no confirmation that only I2C is used to communicate between the Pi and the piface. I notice that Control and Display 2 has two address lines, but there is nothing to say what these are for.
The GPIO pins are not available when the piface unit is installed and the unit is not stackable. Other than soldering wires on to the piface GPIO pads, there is no way to connect the temperature module.
There are lots of devices available for low prices that interface with temperature, humidity, displays, photo detectors, et al and they are all driven from Arduinos. Many can be driven from the Raspberry Pi GPIO, but have reduced performance at 3.3v.
Here's one I found earlier:
1PC DS18B20 Digital Temperature Sensor temperature Module for Arduino BH | eBay
This is a potential solution to your problem that I am looking at for my own use. It makes the full performance of Arduino GPIO connected modules available to the Raspberry Pi without needing Raspberry Pi GPIO connections.
Digispark Kickstarter Micro General USB Development Board For Arduino ATTINY85 W | eBay
This one plugs straight into a full USB port, but others use a USB cable. You can program the ATtiny85 using the program 'arduino' on the Raspberry Pi. Shields (programs) are available to interface with practically anything. Bear in mind that the ATtiny85 has a maximum of six GPIO pins and only four when using the USB port to interface with the Pi. However, those four are enough for I2C devices and 'Dallas one-wire' devices like the DS18B20. The data from the 'tinyArduino' should be accessible from Python within the Raspberry Pi in the same way as with any computer interfacing with Arduino devices. Please bear in mind that these are not standard Arduino boards and that some configuration of the arduino program in the Pi is required. They may require Digispark Python modules for USB communication rather than the standard serial Arduino python modules.
If you want a Swiss Army Knife solution, then this:
MINI USB Nano V3.0 ATmega328P CH340G 5V 16M Micro-controller board Arduino MO | eBay
is easier to program and use because it is a mainstream Arduino device. It has loads of GPIO pins, but is much bulkier (as big as some USB flash drives!). It could be used for multiple detectors, controls and an I2C display. It will work in conjunction with the piface and within the same Python program by loading the required Python library modules.
DON'T CONNECT ARDUINO GPIO PINS TO RASPBERRY PI GPIO PINS.
The Arduino usually uses 5V. The Atmel controller chips in Arduino boards will run at 3.3V rather than 5V, which makes them Raspberry Pi GPIO friendly, but at reduced clock speeds.
Any Arduino board powered from the USB port will be running at 5V.
Please don't take the, above, links as recommendations. There are a huge range of manufacturers and suppliers of all of these devices.
Hi Joe,
I misunderstood the available documentation and assumed that Control and Display was an alternative plug-in module to piface.
The display is almost certainly using I2C. It is a standard display unit and probably driven by an equivalent to one of these I2C interfaces. ,
IIC/I2C/TWI/SPI Serial Interface Board Module for Arduino 1602 LCD Display 5V | eBay
Don't use these with the Raspberry Pi. They are supplied without the components required to boost the 3.3V of the I2C connections to 5v to drive the display.
I suspect that the IR detector, buttons and navigation of the Control and Display use I2C expansion as well, but there is practically no information I can find about the electronics involved and there is no confirmation that only I2C is used to communicate between the Pi and the piface. I notice that Control and Display 2 has two address lines, but there is nothing to say what these are for.
The GPIO pins are not available when the piface unit is installed and the unit is not stackable. Other than soldering wires on to the piface GPIO pads, there is no way to connect the temperature module.
There are lots of devices available for low prices that interface with temperature, humidity, displays, photo detectors, et al and they are all driven from Arduinos. Many can be driven from the Raspberry Pi GPIO, but have reduced performance at 3.3v.
Here's one I found earlier:
1PC DS18B20 Digital Temperature Sensor temperature Module for Arduino BH | eBay
This is a potential solution to your problem that I am looking at for my own use. It makes the full performance of Arduino GPIO connected modules available to the Raspberry Pi without needing Raspberry Pi GPIO connections.
Digispark Kickstarter Micro General USB Development Board For Arduino ATTINY85 W | eBay
This one plugs straight into a full USB port, but others use a USB cable. You can program the ATtiny85 using the program 'arduino' on the Raspberry Pi. Shields (programs) are available to interface with practically anything. Bear in mind that the ATtiny85 has a maximum of six GPIO pins and only four when using the USB port to interface with the Pi. However, those four are enough for I2C devices and 'Dallas one-wire' devices like the DS18B20. The data from the 'tinyArduino' should be accessible from Python within the Raspberry Pi in the same way as with any computer interfacing with Arduino devices. Please bear in mind that these are not standard Arduino boards and that some configuration of the arduino program in the Pi is required. They may require Digispark Python modules for USB communication rather than the standard serial Arduino python modules.
If you want a Swiss Army Knife solution, then this:
MINI USB Nano V3.0 ATmega328P CH340G 5V 16M Micro-controller board Arduino MO | eBay
is easier to program and use because it is a mainstream Arduino device. It has loads of GPIO pins, but is much bulkier (as big as some USB flash drives!). It could be used for multiple detectors, controls and an I2C display. It will work in conjunction with the piface and within the same Python program by loading the required Python library modules.
DON'T CONNECT ARDUINO GPIO PINS TO RASPBERRY PI GPIO PINS.
The Arduino usually uses 5V. The Atmel controller chips in Arduino boards will run at 3.3V rather than 5V, which makes them Raspberry Pi GPIO friendly, but at reduced clock speeds.
Any Arduino board powered from the USB port will be running at 5V.
Please don't take the, above, links as recommendations. There are a huge range of manufacturers and suppliers of all of these devices.