Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

[Solved / Archived] Stacking pHats on Pi Zero with WITTY PI 4 L3V7

9 Posts
6 Users
0 Likes
771 Views
(@clubmanplus850)
Posts: 3
Active Member
Topic starter
 

hi!

i would like to build a simple remote pi zero and planned to use the WITTY PI 4 L3V7 - the main feature is to schedule power up/down - which the device seems to handle perfectly - however reading the docs I have two questions

1. Is it possible to stack another pHat on top to have a stack : pi-zero : witty : pHat - specifically I would like to use this NB-IoT/LTE pHat : https://thepihut.com/products/nb-iot-emtc-edge-gprs-gnss-hat-for-raspberry-pi?variant=39808804815043

from reading the docs I think there will be a pin conflict, but not 100% sure so best to ask before I spend the money

the second question is, if i can make the stack do you have a recommendation for a case? my first thought was this one: https://thepihut.com/products/flanged-weatherproof-enclosure-with-pg-7-cable-glands?variant=18634584817726 - and put a thin (maybe plastic) layer between the battery on the bottom and the pi zero above - just to protect the battery from any GPIO pins/solder points

 
Posted : 31/08/2023 11:43 am
(@admin)
Posts: 491
Member Admin
 

Please read section 15.4 (on page 44) in the user manual. We have no knowledge of the HAT/pHat you are going to use, and we don't have bandwidth to look into it when being asked. The only feasible way is that we provide the information about what GPIO pins and what I2C address(es) are used by Witty Pi, and then the customer figure out whether there is a confliction with other hardware. In the user manual we already provided all those information.

If you already confirm there will be pin conflicting, you may provide more detailed information about which pin is conflicting, and maybe there is workaround.

Sorry we do not have recommandation for case, especially when third-party hardware are used -- we could not recommand a case that we have never tried out with the involved boards.

 

 
Posted : 31/08/2023 12:06 pm
(@clubmanplus850)
Posts: 3
Active Member
Topic starter
 

Hi, 

my apologies for missing that section of the document - it's pretty clear and i can very well understand you can't look into every combination of devices!

if i may clarify this though: 

Witty Pi 4 L3V7 doesn’t actually use the TXD pin, but it will monitor its voltage. The TXD pin is supposed to be HIGH when the system is on, and should go LOW after system has been shut down. If you connect some other devices that also use the TXD pin, please make sure they don’t change this default behavior, otherwise Witty Pi 4 L3V7 doesn’t know when the system is off, and cannot fully cut the power.

if a device is using the UART (say a cellular modem) then that pin will be changing hi/low with data flow; I just want to be absolutely sure, this will then cause the Witty to no work correctly? or is the witty looking for the pin to be low for some period of time that allows normal UART to work?

if not, is there another pin that can be monitored?

 
Posted : 31/08/2023 1:29 pm
(@admin)
Posts: 491
Member Admin
 

The TXD will go through a diode and then the voltage will get smoothed by a capacitor before feeding to MCU's ADC for measuring. This is how Witty Pi monitors the TXD pin's voltage.

If the serial port is in communication and the TXD pin gets pulled down for transmitting data, the voltage after diode and capacitor will keep stable and Witty Pi will not consider the system is off. Only if the TXD pin gets consistantly pulled down will make Witty Pi think the system has been shut down.

We have tested the scenario that using serial port for data transmition while Witty Pi still works well.

 
Posted : 31/08/2023 5:33 pm
(@clubmanplus850)
Posts: 3
Active Member
Topic starter
 

@admin fantastic! thanks for that - looking forward to getting my Witty 🙂

 
Posted : 31/08/2023 8:26 pm
(@billsidea)
Posts: 5
Active Member
 

I can share a working example similar to what you are proposing:

I have a Raspberry Pi Zero with a Witty Pi 4 L3V7 stacked on top of it and then a Waveshare E-Ink display on top of that. Depending on the size and form factor of your hat, you may need some sort of stacking female header extension like this. I needed this for my scenario.

For cases, this may be a great time for you to look into getting a 3D printer. 🙂 That way you can make a case to suit your needs. There are lots of examples on Thingiverse. You may also have some luck specifically looking at Pwnagotchi cases on Thingiverse, as your needs look to be similar in size. You can tweak these existing designs on Tinkercad as well if you're willing to do some learning and experimentation.

I hope this helps.

 
Posted : 07/09/2023 10:35 pm
(@newpond)
Posts: 1
New Member
 

 

I managed to resolve this for the zwave hat I was using which requires the serial port by adding the following line to the /boot/config.txt (to set the pin low on shutdown)
dtoverlay=gpio-poweroff,gpiopin=14,active_low="y"
And then adding the following line to /home/pi/witty/daemon.sh (to set it back to normal at boot up) gpio -1 mode 8 alt0

or on bullseye

raspi-gpio set 14 a0

 
Posted : 12/11/2023 5:23 pm
(@matthias-goetzke)
Posts: 3
New Member Customer
 

Posted by: @billsidea

I have a Raspberry Pi Zero with a Witty Pi 4 L3V7 stacked on top of it and then a Waveshare E-Ink display on top of that. Depending on the size and form factor of your hat, you may need some sort of stacking female header extension like this. I needed this for my scenario.

I have the same setup, but I cannot get the Witty Pi to turn on when pressing a button or via schedule. Do you do that ?

 

 
Posted : 17/11/2023 4:23 pm
(@pbljung)
Posts: 1
New Member Customer
 

I also have a RPi ZeroW (and Zero2W) with Wittypi4L3V7 and Waveshare epaper display. The button to wake and shutdown works fine. I don't use the scheduling. 

 
Posted : 20/06/2024 7:21 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.