Adafruit PiUART - USB Console and Power Add-on for Raspberry Pi

The Adafruit PiUART - USB Console and Power Add-on for Raspberry Pi looks interesting.

Two Questions:
Can one also perform a shutdown first when the on/off key is pressed. I think this is a very neccesary attribute.

Can one have two serial ports over the USB?

Many thanks for you assistance.

That on off switch just switches off the +5V that comes in from the Micro USB on the PiUART. It’s not a shutdown button. From here, Adafruit PiUART - USB Console and Power Add-on for Raspberry Pi : ID 3589 : $6.95 : Adafruit Industries, Unique & fun DIY electronics and kits
We had some space left over, so the PiUART also comes with an on-off switch with a 4 Amp transistor. You can power your Pi through the microUSB port and then use the switch whenever you want to cut power, without having to unplug the cable. Low-power usage Pi’s like the Pi Zero and A+ can thus be powered and controlled from a single cable connected to your computer. Heavy-hitter Pi’s like the Pi 2 and Pi 3 may draw too much power from a computer USB port, so check if your motherboard has a high-current USB port before trying.

Thank you for your reply.

Frankly, I would much prefer a shutdown switch to a power off. If one has a headless RPi this means shutting down from another terminal…very off-putting when the the Rpi is in a remote location and one want to power off when running.

I need two serial ports - is this possible.??

I have several headless Pi’s. On one I have a button wired up to a GPIO pin and with a bit of python code that button does a shutdown. On another I use the joystick on my sense hat to do a shutdown, same deal it’s done via some python code. My Pirate Radio has that function built into its software. Lots of different ways to do it.

The two serial ports I don’t know? I have that PiUART. So far I’ve only ever used it once just to make sure I didn’t get a dud. I haven’t actually put it to good use yet. Starting to wonder why I bought it?

Yes, indeed.
But I was making the suggestion that the switch should be used to activate a shutdown ( I usually use the Python interupts for that - I dislike the idea of having to poll a switch) rather than an on/off switch. Ideally one swith for both funtions - first the shutdown then after a while the power off.
All this is based on a real need in my projects.

I have been looking for a case that has a fair bit if height, and found Pyjuice who offer a “high” Case which is ideal for use with a HAT AND there is a place to add a switch on that case - you have drill it yourself. …are you reading this pimoroni:-)

I have two sensors that need serial transmission which is a bit of a bummer.

Adafruit makes the PiUart, not Pimoroni. They do have things like the on off shim though

I did not say that Pimoroni made the PIUART: I have the ON/OFF Shim - have not tried it yet - but again that is not quite what I really need.
The PiJuice looks good like what I need BUT it es expensive .

For extra serial ports, if you have any USB slots available on the Pi or via a small USB hub, there are plenty of cheep USB to Serial adapter boards and cables or you could use or go bigger and plug in an Arduino Mega 2560 for five extra serial ports and a ton of extra input pins.
The Pi itself is limited to the one serial port you can get at.
Of course you may need a bigger box to house it all but that is par for the course.

I like the idea of the 5 serial ports on the Arduino.
So I need sn Arduino Mega + WiFi Hat + MQTT to transfer the data to thr RPi3
It would also add a lot of IO as well.
This looks like a fun project and very useful to boot.

My comment about Adafruit making the PiUART was in response to your “are you reading this Pimoroni” comment. I misunderstood what you meant by that? Sorry for the confusion.

It does sound like your project might be better suited to a micro controller instead of a PI.

No…I need the computing power of the Pi, in fact I may well try 2 RPis.
This is quite a project.
The Arduinoo would be used an IO Port and sensor aquisition.

Oops the Mega only has 4 UARTs see Arduino for more details

It would connect to the Pi with its USB a to B lead and provides up to 54 digital I/Os
Plug it into a development Pi running the Arduino IDE and you can program it from the Pi too :-)

I want to use MQTT - It can then be used by other RPis.

Cool project. The only Micro controller I’ve played with is the BBC Micro-Bit. And played with is about all I’ve done so far.