App note: Driving of OLEDs

an_osram_oled_driving

Application note from OSRAM on driving OLEDs with constant current for longer operation. Link here

The operation of OLEDs with electronic drivers is similar to anorganic LEDs for the most part. In a majority of applications, standard LED drivers may be used also for OLEDs. Nevertheless, there are some important basic rules and OLED specific characteristics, that have to be considered.

ESP32 (14) – esp-idf v2 is here and how to manage different versions

On 6th of April, Espressif published version 2.0 of the esp-idf framework.

idf2-01

The complete list of the new features and the bugs fixed is available on Github, let’s see the most important ones (in my opinion ;)):

  • they included or made stable new drivers for peripherals like I2C, I2S, SPI Master, SDMMC
  • you can now run a serial monitor using build commands (make monitor)
  • both the two cores (CPU e APP) are now enabled by default
  • the examples have been revised and expanded

It’s very important to notice – if you’re using a dedicated toolchain to build your projects – that the new framework does require version 5 of GCC compiler; you therefore need to download the updated toolchain Espressif prepared (I’ve already updated my tutorial about how to install and configure it).

Git repositories

The framework‘s source code is published on Github, that is a projects web repository based on the version control software Git. To explain how you can download and use the different versions of the framework, I have to do a brief introduction of the main concepts and commands of the tool.

What follows is not meant to be a complete tutorial about Git but only a way to give some information to better understand the commands used afterwards. I strongly suggest the tutorials by Atlassian if you want to explore the complex world of Git.

In Git, the “container” for a project or a set of files is named repository. All the information Git requires to manage a repository are stored in the .git subfolder within the main folder of your project:

idf2-02

To create a local repository, you only need to enter the folder of your project and run the command:

git init

If instead you want to copy on your local PC a remote repository (for example the repository – hosted on Github – that contains the esp-idf framework) you have to use the clone command:

git clone <url>
Notice that the clone command creates a local copy of the whole repository, including all the different versions of the files it contains.

It may happen that, when developing a project, you need to use code from other projects (for example libraries developed by others). In Git, thanks to submodules, you can “include” a Git repository as a folder of another repository. The esp-idf framework uses submodules to include the Wifi and Bluetooth libraries – at the moment for those libraries you cannot access the source code.

Browsing the repository, you can identify submodules thanks to a different icon:

idf2-03

If you click on it, you’re redirected to the Github repository which contains the module:

idf2-04

If a Git repository contains one or more submodules and you want to clone it including those submodules you have to add the –recursive option. The command to have a full local copy of the esp-idf repository is therefore:

git clone --recursive https://github.com/espressif/esp-idf.git

You can keep the local copy aligned to the remote repository with the command git pull. If the repository contains submodules, you have also to run the command git submodule update to update them as well:

idf2-05

 Branches and tags

Every version control system allows to branch your project, for example to perform parallel developments or to add new features and at the same time do some bugfixing on the actual version.

Moreover, Git allows to “take a snapshot” of the repository in a point in time and to label that snapshot with a tag.

On the Github website, you can select a specific branch or tag using the drop-down menu on the top left corner:

idf2-06

When Espressif releases a new version of the framework – both for stables and RC ones – it creates a specific tag:

idf2-07

We can therefore align the local copy of the repository to a specifig tag (for example version 2.0) with the commands:

git checkout v2.0
git submodule update --init

Working with different versions

Sometimes you may need to have different versions of the framework at the same time on your PC; for example because one of your projects is not compatible with version 2.0, version you’re instead using for a new development.

All the framework’s build process is based on the folder declared in the IDF_PATH env variable:

idf2-08

You can create different folders on your PC and use the git commands explained above to clone in those folders different versions of the repository. It only needs to change the IDF_PATH variable to let you choose which version you’re going to use when you run the make command.

MQTT with lwip and NXP FRDM-K64F Board

lwip-ping-example

Erich Styger from MCU on Eclipse writes, “In this article I show the basic steps to get MQTT running on the NXP FRDM-K64F board using MCUXpresso IDE, lwip and MQTT. lwip ois a small and open source TCP/IP stack which is widely used. To keep things very simple in this first post, I’m using it in bare-metal (no RTOS) mode with no encryption/security. The principle applies to any IDE/toolchain, as long there is a lwip port available for your board and IDE/toolchain. I’m using the MCUXpresso IDE as it nicely integrates with the MCUXpresso SDK which includes a lwip port for the FRDM-K64F.”

