Slides
Control App(s)
Citizen Science / Data Logging App
IoT Applications
Great microbit.org Resources
Misc.
- ScratchX (Micro:Bit extension!)
Making Blocks
Submit your resource summaries here.
Submit your resource summaries here.
This project was created in an effort to create a real-world example project for my introductory IoT courses.
The mini-garage provides nearly the same features as a real garage door opener:
The videos below shows the basic garage door control that developers (students) have to implement. They implement all control logic (direction of motor, when to start/stop, etc.). Some of the required behaviors include:
Follow-up assignments implement internet-based control of and feedback from the door. These include features that aren’t feasible on traditional garage door openers, such as notifications if the door has been left open.
Basic Opening Due to Button
Alternate Video Source
Detecting a Fault (Person in the Way)
Alternate Video Source
View of the Mechanical Parts Opening/Closing from Above
Alternate Video Source
View of the Mechanical Parts Opening/Closing from Side
Alternate Video Source
A Tour of the 3D Model
Alternate Video Source
An Overview of Constructing the 3D Model
Alternate Video Source
A garage was selected for a variety of reasons:
I also had some personal goals:
The intended purpose (classroom use), imposed some requirements on the mini-garages:
Given the requirements, I decided on something that’s approximately shoe-box size. A 1/24th scale was a good fit. The model is parameterized and many aspects of it will scale with a simple change to the scale parameter. The size of tabs on the box joints may need some adjustment and some elements, like the motors/gears/etc. are a set size and don’t scale. Consequently, modifications of scale often need some triage to get back to a working model and things go awry if the scale is significantly different than 1/24th.
I chose a two processor design to help protect hardware and to require compliance with an API. The students write code for a Particle Photon, which is then plugged into the garage hardware via a ZIF socket. It interacts with an Arduino Pro Micro, which does the real I/O. The only shared electrical connections from the Photon are power, ground, and RX/TX from a UART. This minimal interface helps avoid a wayward short-to-ground due to an accidentally misconfigured output. (RX/TX is relatively safe due to code review prior to using the hardware and because we don’t use that RX/TX for any other aspect of class. Circuits for other work only uses the DX and AX pins).
When developing and testing code without the garage, developers use stubs for the API. The stubs typically simulate the garage via LEDs and switches, which is sufficient for most testing. Some aspects of the assignments require meeting timing constraints, which requires code instrumentation as well.
The motors (steppers) were chosen partly due to size and, largely, due to price and availability. The choice of motors impacted both the technique for stall detection and the power requirements. Since it’s relatively difficult to detect stalls in steppers via changes in current, a mechanical rotary sensor on the front belt gear is used. If motion stops for a sufficiently long time it’s assumed that the door is stalled. This technique has some limitations if the mechanical strength of the motor/belt can damage the mini-garage prior to a stall being detected, but fortunately this doesn’t seem to be the case.
Typically the Arduino Pro Micro is connected via a USB cable to a PC, which monitors for errors. If the developer’s code attempts to overdrive hardware or misses timing constraints, it’s reported via a message. It was originally hoped that the USB cable could also satisfy all power requirements. Unfortunately the total current used by all components may exceed the current supplied by either of the Arduino Pro Micro’s on-board voltage regulators, which could lead to erratic performance. Rather than using a custom USB cable and additional power supply, I decided to just use an independent power supply for the motors (4AA batteries).
Files / Source
Average cost for a single garage: $40.83 (plus minor incidentals)
Special thanks to Carly Lowe, who was a Dream Consultant at Tech Shop when I made these. Around 5pm one day I mentioned to Carly that I wanted to create a little model garage. There was a prototype building with sliding door assembled and waiting when I came in at 9am the next morning. She showed me the idea was feasible. Of course it took me about two months to recreate what she’d done as an evening project. (I wouldn’t have considered the windows/door/etching if I hadn’t seen Carly’s model. She also suggested the use of fabric for the door “hinge”)
This is out-of-date. Just follow the instructions at https://github.com/Microsoft/pxt-microbit
I’ve been looking into the Micro:Bit and Microsoft’s PXT (Programmer eXperience Toolkit). PXT and all the required build tools can be installed on macOS, but the official instructions are a little weak. Here are the required steps:
All these commands need to be run in a terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
brew tap ARMmbed/homebrew-formulae
brew install python cmake ninja arm-none-eabi-gcc
pip install yotta
brew install srecord
git clone https://github.com/Microsoft/pxt-microbit
cd pxt-microbit
npm install -g pxt
npm install
pxt serve
This will download the needed components, do compilation, and eventually launch the PXT environment in your default browser. Watch the terminal window though. Downloads may exceed github limits and it may require you to paste a URL to login in and complete downloads (something like https://yotta.mbed.com/?provider=github#login/...).
cd pxt-microbit/libs
git clone https://github.com/Microsoft/pxt-bluetooth-temperature-sensor
mv pxt-bluetooth-temperature-sensor bluetooth-temperature-sensor
...
"bundleddirs": [
... ,
"libs/bluetooth-temperature-sensor"
],
...
...
"dependencies": {
"core": "file:../core",
"bluetooth": "file:../bluetooth"
...
This year co-author Michael Rogers and I presented “An IoTa of IoT” at SIGCSE2017.
I helped put together two simple projects that could be used in agriculture applications (monitoring livestock):
Thanks for participating in our Workshop. Feel free to contact us at any time either via e-mail or connect with us on LinkedIn:
Bill Siever | Michael Rogers |
---|---|
bsiever@gmail.com | mprogers@mac.com |
Please download these files:
Please help SIGCSE evaluate workshops by completing this survey at the end of our session: