View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

The future of GTK+

2018-11-19

Categories: random-software  
Tags: random-software  

Alright, so we’re wondering about the current status of GTK+. With the whole GTK+3 fiasco, how is it holding up? Well, it appears there is some good news for the future. GTK+4 will settle down and become more compatible. But, it appears that the general consensus is clear. People are switching away from GTK+ in preference of Qt.

But, if you ask me for my preference and pick. If I can’t use a C windowing toolkit like GTK+, I’d rather use WxWidgets over Qt. WxWidgets is pretty stable and well-liked by its existing user base, isn’t it? Well, indeed it is.

Speaking about high DPI displays. GTK+ 3 has been switched over so that all widgets are rendered via Cairo. In late versions of GTK+ 2, most widgets were being rendered via Cairo as part of a long-term switchover. Indeed, if you want to render user interfaces on high DPI displays, Cairo is a must, and no longer will you be able to talk about pixel-pushing in the realm of user interfaces. In high-res, pixel-pushing is a relic only of image processing and the like.

Read on →

Still wondering about battery monitoring in a Raspberry Pi? Yes, I’m still wondering about that. Sure, there is that VBAT pin or whatever on the Broadcom BCM microcontroller that the Raspberry Pi uses, and purportedly that is for the microcontroller to measure the battery level, but for now, let’s assume that software access and control to that pin is off limits on the Raspberry Pi. If so, your only next best option is to set up your own circuit and software on the GPIO pins. Use a power management integrated circuit (PMIC) is another option.

20181119/DuckDuckGo raspberry pi battery voltage monitoring
20181119/https://github.com/kmcallister/rpi-battery-monitor
20181119/https://raspi.tv/2013/controlled-shutdown-duration-test-of-pi-model-a-with-2-cell-lipo

UPDATE: VBAT looks to be a voltage supply pin, not a measurement pin. Also, it is only directly accessible on the Raspberry Pi compute module.

20181119/DuckDuckGo raspberry pi VBAT
20181119/https://www.raspberrypi.org/forums/viewtopic.php?p=707418

So, you’re wondering about the L293D just right off the bat? Search for some quick information on it, eh? Well, well, this is what I found out.

  • Indeed, this chip is available from Digikey.

  • The chip is also available from Adafruit, and they have a nice product information page on it for beginners who are not super skilled in electronics.

  • The chip is in fact a dual H-bridge integrated circuit. No magic involved in its design.

  • You can also use the L293D to control stepper motors and solenoids. In the case of solenoids, 4 can be controlled with one motor control unit.

  • There is a built-in inductive kick-back protection diode, of course.

  • On the other hand, that means for motors that guard voltage regulators and diodes may still be required, in case the motor gets turned externally and runs in “generator-mode.”

  • PWM input can be used to modulate the motor speed.

Read on →

Decisions on gearing to apply to the laser rotation motor.

So, I reviewed my Raspberry Pi 3D scanner notes and it looks like I didn’t decide on a final gearing option for the laser rotation motor after all. My “final” option for now is to use the Lego MINDSTORMS kit motor and gears to rotate the laser. Fair enough, it’s good enough to get me started, but I know I’m going to want something better for larger scale usage.

So, although I know I looked at this before, I must not have saved the links to the great website with information on motor gearing and the energy efficiency of different gearing solutions. So first I went searching around to try to find a near analog to that website, which is also the website I learned about the option of planetary reduction gears at.

20181117/DuckDuckGo micro motor gear reduction
20181117/DuckDuckGo electric motor gear reduction
20181117/DuckDuckGo electric motor gear reduction ratio
20181117/DuckDuckGo planetary gear for small electric motor

A different website that may be useful for getting supplies.

20181117/https://www.powerelectric.com/electric-planetary-gear-motors/

Wikipedia article for background information indeed confirms that planetary reduction gears are great for getting high-torque with a small package.

20181117/https://en.wikipedia.org/wiki/Planetary_gear

Read on →

The question of heat shrink tubing.

Now, when it comes to building my circuits, I will be soldering together wires and there will be solder joints. How will I cover them up? Well, there are a lot of options here. One option is to use heat-shrink tubing. The main disadvantage that I see here is the possible complication in removing the heat shrink tubing. Another interesting option is cold-shrink tubing, which doesn’t require the application of heat for it to shrink. Perhaps it’s more convenient for installation, but it still has the same problems when it comes to removal.

20181117/https://en.wikipedia.org/wiki/Heat-shrink_tubing
20181123/https://en.wikipedia.org/wiki/Cold_shrink_tubing

Finally, perhaps my preferred and (personally) more traditional option for now it to use wrap-around tape tabs. I take a piece of tape, fold it over on two edges to create and easy removal tabs, and wrap the tape around the solder joint. This provides insulation at the solder joint, and removing it is as easy as pulling at the tape tabs. Plus, I don’t have to buy any new special materials to get started on this approach right away.

Discussion on GPIO and motor connections with Raspberry Pi.

Granted that I am building a motor control circuit for my own 3D scanner design, I realize that the FabScan Raspberry Pi design of course also needed to use a motor control setup. So, for my own sake, I might as well review what they used in detail and summarize the key points that are pertinent to me.

20160829/http://hci.rwth-aachen.de/materials/publications/lukas2015a.pdf

