site  contact  history  index

Junction box for custom trike part-2

November 04, 2024 — BarryK

Part-1 was posted a few weeks ago:

At the time, made an assumption, and thought could get away with it. Previous experience with a lithium battery was when I built a "powerbox" for camping; see here. Reproducing the diagram from that post:

img1

...the battery has one +ve and one -ve terminal. However, the LFP battery that I purchased from China to use on the trike, has two separate pairs of wires, for charging and discharging. Connecting the charging and discharging wires together, might not work!

I'm a retired electronic engineer, but lithium batteries are recent tech. Hey, I even learnt about vacuum tubes when I did my degree! Anyway, I've been reading up on BMSs -- Battery Management Systems for lithium batteries -- so much more complicated than lead-acid batteries!

This webpage explains that with some BMS you can connect charge and discharge wires together, some you can't:

https://www.elecycles.com/blog/post/what-is-electric-bike-lithium-battery-bms/

img2

Beware, that "P-" and "C-" might measure as zero ohms; however, there may be shunts for the BMS to measure incoming and outgoing current. Shunts are very low resistance, that might not show up in the multimeter and you might think P- and C- are wired together -- and if you do connect them together externally, it will stuff up the BMS. So you do need the specs for the BMS to be sure that the two negative wires can be (or are) connected together.

Here is another BMS diagram:

img3

I don't know what kind of BMS is inside my battery, nor do I want to cut open the shrink-wrapping to find out. Besides, it may be that the BMS is a Chinese part for which I cannot find manufacturer specs. So, I have decided to "play safe"...

Here is the simplified diagram from the junction box part-1:

img5

...the +ve wire from the solar panel MPPT controller is going through a circuit-breaker to the battery; the discharge terminal of the battery. The -ve wire from the MPPT controller to common-ground, which goes to the -ve discharge terminal of the battery.

I did some reading on whether can charge through the battery discharge terminals, and maybe ok, except might cause issues with cell balancing. It might be good that the MPPT controller is going straight to the motor (via another circuit breaker), bypassing the battery.

Decided that need to experiment. Have put in a DPDT (Double Pole Double Throw) switch, so can switch the +ve and -ve wires from the MPPT controller, either as shown in above diagram, or to the charging terminals on the battery.

It was a tight squeeze:

img6

The front panel:

img6

...next time go the workshop, will use an etching pen to write what the new toggle switch does.

Making no assumptions about how the BMS works; when the toggle switch is flipped to send the MPPT +ve and -ve direct to the charging input of the battery, completely separate from the battery output +ve and -ve. I'm not even assuming a common +ve as is shown in the above BMS diagrams.

This toggle switch is going to be something to play with when riding the trike. I read somewhere that some BMSs don't like being charged and discharged at the same time, in which case setting the toggle switch to MPPT direct to battery output would be good. Does the BMS have "pass through" so that charging while discharging will just pass the charging current direct to the output? -- have no idea whether my BMS will do this.

Fun times ahead. The trike project is advancing so slowly. Most of my time has been on EasyOS, apart from having a life. Anyway, will see if can progress the trike project, as really want to ride it while still summer here. I'm in the Southern hemisphere, so summer just starting.   

Tags: light

HTML-NOTEPAD and PackIt

November 03, 2024 — BarryK

Both of these will be in the next release of Easy Scarthgap and Easy Daedalus.

HTML-NOTEPAD
I want a simple WYSIWYG HTML editor, without having to intall SeaMonkey, and HTML-NOTEPAD does the job. Homepage:

https://html-notepad.com/

I looked at this in 2022, and posted an issue to the developer:

https://github.com/c-smile/sciter-sdk/issues/225

...got no response from the developer, and he has archived the project in 2023.

I have uploaded the last source that works, here:

https://distro.ibiblio.org/easyos/source/alphabetical/s/sciter-sdk-20200509-git9c2da08.tar.gz

Photo:

img1

