Wireless MicroPython Programming With Thonny

I’ve been playing with a few MicroPython projects recently on several different embedded platforms, including a couple of ESP32 WiFi modules. There are various ways to program these modules:

  • Use a serial terminal and ampy (maintained by [devxpy] since being dropped by Adafruit in 2018).
  • If you use Pycom boards or WiFy firmware, there are the pymakr plugins for Atom and Visual Studio.
  • If you prefer the command-line like me, there is rshell by one of the top MicroPython contributors [Dave Hylands].

For over a year, I have been quite happy with rshell until I started working on these wireless nodes. Being lazy, I want to tinker with my ESP32 modules from the sofa, not drag my laptop into the kitchen or balcony to plug up a USB cable. Can’t I work with them wirelessly?

Well, you can use WebREPL. While its functional, it just didn’t strike my fancy for some reason. [Elliot] mentioned in a recent podcast that he’s using telnet to access his wireless nodes, but he’s using esp-link on an ESP8266, which means throwing another chip into the mix.

The Thonny IDE

I had all but given up when by chance I saw this video on the Dronebot Workshop channel about running MicroPython on the new Raspberry Pi Pico boards. Bill was using Thonny, a Python IDE that is popular in the education community. Thonny was introduced in 2015 by Aivar Annamaa of the University of Tartu in Estonia. Thonny was designed to address common issues observed during six years of teaching Python programming classes to beginners. If you read about the project and its development, you’ll see that he’s put a lot of effort into making Thonny, and it shows.

Leaning about Thonny got me curious, and after a little digging I discovered that it has WebREPL support for MicroPython right out-of-the-box. Although this is a new feature and classified as experimental, I found it reasonably stable to use and more than adequate for home lab use. Continue reading “Wireless MicroPython Programming With Thonny”

ASCII Schematic Diagrams

We wondered recently about those crude ASCII schematics you see in some documentation — are there any dedicated schematic-focused tools to draw them, or are they just hand-crafted using various ASCII-art drawing tools? To our surprise, there is such a tool. It is called AACircuit and was developed by [Andreas Weber]. It has a history going back to 2001 when it was first introduced as ASCIIPaint. Be forewarned, however, the quality of the code may be questionable. According to the notes on [Andy]’s GitHub repository:

WARNING: a lot of spaghetti code ahead

This code was created in 2001-2004 when I taught Borland Delphi 3 to myself. It contains many, many global variables, unstructured and undocumented procedural code and bad variable names.

If you don’t want to wrestle with old and sketchy object-oriented Pascal code, you’re in luck. [Chaos Ordered] has made a Pythonized version which you can get from his GitHub repository. We tried it out and got it working on Ubuntu in short order (after wrestling with a pycairo dependencies). This might not be everyone’s cup of tea, but it has some uses now and then. While we wouldn’t want to document a computer motherboard with ASCII schematics, it’s great for a quick-and-dirty circuit diagrams.

Not exactly schematics, but [Duckman] has some Arduino pinout diagrams he made using ASCII-art. These could be useful when pasted into source code as comments, documenting the pinouts for your project.

Do you recommend any tools for making ASCII schematics, or this just a waste of time?

Solar And Wind Could Help Support Ethiopia’s Grand Dam Project

Ethiopia is in the midst of a major nation-building project, constructing the Grand Ethiopian Renaissance Dam (GERD). Upon completion, GERD will become the largest hydropower plant in Africa, providing much needed electricity for the country’s growing population.

The project dams the Blue Nile, a river which later flows into neighbouring Sudan, where it merges with the White Nile and then flows on to Egypt. Like all rivers that flow across political boundaries, concerns have been raised about the equitable management of the water resources to the benefit of those upstream and down. Too much water dammed upstream in GERD could have negative effects on Egyptian agriculture reliant on river flows, for example. Efforts are ongoing to find a peaceful solution that suits all parties. Recently, suggestions have been made to supplement the dam’s power output with solar and wind to minimise disruption to the river’s users.

Continue reading “Solar And Wind Could Help Support Ethiopia’s Grand Dam Project”

Print Your Own Wireless 2.1 Speaker System

Buying a set of stylish bookshelf speakers is a perfectly reasonable thing to do, and remains legal in most free countries around the world. However, if you really want to impress with a pretty pair to crank out your tunes, you might consider designing and printing your own. [EH_Design] did just that with a stylish 2.1 Bluetooth audio system.

