Last time, we covered storing and charging a 3000 Farad supercapacitor to build a solar-powered, portable spot welder. Since then, I’ve made some improvements to the charging circuit and gotten it running. To recap, the charger uses a DC-DC buck converter to convert a range of DC voltages down to 2.6 V. It can supply a maximum of 5 A though, and the supercapacitor will draw more than that if allowed to.
After some failed attempts, I had solved that by passing the buck converter output through a salvaged power MOSFET. A spare NodeMCU module provided pulse width modulated output that switched the MOSFET on for controlled periods of time to limit the charging current. That was fine, but a constant-voltage charger really isn’t the right way to load up a capacitor. Because the capacitor plates build up a voltage as it charges, the current output from a constant-voltage charger is high initially, but drops to a very low rate in the end.
Before Lunar New Year, I had ordered two 3000 F, 2.7 V supercapacitors from China for about $4 each. I don’t actually remember why, but they arrived (unexpectedly) just before the holiday.
Supercapacitors (often called ultracapacitors) fill a niche somewhere between rechargeable lithium cells and ordinary capacitors. Ordinary capacitors have a low energy density, but a high power density: they can store and release energy very quickly. Lithium cells store a lot of energy, but charge and discharge at a comparatively low rate. By weight, supercapacitors store on the order of ten times less energy than lithium cells, and can deliver something like ten times lower power than capacitors.
An urban planner once told me that every car requires at least four times as much space as they actually occupy. Each needs a spot on the roads, and three available parking spaces: one at home, one at work, and one to shop. Motorcycles are much smaller, but they still spend most of their time parked.
Motorcycles are the primary means of transport in Southeast Asia, and learning to safely drive one is an essential part of adapting to life here. Assuming it’s not pouring rain and you’re not flooded past your ankles, it’s actually quite a pleasant experience… until you have to park.
Unlike the parking lots you may be familiar with, there’s no expectation that your bike won’t be moved. In fact, it might very well end up on another floor, in another parking lot, or behind hundreds of impassable parked bikes on the roof. In the latter case, the attendant will shrug and suggest you come back in a few hours. Eventually, this won’t even register as a frustration – you will simply reason that there are plenty of other things that are more convenient here, like the weather (recent typhoon aside) or unlimited symmetrical fiber to the home for USD 5 a month.
That being said, with a little technology the problem could be lessened a bit while waiting for automated parking lots to become commonplace. On rare occasions I see people with little radio emitters that make their headlights flash, but they’re not terribly common here and require carrying yet another thing on my already full key chain (homes here typically use several different locks). It seemed pretty easy to pull off something similar using my smart phone with an ESP8266 running NodeMCU. I had been meaning to try out the sleep modes to save battery power anyway, so off I went.
With one holiday period coming to a close, another looms on the horizon: Lunar New Year. That means three things in my mind: nice weather, a beautiful holiday with great food, and that I had better get all my orders for electronic parts for the next few months out immediately. In fact, I should have done it last month but I’m a bit closer to the source than many of you are.
In any case, Lunar New Year affects our ability to order neat gadgets at a time of year when some of us have received a little money to spend. So I thought I’d take a moment away from hacking to share with you how important this holiday is to much of the world so we can manage our expectations for quick global shipping accordingly.
Cantennas outperform every consumer-grade Wi-Fi antenna I’ve had the bad luck of purchasing. Cantenna is a mashup of ‘can’ and ‘antenna’ creating the nickname for a directional waveguide antenna built from re-purposed steel cans. For anyone who has yet to build one, it makes an excellent afternoon project. Here are some build instructions and technical details. I went beyond that, and ended up catching a rogue WiFi access point in the process.
When I needed to extend the range of some ESP8266-based sensors, cantennas were right at the top of my list of things to try. It was easy enough to build one, attach it to a Wemos Mini D1 Pro, and call the job done… leaving me with plenty of time to over-engineer it, and I ended up down a bit of a rabbit hole.
The first thing I did was stop using cans. Canned goods are not only expensive in my corner of the world, but more importantly don’t lend themselves that well to making a standardized antenna in volume. I can also only eat so many beans! The latter reason alone is enough to consider an alternative design like a modular dish reflector.
One of the tasks I dread is configuring a web server to send email correctly via Gmail. The simplest way of sending emails is SMTP, and there are a number of scripts out there that provide a simple method to send mail that way with a minimum of configuration. There’s even PHP mail(), although it’s less than reliable.
Out of the box, Gmail requires OAUTH2 for authentication and to share user data, which has the major advantage of not requiring that you store your username and password in the application that requires access to your account. While they have an ‘allow less secure apps’ option that allows SMTP access for legacy products like Microsoft Outlook, it just doesn’t seem like the right way forward. Google documents how to interact with their API with OAUTH2, so why not just use that instead of putting my username and password in plaintext in a bunch of prototypes and test scripts?
Those are the thoughts that run through my head every time this comes up for a project, and each time I’ve somehow forgotten the steps to do it, also forgotten to write it down, and end up wasting quite a bit of time due to my own foolishness. As penance, I’ve decided to document the process and share it with all of you, and then also make it work on an ESP8266 board running the Arduino development environment.
As an alternative, we briefly mentioned the t-test. The basic procedure still applies: form hypotheses, sample data, check your assumptions, and perform the test. This time though, we’ll run the test with real data from IoT sensors, and programmatically rather than by hand.
The most important difference between the z-test and the t-test is that the t-test uses a different probability distribution. It is called the ‘t-distribution’, and is similar in principle to the normal distribution used by the z-test, but was developed by studying the properties of small sample sizes. The precise shape of the distribution depends on your sample size. Continue reading “Statistics and Hacking: A Stout Little Distribution”→
By using our website and services, you expressly agree to the placement of our performance, functionality and advertising cookies. Learn more