It would be a good project to simplify that window; get rid of the "wasted" space either side of the file. Clicking on a web link does open it; however, would like to change that to open remote links in the main browser.

The sciter-ide project has some other examples, including a very nice HTML viewer. Really small, and would make a great local help viewer. Same comment about remote links. Also "Forward" and "Backward" buttons would be good.

PackIt
This is an archiving utility, created and maintained by Jake (SFR in the forum):

https://forum.puppylinux.com/viewtopic.php?t=6868

I have modified /usr/bin/build-rox-sendto, so that right-click on a file or folder and "PackIt" will be shown in the menu. It was before, but buried inside the menu entry "Open With..."; now it is top-level.

A couple of guys on the forum have suggested that UExtract, an archive extraction tool, also created by SFR, be included builtin to Easy; however, I am not convinced, as Easy already has XArchive.   

Tags: easy

CherryTree notes manager

November 02, 2024 — BarryK

I was reminded about CherryTree when forum member 'wiak' posted about it:

https://forum.puppylinux.com/viewtopic.php?t=7189

I have compiled it in Easy Scarthgap, and it is now a PET package. After updating the PKGget databse, it can be installed from the "pet-scarthgap" repository.

I haven't checked, but presume for Easy Daedalus it is in the Devuan package repository.

If you download it individually, it will also need the 'vte', 'uchardet' and 'fmt' packages. Scarthgap already has 'vte9', which is for gtk+2, whereas 'vte' is for both gtk+3 and gtk4 -- 'vte' has some gtk4-related dependencies, but CherryTree only uses the gtk+3 vte lib -- meaning that, if you use PKGget to install 'vte', you can ignore all the deps, just install 'vte' only.

Here is the CherryTree homepage:

https://www.giuspen.net/cherrytree/

And project site:

https://github.com/giuspen/cherrytree

CherryTree is nice, but I am not motivated enough to replace the builtin NoteCase. NoteCase is simpler and the package is much smaller; I think that it works OK as a notes manager.   

Tags: easy

PKGget ask install non-root

November 01, 2024 — BarryK

A unique feature of EasyOS is that an application may run non-root, as its own unique user. For example, the Chromium browser runs as user "chromium", with home folder '/home/chromium'. This gives a very high level of security, isolating the application from other applications that also run as their own user. Note also that Chromium is able to read and write in /files/apps/chromium, that other non-root apps can't even see into.

Flatpaks, AppImages and "orange ball" menu entries (you will see these in the menu; that are applications that are important to be entered in the menu but not yet installed), all install non-root.

I have modified PKGget, the package manager, to ask if an app is to be installed to run as root user or non-root.  To test this, I installed Gthumb image viewer. Running PKGget, after the install it asks:

img1

...yeah, decided it is polite to ask, rather than just go ahead and install non-root.

There are many apps that I would prefer to run as root. SeaMonkey for example, as I use the Composer HTML editor module, and I really want to be able to edit files anywhere in the system. Same goes for a file manager and various utility/system applications.

For Gthumb, I clicked the "non-root" button, then got this:

img2

...chose to create a desktop icon, and Gthumb works nicely.    

Tags: easy

Lite XL text editor

October 31, 2024 — BarryK

I'm over the moon, this is a wonderful text editor!

Lite XL is a small binary, about 500KB, and requires very little system libraries. Compiled and installed in Scarthgap:

# ldd /usr/bin/lite-xl
linux-vdso.so.1 (0x00007ffec57be000)
libSDL2-2.0.so.0 => /usr/lib/libSDL2-2.0.so.0 (0x00007f7a96ebf000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f7a96e0d000)
libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f7a96dad000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f7a96cd5000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f7a96b05000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007f7a96aeb000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f7a96ab5000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f7a96ab0000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib/ld-linux-x86-64.so.2 (0x00007f7a970ee000)
It has a Lua interpreter compiled into the binary, rather than require a system install of Lua. Rendering is done with SDL2, and it does a pretty good job of creating a GUI. Some of the plugins require 'yad', for example the "GUI file picker" uses yad to bring up a gtk file chooser.

