PiSupply / PiJuice

Resources for PiJuice HAT for Raspberry Pi - use your Pi Anywhere
https://www.pi-supply.com/product/pijuice-standard/
GNU General Public License v3.0
435 stars 102 forks source link

PiJuice Hardware Updates - USB C etc #580

Open shawaj opened 3 years ago

shawaj commented 3 years ago

Starting this issue to track hardware updates of PiJuice HAT / Zero surrounding the Pi 4 upgrades - USB C etc.

These are already included updates of PiJuice and Zero boards from last year, but not finished...waiting for confirmation to be released (see attached images):

These are other proposed updates:

Miscellaneous:

Images...

PiJuice zero V1 1 PiJuice V2 3 0

@tvoverbeek @ryanteck any other ideas / thoughts on potential hardware updates / upgrades?

shawaj commented 3 years ago

There is also this firmware issue from @tvoverbeek email of 27/07/20...

With reference to the email conversation with Jean-Christophe Poisson about his problem with the 1.4 Firmware (repeated wakeup not working when solar array input present with 1.4 firmware, while 1.3 works)

ryanteck commented 3 years ago

All the main suggestions look good to me, USB C would be nice indeed.

I think either adding a connector or replacing the screw terminal connector with the same one as the Zero would be a great idea as it makes it that bit more user friendly for the bigger batteries we sell.

I think possibly 3A output would be quite good, the 2.5A input is likely fine as for the surges the battery can compensate. But a slightly higher output would be beneficial.

For the input voltage increase we were looking at (and I was mid way through designing) a Pi Juice wide input pHAT which took up to I think 19V in and regulated it down to 5V 2A for the GPIO header and could be used alongside or independantly of Pi Juice. If we integrated it on the board this additional add-on wouldn't be needed so it could be good to decide if we split it off as it's own thing or merge it in if we're re-designing. (I went with a 19V target to support the 12-15V from a car 12V socket, but also to then accept the 19V DC Jack output of our 40W solar panel).

We have had some request for multiple cells, however I'm not sure how easy it would be to add this in.

shawaj commented 3 years ago

@ryanteck do you think USB-C on the PiJuice Zero as well? Guess it could be good to have that and then you have option of either USB micro or USB-C perhaps?

Was thinking of the other battery connector to be as well as the screw terminal - firstly because moving that compromises the battery surround setup. But also because it is easier for a non-PiJuice branded battery to use the screw terminals.

Are there any other features in the software / firmware / hardware that you would like to see in an update?

ryanteck commented 3 years ago

I think USB-C on the Zero too, but would be interesting to see what others think.

Yeah both battery terminals would be good, we'd need to maybe try and make it so it's clear not to have a battery in the main holder + the socket underneath in that case.

shawaj commented 3 years ago

@ryanteck yeah i agree about usb c on zero

and yeah i think we just have to clarify not to plug two batteries in at once. Inevitably someone will attempt to though. Maybe there is a way we can physically / electrically stop this somehow but not entirely sure how - maybe one for @mmilann

mmilann commented 3 years ago

It would not be necessary, it is just initial stress if one is full, other empty connected in parallel, additionally there will be two NTC in parallel so reported temperature will be too high and charging disabled as kind of protection. Further protection with automatic switch is possible but will degrade performance with additional power/voltage loss on switching transistor, so not worthy for rare cases.

On Fri, Nov 13, 2020 at 7:13 PM Aaron Shaw notifications@github.com wrote:

@ryanteck https://github.com/ryanteck yeah i agree about usb c on zero

and yeah i think we just have to clarify not to plug two batteries in at once. Inevitably someone will attempt to though. Maybe there is a way we can physically / electrically stop this somehow but not entirely sure how - maybe one for @mmilann https://github.com/mmilann

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PiSupply/PiJuice/issues/580#issuecomment-726932725, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZI57UHMG7F2VRQBQPVNQTSPVZNLANCNFSM4TTZX4RA .

-- Milan NeskovicHardware Engineer

Pi Supply Unit 4 Bells Yew Green Business Court, Bells Yew Green, East Sussex, TN3 9BJ, United Kingdom Email us at sales@pi-supply.com [image: Pi-Supply] http://pi-supply.com/ [image: Email] milan@pi-supply.com[image: LinkedIn] https://www.linkedin.com/in/milan-neskovic-5369b5167

shawaj commented 3 years ago

@mmilann ok great - not an issue then in that case. We can just put a note about it on here.

shawaj commented 3 years ago

