Simultaneous use of PiFace 2 and SenseHAT on a Raspberry Pi

proposed by Christian, this article has the particularity to simultaneously implement a SenseHAT and a PiFace 2 card normally not used together.

a bit of history…

Christian had already made a case with battery. The goal was to take Photos/Videos offline. But he needed a RJ45 and VNC connection to control remotely with a PC…
He wanted to use the Piface2 to also order my timelapse in local.
But he had a display.

initially, it is the map Piface Control & Display (above) that has been tested. The display works well but the buttons aren’t really good and more card is hardly integrable in a box with the buttons on the side…
Anyway… it’s good for a hack on table!

first of connection trouble too, because the Piface is not apparent from the GPIO benthics. It’s KUBII that comes the solution of the map PiFace SHIM , welded on the Raspberry Pi. It allows to deport the GPIO on the side and plug a tablecloth M/F 40 points.

the SenseHat

is that later that occurred the SenseHAT (after an article of the blog ) giving Christian inclination to use the LED matrix for display.
A small script to learn how to use only one worked perfectly. But when we add the Piface… anything goes!
Indeed, the SenseHAT uses the I2C for sensors, but also the SPI (as the Piface) in order to load its Firmware.

with Christian, we then had multiple (very interesting) exchanges by mail on the compatibility of the SenseHat which uses the I2C and SPI, and which was a problem with the Piface 2… which also uses the SPI.

exchanges have also involved which gives connections to a large number of expansion for the Raspberry Pi. I also asked the question on the Github of the 2 PiFace …  “The official version is:” riding, y’ has nothing to do!

in fact the standard HAT predict that a single card can be used at a time.” You need to use two? No Bowl! It is not expected 🙁

so Christian Dove back into my script.
You can order the HAT with buttons on the entries in the Piface in interruption. The only flaw that persists, is that every action of a button turns on full speed the matrix with the Rainbow of start… for this part

synoptic realization

Synoptique du Timelapse

click to enlarge.

you have above synoptic complete of the timelapse projected by Christian. In the Center the Raspberry Pi 3 equipped with card PiFace 2. On the left the SenseHAT connected by a tablecloth to the GPIO, then the battery to power everything, with a capacity of 10400 mAH.

you could power the PI either by battery or external USB charger. Course in ‘outer’ position, we can recharge at the same time. Christian tried to mount an or diode between the battery and external charger, but even with schotky diodes, the voltage drop is too strong and the Raspberry Pi reports a defect of undernourishment.

to the right we find the card adapter Tindie that allows you to connect the camera via an HDMI cable, the remote PiCam and flash equipped with 4 LED, powered by one of the relays of the PiFace 2.

Les différents composants du timelapse de Christian

in this photo made during tests, mounting components are identified.

installation in the case

Début du montage du timelapse : montage du Raspberry Pi et de l'adaptateur HDMI

Assembly of the Raspberry Pi in the case. Camera connection.

Christian has chosen to integrate its realization in a solid case ( Conrad case 150 x 200 x 110 ref 520454 ). He presents here the stages of its realization.

Mise en place de la batterie et de la carte PiFace pour le timelapse

and set up the card PiFace 2 battery for power editing.

Début de câblage du timelapse

connection of the camera by HDMI cable, wiring to the switches.

Christian has mounted the PiCam in a box he had in stock. The connection is with a HDMI 1.5 m cable (it also works with 2.5 m) via an HDMI adapter

the wiring is completed. It remains to add the water to connect the SenseHat.

Le timelapse prêt à être utilisé. all practically ready to be used. We see the SenseHAT card at the end of the water connected to the PiFace SHIM under the lid.

Face avant du timelapse on the side front of the case, 5 push buttons connected to the entries of the card PiFace 2. Top right the cable HDMI linking the PiCam to the case. The 2mm terminals are here used to power the flash but there would be many other uses…

Face arrière du timelapse on the side rear outputs relay, RESET and switches for the power button.

Le timelapse vu de dessus. On aperçoit la matrice de LED de la SenseHAT view from top of the box over. The SenseHAT is mounted on the hood with the nylon spacers and connected by a M/F 40 Pts tablecloth to the GPIO. The SenseHat holes have been enlarged to 3mm without problem. The USB and the Raspberry Pi network are available on the right side. The matrix of the SenseHAT used for the display appears in a cut of the upper side of the housing.

map PiFace SHIM

map PiFace SHIM before installation

Christian has used a map PiFace SHIM (= the shim, shim shim) planned to extend access to the Raspberry Pi GPIO.

Carte PiFace SHIM avec le connecteur coudé monté once the elbow connector is welded on the SHIM map, this one comes to position itself on the terminals of the GPIO on which we’ll weld them.

Principe d'utilisation de la carte PiFace SHIM then we can normally implement a HAT on the GPIO card. For my project, Christian has connected the map SenseHAT with a flat cable connected through the SHIM Board. Map PiFace 2 has been mounted on the origin of the GPIO pins.

solder cheapskate!

Soudure de la carte SHIM du timelapse : il faut éviter les remontées de soudure sur les broches du GPIO

we have to make very fine welds on the SHIM map avoiding at all costs the lifts of solder on the benthics, otherwise it will become impossible to plug the card PiFace 2. Be so ‘ cheap ‘ on the weld… The worst plan to the braid to desolder to catch your “burrs” 🙂

simultaneous mounting of the SenseHat and the PiFace

La carte SenseHAT du timelapse est reliée au Raspberry Pi via un câble en nappe in this picture we have all mounted, the Raspberry Pi below, the card SHIM welded on the GPIO with its tablecloth 40 wires that takes to the SenseHAT GPIO ports , and finally on the last card PiFace 2 floor that provides input/output editing.

La caméra et le système d'éclairage du timelapse the IP camera is protected by a box, mounted on the vertical bar of the wooden support. It is connected to the Raspberry Pi 3 HDMI cable through a camera HDMI adapter.

the LED spotlight is bought from LIDL €6 closet lighting! Just solder 2 wires to battery holder power to order by Piface in 5v output.

Thank you Christian for this description of timelapse illustrated very well who might give (certainly same 🙂) ideas to the readers of the blog…

you can download the program Python and its configuration file .

Christian we will probably present more about this achievement and will talk about the timelapse whereby this set should be used. He endorsed in particular scripts that launch at startup of the Raspberry Pi based on the push button when the power.

No comments:

Powered by Blogger.