So, what do I have to say about the specifics of their design, things worth noting, and differences with my design?

  • Overall, their design requires more complicated electronics design and manufacturing. More electronic components are called for all-around. The use of printed circuit boards scales well for mass production, but it is not very friendly toward the kind of use case of building a custom design by hand, using it for a while, then being able to easily disassemble it and reuse the parts in a new project piecemeal. By far and large, this is the one thing that has bugged me most about some older electronics boards I have: there are some components soldered onto a PCB that I have in my immediate physical vincity but am no longer using in the present. I would love to quickly and easily repurpose those components for new projects, but alas, removing them from the PCB is too difficult.

  • The use of stepper motors requires more complicated motor control driver ICs than is required for plain DC motors.

Read on →

Okay, so I’ve figured out the solution to the mystery connector on my IR cut filter, I think. I took a good careful look at the connector. I measured the distance between the pins to be about 1 mm, but alas, I concede that I couldn’t do a highly accurate measurement and they could be just as well 1.25. Finally, I took a good careful look at the RC Groups JST connector confusion page, and after careful analysis of minute features of the various connectors, I’ve determined that my connector must be a Molex PicoBlade, not a JST. Using the metrics on the site of the outside dimensions, I measured the outside dimensions of mine to confirm that they are the same. The distinguishing features of Molex PicoBlade are blade-like receptacles and the lip protrusion details. It’s important not to draw conclusions about the micro-scale connector designs based off of pictures of the larger scale connectors.

20181117/https://en.wikipedia.org/wiki/Molex_connector
20181117/https://en.wikipedia.org/wiki/JST_connector

20181117/https://www.rcgroups.com/forums/showthread.php?1493712-JST-connector-confusion-the-real-story
20181117/https://static.rcgroups.net/forums/attachments/6/9/1/2/6/a4299114-113-4%20JST%20%20Plugs.jpg
20181117/http://www.micronwings.com/HintsAndTips/RCConnecorTypes/index.shtml
20181117/http://www.micronwings.com/HintsAndTips/RCConnecorTypes/Molex3P/index.shtml
20181117/http://www.micronwings.com/HintsAndTips/RCConnecorTypes/Molex2P/index.shtml


Now, what about other small modular electrical connectors that I’m going to use in my Raspberry Pi 3D scanner project? Am I going to use Molex PicoBlade or micro JST? Well, my goal was to use practically the same small white plastic modular connectors are used inside my XMODS RC car to connect with the extra lighting doodads. So, I checked those connectors in detail, and indeed, they are Molex PicoBlade because they have the distinctive blade-like receptacles.

While I was searching for previous information on the Prusa i3, I found these two interesting articles on Hackaday.

The first one, about the history of the pasteurization of milk. It’s interesting that I haven’t learned about Alice Evans in my previous schooling. But, the main point and important point is this Alice Evans was the key person to study the bacteria found in cow’s milk, trace the link with the bacteria found in goat’s milk and the associated illness that can develop in humans, search for evidence of a similar medical illness in America, and recommend pasteurization on all cow’s milk, even milk from healthy-looking cows. Initially, there was strong opposition and resistance to this switch, largely due to the cost of the pasteurization equipment and the prospective cost of having all cow’s milk pasteurized. So, the dairy industry started by making a compromise. “Grade A” milk would be unpasteurized milk taken from healty-looking cows under strict cleanliness standards. Everything else would be pasteurized.

The story of how the dairy industry switched over to finally pasteurize Grade A milk too is interesting. One day the child of a high-ranking officer in the dairy industry came down with great illness. A doctor’s examination concluded that the illness was brucellosis, caused from bacteria in the milk they drank. Of course they were only drinking Grade A milk, which was unpasteurized. This was the tipping point to change the dairy industry to pasteurize all milk.

20181117/https://hackaday.com/2018/11/13/alice-evans-brucellosis-or-why-we-pasteurize-milk/

Now, a brief summary of this one is interesting. Automated telephone switching equipment initially came about to defeat fraud. But, ironically, nowadays it is used heavily to commit fraud, via spam computer dialing. Part of this is due to the network design pre-dating the era for the need of strict security measures, other of it due to government regulations on openness and exchange of the network not allowing for much to be added in the way of security.

20181117/https://hackaday.com/2018/11/12/hello-and-please-dont-hang-up-the-scourge-of-robocalls/

So, now I’m wondering. Really, can you 3D print a magnifying glass? Yes you can. A real working, crystal clear smooth one at that.

So, how do you do it? There are multiple ways. I’ll point out the first and perhaps most expensive way.

First of all, use a SLA 3D printer to 3D print your object out of clear resin. Once you’re done with that standard job, you need to finish off the surface smooth by one of several means. Yes, you can do traditional pellet pounding, acid bath, and sanding with sandpaper. Another nifty method you can do is to spray it with a clear resin coating spray.

So, now you’re wondering. Can you also do this with a FDM printer like the Prusa i3? Well, in order to do that, you’d first need to be able to 3D print with a transparent plastic like polycarbonate. So can you do that on the Prusa i3? Indeed you can. Now, there’s a really nifty trick to do that, though. You know how you’ve been told that 3D printing with polycarbonate requires higher temperatures than typical consumer, DIY, and hobbyist 3D printers can supply? Well, not an entirely complete description of what’s going on here. The plastic’s ability to be shaped depends on both the temperature and pressure applied to it. So if you keep the temperature the same, but increase the pressure, will that work? Indeed, it does work quite well.

So, there you go. Now you can 3D print with polycarbonate on a FDM 3D printer too.

Read on →

Now, just a heads up here. When developing your own film, avoid using old chemicals as you can have bad results. Of course, this appears to apply mostly if you use pre-mixed liquid chemicals. But still, yeah if you mix your own chemicals, make sure to keep the oxygen out of the ingredient containers.

20181117/https://www.35mmc.com/11/11/2017/experiments-developing-colour-film-home-chemicals-dilemma-guest-post-aukje/