Skip to content

lecture notes

this weeks lecture

Nicolas de Coster made a USB QC board so you can use a USB power supply for all your projects. QC is proprietary but easy to implement. Much less known than USB PD but higher end USB chargers can do both.

Charlieplexing: multiplex LEDs to reduce pin count. All cathodes to leds as rows, all anodes to leds as columns. Row and column pins can be 0, 1 or X. You can’t use the diagonals. So N wires can control N*(N-1) LEDs which almost is equal to N^2. In software you control which pins are set as input and which as output.
sm
(source)

When using a mosfet, It’s a good idea to add a 10k resistor from gate to ground to make sure the mosfet has a known state (off) when the microcontroller is turned on.
Also a small (100 Ohm) resistor might be good to add between control port and gate, to ease the switching spikes. As the gate is seen as a capacitor, this RC combination acts as a lowpass filter, effectively rolling of the high frequencies.

Neil made a working example how to use I2C oleds without library.
Lingdong Huang made a hole menu system for oleds.

i2c pullups: check debug page of Ricardo Marques there are formulas and everything how to calculate the value of the I2C pullup resistor. Even the length of the cable can influence the value of the resistors
because of changes in cable/trace capacitance.

A cheap brushed motor driver is the TB67H451AFNG. You’d use a motor driver if you want the motor to be able to go forward and backwards. This is called an H-bridge.
Using 2 capacitors in parallel (10 uF and 0.1 uF) is needed to decouple high freq spikes and quick power supply.
In micropython boot.py is run before main.py. Use this to set the pins for an H-bridge to output and turn them to 0 as soon as possible. Otherwise crazy stuff might happen.
A DC motor to turn slowly, you usually use a gear motor.

To drive a speaker you can use an H-bridge too :-)

BLDC = brushless DC motor. They are efficient, reliably and make less noise. They have 3 sets of coils that you drive with a half-bridge (half of a H bridge). They’re available in lots of variations. Gimbal motors include an encoder. See here for an example. Most commonly you’d use an ESC (Electronic speed controller) to drive them (for anything beyond small BLDCs).

DRV8428 is a favorite driver for stepper motors. It has a step and direction interface. It can do microstepping: varying the current into the coil so you do smaller steps. Using microstepping, you can make them more silent.

The peopoly magneto X uses a magnetic-based linear motor system like the Maglev trains, for very high accuracy: 3 microns. see this youtube video.

Machine building recitation

https://machines.fabcloud.io/
COTS -> Commercial off the shelf -> Fab-in-a-box
NOTS -> Not off the shelf

leonmcelroy.com –> hackclub.com
Fab Pico V2: 3D printed PCB mill, fully functional and can be printed on a prusa in < 40 hours: made by rahul
Daniele Ingrassia -> open source machines for fablabs. Documentation and files on Open Lab Starter Kit at github.
Jens Dyvik -> Fabricatable machine

Jake Read, Leo McElroy, Quentin Bolsé made Modular Things -> idea is to directly interact with a device, the device will tell what it is capable of. See https://modular-things.com. It all runs on OSAP: open systems assembly protocol.
Urumbu -> what if the devices don’t have a motherboard. A computer talks directly to the hardware -> https://gitlab.cba.mit.edu/neilg/urumbu.
Nadya Peek -> professor at Uni of Washington -> machine agency. Github here.