EE_2012-09.pdf

(9965 KB) Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
[ MICROCONTROLLERS & EMBEDDED ANALOGUE AUDIO DIGITAL TE S T & MEASUREMENT ]
74874
September 2012 AUS$ 14.90 - NZ$ 17.90 - SAR 105.95 - NOK 102 £ 4.90
embedded
LINUX
www.elektor.com
www.elektor.com
Software Development
Arduino on Course
1-bit Sound Generation ... What?!?
Nunchuk USB Interface
repurposing a video game controller
Model Train Interface
with USB connection and Windows script editor
PICo PROto
Minimalist prototyping tool for PIC16 or 18
Personal Download for I © Elektor
875788581.533.png 875788581.544.png 875788581.555.png 875788581.566.png 875788581.001.png 875788581.012.png 875788581.023.png 875788581.034.png 875788581.045.png 875788581.056.png 875788581.067.png 875788581.078.png 875788581.089.png 875788581.100.png 875788581.111.png 875788581.122.png 875788581.133.png 875788581.144.png 875788581.155.png 875788581.166.png 875788581.177.png 875788581.188.png 875788581.199.png 875788581.210.png 875788581.221.png 875788581.232.png 875788581.243.png 875788581.254.png 875788581.265.png 875788581.276.png 875788581.286.png 875788581.297.png 875788581.308.png 875788581.319.png 875788581.330.png 875788581.341.png 875788581.352.png 875788581.363.png 875788581.374.png 875788581.385.png 875788581.396.png 875788581.407.png 875788581.418.png 875788581.429.png 875788581.440.png 875788581.451.png 875788581.462.png 875788581.473.png 875788581.484.png 875788581.495.png 875788581.506.png 875788581.517.png 875788581.527.png 875788581.532.png 875788581.534.png 875788581.535.png 875788581.536.png 875788581.537.png 875788581.538.png 875788581.539.png 875788581.540.png 875788581.541.png 875788581.542.png 875788581.543.png 875788581.545.png 875788581.546.png 875788581.547.png 875788581.548.png 875788581.549.png 875788581.550.png 875788581.551.png 875788581.552.png 875788581.553.png 875788581.554.png 875788581.556.png 875788581.557.png 875788581.558.png
74874
Brought to you by Eurocircuits
The European reference for PCB
prototypes and small series
Speed up your design cycle and keep costs down using our fast,
easy-access online PCB pooling services.
We deliver:
• Top quality PCBs at low pooling prices
• Fast deliveries to suit your requirements
• Comprehensive technology support
• No set-up or tooling charges
• No minimum order charge - order from 1 PCB
• Online ordering without pre-payment
• Stencil service
PCB proto dedicated engineering prototype service, fast and low-cost
• 1 or 2 PCBs in 2, 3, 5 or 7 working days
• DRC-checked and fully fi nished with 2 soldermasks and 1 legend, 150µm technology
• 1 x 100 x 80mm in 7WD - 2 layer 47,02
- 4 layer 95,52
• 2 x 100 x 80mm in 7WD - 2 layer 36,89 each
- 4 layer 74,76 each
Prices quoted include 21% Belgian VAT but exclude transport costs
STANDARD pool widest choice of Eurocircuits pooling options
• 1-8 layers 150µm technology PCBs
• from 2 working days
TECH pool all the benefi ts of pooling for high-density PCBs
• 2-8 layers 100µm technology PCBs
• from 4 working days
IMS pool aluminium-backed PCBs for high heat-dissipation (LED) applications
• Single layer Insulated Metal Substrate PCBs
• 1.5mm aluminium base with 75µm thermally conductive dielectric and 35µm Cu foil
• from 3 working days
On demand multi-option non-pooling service for specialist needs
• 1-16 layers down to 90µm technology
• RF and high Tg materials
• from 2 working days
www.elektorPCBservice.com
Personal Download for I © Elektor
875788581.559.png 875788581.560.png 875788581.561.png 875788581.562.png 875788581.563.png 875788581.564.png 875788581.565.png 875788581.567.png 875788581.568.png 875788581.569.png 875788581.570.png 875788581.571.png 875788581.572.png 875788581.573.png 875788581.574.png 875788581.575.png 875788581.576.png 875788581.002.png 875788581.003.png 875788581.004.png 875788581.005.png 875788581.006.png 875788581.007.png 875788581.008.png 875788581.009.png 875788581.010.png 875788581.011.png 875788581.013.png 875788581.014.png 875788581.015.png 875788581.016.png 875788581.017.png 875788581.018.png 875788581.019.png 875788581.020.png 875788581.021.png 875788581.022.png 875788581.024.png 875788581.025.png 875788581.026.png 875788581.027.png 875788581.028.png 875788581.029.png 875788581.030.png 875788581.031.png 875788581.032.png 875788581.033.png 875788581.035.png 875788581.036.png 875788581.037.png 875788581.038.png 875788581.039.png 875788581.040.png 875788581.041.png
74874
Personal Download for I © Elektor
875788581.042.png 875788581.043.png 875788581.044.png 875788581.046.png 875788581.047.png 875788581.048.png 875788581.049.png 875788581.050.png 875788581.051.png 875788581.052.png 875788581.053.png 875788581.054.png 875788581.055.png 875788581.057.png 875788581.058.png 875788581.059.png 875788581.060.png 875788581.061.png 875788581.062.png 875788581.063.png 875788581.064.png 875788581.065.png 875788581.066.png 875788581.068.png 875788581.069.png 875788581.070.png 875788581.071.png 875788581.072.png 875788581.073.png 875788581.074.png 875788581.075.png 875788581.076.png 875788581.077.png 875788581.079.png 875788581.080.png 875788581.081.png 875788581.082.png 875788581.083.png 875788581.084.png 875788581.085.png 875788581.086.png 875788581.087.png 875788581.088.png 875788581.090.png 875788581.091.png 875788581.092.png 875788581.093.png 875788581.094.png 875788581.095.png 875788581.096.png 875788581.097.png 875788581.098.png 875788581.099.png 875788581.101.png 875788581.102.png 875788581.103.png 875788581.104.png 875788581.105.png 875788581.106.png 875788581.107.png 875788581.108.png 875788581.109.png 875788581.110.png 875788581.112.png 875788581.113.png 875788581.114.png 875788581.115.png 875788581.116.png 875788581.117.png 875788581.118.png 875788581.119.png 875788581.120.png 875788581.121.png 875788581.123.png 875788581.124.png 875788581.125.png 875788581.126.png 875788581.127.png 875788581.128.png 875788581.129.png 875788581.130.png 875788581.131.png 875788581.132.png 875788581.134.png 875788581.135.png 875788581.136.png 875788581.137.png 875788581.138.png 875788581.139.png 875788581.140.png 875788581.141.png 875788581.142.png 875788581.143.png 875788581.145.png 875788581.146.png 875788581.147.png 875788581.148.png 875788581.149.png 875788581.150.png 875788581.151.png 875788581.152.png 875788581.153.png 875788581.154.png 875788581.156.png 875788581.157.png 875788581.158.png 875788581.159.png 875788581.160.png 875788581.161.png 875788581.162.png 875788581.163.png 875788581.164.png 875788581.165.png 875788581.167.png 875788581.168.png 875788581.169.png 875788581.170.png 875788581.171.png 875788581.172.png 875788581.173.png 875788581.174.png 875788581.175.png 875788581.176.png 875788581.178.png 875788581.179.png 875788581.180.png 875788581.181.png 875788581.182.png 875788581.183.png 875788581.184.png 875788581.185.png 875788581.186.png 875788581.187.png 875788581.189.png 875788581.190.png 875788581.191.png 875788581.192.png 875788581.193.png 875788581.194.png 875788581.195.png 875788581.196.png 875788581.197.png 875788581.198.png 875788581.200.png 875788581.201.png 875788581.202.png 875788581.203.png 875788581.204.png 875788581.205.png 875788581.206.png 875788581.207.png 875788581.208.png 875788581.209.png 875788581.211.png 875788581.212.png 875788581.213.png 875788581.214.png 875788581.215.png 875788581.216.png 875788581.217.png 875788581.218.png 875788581.219.png 875788581.220.png 875788581.222.png 875788581.223.png 875788581.224.png 875788581.225.png 875788581.226.png 875788581.227.png 875788581.228.png 875788581.229.png 875788581.230.png 875788581.231.png 875788581.233.png 875788581.234.png 875788581.235.png 875788581.236.png 875788581.237.png 875788581.238.png 875788581.239.png 875788581.240.png 875788581.241.png 875788581.242.png 875788581.244.png 875788581.245.png 875788581.246.png 875788581.247.png 875788581.248.png 875788581.249.png 875788581.250.png 875788581.251.png 875788581.252.png 875788581.253.png 875788581.255.png 875788581.256.png 875788581.257.png 875788581.258.png 875788581.259.png 875788581.260.png 875788581.261.png 875788581.262.png 875788581.263.png 875788581.264.png 875788581.266.png 875788581.267.png 875788581.268.png 875788581.269.png 875788581.270.png 875788581.271.png 875788581.272.png 875788581.273.png 875788581.274.png 875788581.275.png 875788581.277.png 875788581.278.png 875788581.279.png 875788581.280.png 875788581.281.png 875788581.282.png 875788581.283.png 875788581.284.png
 
