Exercise: Pico Music¶
In this exercise we will automate the motor-driven musical instrument you produced for the previous exercise. The overall project objective is an autonomous sound-producing device. The technical objectives are prototyping a motor driver circuit and using software to create rhythm.
Performance¶
Your goal is to produce a time-varying musical performance between 30 and 60 seconds using your specific machine. The sample code demonstrates turning the motor on and off, changing direction, and changing speed. Given there are no sensors or inputs, the principle approach is creating patterns over time.
Please experiment with patterns of motor activation which work best for your mechanism. Some prompts to consider:
a time-based performance has a beginning, middle, and end
rest periods provide silence and contrast
an accelerating or decelerating tempo can build to a conclusion
patterns can be rhythmic or irregular
articulation creates expression, e.g. varying between staccato and legato
a theme and variation provide an anchor for repetition for the listener
a few simple phrases assembled together can make a piece
Sample TB6612 Motor Driver Circuit¶
The lab currently stocks Pololu TB6612FNG dual motor driver modules, Lab Part 0485.
Sample motor driver circuit. The TB6612 is a dual H-bridge driver capable of operating two motors bidirectionally. Note that any six GPIO pins may be used to control the TB6612. Please be careful with the power wiring, motor voltages can destroy the Pico.¶
References¶
Deliverables¶
Live in-class demo of your device performance.
A short report posted to the shared drive including:
a short text statement reviewing your intent and outcomes in about a paragraph
a brief video (e.g no more than 60 seconds) with sound of the machine performance
Your CircuitPython script (e.g.
code.pyfile)