More details at MCU on Eclipse homepage.

MightyWatt: 70W Electronic Load for Arduino

pics-complete2_r-600

Jakub designed and built a programmable electronic load for Arduino, the MightyWatt R3:

MightyWatt R3 is a programmable electronic load. That means you can use it for testing batteries, power supplies, fuel cells, solar cells and other sources of electrical power. You can also make a programmable power supply from a fixed-voltage power supply and MightyWatt R3 and use it for example as an intelligent battery charger.

Project info at Kaktus circuits’ blog. It’s also up on Tindie.

MPPT solar charger rev c

pics-20170331_SolarCharger_008-8-600

Lukas Fässler from Soldernerd has been working on revised version of his MPPT Solar charger project:

Over the last few weeks I have been quite busy with my MPPT Solar Charger project. I’ve built up a first board and started writing firmware for it. Since the last version was not too different in terms of hardware I was able to re-use most of that code. But I hadn’t even touched on the whole USB stuff back then so there was still a lot of work to do. While the project is still far from being complete I am happy to say that I’ve made quite some progress. Most importantly, the new design seems to work well and so far I haven’t found any mistakes in the board layout. But let’s go through this step by step.

More details at Soldernerd homepage.

Tutorial: Using Eclipse with NXP MCUXpresso SDK v2 and processor expert

sdkv2-project-with-processor-expert

Erich Styger from MCU on Eclipse writes:

To me, software and tools are by far more important than the microcontroller. Because the silicon is a ‘one time kind of thing’, where the software has to be maintained and working over a longer time. And at least my software usually needs to be ported to a new device, so portability and available software and tools are critical to me.

The combination of MCUXpresso SDK (formerly Kinetis SDK) and Processor Expert is unfortunately not supported by NXP. But I have found a way to get them work together in a nice way, and this article is about making that combination possible :-).

More details at MCU on Eclipse homepage.

Bridge monitoring system using wireless sensor network

pics-LabVIEW

Zx Lee and his friends built the bridge monitoring system using wireless sensor network, that is available at github:

Recently, I completed a mini project together with two of my friends. So I am going to take this opportunity to share the project that we have made, we named it the Bridge Monitoring System (BMS) using Wireless Sensor Network (WSN). We are required to design an embedded system that is related with disaster management, either mitigation, preparedness, response or rehabilitation. To give you a high level overview of this project, basically we created three sensor nodes that acquire sensor measurement and transmit to central hub through wireless network. The sensor network works in a many-to-one fashion and data processing is done on the central hub. All the sensor measurement from each node is also displayed on the Host PC for user interface. Therefore, in this article, I am going to walk through some details of the project and how it works.

Project info at Zx Lee’s blog.

How Scotty made his own iPhone in China

Over the past two months we’ve been super excited to follow Scotty’s adventure recycling/refurbishing an iPhone 6S in the used cell phone market just south of Huaqiangbei, Shenzhen, China. Scotty finds all the bits and pieces from various sellers and then follows the iFixit instructions, backwards, to build his own recycled franken-phone.

Despite living in the market and running six hacker camps, it was still not clear to us exactly what goes on in the used cell phone markets. This video blows that open and exposes the brisk trade in recycled iPhone parts here in Shenzhen.

Along with This is Not Rocket Science, Scotty also took us on a three day phone recycling expedition earlier this month. Watch his channel for more videos and clips soon!

Magic Mote MSP430G2553 wireless sensor node with NRF24L01+ module

pics-magicmote2-600

Tom from Magic Smoke writes:

This is my first time designing a PCB for MSP430. I really like the NRF24L01+ booster pack but I would like something smaller to use for remote temperature sensors. With that in mind I’ve designed a 24.5 x 50 mm PCB (2 on a 5×5 cm prototype) featuring MSP430G2553 and an adapter for a 8-pin NRF24L01+ module using essentially the same pinout, with the intention of using the Spirilis library. There’s a jack socket to connect a 1-wire sensor (e.g. DS18B20), a 4-pin header to connect a temperature/humidity sensor (SHT22 or similar), a programming header that gives serial access, and 3 other general purpose I/O pins.

More details at Magic Smoke blog.