![Page 1: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/1.jpg)
Mitch Altman Chief Scientist, Cornfield Electronics, San Francisco, CA USA Author of The Brain Machine in MAKE Magazine #10 Inventor of TV-B-Gone universal remote control
email: [email protected] site: www.CornfieldElectronics.com
Codebits November 14, 2008
Hacking Cool things With
Microcontrollers!
![Page 2: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/2.jpg)
I Love My Job!
![Page 3: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/3.jpg)
Why make cool things with Microcontrollers?
![Page 4: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/4.jpg)
And anyone can learn…
Microcontrollers are fun to play with
Why make cool things with Microcontrollers?
![Page 5: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/5.jpg)
Examples of Cool Microcontroller Projects (in my opinion)
TV-B-Gone TV-B-Gone Pro
TV-B-Gone Kit
![Page 6: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/6.jpg)
Examples of Cool Microcontroller Projects (in my opinion)
MiniPOV3 kit
The Brain Machine
Trippy RGB Light LED Cube
Solar BugBot
![Page 7: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/7.jpg)
Examples of Cool Microcontroller Projects (in my opinion)
Mignonnette Game kit
![Page 8: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/8.jpg)
Examples of Cool Microcontroller Projects (in my opinion)
Trippy RGB Waves kit
![Page 9: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/9.jpg)
What is a Microcontroller?
![Page 10: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/10.jpg)
What is a Microcontroller?
A complete computer on a chip (with a little extra stuff)
Processor Program Memory
RAM
Input/Output
Timers
Inputs
Outputs
![Page 11: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/11.jpg)
What Does a Microcontroller Do?
Like all computers:
Fetch Instruction
Execute Instruction
Repeat forever (till power goes off)
![Page 12: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/12.jpg)
How to Make Cool Things with Microcontrollers
• Idea
• Hardware
• Firmware
• Coolness!
![Page 13: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/13.jpg)
Hello World
Make an LED blink
![Page 14: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/14.jpg)
Hello World – Hardware Battery +
Battery -
Battery - Resistor LED Microcontroller
![Page 15: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/15.jpg)
Hello World – Digression:
(Very) Basic Electronics Lesson
Electronics: electrons flowing through wires and parts (sorta like water flowing through pipes)
Current -- speed of electrons flowing
Battery -- like a pump pushing electrons
Resistor -- like a kink in a pipe, slows down electrons
Diode -- one-way valve for current
LED -- special diode: emit photons when current flows
Transistor -- remotely controlled switch
Microcontroller -- zillions of transistors!
![Page 16: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/16.jpg)
Hello World – Firmware
Software: X = 00000001
Firmware: X = 00000001
Assign a value to a variable:
![Page 17: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/17.jpg)
Hello World – Firmware
PortA = 00000001
PortA = 00000000
Changing an output pin:
![Page 18: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/18.jpg)
Hello World – Firmware
PortA = 00000001
Call Delay
PortA = 00000000
Changing an output pin (using manual delay):
Delay: Count = 0
Wait: Count = Count + 1 If Count < 10,000 goto wait Return
-----------
![Page 19: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/19.jpg)
Hello World – Firmware
Main: Call Init
PortA = 00000001 Call Delay
PortA = 00000000 Sleep
Changing an output pin (using hardware timer):
Delay: Timer0 = 60,000
Wait: If Timer0flag = 0 goto wait Return
-----------
![Page 20: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/20.jpg)
Hello World – Firmware
Main: Call Init
PortA = 00000001 Call Delay
PortA = 00000000 Sleep
Changing an output pin (using interrupts):
Delay: Timer0 = 60,000
Wait: If TimeFlag = 0 goto wait Return
-----------
Advanced topic:
ISR: TimeFlag=1
Return
![Page 21: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/21.jpg)
Hello World – programming your chip
Use software on your computer Text Editor Compiler Programmer
Specific software Depends on your microcontroller PIC, AVR, etc.
Need hardware programmer (often very cheap)
![Page 22: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/22.jpg)
Real Project: Ladyada’s MiniPOV3
Just like “Hello World”, but 8 LEDs and different timing
Etc…
![Page 23: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/23.jpg)
Hacking! :
The easy way to make your cool microcontroller projects
![Page 24: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/24.jpg)
Hacking!
TV-B-Gone from MiniPOV3 kit
![Page 25: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/25.jpg)
Hacking!
TV-B-Gone Kit from MiniPOV3 hack
![Page 26: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/26.jpg)
Hacking!
TV-B-Gone Pro from TV-B-Gone Kit
![Page 27: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/27.jpg)
Hacking!
Trippy RGB Light from MiniPOV3 kit
Pulse Width
Modulation (PWM)
. . . . . . 1/2 brightness
. . . . . . 1/4 brightness
. . . . . . min brightness
![Page 28: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/28.jpg)
Hacking!
Trippy RGB Waves kit from Trippy RGB Light
IR detector causes interrupt when it sees IR reflecting from your hand
![Page 29: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/29.jpg)
Hacking!
Solar BugBot from MiniPOV3 kit
![Page 30: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/30.jpg)
Hacking!
LED Cube from MiniPOV3 kit
(First NYC Resistor Project)
![Page 31: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/31.jpg)
Hacking!
Brain Machine from MiniPOV3 kit
Synchronizes your brain to a desired brainwave sequence (and hallucinate along the way!)
WARNING: Blinking lights are not good for people with epilepsy
![Page 32: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/32.jpg)
Brain Machine
![Page 33: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/33.jpg)
What’s It Like?
Video by Bre P
ettis
![Page 34: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/34.jpg)
Microcontrollers are fun to play with
Come by the Workshop Hardware Hacking Area
And anyone can learn!
![Page 35: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/35.jpg)
Q & A
![Page 36: Hardware Hacking area: Make Cool Things with Microcontrollers (and learn to solder)](https://reader033.vdocument.in/reader033/viewer/2022060200/5599666c1a28ab731e8b47b0/html5/thumbnails/36.jpg)
Mitch Altman Chief Scientist, Cornfield Electronics, San Francisco, CA USA Author of The Brain Machine in MAKE Magazine #10 Inventor of TV-B-Gone universal remote control
email: [email protected] site: www.CornfieldElectronics.com
Codebits November 14, 2008
Hacking Cool things With
Microcontrollers!