09/21/2019 at 01:37 •
Just found a perfect solution for wireless charging! The size of it fits so well to the pi zero and the battery. Maybe we should add two solder pads and take this coil as an optional sub-module.
09/18/2019 at 06:39 •
Just get a photo of new pin parts from the vendor. These are headers, bases and springs waiting for assembling. They have produced so many units, much more than we expect 0_0'
08/18/2019 at 03:54 •
It was three days ago I found that bluetooth can be accessed by web content in Chrome! So I have written a webpage as new client for our previous bluetooth project.
First, install the server-side program on your pi, see how: https://github.com/PiSugar/sugar-wifi-conf
Then you can connect your pi through BLE with your laptop or smartphone by opening this link in chrome app: https://www.pisugar.com/sugar-wifi-conf
Since web bluetooth has not been widely supported yet, I have tested on several devices:
- It works well with latest Chrome for MacOS and Android.
- On Win10, Chrome is able to detect the bluetooth but I am not able to open it, which is pretty strange. (If you can open it, please do tell me how)
- Chrome for iOS doesn't support web-bluetooth. There is an ios app called WebBLE which implements the web-bluetooth api. However, it doesn't works. It seems different from the standard api. I will see how to fix this later.
For other compatibility information please see here.
It's able to run on iOS now!
The iOS problem I mentioned above, it's because WebBLE browser only supports the early version of web-bluetooth api, which doesn't include "getCharacteristics" method. (Click here to see more detail) Therefore I had to use the old way to get characteristics when it runs on iOS.
08/14/2019 at 02:56 •
Honestly I didn't have a clear view at the beginning of the coding work, but I believe a friendly UI is always needed. As I go deeper, I found some suitable tools to achieve this goal.
The diagram below shows the architecture behind this.
There are several ways to interact with PiSugar 2:
- shell script: if you are familiar with linux, or you want write some program that needs information from the battery, you can access it with shell scripts. It's based on UDS and you know have to go across the network layer.
- web UI : you can manage PiSugar2 through a web page. Although pi zero is able to run a desktop but I use it without screens in most of time. Web UI is accessble for other machines in the same local network.
- electron UI: electron is one of my favourites. It can build a really nice desktop app written in html5, also I can use the same code to generate the web UI. Double kill! The problem is that electron does not support armv6l (pi zero). Never mind, I can still use the web UI on pi zero.
- system tray: if you have a desktop raspbian, I do think a battery tray icon indicating power level is necessary. For compatibility with armv6l, I use pyQt5 to build the icon. ( I had tried Qt to build the main window, although it can run on pi zero, it's cumbersome. )
The http sever is just for hosting html and js files, most of the UI communication is based on websocket, which mean we can get realtime data such as button events, whether the RTC alarm is triggered, etc.
To be continue...
08/13/2019 at 03:59 •
Just recieve two boxes of PiSugar (semi-finished) today.
Since our recent work is focused on the development of PiSugar 2, it is perhaps the last mass production of the first generation! It's not easy since from design to PCB, SMT, soldering, testing, if something goes wrong we have to start over.
08/02/2019 at 07:06 •
This week we start coding for PiSugar 2.
There will be a core python program allowing you to interact with it using shell.
Also there will be a system tray icon and a nice UI build in electron.
However, I found that electron has no support for armv6l (pi zero), it can only run on pi 2, 3 ,4.
So I will build a webpage ui for armv6l as replacement.
But wait... why I need to run such program on a bigger Pi? Isn't PiSugar is just for Pi zero?
Well... maybe it will be more than that.
07/22/2019 at 06:30 •
Just have a busy weekend. We start testing a new prototype.
The power will not be interrupted when you pull out of charging cable. It's a UPS now.
We can get battery level through i2c. RTC works fine but the timed boot function is unstable. Some hardware bugs need to be fixed.
A button is connected to GPIO.7 of pi zero, for soft shutdown or custom functions. However, we just find a GPIO pin provided but powerIC chip... which is a good news. Maybe we should connect the button to the powerIC, and detect it via i2c. Save one GPIO pin!
Using special pogopins to connect the pi, the new version will be as compact as the old ones (or even thinner?). Anyway, we insist on the compatibility with all pi zeros whether it has gpio headers. Just plug and play.
07/12/2019 at 10:53 •
Joy Bonnet Cap!
Download printable model here: https://github.com/PiSugar/pisugar-case-pihat-cap/tree/master/jot_bonnet_cap
07/02/2019 at 07:15 •
Today we begin testing a new design of PiSugar.
There will be i2c power level detection (for soft shutdown), RTC, UPS, a gpio button.
It turns out that the power IC we use has i2C but has nothing to do with power level detection....sigh....so we are about to change another model.
Sugarpin samples also arrived. Still need some modifications. Anyway it's probably the tiniest structure we had ever made. BTW it's gold plated !
06/23/2019 at 02:22 •
We have designed a special pogopin to connect pi zero and pisugar. We call it "SugarPin". With this tiny little thing we can get access to the pi from the bottom of GPIO pins (or just GPIO pin holes). It's now possible to make new pisugar compatible with all models of raspberry pi.
Today we just got the first look: