Gadget Lab Lecture 6:
Sensors and Interfacing…
Dr. Cindy Harnett
ECE Dept., U of Louisville
run the gadget universe
microcontroller talks to the 1
wire chips in the
sensor project, and to the radio chip. (Texas Inst.)
microcontrollers in cell phones are as powerful as
desktop computers of a few years ago, and consume little
power. (Made by many companies)
Nowadays: programmable in high level languages like C.
Minimalist chips like some
(Microchip) are still programmed in assembly language.
Most microcontrollers are not good at multitasking, but
excel at repetitive tasks requiring good timing.
Remember all those “black dots” in our
teardowns? Usually there’s a microcontroller
underneath. Sometimes a custom made IC.
Strict syntax, few commands
Commands differ for each controller
Can make up variable names
Can have subroutines
Should have comments!
; change LED pattern based on state of digit_index and dot_index
;test for end of digit
;pattern for blank column
;it needs a blank
;clear carry before a rotate
;double the index because each
;takes two instructions
How do you program
Get or build a
that plugs into a
PC. Can program in a ZIF socket or in a circuit.
Get software that “
” from your
PC to the target chip. Usually sold by the chip
maker, sometimes 3rd party
Usually there’s a free
that lets you code, compile, and
download your code onto the chip
Fancy hardware (debuggers, emulators) is
usually available to catch
Learning to use microcontrollers
Take ECE course specifically on microcontrollers:
Or pick a starter project like lighting a 7
display and learn from examples
Microchip PICs are versatile and cheap
stick with assembly language
MSP430 tools are also inexpensive ($20
Or get a module like a Basic Stamp or Arduino,
with a large online community and plenty of code
ECE 412, Computer Interfacing (uses 68HC11 chips)
From last time:
LabView PCI or PCMCIA
cards and connector board
very common in research labs
Lower cost: “Phidgets” have
analog inputs and USB to PC
Even cheaper, dedicated
circuits such as the 1
And many more…
Demos based on lab projects at U of L:
Wire and wireless sensor interfacing
wire” chips allow
multiple sensors to be
connected to the same
wire for weatherstations
and similar devices.
Wireless sensor board
can poll multiple sensors
on the 1
(Flow sensor demo)
From last time:
Antepenultimate* Slide of the
Thanks for being the Gadget Lab “
.” Comments? What should be changed
See IEEE student group for jumper
wires/other gadget building tools.
Slides and most websites I mentioned in the
course are available on BlackBoard.
Visit ECE labs in BRB/Lutz/Speed!
*2 more slides after this one. This word is “drittletzt” in German
Heat the part, then solder will flow onto it. If solder is only going onto your
wire but not your motor, you’ve probably noticed that thin wires heat more
quickly than chunky motors. Try heating the motor first, then bring the wire
in just before soldering.
Attach copper foil to your motor: copper solders easily
Is the tip blackened (oxidized) so much that
the solder won’t melt? Dip the hot soldering
iron in tip
Avoid touching the soldering iron to the sponge for more than about 1
second. Long contact will oxidize the tip.
Work at the lowest temperature you can, to avoid oxidizing the tip.
Sandpaper can be used in tough cases (let your tip cool off first), but
eventually it will remove the tin plating on the iron.
You will need a new tip someday.
727 West Main Street
4:30 (drop in anytime)
Show off your projects at the ECE table
And A Special Announcement