I wonder if #425 is worth looking into further also

shawaj commented 3 years ago

Another issue worth looking into is #357 (even though it is currently closed). I'll try and go through all the open issues this weekend and see if I can find anything else as well that might be worth looking into

devicenull commented 3 years ago

12v input would be great for me - I'm using pijuice to provide graceful shutdown when my car turns off. Eliminating the extra power supply there would certainly make things easier.

I had mentioned it in #567 - but the ability to run off of one or more 18650's would also be great. They're a lot easier to find then arbitrary cell phone batteries or somewhat non-standard battery packs.

shawaj commented 3 years ago

@devicenull thanks for the input.

We may not put the 12v functionality on the main board, but @ryanteck has been working on a design for an add on that sits on top for this so will be achieved one way or another.

Exploring the 18650 one too 🤩

shawaj commented 3 years ago

@mmilann we should also add any updates to the PiJuice HAT to the PiJuice Data as well.

We will probably aim to launch it soon but may as well do with the most up to date hardware.

shawaj commented 3 years ago

Just had a thought that we should also look to address #541 and #423

tilghman commented 3 years ago

@shawaj You mentioned adding a run pin location for the Pi 4. Would it be possible to include a socket on the PiJuice for the run pin, so that those of us who are less than comfortable with soldering could potentially just insert a run pin into that socket on the PiJuice?

shawaj commented 3 years ago

@tilghman I am unsure what you mean here? You can already do this without soldering in the latest firmware using GPIO3 https://github.com/PiSupply/PiJuice/blob/master/Software/README.md#wakeup-alarm-menu

tilghman commented 3 years ago

@shawaj Is that also true for the Pi 4? The documentation is written from the perspective from before its release, so it's not exactly clear.

shawaj commented 3 years ago

@tilghman yes you don't need to use the pogo pin on any Pi anymore to reset whilst powering from Pi micro USB. You can go that with gpio3.

The pogo pin is now optional and we don't include it in the package.

mmilann commented 3 years ago

RUN pin can be useful for watchdog reset.

mmilann commented 3 years ago

I would not change USB micro to USB-C on Zero because of higher cost of connector >£0.5.

shawaj commented 3 years ago

@mmilann ahh ok - maybe not then. Guess can use USB-C adapter if necessary. It doesn't need the extra power anyway.

shawaj commented 3 years ago

@tilghman https://github.com/PiSupply/PiJuice/issues/580#issuecomment-728168837

ryanteck commented 3 years ago

@mmilann ahh ok - maybe not then. Guess can use USB-C adapter if necessary. It doesn't need the extra power anyway.

The main benefit would be the convenience of USB C now rather than power. It would be nice to have if possible because then it's only one cable needed no matter if you're using the Zero or Full Hat. It feels like a shame the Zero wouldn't have it if the full size one has.

shawaj commented 3 years ago

@ryanteck yeah I guess so. That's a fair point. And I guess removing the LC709203F saves about 0.75 USD as well so evens out.

mmilann commented 3 years ago

@ryanteck yes that is true, can facilitate production together with hat version. I expect Aaron to dig some $0.01 ch sourced usb c.

shawaj commented 3 years ago

@mmilann haha thanks for the challenge! Do you have part number of USB-C connector used on this? I will check for alternatives with Sunsoar.

mmilann commented 3 years ago

@shawaj USB4105-GF-A it is one of cheaper optimised for chargers.

shawaj commented 3 years ago

@mmilann there is these two attached.

U CTY-F-16-30N-WRS-P-S1-F-X-000.pdf

(已压缩)TYPE-C 16PIN 母座(040).pdf

usd0.05/pc for more than 10000pcs, MOQ 1000PCS/reel... For second one. Waiting for the price on first one.

shawaj commented 3 years ago

@mmilann for first one

Quantity: 2000 Unit Price: USD0.055/pcs

Quantity: 10000 Unit Price: USD0.05/pcs

Are they suitable?

mmilann commented 3 years ago

@shawaj can't believe that price. Order em all before exhausted, they are same dimensions.

shawaj commented 3 years ago

@mmilann me too. I thought they made a mistake with it and should be 0.5 but they said it is correct

shawaj commented 3 years ago

Copying this over from #584 from @jophut so we have it all in one issue...

So my question is: Would it be possible for future PCB's to have test-pads for the SDA and SCL line of the I2C-2 bus? Also a test-pad for the SW1, SW2, SW3, IO1, IO2 would be really nice for me. If there is any space left also for all three channels of both the LED's.