The 2.1 designation refers to the use of two stereo channels plus a subwoofer. It’s a popular setup as human perception means it’s not as necessary to have stereo imaging for low frequency content. The build uses a Texas Instruments TPA3116D2 Class D amplifier with a Bluetooth input, with the efficient design allowing the build to be more compact without the need for as much heat sinking. A 24 V supply delivering up to 3 A is specified, providing plenty of volume when needed. The speakers themselves consist of 3″ drivers mounted in attractive 3D-printed shells, with the “subwoofer” consisting of a pair of 5″ woofers paired up in a special isobaric enclosure that enables a smaller volume to acoustically act like one double the size.

The result is a futuristic-looking set of bookshelf speakers that remind us of some of the fancier high-end sets often seen in hi-fi magazines. Of course, if 3D printing enclosures isn’t enough for you, you could always consider 3D printing the actual speaker driver itself. When you do, let us know how it goes!

 

RC Ekranoplan Uses LIDAR To Fly In Ground Effect

Ekranoplans are a curious class of vehicle; most well known for several Soviet craft designed to operate at sea, flying just above the waves in ground effect. [rctestflight] had accidentally come across the ground effect flight regime himself years ago, and decided it was time to build an ekranoplan of his own.

I want to see little ekranoplans in at least three top 10 pop film clips by summer’s end. Please and thank you.

While ground-effect flight can be quite stable for a heavy, human-scale craft, the smaller RC version suffered more from minor perturbations from the wind and such. Thus, a Pixracer autopilot was installed, and combined with a small LIDAR device to accurately measure altitude above the ground. With some custom tweaks to the Ardupilot firmware, the craft was able to cleanly fly along barely a foot off the ground.

The final effect is almost mesmerizing; it appears as if the craft is hovering via some heretofore unknown technology rather than just flying in the usual sense. It’s still sensitive to breezes and sudden drops in the terrain lead to a temporary escape from the ground effect region, but the effect is nonetheless impressive. It’s a nerve wracking video at times, though, with quite a few near misses with traffic and children. Regardless of the nature of your experimental craft, be cognisant of your surroundings. We’ve seen [rctestflight]’s Ardupilot experiments before, too. Video after the break.

Continue reading “RC Ekranoplan Uses LIDAR To Fly In Ground Effect”

Measuring An Atom

Do you need a well-equipped lab to measure the size of an atom (German, machine translation)? According to [stoppi], no. You need sunflower oil, some bear moss spores, and a bit of gasoline. You’ll also need some common things like a syringe, a baking sheet, and a jar. You can see the whole process in the video below. The measurement isn’t really for a specific atom, but it is an average for a lipid molecule, which is still impressive.

You essentially measure the diameter of an oil drop spread over water. Since the oil is mostly oleic acid, the height of the layer is known as 167 atoms. After that, it is some simple measurements and math to get the height and find the average atom height.

Continue reading “Measuring An Atom”

Open Source Pizza Compass Will Show You The Way

In Pirates of the Caribbean, Captain Jack Sparrow has an enchanted compass that points to what the holder wants most in life. The Pizza Compass created by [Joe Grand] is basically the same thing, except it’s powered by a Particle Boron instead of a voodoo spell. Though depending on who’s holding the thing, we imagine they’d even point in the same direction.

[Joe] was tasked by Wired to design and produce the Pizza Compass in three weeks, a process which was documented in the video below. Being the Badgelife luminary that he is, the final product looks far more attractive than it has any business being. In addition to the Particle Boron that slots in on the back of the handheld PCB, there’s a GlobalTop PA6H GPS module, a LSM303DLHC compass, and eight NeoPixels that correspond to the points on the silkscreen compass.

From prototype to final product.

Using the device is simple, just press the button and then walk around trying to keep the top-most LED lit. Behind the scenes, the Boron is pulling down the coordinates of the closest pizza place as reported by Google’s API, and comparing that to the user’s current GPS location. In practice that means the Pizza Compass isn’t concerned with nuances like streets or buildings, so its up to the user to figure out how best to stay on the desired heading. So rather than just following some turn-by-turn directions, there’s some proper navigation involved if you want that fresh slice.

If you don’t like pizza, you could reprogram the compass to point to whatever quest-worthy resource you wish. As explained at the end of the video, [Joe] wanted this to be an open source project so it could easily be adapted for different tasks by the community. Though honestly, it’s pretty weird if you don’t like pizza.

We’ve actually covered a very similar device in the past that would point the user to the closest White Castle or Five Guys, but with all due respect to that project, the Pizza Compass is in another league. When you’ve got the talent and experience of [Joe Grand] on the team, even the most mundane of gadgets ends up looking like a piece of art.

Continue reading “Open Source Pizza Compass Will Show You The Way”