875788581.285.png 875788581.287.png 875788581.288.png 875788581.289.png 875788581.290.png 875788581.291.png 875788581.292.png 875788581.293.png 875788581.294.png 875788581.295.png 875788581.296.png 875788581.298.png 875788581.299.png 875788581.300.png 875788581.301.png 875788581.302.png 875788581.303.png 875788581.304.png 875788581.305.png 875788581.306.png 875788581.307.png 875788581.309.png 875788581.310.png 875788581.311.png 875788581.312.png 875788581.313.png 875788581.314.png 875788581.315.png 875788581.316.png 875788581.317.png 875788581.318.png 875788581.320.png 875788581.321.png 875788581.322.png 875788581.323.png 875788581.324.png 875788581.325.png 875788581.326.png 875788581.327.png 875788581.328.png 875788581.329.png 875788581.331.png 875788581.332.png 875788581.333.png 875788581.334.png 875788581.335.png 875788581.336.png 875788581.337.png 875788581.338.png 875788581.339.png 875788581.340.png 875788581.342.png 875788581.343.png 875788581.344.png 875788581.345.png 875788581.346.png 875788581.347.png 875788581.348.png 875788581.349.png 875788581.350.png 875788581.351.png 875788581.353.png 875788581.354.png 875788581.355.png 875788581.356.png 875788581.357.png 875788581.358.png 875788581.359.png 875788581.360.png 875788581.361.png 875788581.362.png 875788581.364.png 875788581.365.png 875788581.366.png 875788581.367.png 875788581.368.png 875788581.369.png 875788581.370.png 875788581.371.png 875788581.372.png 875788581.373.png 875788581.375.png 875788581.376.png 875788581.377.png 875788581.378.png 875788581.379.png 875788581.380.png 875788581.381.png 875788581.382.png 875788581.383.png 875788581.384.png 875788581.386.png 875788581.387.png 875788581.388.png 875788581.389.png 875788581.390.png 875788581.391.png 875788581.392.png 875788581.393.png 875788581.394.png 875788581.395.png 875788581.397.png 875788581.398.png 875788581.399.png 875788581.400.png 875788581.401.png 875788581.402.png 875788581.403.png 875788581.404.png 875788581.405.png 875788581.406.png 875788581.408.png 875788581.409.png 875788581.410.png 875788581.411.png 875788581.412.png 875788581.413.png 875788581.414.png 875788581.415.png 875788581.416.png 875788581.417.png 875788581.419.png 875788581.420.png 875788581.421.png 875788581.422.png 875788581.423.png 875788581.424.png 875788581.425.png 875788581.426.png 875788581.427.png 875788581.428.png 875788581.430.png 875788581.431.png 875788581.432.png 875788581.433.png 875788581.434.png 875788581.435.png 875788581.436.png 875788581.437.png 875788581.438.png 875788581.439.png 875788581.441.png 875788581.442.png 875788581.443.png 875788581.444.png 875788581.445.png 875788581.446.png 875788581.447.png 875788581.448.png 875788581.449.png 875788581.450.png 875788581.452.png 875788581.453.png 875788581.454.png 875788581.455.png 875788581.456.png 875788581.457.png 875788581.458.png 875788581.459.png 875788581.460.png 875788581.461.png 875788581.463.png 875788581.464.png 875788581.465.png 875788581.466.png 875788581.467.png 875788581.468.png 875788581.469.png
74874
6
Colophon
Who’s who at Elektor.
8
News & New Products
A monthly roundup of all the latest in
electronics land.
Do try this at home
14
DesignSpark ChipKIT™ Challenge
Winners
Hot ideas turned into cool solutions, and
winning prizes too.
I believe one our irst articles linking DIY elec-
tronics to ‘kiddie’ electronics was the Game-
boy Digital Oscilloscope (GBDSO) from 2000.
Basically, you plugged a module into a Nin-
tendo Gameboy game console and hey presto
there’s a simple portable oscilloscope. Initially
we staged a Dutch-ish auction on the web to
‘test the market’, that is, check what price our
customers were willing to pay for the product.
Eventually the Elektor GBDSO reached sales
volumes in the thousands across a period of
more than ten years. If that GBDSO were an
Olympic athlete, it would be in the company
of Crescendo, EEDTs, Junior Computer, Film-
net Decoder, ATM18, SDR and Pico-C.
Resonating widely across the e-commu-
nity, it is not surprising to see a product
like GBDSO attracting strange questions
from law-abiding readers (mostly from
Germany), like “Where do I get hold of a
known-good Gameboy, with full warranty,
mint condition, at the lowest price?” to
which we replied “Promise your kid(s) the
new Advance model”, or “Dig around in
the sandpit at the local playground”. Like-
wise, Q : “Did you get Nintendo’s lawyers
to approve that module?” A : “Hardly. Nin-
tendo’s techies subscribe to Elektor.”
Twelve years on, I would unhesitatingly rec-
ommend to all you electronics designers
out there to hack, fry, disembowel, blend,
explore, rebuild or repurpose the tons
of kid’s electronics out there. It’s cheap,
often free and in plentiful supply. By rescu-
ing stuff from skips and dumpsters illed
by the throwaway generation, the elec-
tronics inside provides a mental link to the
clever people who designed and build it all.
Reverse engineering is good engineering.
Do it creatively and with respect. Like we did
with the Nunchuk on page 18.
18
Nunchuk USB Interface
Adding USB enables the famous Wii
accessory to be changed into an I 2 C man/
machine interface.
26
Model Train Interface
Give your model railway layout more
intelligence without investing in
intelligent trains!
32
Embedded Linux Made Easy (3)
In this instalment we deal with building
the components of the O/S and even
develop a little C.
40
Motorbike Alarm
This electronic sentry detects if your
bike’s memorized position on the stand is
changed, and sets off an alarm.
43
E-Labs Inside:
- ‘Spoon’ soldering
- USB: current unlimited!?
- GPIO access on Elektor Linux board
- SD Card Correction Script
- Elektorprojects.com 4U2
- Plug-o-(d)rama 2.0
47
Low-cost 60 MHz Sig Gen
PWM, incremental control and an
impressive frequency range — all
squeezed from an LTC6904 and a
PIC16F1823.
48
Electronics for Starters (7)
Adding capacitive feedback to static
transistor circuits enables LEDs to lash
and blink on their own, 4ever & ever.
Happy reading and nunchuking,
Jan Buiting, Managing Editor
4
09-2012 elektor
Personal Download for I © Elektor
875788581.470.png 875788581.471.png 875788581.472.png 875788581.474.png 875788581.475.png 875788581.476.png 875788581.477.png 875788581.478.png 875788581.479.png 875788581.480.png 875788581.481.png 875788581.482.png 875788581.483.png 875788581.485.png 875788581.486.png 875788581.487.png 875788581.488.png 875788581.489.png 875788581.490.png 875788581.491.png 875788581.492.png 875788581.493.png 875788581.494.png 875788581.496.png 875788581.497.png 875788581.498.png 875788581.499.png 875788581.500.png 875788581.501.png 875788581.502.png 875788581.503.png 875788581.504.png 875788581.505.png 875788581.507.png 875788581.508.png 875788581.509.png 875788581.510.png 875788581.511.png 875788581.512.png 875788581.513.png 875788581.514.png 875788581.515.png
74874
Volume 38
September 2012
no. 429
CONTENTS
54
Arduino on Course (1b)
Here we close off our introduction into
the basics of sound generation using the
Arduino.
18
Nunchuk USB Interface
The Wii games console accessory called Nunchuk has a second controller go-
verning a 3-axis accelerometer, an analogue joystick, and two buttons. All it
takes is a PIC18F2550 to communicate with this man/machine interface using
the I²C protocol and use it for other applications, e.g. in robotics, modelling,
for DMX, etc.
59
Component Tips
Raymond’s Pick of the Month: ams
AS3935 Lightning Sensor. This novel IC
detects thunderstorms up to 25 miles
away.
60
AVR Software Deined Radio (5)
This month we delve into decoding VLF
time signal stations like DCF77, MSF and
TDF162.
26
Model Train Interface
68
BasicCard goes Contactless
Zeitcontrol’s RFID version of the
BasicCard is a great tool to explore
contactless operation of all sorts of
devices.
With this small circuit your model railway will have a few additional features
and more intelligence, without the need to buy intelligent trains and other ex-
pensive model railway equipment. The idea is to write a script which contains
a sequence of instructions (drive forwards or backwards at a particular speed,
stop for a number of seconds, drive to the station, etc.) and to have this script
executed by a circuit speciically designed for this purpose.
70
PICo PROto
Here’s a minimalist prototyping tool for
PIC16 and 18 devices.
74
Model Aircraft Lighting
Use a spare channel on your R/C controller
to switch your model’s navigation,
landing lights, anti-collision beacon and
wing tip strobes.
32
Embedded Linux Made Easy (3)
It is easiest to develop for an embedded Linux system with the help of a con-
ventional Linux system, normally running on a PC. This month we will base our
experiments on version 12.04 of the ‘Ubuntu’ distribution. What do we need to
install such a system? Not a lot: a little free space on the hard disk and, ideally,
a network connection. Linux = GO.
76
Retronics: The ‘Pansanitor’ (1928)
Muscle stimulation from the olden days.
Don’t try this at home. Series Editor: Jan
Buiting
79
Hexadoku
Elektor’s monthly puzzle with an
electronics touch.
68
BasicCard goes Contactless
84
Coming Attractions
Next month in Elektor magazine.
In a new twist, the well-known BasicCard with an open operating system is now
available in an RFID version. As well as the new facilities for contactless opera-
tion, very powerful (and free!) development tools are now available to provide
an easy way to get to grips with this fascinating technology.
elektor 09-2012
5
Personal Download for I © Elektor
875788581.516.png 875788581.518.png 875788581.519.png 875788581.520.png 875788581.521.png
 
875788581.522.png 875788581.523.png 875788581.524.png 875788581.525.png 875788581.526.png 875788581.528.png 875788581.529.png 875788581.530.png 875788581.531.png
Zgłoś jeśli naruszono regulamin