Since I'm late to the party, I'm just going to do a quick proof of concept implementation rather than a fully developed tool. I'll continue to develop the tool to fit future requirements.
I decided to make the tool modular to make it more flexible. The first module will incorporate the Micro:bit and the display shield. The second module will include the I2C DAC and programmable current sink. The modular approach allows me to add other functionality later.
The first step was to print a case to house the Micro:bit and display.
The second step was to provide the interface for the second module. The second module needs the I2C pins to program the DAC and an Analog pin to read the current sink voltage plus power pins.
|19||SCL I2C clock|
|20||SDA I2C data|
|0||Analog In 0|
Unfortunately, the LCD shield that I'm using only provides the breakout of the pins that the shield uses so I needed to solder wires directly to the shield connector pins.
For now, I've decided to implement the second module on a breadboard so I won't print a case for it yet.
As I was searching for the right software development environment to use, I came across a great tutorial by Adafruit on programming the Micro:bit using the Arduino IDE: https://learn.adafruit.com/use-micro-bit-with-arduino/overview.
Since I am very familiar with the Arduino IDE, this allowed me to get the software working quickly. I used the SPI library and and a Waveshare library for a compatible Arduino LCD shield. After adjusting the pins and fixing the screen orientation I was able to use the library functions without additional modification. I used the Wire library for the I2C and since the Board Manager maps the Micro:bit default pins; I didn't need to specify them.
Here is the code for my example program: Microbit_VI_Monitor.ino:
Video of Curve Trace: Linear trace of current through a fixed resistor
I basically just verified that I could get the hardware and software interface working for a Micro:bit Curve Tracer. It still needs some work to get it functioning as I'd like. I would like to add remote logging via Bluetooth in addition to just using the LCD display for output. Remote control via Bluetooth would be nice also. I need to add some configuration code to allow scaling for different voltage and current values. I also need to add calibration values to allow running with different power sources (I am using the 3.3V supply as my DAC and ADC references and the supply value changes with power source - i.e. USB vs battery). And I need to package the second module. But all that will have to wait for another day....