img1

Here is the homepage:

https://lite-xl.com/

I downloaded the source code and plugins from here:

https://github.com/lite-xl/lite-xl

https://github.com/lite-xl/lite-xl-plugins

The inbuilt plugins at /usr/share/lite-xl/plugins:

autocomplete.lua autoreload.lua contextmenu.lua detectindent.lua drawwhitespace.lua language_c.lua language_cpp.lua language_css.lua language_html.lua language_js.lua language_lua.lua language_md.lua language_python.lua language_xml.lua lineguide.lua linewrapping.lua macro.lua projectsearch.lua quote.lua reflow.lua scale.lua tabularize.lua toolbarview.lua treeview.lua trimwhitespace.lua workspace.lua

I added these extra plugins, in the plugins folder:

gui_filepicker.lua language_diff.lua language_ini.lua language_make.lus language_nim.lua language_perl.lua language_po.lua language_rust.lua language_sh.lua

I have created a PET package for Scarthgap, will also compile it in Daedalus -- that latter one will be good for other pup-distros that are same vintage or newer than Debian Bookworm. Will upload the PETs soon and announce on the forum; probably here where we have been discussing text editors for Zig:

https://forum.puppylinux.com/viewtopic.php?t=12993

Lite XL will be builtin in the next releases of Easy Scarthgap and Daedalus.   

Tags: easy

EasyOS Daedalus-series version 6.4.1

October 30, 2024 — BarryK

I posted just two days ago, both Scarthgap-series and Daedalus-series version 6.4 released:

Daedalus 6.4.1 has been brought up to be more directly comparable with Scarthgap:

  1. The builtin browser changed from Firefox to Chromium
  2. Zig support in the "devx" SFS.

Why Chromium? ...it is my personal preference. It does solve one issue with 6.4; it has Firefox ESR which is installed in /usr/lib/firefox-esr, whereas the "Download latest Firefox" menu entry installs into /usr/lib/firefox, which requires a manual fix to /usr/bin/firefox.bin0

One "downside" of not having Firefox; FF supports DRM (Digital Rights Management), Chromium doesn't. DRM is required to play some videos on YouTube. Example here.

See further release notes here:

https://distro.ibiblio.org/easyos/amd64/releases/daedalus/2024/6.4.1/release-notes.htm

The obligatory snapshot:

img1

If you load the devx SFS, then you will get a complete compile development environment, now including Zig support. The devx SFS is downloaded and installed by clicking on the desktop "pkg" icon and choose "SFSget".

You may choose to download the devx only, in which case you can install later (or uninstall), via these two routes:

  1. Menu "Filesystem -> Easy BootManager -> Load extra SFS files"
  2. Click desktop "setup" icon -> "EasyOS" button -> "Bootup" button

The devx has Zig version 0.13.0 and Gvim text editor. Left-click on a .zig file still opens the default text editor which is Geany ...hmm, could change that to Gvim. For now, right-click on a .zig and Gvim is offered, and you get syntax highlighting:

img3

The ZLS (Zig Language Server) is installed, but an editor that supports it is required. The Devuan package repository does have NeoVim for example. I do intend to post some simple Zig tutorials soon.

Download Daedalus 6.4.1 from ibiblio:

https://distro.ibiblio.org/easyos/amd64/releases/daedalus/2024/6.4.1/

Fast mirror in Europe, courtesy of the Netherlands Linux/Unix User Group:

https://ftp.nluug.nl/os/Linux/distr/easyos/amd64/releases/daedalus/2024/6.4.1/

And in Australia mirrored by AARNET:

https://mirror.aarnet.edu.au/pub/easyos/amd64/releases/daedalus/2024/

Install help is in this file:

https://distro.ibiblio.org/easyos/amd64/releases/daedalus/2024/6.4.1/readme.htm

Feedback welcome at the forum:

https://forum.puppylinux.com/viewtopic.php?p=134509#p134509

Have fun!    

Tags: easy

Vim text editor supports Zig

October 28, 2024 — BarryK

I didn't know!!! Scarthgap has the Vim text editor available via PKGget (compiled in OE). I have overlooked it, as always thought that it is a terminal-mode application, like its predecessor 'vi'. However, it also has a gtk3 GUI, when started with "gvim" or "vim -g".

I installed it, and discovered that it supports Zig syntax highlighting out-of-the-box. Snapshot:

img1

Here is my earlier post, looking around for text editors that support Zig:

I also mentioned that "Dude the Builder" uses NeoVim; this is one of many "successors" to Vim. Though, the original Vim remains a very active project. Vim homepage:

https://www.vim.org/

This is the Zig support, that is already builtin to Vim:

https://github.com/ziglang/zig.vim

I will be very happy to remove VSCode from the 'devx' SFS. VSCode is a PET package, so anyone can install it with PKGget if they wish.

Vim is quite small, so might put it into easy.sfs, so offering an alternative to Geany. Just need to tweak a few things -- like, it currently creates menu entries in the "Utility" category.   

Note, I will likely post some simple getting-started tutorials for Zig soon.  

Tags: easy

EasyOS Scarthgap and Daedalus version 6.4

October 28, 2024 — BarryK

I'm currently maintaining three Linux distributions; EasyOS Scarthgap-series, EasyOS Daedalus-series and QV (Quirky Void). maybe in a year or so, that will be rationalized down to one "winner", but for now, there are three to choose from.

Scarthgap
Scarthgap is the main guy, packages compiled entirely from source in my fork of OpenEmbedded (here). The other two are newcomers, and Scarthgap is most mature and likely to continue to be my main focus going forward. So if you are new to EasyOS, I recommend choose Scarthgap.

Scarthgap release notes:

https://distro.ibiblio.org/easyos/amd64/releases/scarthgap/2024/6.4/release-notes.htm

Download:

https://distro.ibiblio.org/easyos/amd64/releases/scarthgap/2024/6.4/

Mirror in Europe, thanks to the Netherlands Linux/Unix User Group:

https://ftp.nluug.nl/os/Linux/distr/easyos/amd64/releases/scarthgap/2024/6.4/

There is also a mirror in Australia, though right now 6.4 hasn't arrived there:

https://mirror.aarnet.edu.au/pub/easyos/amd64/releases/scarthgap/2024/

If you are new to EasyOS, you might find it helpful to read the announcement for 6.0, the start of the 6.x versions:

Forum feedback for Scarthgap is welcome here.

Daedalus
Daedalus-series has been built with Devuan Daedalus (Debian Bookworm) DEB packages, with some Kirkstone OpenEmbedded-compiled packages. The main advantage is that PKGget, the the package manager, has access to the large Devuan/Debian package repository (Scarthgap has a much smaller repository, but both have support for AppImages, Flatpaks and SFS files).

There are no release note; just read recent blog posts:

Download:

https://distro.ibiblio.org/easyos/amd64/releases/daedalus/2024/6.4/

Forum feedback welcome here.

QV
This is totally different. EasyOS is experimental; QV is experimental on steroids. It does not use aufs or overlay layered filesystem. It uses BTRFS and exploits the snapshot capability. PKGget has access to the fairly large Void Linux package repository. The project page at github has some introductory notes:

https://github.com/bkauler/woof-quantum-vis

Download:

https://distro.ibiblio.org/quirky/quirky-void/amd64/releases/base/

Version-numbering is by date, most recent is 24-10-07. There is supposed to be an update mechanism, but I haven't got around to that yet.

Forum feedback is welcome here.

A final note: I have been exploring ways to add another package repository to Scarthgap. KDE apps for example, are wanted by some users; though, they are available as AppImages and Flatpaks. Anyway, I do intend to explore strategies for offering more packages in Scarthgap.

Have fun!   

Tags: easy