Friday, March 28, 2025

Print your own USB connector

For an index to all my stories click this text.

Sometimes I find something on the web that is so usefull that I want to share it with you.

Powering your circuits.

When testing and building a small circuit with just one or two sensors you can use the power that your microcontroller supplies over it's 5V pin. Both the ESP32 and the Raspberry Pi Pico have a 5V and 3V3 power out pin.

But when I need more power I use an USB breadboard connector to power the project.


An example is this circuit where two TM1637 7 segment displays are connected to a Raspberry Pi Pico. The Raspberry pi pico is powered through it's USB port and on the left-top side you can see a breadboard USB connector attached to a USB power plug.

Nothing wrong with this but I always seem to run out of breadboard USB connectors.

3D printer to the rescue

Then I found this on the web:
https://www.instructables.com/Minimalist-USB-Connector-No-Special-Hardware-Requi/


This is a 3D printed USB connector. The photo shows the assembled version.
But does it work ????


Works like a charm !!!
As you can see the USB connector is plugged into a powerbank and the multimeter shows that a nice 5V is supplied.

The STL files

The connector consists of 2 parts.

You can find the STL files in the original story which you can find here:
https://www.instructables.com/Minimalist-USB-Connector-No-Special-Hardware-Requi/


The first part is the bottom in which you need to insert the wires. The second part is the top which you should glue and press on to the bottom part when the wires are placed. The top part has ridges that help keep the wires in place.


This is how the files look in my slicer. I use Cura.


Set the quality at 0.2mm and supports on. As these are small parts you could set adhesion also on.

Assembling

I used solid copper wire with a diameter of 0.5mm. That worked very well.

I took a slightly different approach to assembling as what the original developer described.

First I stripped the wires.


Then I pulled the stripped part through the holes.

Then I glued the lid on.
The last step was to cut off the excess wire.

The blue wire at the top is GND.
The red wire at the bottom is VCC (5V).
Please test before you actually put it to use to make sure the wires are not twisted. If you mix the wires up you might/will blow up your circuit so test, test, test !!!


The wires are thick enough to fit direct into a breadboard.

You can make the wires any length you want. Short to connect to a powerbank and fit on your desk. Or make them long to connect to a wall outlet with an USB power plug.

I have printed several of these. They are ready to use in my drawer. A really great design.

Til next time
Have fun

Luc Volders

Friday, March 14, 2025

Speeding up Domoticz

For an index to all my stories click this text.

As you might know from previous stories on this weblog I have Domoticz installed as my home automation system. It was only getting slower and slower.

Now my idea was that the problem might lay in the fact that I was using a Raspberry Pi 2. And as I installed the latest updates, that could indeed slow down my system. So I considered upgrading to a Pi 3 or Pi 4.
And just for your information: If you want to install Domoticz you will need at least a Pi3 as previous versions are no longer able to install Domoticz.



Clicking on the Devices Tab in the settings menu stopped the complete system for several minutes.

Then I noticed something.



Each page of the devices pages contains 100 entries (you can select that). And I had no less then 225 pages. That means that the database had 22500 entries.



And many of these entries were from years ago. As you can see the highest page numbers pointed to database entries from 2016. That is 7 year ago, at the time of this writing !!!

Why on earth would I want to keep that information. More even while the entries hold info on switches, thermometers etc from neighbours. And that that does not interest me.



So at the top of the page I clicked on the button that says Ongebruikt. The English version will mention Unused.

Next I clicked on the small V at the top. After two clicks all entries on that page were selected. Then I clicked on the waste basket next to the V and the entries from that page disappeared.

Make sure you use the Unused entries button otherwise you might remove your own settings !!!!

I removed all unused entries that way and this made Domoticz fast again !!!
So no need to switch to a more modern Raspberry Pi or even another home automation system !!!

Please be aware that Domotics keeps receiving and storing data from all kinds of switches and thermometers all the time. So a regular cleanup is advised.

Maybe it's me, but I could not find this simple speed improvement in the manual, so I did not want to keep it from you.

Till next time
have fun


Luc Volders