Python is everywhere. Its capabilities continue to grow. Not only can you create simple scripts, but you can create full-blown applications with it. The core has been scaled down to run on 32-bit microcontrollers like the ESP32 and Adafruit Feather M0. You can even use Python engineer modules to design stuff like circuits. There are electronics Python modules that create schematics, simulate circuits, and make solving math a cinch. Here are some of the modules I found that make Python usable for (electronics) engineering.
Upfront, make sure you have a functioning Python environment. Update the package manager “pip” since all of these electronics python modules rely on it. Speaking of dependencies, you may need to also install third-party libraries for some of them. From what I can tell, these all should be platform-independent. However, I only tested these electronic modules with 64-bit Windows.
In April 2019, hardware hackers, hobbyist, and engineers joined together for the first KiCon. A couple of people asked me, “why is there a conference for KiCad?” Some questioned if KiCad was significant enough software to warrant a conference. That question is valid. But KiCon is larger than the KiCad software. Even in its first iteration, KiCon evolved more into a meeting for people building electronics hardware from small scale hobbyist to professionally designed systems, than just a conference on a single piece of software. Some might call it a maker conference. I call it a hardware developer conference. The key that tied everyone together is the open source software behind our printed circuit boards.
Twenty-five different talks covered basic KiCad usage, automating tasks, PCB layout techniques, and projects designed in KiCad. Wayne Stambaugh ended the first day with a State-of-KiCad discussion. He introduced the feature list for KiCad 6. Additionally, he announced four new lead developers and that he would be working on KiCad full time. That news means it is likely KiCad 6 will be here faster than the usual two-year release cycle.
In addition to the talks, there were several workshops and panel discussions. The workshops included a getting started with KiCad lead by Shawn Hymel [link]. That one was cool to keep an eye on because people were designing their first PCB, milling it, and then soldering parts to make the boards blink. In another workshop, Anool Mahidharia provided a hands-on guided introduction to FreeCAD. It is a parametric mechnical cad tool. The panels featuerd PCB manufactureres, workflow discussions, and the KiCad development team.
Outside of the planned classes and activities, I finally shook hands with friends whom I only knew through social media. Even though we are all electronics enthusiast or professional engineers, it is rare we end up at the same place at the same time. See what I mean about KiCad connecting liked minded people together?
With so much going on, I realized I couldn’t cover everything. Instead, this post’s focus is the tidbits I learned at the conference and stuck with me after a little bit of time passed. Here are the six things I learned at KiCon 2019.
Back in 2013, a Kickstarter ran for a project to put a python interpreter on a microcontroller. At the time I could not see the benefit. Cool project, but I asked myself: “why?” On my last Adafruit order, I received a free Circuit Playground Express. The board comes with CircuitPython pre-installed. After playing with Circuit Python, or CP, I finally “get it.”
For Valentine’s Day, I made an animated LED heart for a new love in my life, Circuit Python. Well, love is a bit of a strong word. The past couple of weeks I have been learning Circuit Python, and I am excited by what it offers.
What is Circuit Python?
It is a Python implementation that runs on microcontrollers. The code exists on the microcontroller as text. The interpreter runs the code from that text file. Circuit Python is built on, or based on, MicroPython. Adafruit is designing it to teach programming. It is easy to get started, just open up the code.py file from the auto-mounted drive and start typing. When you hit save, the code runs. That’s it.
The Pi Cap adds capacitive touch buttons to your Raspberry Pi. Bare Conductive was kind enough to send me one. I do not have a project in mind right now, so here are my first impressions.
What is the Pi Cap?
Arduino tends to call daughter cards shields, while the Raspberry Pi community calls them hats. The Pi Cap is a hat. It plugs into the GPIO header of a Raspberry Pi and provides 13 capacitive touch pads. There is a traditional push button, an LED, and a prototyping area. While the Pi Cap does consume all of the GPIO pins, several are broken out near the GPIO header.
The Arduino serial monitor is usable when you want to watch data from an Arduino. However, it does not have a built-in method for saving the data. Here are some ideas if you want to build an Arduino data logger with or without a PC.
Important note on Arduino Data Logger examples
With all of these examples, please remember that whenever you open the Arduino’s serial port, the board will reset. So if your log file shows “Initializing SD card…” with a few data lines in between, it is because there is a reset happening.
Initializing SD card…initialized.
Temp: 34, Time: 03:24:44
Temp: 33, Time: 03:24:45
Temp: 34, Time: 03:24:46
Initializing SD card…initialized.
Temp: 34, Time: 03:24:50
Temp: 34, Time: 03:24:51
Temp: 33, Time: 03:24:52
Temp: 34, Time: 03:24:53
In that code you can see data logging started and then restarted. What happened is that after programming, the board starts logging. Then when you open the Serial Monitor, the data logger restarts.
To solve this issue, either disable auto-reset, add a 3-4 second delay at the start of setup(), wait for a character to be received, or wait for a button press. That will give you time to open the Serial Monitor.