So basically add a bunch of test pads for various things :-)

shawaj commented 3 years ago

We should also look into #140 as well @mmilann as it seems like a good idea...

Currently PiJuice address in GUI and System task sources is hard-coded to default 0x14. If HAT address is changed from HAT configuration window PiJuice becomes non-responsive to software and only way to recover is to reset configuration by button press. In future update there should be kind of saving currently configured address (when it is changed from HAT configuration window) into config file, for example there can be two json entries: address1:0x14 address2:0x68 Additionally there can be resolve function in case those entries in json are for some reason corrupted. Some kind of charge level / status polling in range of I2C addresses similar to i2cdetect, success will be response with correct checksum, triggered with button press next to address change entry in HAT configuration window.

kfandersen01 commented 3 years ago

Can you update the schematics pdf files as well? The connector P1 has mirrored pinout: Pijuice P1 pinning schematics

shawaj commented 3 years ago

@mmilann ^^

shawaj commented 3 years ago

See #590 also

mmilann commented 3 years ago

There is smt variant of pijuice zero battery connector, can be on bottom without need to change layout on top. What position is better 1 or 2?

J2B POSITIONS

tvoverbeek commented 3 years ago

Position 1 is bad. The battery connector is then on the side of the USB connectors on the RPi. Will be nearly impossible to get a battery cable connected there. Position 2 is OK. All power connections (RPi, PiJuice USB and PJZero battery on the same side.

shawaj commented 3 years ago

Yeah I agree with @tvoverbeek position 2 is better otherwise you have to remove the hat entirely to plug in a battery.

mmilann commented 3 years ago

Yes, although situation is better on Rpi 4 because there is around 5mm for cable out between board and USB connectors.

shawaj commented 3 years ago

@mmilann true but I will think it is not so good because we will not do two versions - we will have this as only version for all Pi versions and also it is still more difficult to plug than facing other day. Without removing the hat from Pi

STrRedWolf commented 3 years ago

Just subscribing to this. There's a bit of a surge with Raspberry Pi based "cyberdecks" and having a PiJuice with a 3A capability will let folks build them with just a display, a Pi 4 8gb or Pi 400, a display, and some printing.

shawaj commented 3 years ago

@STrRedWolf we are making good progress but don't have a timeline on finished units coming to market yet. But we will be sending off for prototypes in the next couple of weeks.

mmilann commented 3 years ago

Alternative I2C GPIOs. When DPI interface is enabled GPIO2/3 are taken. There can be jumpers to switch to other free GPIOs and software I2C. @ryanteck @tvoverbeek @shawaj What would be best choice for alternative pins?

tvoverbeek commented 3 years ago

@mmilann See https://www.raspberrypi.org/documentation/hardware/raspberrypi/dpi/ RGB888 takes all pins. All the other DPI modes leave GPIO 26 and 27 (pins 27 and 13) free. Suggest to use those for jumpers and SW I2C

mmilann commented 3 years ago

Yes, according to table 26/27 pair covers all modes and there could be even additional SPI pins free in 565 configuration.

shawaj commented 3 years ago

Sounds good to me @mmilann @tvoverbeek re the pins

shawaj commented 3 years ago

Incoming changes...

PiJuice_HAT_layout PiJuice_Zero_layout PiJuice_data_layout PiJuice HAT Change log.txt PiJuice Zero Change log.txt PiJuice Data Change log.txt

mmilann commented 3 years ago

Lacking space for additional TH header for external option D2/SW2, instead there are test points TP32,TP33,TP34,TP35.

alpapak commented 3 years ago

@shawaj @tvoverbeek I would like to see a hat(like PiJuice, PiBattery) on top or bottom of RPi with standoff screws and a wire to connect to PiJuice Hat. It will be a nice add on, stackable, instead of the external battery or the small internal. Also, It could be a two 18650 holder and extended to 2 or more hats(one on top of the other). I think this one, is easy and most popular at the moment. Nowdays, more mAh are needed for projects/peripherals. It will work with all versions of PiJuice.

devicenull commented 3 years ago

If it's not too late - some sort of mechanical attachment for the battery would be nice. The friction fit it currently has works ok for somewhat stationary usage, but not bouncing around in the back of a car. I've tried hot glue, but it's not super effective (especially when things start to heat up)

Any ETA on availability? I know supply chains are completely screwed up now, but I'd love to see a new hardware revision here (I think this is one of my last USB micro devices)