Home
projects microcontrollers
Contents
1. COMPONENTS LIST Resistors RI R3 10kQ R2 820 RA 3900 P1 Alps 10kQ logarithmic stereo motor potentiometer e g RK27112MC Capacitors 1 C7 C8 100nF ceramic lead pitch omm C2 C6 10uF 63V radial lead pitch 2 5mm C3 100pF lead pitch 5mm CA C5 22pF lead pitch 5mm C9 220uF 25 V radial lead pitch 2 5mm C10 C13 22nF ceramic lead pitch 5mm Semiconductors D1 2 pin dual LED IC1 ATMEGA8 16PU programmed Elektor SHOP 071135 41 IC2 SFH5110 36 possibly via 3 way SIL pinheader IC3 7805 Miscellaneous B1 B80C1500 80Vpiv 1 5A round case K1 K6 K9 2 way SIL pinheader K2 K7 K8 4 way SIL pinheader K3 7 way SIL pinheader K4 K5 2 way PCB screw terminal block lead pitch 5mm X1 4MHz quartz crystal PCB ref 071135 1 from www thepcbshop com Controller software free download 071135 11 zip from www elektor com a een ym a i py pt p o gt ky p i py eo ce T operating mode where the fifth out put is replaced with an on off function standby command 12 decimal 071135 I Professional PCB Supplier High Quality eS rice URL www EZPCB com Email salestpezpcb com Tel 86 139 1002 1704 HDI Up To 50 Layers 2 5mil TC 0 1mm Hole Size Other Products Stencils Keypads Frontpanels Enclosures Turnkey
2. 36 90 73 80 071035 95 Port Extension PCB populated with SMD 13 40 26 80 RF Sweep Frequency Generator Spectrum Analyser 040360 41 Programmed controller ATmega8535 21 80 43 60 September 2008 No 381 DCC Command Station 070989 71 Kit of parts incl programmed ARM module 88 50 177 00 July August 2008 No 379 380 Solar powered Automatic Lighting 080228 41 Programmed controller PICI2C671 9 00 18 00 Battery Discharge Meter 070821 41 Programmed controller PIC 6F676 201 P 5 90 11 80 070821 42 Programmed controller PIC16F628 20 P 9 00 18 00 Operating Hour Counter 070349 4 Programmed controller PICT2F683 5 90 11 80 Energy efficient Backlight 080250 41 Programmed controller ATmega32 22 50 45 00 Deluxe 123 Game 080132 41 Programmed controller ATmega8 PU 9 00 18 00 Reaction Race using ATtiny13 080118 41 Programmed controller ATtinyT3 4 90 9 80 Underwater Magic 071037 41 Programmed controller AT90S8515P 14 90 29 80 Flowcode for Garden Lighting 080113 41
3. Programmed controller PICT6F88 11 90 23 80 Tent Alarm 080135 41 Programmed controller ATtinyT3V 4 90 9 80 Programmable Servo Driver 080323 41 Programmed controller PICT2F675 5 90 11 80 Simple USB AVR ISP Compatible Programmer 080161 41 Programmed controller ATmega8 16AU 11 90 23 80 Intelligent Presence Simulator 080231 41 Programmed controller PICI2C508 5 90 11 80 LiPo Manager 080053 41 Programmed controller PICT6F64 11 90 23 80 GPS Receiver 080238 41 Programmed controller PIC OF876A 23 00 46 00 Universal Thermostat 080090 41 Programmed controller PICI6F628 9 00 18 00 DTMF controlled Home Appliance Switcher 080037 41 Programmed controller ATmega8 16PC 9 00 18 00 Solar powered Battery Charger 080225 41 Programmed controller PICI2C671 9 00 18 00 11 2008 elektor Kits amp Modules Embedded Linux Control Centre ISBN 978 0 905705 72 9 24 00 US 48 00 Universal Display Book ISBN 978 0 905705 73 6 23 00 USS 46 00 Visual Basic for Electr
4. To minimise the power consumption when water is detected the active buzzer is intermittently turned on The buzzer is activated for about 1 to 1 5 seconds every 10 seconds The os cillator that makes this happen is im plemented with discrete parts For this we chose an astable multivibrator with two transistors The advantage of this is that one of these two transistors T3 switches the buzzer and the buzz er also functions as the collector resis tor C4 is necessary because most ac tive buzzers the version with a built in oscillator that generates the bleeping noise are a very noisy load The buzzer that is used here without a parallel ca pacitor prevented the operation of the oscillator the buzzer remained on The component values of the circuit around T2 and T3 have been designed with the specific requirements of this application in mind highly asymmetric square wave so that these values are quite different from the standard im plementation This is also why the off time deviates from the value resulting from the standard formula that is nor mally used to calculate the component values for this AMV T3 is a Darlington device so that the base resistor R6 can be as large as possible This ensures that C3 has a reasonable value When the buzzer is not activated the collector resistor of T2 determines the largest share of the current consumption During the time when the buzzer is activated C3 has to be charg
5. Gfinder sy amp 36 11 9 005 0000 i OSV Am 10A 280N P e 5V zn i e Htilk R9 Inte RIO Hia RH E sA ft L4 Florian Sch ffer Germany Remote control using mobile phones and SMS Text Messaging is in great demand but many systems on sale suffer from imperfections The ingenious new design combines powerful capabilities with low technical overheads It has programmable AC mains switching outlets plus status reports by text message and alarm activated delivery of GPS data Mobile phone GSM Cellphone con ing a reputation for reliability or afford readily available mobile phones for trolled switching devices have been ability The project featured here cor the GSM receiver and data output around for a while now without earn rects this impression making use of function at no cost at all if you use 30 elektor 11 2008 discarded handsets Its many capa bilities are listed opposite in the inset under the headings Characteristics and Applications Principles The criterion for activating and control ling this remote switch is the number of incoming calls not the number of individual ringing sounds heard received within 90 seconds One call within this 90 second time window switches Output 1 two calls enable Output 2 three calls operate Output 3 whilst four calls trigger a status alert by SMS text Since nobody actually answers the calls there are no telephone charges for receiving these contr
6. from 3 working days 100 DRC verification full options service 1 16 layers UL marking 75 OTANI Puze Hexadok Puzzle with an electronics touch This time of the year a Hexadoku puzzle like the one printed here should provide low cost mental entertainment for an evening or two So go for it and try to enter the right hex numbers in the boxes Send us your solution and enter a prize draw for an E blocks Starter Kit Professional and three Elektor Shop vouchers The instructions for this puzzle are straightforward In the diagram composed of 16 x 16 boxes enter numbers such that all hexadecimal numbers O through F that s 0 9 and A F occur once only in each row once in each column and in each of the 4x4 boxes marked by the thicker black lines SOLVE HEXADOKU AND WIN Correct solutions received enter a prize draw for an E blocks Starter Kit Professional worth 249 and three Elektor SHOP Vouchers worth 40 00 each We believe these prizes should encourage all our readers to participate The competition is not open to employees of Elektor International Media its business partners and or associated publishing houses A number of clues are given in the puzzle and these determine the start situation All correct entries received for each month s puzzle go into a draw for a main prize and three lesser prizes All you need to do is send us the numbers in the grey boxes The puzzle is also
7. ATmega88 mm XTAL1 XTAL2 z DIE ATTACK PAD 070850 11 Figure 1 It can t be much simpler than this we do the control of the CC2500 with an ATmega88 via USB ous we use an AVR with hardware SPI support for the actual sniffing This AVR then sends the eavesdropped sig nal via a serial port to the PC where the actual decoding can begin When we push a few buttons on the remote control it is immediately clear that the protocol is more complicat ed than we had initially anticipat ed When the remote control is first turned on The CC2500 is initialised with data regarding the frequency the type of modulation and the data rate The actual communication is based on packets A packet is loaded into the CC2500 and transmitted by the chip in RF form Reception is done in the same way The CC2500 is set to re ceive mode and as soon as a packed has been received a particular pin goes high and the packet can be read by the microcontroller Data format The packets consist of a number of fields The first thing that emerges is that both the remote control and the lamp have a probably unique ad dress Therefore the packets for set ting the colour for example start with the address of the lamp followed by the command The commands correspond with the buttons on the remote control There is among others a command to turn the lamp on to turn it off again to set the colour and to set the lamp in demo
8. Dimensions mm 60Wx100Lx60H Kit Order Code 3067KT 13 95 Assembled Order Code AS3067 21 95 8717 Credit E Sales Controllers amp Loggers Here are just a few of the controller and data acquisition and control units we have See website for full details Suitable PSU for all units Order Code PSU445 8 95 Computer controlled 8 channel relay board 5A mains rated relay outputs 4 p isolated digital inputs Useful in a variety of control and VW sensing applications Con trolled via serial port for programming using our new Windows interface terminal emula tor or batch files Includes plastic case 130x100x30mm Power Supply 12Vdc 500mA Kit Order Code 3108KT 54 95 Assembled Order Code AS3108 64 95 4 channel temperature log ger for serial port C or F Continuously logs up to 4 separate sensors located 200m from board Wide range ot tree software applications for stor ing using data PCB just 45x45mm Powered by PC Includes one DS1820 sensor Kit Order Code 3145KT 17 95 Assembled Order Code AS3145 24 95 Additional D81820 Sensors 3 95 each State of the Art High security 4 channels Momentary or latching relay output Range up to 40m Up to 15 Tx s can be learnt by one Rx kit in cludes one Tx but more avail able separately 4 indicator LED s Rx PCB 77x85mm 12Vdc 6mA standby Two and Ten channel versions also available Kit Order C
9. CA C5 C6 C7 C8 luF 16V C9 C10 22pF C12 C13 C14 0 1uF amp re see text Semiconductors D1 P6KE30A TVS 30V 600W D2 D3 SB320 or 1N5820 Schottky 3A 20V D4 LED red low current 3mm D5 LED green low current 3mm D6 D9 LED yellow low current 3mm D10 D11 D12 1N4148 TI T2 T3 BC337 TO92 case IC1 L78SO05CV TO220 case IC2 MAX232CPE DIP16 case IC3 ATMEGA8 16PU DIP28 case pro grammed Elektor SHOP 080324 41 OC1 PC817X2JOOOF optocoupler DIP4 case Inductor L1 40uUH 2A e g EPCOS Miscellaneous X1 8 MHz quartz crystal HC49 case RE1 RE2 RE3 HRS4E S DC 5V K1 DC adapter socket PCB mounting K2 2 way PCB screw terminal block lead pitch 5mm K3 K5 2 way pinheader lead pitch 2 54mm K6 9 way sub D plug male PCB mount K7 6 way mini DIN socket PCB mount K8 6 way SIL pinheader lead pitch 2 54mm JP1 JP2 JP3 2 way SIL pinheader lead pitch 2 54mm S1 MCRH2AF 10R 10 way DIP rotary encoder S2 MCDS02 2 way DIL switch S3 FSM4JH single pole pushbutton PCB mount Fl auto resetting PTC fuse 30V sus tain current 1 1A activation current 2 2A e g Multifuse MF R110 0 99 Bourns or Polyfuse 30R110 Littlefuse or Polyswitch RUEF110 Tyco ES LP30 110 ESKA PFRA 110 Reichelt de P1 P8 1mm dia solder pin IC sockets for IC2 DIL16 IC3 DIL28 OC DIL6 used as DIL4 Heatsink for IC1 U profile 25x15x20 mm 17K W
10. The documents are PDF files ISBN 978 90 5381 214 3 19 50 USS 39 00 All articles published in 2007 Elektor 2007 This CD ROM contains all articles pub lished in Elektor Volume 2007 Using the supplied Adobe Reader program articles are presented in the same layout as originally found in the magazine An extensive search machine is available to locate keywords in any article The instal lation program now allows Elektor year volume CD ROMs you have available to be copied to hard disk so you do not have to eject and insert your CDs when searching in another year volume With this CD ROM you can produce hard copy of PCB layouts at printer resolution adapt PCB layouts using your favourite graphics program zoom in out on selected PCB areas and export circuit diagrams and illustrations to other programs ISBN 978 90 5381 218 1 17 50 USS 35 00 More than 68 000 components ECD 4 The program package consists of eight databanks covering ICs germanium and silicon transistors FETs diodes thyristors triacs and optocouplers A further eleven applications cover the calculation of for example LED series droppers zener diode series resistors voltage regulators and AMVs A colour band decoder is in cluded for determining resistor and in ductor values ECD 4 gives instant access to data on more than 68 000 compo nents All databank applications are fully interactive allowing the user to add edit
11. gives connectivity to SDRAM up to 64 MB on board of modules and up to 4 GB of NAND Flash the largest amount available for now a complex hardware base allow users to build stan dalone systems using an Eth ernet interface and an embedded The additional set of peripheral devices contain 10 100Mbit PHY Ethernet with a trans former and an RJA5 connec tor one USB Device 2x USB 2 0 Host i e Full Speed and 5x RS232 interface These features operating system PROPOX went one step further by offering the Linux on board solution to customers all modules are available with running Linux and come with a DVD containing source codes compilers and sam ple software A complete eLinux solution called the MMnet1002 module will be available soon WWW propox com 080793 I elektor 11 2008 PAET ROMI e EQUIPMERT FOR ELECTRONICS PEVELOFMENRT TRAINING amp CEP CRIB EMT ATION EasyPIC5 C Starter Pack everything needed to start developing PIC projects in C for just 189 The EasyPIC5 C Starter Pack contains everything needed to start learning about and devel oping with PIC microcontrollers using the C programming language The package contains the popular EasyPIC5 development board a full version of MikroElektronika s powerful mikroC compiler USB and serial cables blue backlit 16x2 character and 128x64 graphic LCDs touch screen overlay for graphic LCD DS1820
12. mode The command is followed by a se In comparison with the ATmega88 the latter is deed quite mega 11 2008 elektor The size does not make it impossible to solder A steady hand a magnifier and thin wire go a long way This is how the transmitter is mounted on the USB PCB The thing with black tape around it is a 25 MHz SMD crystal 67 PROJECTS MODDING amp TWEAKING quence number This is a number that increments by one after each com mand is sent When the lamp sends a response this same sequence number is sent back so that the remote control can determine which response goes with which command It gets more interesting after the se quence number byte There now follow three bytes with colour information The fact that colour information is be ing sent is somewhat remarkable since the average remote control only passes on which button is being pushed The decision to store the selected colour in the remote control makes sense In this way Philips ensures that if you use the remote control with multiple lamps they will all be set to the same colour For our purposes this is also very prac tical it is after all much easier to sent the desired colour than to emulate all sorts of button pushing To send the colour Philips decided to use the HSV system The Hue gives the colour the Saturation the intensi ty of that colour and Value the amount of light the lamp has to generate By giving t
13. storage RAM and reveals that all ICs and transistors from T092 up to TO3 out line are mounted on sockets The build quality and atten tion to detail verges on the obsessive and explains partly why Tektronix has such a good reputa tion amongst repair and calibration engineers With this build quality comes a price in 1979 the cost of the 7D01 and DF2 alone would have set you back over 11 000 US dol lars the price of a very nice car All the operator manuals are famously com prehensive and can be found on the Internet With modern desk top PCs clocking at several GHz you may wonder if there is still a place on the workbench for an analyser that can only manage a maximum asyn chronous clock of 100 MHz but for the majority of microcontrol ler designs the unit has proved to be more than adequate 080644 1 Retronics is a monthly column covering vintage electronics including legendary Elektor designs Contributions suggestions and requests are welcomed please send an email to editor elektor com 11 2008 elektor WAITTUTISHOWCASE To book your showcase space contact Huson International Media IJI T EO Rk yer iii Fax 0044 0 1932 564998 ATC SEMITEC LTD www atcsemitec co uk Thermal and current sensitive components for temperature control and circuit protection e NTC Thermistors e Current Diodes e Thermostats e Re settable Fuses e Thermal Fuses e Temperature Sensors Call today for free sam
14. wheel with you Mounting the accelerator handle was rea sonably straightforward The size of the tubing for the han dlebars in China is apparently the same as in Europe Once the wheel and the accelerator handle were fitted and the controller circuit and batteries in the pannier it was time for a test ride see photos The handbrake and pedal sensor should also have been connected see EU regulations inset but the motor also works without them The handbrake contains a switch which turns the motor off the moment you start to brake An additional advantage of not installing the pedal sensor is that the accelerator handle always works So you do not need to pedal for the motor to turn on Note that it is therefore not legal to ride on the road this way The DIY e bicycle in action The compact controller PCB already comes with a header that can be used to re program the controller 50 The advantage of an electric motor over a combustion engine is emphasised once again an electric motor pro vides immediate torque while simple combustion engines first has to get up to speed The bike soon moved too fast for laps through our lab so we moved the test outdoors Even though the batteries were brand new and really should have been conditioned a little they nevertheless gave very little trouble The motor was very capable of propelling the test bicycle to a speed of about 25 kilometres per hour without doing any
15. 7 Hula RIO mr wt LH d Lea iz d AN Be Figure 3 Sample PCB with components inserted viewed from above switched in such a way that a cur rent of around 20 mA flows through the LED in the optocoupler in either alarm or quiescent state You need to watch the polarity of the voltage too since the internal LED of the optocou pler can be damaged otherwise The LED in OC1 drops around 1 2 V mean ing that resistor R12 is calculated as follows 005 0000 tinder a N3 36 11 amp Fe 35V 36 11 9 005 0000 SN 4 10A 250V tinder qe i x i 10A 250V QD tinder M 26 11 9 005 0000 35V QUEM MX Uj 1 2 V 20 mA So if the voltage at K2 is 12 V for example you need a value for R12 of 10 8 V 20 mA 540 in fact you would use 560 Q When inserting components into the PCB Figure 2 there are only two details to note The EPCOS inductor L1 used on our sample board does not allow the connection leads to be made too close to the end caps of the coil and a minimum distance of 3 mm is indi cated The second detail is the socket for the optocoupler which is produced as a 4 pin DIL chip Because 4 hole SOCkets are not available everywhere we have used a 6 hole socket You can see in the photo Figure 3 how the IC is placed in this socket Of course you can solder the chip direct into the PCB if you prefer without using a socket The mobile conne
16. AS5030 descrip tion AS5030 htm 3 http www austriamicrosystems com O3products products detail AS5030 down load AS5030 htm 4 http www bomatec ch index_e php 5 http www arnoldmagnetics com 6 http www invensense com 7 http www austriamicrosystems com O3products products detail AS5040 down load AS5040 htm 8 http www austriamicrosystems com O 6contactcenter distributors start htm Figure 6 An A 50xx demonstration board provides a development environment for dedicated applications using its accompanying free software 11 2008 elektor 65 MODDING amp TWEAKING Colourtul Computer Light Controlling the Living Colors lamp with USB Jeroen Domburg We live in a colourful environment these days Everything is in colour TV advertising billboards mobile phone displays and LEDs Philips added a further dimension to all this with their Ambilight Wake up Light and Living Colors lamp We will work with the latter in this M amp T article The wireless remote control offers interesting possibilities once the protocol has been cracked In the February 2008 issue the editors disassembled a Living Colors lamp from Philips In this article we will once again do something with this lamp One of the disadvantages of the lamp is that it can only be controlled with the supplied remote control Nice enough perhaps if all you want to do is use it as a glorified table lamp But control
17. Analogue and digital practical and theoretical software and hardware trafus min AN c Pipes e P for udis amps Weg supersize 2 ple eg na i Sea MER Swedish as ux Finnish Volume 34 Number 383 November 2008 ISSN 1757 0875 Elektor is also published in French Spanish German and Dutch Together with franchised Editorial secretariat Hedwig Hennekens secretariaat elektor nl editions the magazine is on circulation in more than 50 countries Elektor aims at inspiring people to master electronics at any personal level by Graphic design DTP Giel Dols Mart Schroijen presenting construction projects and spotting developments in electronics and information technology International Editor Managing Director Publisher Paul Snakkers Wisse Hettinga w hettinga elektor nl Publishers Elektor International Media Regus Brentford Marketing Carlo von Nistelrooy 1000 Great West Road Brentford TW8 SHH England Tel 44 208 261 Editors Jon Guiting editor PDKIoE cn Customer Services Anouska van Ginkel 4509 fax 44 208 261 4447 www elektor com International editorial staff Harry Baggen Thijs Beckers Ernst Krempelsauer Jens Nickel Clemens Valens Subscriptions Elektor International Media The magazine is available from newsagents bookshops and electronics retail Regus Brentford 1000 Great West Road Brentford TW8 9HH England outlets or on subscription Design staff Antoine Authier Head Ton Giesbert
18. FAX BACK TO 00 44 0 1932 564998 IN NAME c eae ba 8 98 BD dn te ON OR ODE SCRIETI ON e 11 2008 elektor 79 SHOP BOOKS CD ROMs KITS amp MODULES Going Strong A world of electronics Elektor SMT Reflow Oven from CI single shop October 2008 The Elektor SMT reflow oven will faithfully handle most if not all your soldering of projects using surface mount devices SMDs The oven is particularly suited for use not just in Colleges workshops clubs and R amp D laboratories but also by the ad vanced electronics enthusiast This pre cious workbench tool is at home where SMD boards have to be produced to a variety of requirements on size compo nents and soldering materials Size 418x372x250 mm 16 5x 14 6x 10 inch Art 080663 91 882 00 USS 1525 00 Reduced price till 1 November 2008 799 00 USS 1450 00 DCC Command Station September 2008 Electronics is making more and more in roads into the domain of model trains Communicating with CAN Trains are now controlled with digital October 2008 codes and in many cases the entire sys tem can be operated from a computer The CAN Controller Area Network protocol was originally developed for use in the automotive Elektor presents a design for the device sector It is now over 20 years old but is still frequently used these da
19. It may also help if you use 10 LF electrolytics for capaci tors C4 to C8 Plenty of solutions can be found on the Web and you may end up making your own data cable GPS connection Including a GPS module is necessary only if you actually require GPS data in the alarm or status alerts as in Fig ures 5 and 6 The module must pro vide data in NMEA format at 4 800 baud The data can be handled at either TTL or RS 232 level around 12 V Only the data output TxD of the module is used All these require ments are met on most modules The set up was tested by the author with a GPS A1MLR module and then in the Elektor labs with a Navilock 303P with jumper JP2 set for RS 232 level The GPS module can be connected using the standard Mini DIN connector on the Navilock to K7 on the switch or else soldered direct onto the PCB The necessary power supply of 5 V check the data sheet of your GPS module to see if it uses 5 V too can be taken from the PCB for example on solder pins P1 or P2 ground on pins P3 and P4 If a module using TTL level is con nected to K7 then jumper JP3 must be set under no circumstances can both JP2 and JP3 be set at the same time If connecting TxD from the mod ule direct to the PCB either TTL or RS 232 level can be fed in but never Y oodd FIC S l avi C ALARM GSM Remote Switcher GPS 29 46 Figure 6 This shows an SMS alarm report being received with GPS data i
20. Multifuse Poly 34 fuse Polyswitch etc D1 is a tran sient voltage suppressor diode TVS The model used PK6E30 behaves like a 30 V zener diode and has the ability to react extremely rapidly to high voltage peaks of short duration The two Schottky diodes prevent the flow of reverse currents either side of the voltage regulator The 5 V oper ating voltage VRE decoupled by D3 supplies the three relay stages If you don t require all three outputs the cor responding components can simply be omitted from the PCB The outputs function like a switch When the relay contacts are closed the two terminal connections are linked straight through and make a circuit for the connected elektor 11 2008 Byte Hex Meaning ters of the ASCII set are used 3 The bits of the binary number are then mirrored i e arranged in reverse order 11 Message Flags contains details of how the message is coded and how the telephone should react 00 Reference number Upon 00 the telephone naturally ap points a number for referencing the message and to be Symbol Hex Binary 7 Bits T able to respond to this particular number NE H 48 100 1000 00 01001 OF Number of digits in the target telephone number 491231234567890 consists of 15 OFh digits e 65 110 0101 10 10011 91 Telephone number arranged in international notation 6C 110 1100 00 11011 942113325476 98 FO coded telephone number 6C 110 1100 00 11011 00 Protocol Ident
21. Thermal sensors e e k tO r oscilloscope spectrum e Motor Controllers ce 2 analyzer signal generator e Vision Systems us TT multimeter sound meter e Wireless Telemetry Links ME NE distortion analyzer LCR meter e Embedded Controllers C O Free to download and try SHOWCASE YOUR COMPANY HERE Elektor Electronics has a feature to help For just 220 VAT 20 per issue for image e g a product shot a screen shot customers promote their business eleven issues Elektor will publish your from your site a company logo your Showcase a permanent feature of the company name website address and a choice magazine where you will be able to showcase 30 word description your products and services For 330 VAT for the year 30 per Places are limited and spaces will go on issue for eleven issues we will publish a strictly first come first served basis the above plus run a 3cm deep full colour So please fax back your order today pm to promote my company please book my space Text insertion only for 220 VAT Text and photo for 330 VAT NAME rpm JRGANDATION Cm JOB TT HH PUT TS 5 coe creates TEG PLEASE COMPLETE COUPON BELOW AND
22. United Kingdom Tel 44 20 8261 4509 Fax 44 20 8261 4447 www elektor com subscriptions elektor com ORDERING INSTRUCTIONS P amp P CHARGES Except in the USA and Canada all orders except for subscriptions for which see below must be sent BY POST or FAX to our Brentford address using the Order Form overleaf Online ordering www elektor com shop Readers in the USA and Canada may but are not obliged to send orders except for subscriptions for which see below to the USA address given on the order form Please apply to Old Colony Sound for applicable P amp P charges Please allow 4 6 weeks for delivery Orders placed on our Brentford office must include P amp P charges Priority or Standard as follows Europe 6 00 Standard or 7 00 Priority Outside Europe 9 00 Standard or 11 00 Priority HOW TO PAY All orders must be accompanied by the full payment including postage and packing charges as stated above or advised by Customer Services staff Bank transfer into account no 40209520 held by Elektor Electronics with ABN AMRO Bank London IBAN GB35 ABNA 4050 3040 2095 20 BIC ABNAGB2L Currency sterling UKP Please ensure your full name and address gets communicated to us Cheque sent by post made payable to Elektor Electronics We can only accept sterling cheques and bank drafts from UK resident customers or subscribers We regret that no cheques can be accepted from customers or subscribers in any other cou
23. WWW AXX SSIC COM 1 2 eee ee 21 Paltronix os rn a a RR MR www paltronix com sisse 13 Being DEO uos vare dob e a etr WWWLBZDOD ODHT 5 ce scusa sent RE Rare vast 41 Parallax a cry ceto sop ard 4S wee edes Wwww parallax com ccs 29 Beta Layout Showcase WWw pcb pool com s eene 15 78 Peak Electronic Design www peakelec co Uk esee 15 Bitscope Designs www bitsCOpe cOM eee 11 CONCRETO TETTE www picotech com sse 2 BVM a BeBe AO Bie im GE Sa Gee os Be i ae awe sin GE ek GE ea ww www bvmitd co uk ao Sh Be at tat ae et AP Gals ech aG St cat ar hae tant AE G 29 Propox Sp Sah dee E hr ee oe ae WWW propox COM ww cc eee 17 C S Technology Ltd Showcase WWW CSleCH CO UK iie ees 78 Quasar Electronics www quasarelectronics com 51 Decibit Co Ltd Showcase www decibiLCom 0 02022 seer eens 78 Radiometrix Showcase www radiometrix com csse 79 Designer Systems Showcase www designersystems Co UK 78 Robot Electronics Showcase www robot electronics co Uk ss 79 EasyDAQ Showcase www easydag biz 2 1 eevee eee 78 Robotiq Showcase WWW rODOtIG CO UK llle 79 Easysync Showcase WWW EASYSYNC CO UK isses 78 RS Components www rswww com
24. Word Xyl Xy1 Y2 Dim X2 As Word Xyl Xyl X3 Dim Y2 As Word Xyl Xyl Y3 Dim X3 As Word Xyl Xyl X4 Dim Y3 As Word Xyl Xyl Y4 Dim X4 As Word Print Xy1 Dim Y4 As Word Xy3 Xy2 Xyl Dim Xyl As Integer Xy2 Xyl Dim Xy2 As Integer Xy3 Abs xy3 Dim Xy3 As Integer If Xy3 gt 10 Then Print Wokockockok ko k ko kk XU Declare Sub Send2bytes Portb 0 1 Declare Sub Sensorinit Else Declare Sub Readsensor Portb 0 0 Declare Sub Convertdata End If Dim N As Byte Config Portb Output fe NUR ccrtc pce rp E erp pcs 46 elektor 11 2008 P WS Hind Track a eS PT Ta a Figure 13 Coordinate processing by the PC program Up to four blobs can be shown concurrently nate is a 10 bit value the eight lower order bits of each value are transmit ted in one byte while the two higher order bits of the X and Y coordinates are stuffed into the third byte After all the bits have been rearranged prop erly you have four sets of X Y coor dinates They are transmitted via the serial interface to a terminal emulator program at a speed of 38 400 baud ATM18 I2C Wii IR Sensor P1 66 67 P2 813 228 P3 774 332 P4 722 113 Waitms 200 Loop Sub Send2bytes I2cstart I2cwbyte Slave I2cwbyte D1 I2cwbyte D2 I2cstop End Sub Sub Sensorinit D1 amp H30 D2 amp H01 Send2bytes Waitms 10 X2 Din 7 And amp H30 D1 amp H30 D2 amp H08 Send2bytes Waitms 10 X2 X2 16 D1 amp H0
25. active scan and energy detect features that enable robust operation while supporting the low power requirements of bat tery operated devices Available as a free download from Microchip s new online Wireless Design Centre at www microchip com wireless the small footprint proprietary stack complements the new MRF24J40MA 2 4 GHz FCC certified transceiver mod generated by the LEDs for high performance applications This solution is a perfect complement to using BCM bus converters with low voltage driver ICs for lower power applications such as LED TV backlighting The constant current board dem onstrates the high power density of the PRM with current accuracy of 99 7 across the load range The board has Kelvin connections World s highest integration single chip GPS receiver SkyTraq recently introduced their Venus634LP GPS receiver reportedly the world s high est integration single chip GPS receiver using its low power Venus6T GPS architecture Meas uring 10x1O0mmx1 2 mm the Venus634 LP integrates LNA SAW filter RF front end GPS baseband 0 5 ppm TCXO RTC crystal LDO regulator and passive compo nents A complete GPS receiver requires only an antenna and Venus634 LP Featuring highest integration centimetre squared footprint ultra fast TTFF high sensitivity and low current consumption the Venus634LP GPS receiver enables lowest cost of embedding location awareness into portable applica tio
26. and Software solution with on board USB 2 0 programmer EasyARM board comes with Philips LPC2148 microcontroller Each jumper element and pin is clearly marked on the board It is possible to test most of industrial needs on the system temperature controllers counters timers etc EasyARM has many features making your prototype development easy There is an on board USB 2 0 programmer with automatic switch between run and programming mode Examples in C language are provided with the board BIGAVR Development Board with on board USB 2 0 programmer System supports 64 pin and 100 pin AVR microcontrollers supplied with ATMEGA128 working at 10MHz Many ready to go examples guarantee successful use of the system BIGAVR is an easy to use development system for Atmel AVR microcontrollers BIGAVR has many features that makes your prototype development easy You can choose between USB or External Power supply BIGAVR also supports Character LCD and Graphic LCD as well Easy8051B Development Board with on board USB 2 0 programmer System is compatible with 14 16 20 28 and 40 pin microcontrollers supplied with AT89S8253 There are also PLCC44 and PLCC32 sockets for 32 and 44 pin microcontrollers USB 2 0 Programmer is provided with the system and programming can be done without removing the microcontroller out Please visit our website for more info LV 18FJ Development Board Complete Hardware
27. and operating voltages around the serial interface in the form of solder pins P1 to P8 The programming inter face ISP interface for the microcon troller is taken out to connector pins K8 although this will be needed only if you choose to load different firmware into the microcontroller N O R14 2 O an i Figure 2 The printed circuit board manages without SMDs Almost half the surface area is taken up by the mains voltage section with the relatively large relay and interference suppression components The power supply for the circuitry can be fed either to connector K1 or from an external mains plug in PSU what our American friends call a wall wart or else you can use the on board bat tery supply of the car boat caravan etc Any mains PSU will do an unsta bilised one is fine so long as it deliv ers at least 9 V Make sure there is suf ficient power for other devices con nected mobile and GPS this means you must have at least 1 A available Voltage regulation is handled by the poor em ee He He ee ee eK ee ee eK ee Re eR ee eR ee ee ee ee ee ee ee ee ee Re ee ee ee ee ee ee ee ee ee ee ee ee ee Re ee ee ee ee ee ee ee ee ee ee ee ee Re Re ee Re eRe Re ee ee ee ee ee ee ee ee ee ee ee eK eH KH Hd COMPONENTS LIST Resistors R1 R3 R5 R7 R9 R11 1kQ5 R2 R4 10kQ R6 R8 R10 1kQ R12 see text R13 R14 R15 1Q volt 2W see text Capacitors C1 220uF 35V C2 C11 100nF C3 3uF3 50V
28. author s website 2 Two UIR codes can be stored for each output Each code is represented as a 12 digit hexadecimal number 6 bytes When storing the code with the right button the dip switch is used as the output number This dip switch could also be replaced with a rotary version see photo so that it is easy to change from one output to the next The fifth switch on the DIP block a jumper in the photo selects the second block of 16 codes Leaving programming mode is done with the middle push button Only Protocol then are all the codes stored in the EEPROM The Edit mode With a press of the right push button we enter edit mode This is indicated by the right LED turning red In this mode it is possible to remove a code This is done by simultaneously press ing the left and right buttons The mid dle LED briefly flashes red as confirma tion The output number is again deter mined by the dip switch Leaving edit mode is also done by pressing the middle button In this green When the same code has been received twice in a row the two LEDs on the left turn green and no further codes are received With the right but ton the code can be stored in RAM with the left button a new attempt can be made With an incorrect reception not the same code twice the second LED briefly flashes green and the third LED briefly red Uploading output O code A output O code B output F code B 4 bytes o
29. available as a free download from our website PARTICIPATE Please send your solution the numbers in the grey boxes by email to editor elektor com Subject hexadoku 11 2008 please copy exactly Include with your solution full name and street address Alternatively by fax or post to Elektor Hexadoku Regus Brentford 1000 Great West Road United Kingdom Fax 44 208 2614447 Brentford TW8 9HH The closing date is 1 December 2008 PRIZE WINNERS The solution of the September 2008 Hexadoku is ZAOFE The E blocks Starter Kit Professional goes to Simon Williams UK An Elektor SHOP voucher worth 40 00 goes to Colin Wilson UK Hannu von Essen FIN Jeff Debooy AUS Congratulations everybody F 5 1 B E 7 9 3 A 0 D 8 C 4 2 6 4 6 8 C D 0 A 2 1 9 B F 7 3 5 E A 0 D E B 5 4 6 3 C7 2 9 F 1 8 j4 sle LE TL EL fet 15 ej 2 p 3 7 c Ff4 0 9 B c 7 8 4 1 9 5 2 p E e 9jE B O S 7 A 12 1 JF 76 7 9 2 3 F 1 8 C 5 E 6 4 D B A O 8 7 5 6 3 2 F 1 B A 4 9 E C O D c 1 3 D 8 B 7 AJO F E 5 4 2 6 9 SjAB o Eje 7 2 ise iis ele d 9 e sis p t T e a EE 2 A B 5 0 E 7 z F 7 5 3 6 9 4 2 j2 o a p 3 o mjo es Es o j e to en eo EE mm o sp o 9 Hi t aj ALS atc AR 5 2 2 P O je sme oecov je ete mo ev o m m nfo N o e s s v 9 s e m m e ejol erm Ol elektor 11 2008 T
30. e 90 day money back guarantee e Bus powered from high speed PC e Radio Control B ES e For use with EOBD compliant vehicles e Capture buttons and feature connector e Tank Treads e Fast shipping Optional analysis classes e Hydraulics e Compatible with a wide range Internet Technical Bookshop of diagnostic software OBD2CABLES COM 1 3 Fairlands House North Street Carshalton Visit website or email us at http www obd2cables com Surrey SM5 2HW sales scantool net e Thousands of OBD cables and connectors in email sales robotig co uk Tel 020 8669 0769 stock USB INSTRUMENTS e Custom cable design and manufacturing http Avww usb instruments com e OBD breakout boxes and simulators RADIOMETRIX USB nsn e ie ee belie AOMEN CoN W in PC based instrumentation e Single quantity orders OK Theleading global developer orce ad oae ETC Y e Convenient online ordering of ISM band low power radio i HO D e Fast shipping modules for wireless data transmission dpi a ici Loggers Logic Analaysers Visit our website or email us at e Transmitters e Receivers e Transceivers hich interface t PC via USB sales obd2cables com e RF modems e Evaluation Kits bici iaa ae iud ROBOT ELECTRONICS VIRTINS TECHNOLOGY http www robot electronics co uk www virtins com Advanced Sensors and Electronics for Robotics WWW PC and Pocket PC based e Ultrasonic Range Finders virtual instrument such e Compass modules as sound card real time e Infra Red
31. encoder ICs to help designers gain practical familiarity with the de MagRngn C_ 1 O 070480 15 Figure 5 Pinout of the AS5030 The output signal is available on a serial digital output and as a PWM signal vices The boards consist of a small printed circuit board which carries the sensor IC a microcontroller a four digit seven segment display a USB socket for connection to a PC and a header for connecting an expansion board A hole in the Perspex cover accepts a rotary button fitted with a magnet Figure 6 shows the AS5030 DB demonstrati on board for the AS5030 device again available at 2 An external angle sen sor can be connected using the hea der for example on an AS50xx adapter board available as an optional extra This external sensor can then conve niently be configured or permanently programmed using the demonstrati on board software available for free download at 3 More details about austriamicrosustems 06 10 the demonstration board and adapter board can be found in the PDF manuals available for download at 7 A free en coder software development kit SDK is also available for download inclu ding a DLL and example programs for dedicated applications based on the demonstration board Further informa tion can also be obtained from AMS distributors 8 070480 1 Web Links 1 http www austriamicrosystems com 2 http www austriamicrosystems com O3products products detail
32. make the PCB compact a number of SMD components are used These are standard parts however The PCB is single sided although this results in the need for two wire links The Firmware When the circuit receives a signal from the remote control it is decoded with the aid of the UIR software into a 48 bit code This is compared via the RECEIVED CMD subroutine which checks whether a valid command was received with the codes that are sto red in the EEPROM When a valid code is found the corresponding output is set appropriately At the same time Timer1 is set to zero This generates an interrupt after about 262 ms which turns off the pulse output s and clears a blocking flag There is a peculiarity in the firmware which is caused by the hardware the last four outputs are not connected in order to the microcontroller In addition the other outputs are wired in reverse This is corrected in the software using a look up table PORT CONV The four configuration bytes for the type of output TOGGLE 1 2 and MASTER 1 2 therefore have to be also in this same order This is taken into account in the PC software As a result of these adjustments the outputs nevertheless appear to be in order The size of the EEPROM is 256 bytes Of this 192 bytes are used for the codes two codes can be program med for each output plus four bytes are for the output configuration The output number is also transmitted via the RS485 port To be
33. more accurate this port in fact passes on each of the 32 individual codes that are possible In addition of this serial connection the configuration can also be sent to a PC which makes the programming somewhat easier for more details look under the heading PC software Figure 1 At the centre is the PIC16 microcontroller which is supported by the buffer ICs and the RS485 interface chip elektor 11 2008 i MI Ole WOLD MI W Y k N N N 9 a W V e A o BR N N im IC1 PGC RB6 RAO ANO RB5 EE RA1 AN1 RB4 p RA2 AN2 PGM RB3 HM ASIANS RB RA4 TOCK RB1 gt E SE RA5 ANA4 INT RBO nies TSOP 736 PIC16F877P PSP7 RD7 PSP6 RD6 h c W Y k N N N J ol A fE 5 O5 ULN2803 6 O6 N N N 07 O8 REO RD AN5 PSP5 RD5 RE1 WR AN6 PSP4 RD4 pL NE RE2 CS AN7 PSPO RDO PSP3 RD3 al PSP1 RD1 RCO T10SO PSP2 RD2 RC1 T10SI RC2 CCP1 RX RC7 TSOP1736 RC3 SCK TX RC6 RC4 SDI SDO RC5 mm OSC1 OSC2 um ja C7 eon la Phu i A res LTC485 080063 11 11 2008 elektor 71 YEE READERS CIRCUITS 000000000 000000000 oo e LEES IC2 IC3 105 ULN2803 ULN2803 LTC485 zOgGOOCOGOOO OOOO OGC e er 47 0u BU IC1 PIC1I6F877P 1 e o o e Q1 hunni Bee CE SR isis Se e 472731478 QUU 33p 33p o Y cx e e Bono 7 Figure 2 The component layout for the top of the board sh
34. of in Figure 2 Tombstoning can also occur if temperature does not rise uni formly at both ends of the component If one end is warmer than the other one the solder will melt first at this end lead ing to an undesired upright component This problem usu ally does not occur in modern convection ovens but design related factors such as screening and cooling surfaces can lead to temperature differences Incorrect component placement can also lead to tombston ing but the main cause is a temperature difference between the two ends of the component which causes the solder to melt earlier at one end than at the other end Popcorning is another example of what can go wrong during the soldering process This refers to a condition that can occur if moisture sensitive components remain outside a moisture proof package too long before they are soldered in a reflow oven The component package can absorb mois ture due to its hygroscopic properties If such a component is heated relatively quickly the moisture turns into steam which may create so much internal pressure that the pack age will crack or burst open Another problem is that the component may float on the molten solder and tip over along its long axis as a result This is particularly annoying with LEDs since it causes the light to be emitted toward the side instead of straight up Standards Since the 1st of July 2006 electronic equipment marketed inside the EU is n
35. parallax com search 28040 080793 IX ics Engineers IEEE which develop and ratify technical standards in the Internet community the IPSO Alliance will perform interoperabil ity tests document the use of new IP based technologies conduct Ka EC Ks marketing activities and serve as an information repository for users seeking to understand the role of IP in networks of physical objects The alliance seeks to advocate how networks of objects of all types have the potential to be converged onto IP Founding members of the IPSO Alliance are Arch Rock Atmel Cimetrics Cisco Duke Energy Dust Networks eka systems EDF Electricit de France R amp D Emerson Freescale IP Infusion Jennic Kinney Consulting Nivis PicosNet Proto6 ROAM SAP Sensinode SICS Silver Spring Networks Sun Microsystems Tampere University Watteco and Zensys IPSO Alliance membership is open to any organisation advo cating an IP based approach to connecting smart objects www ipso alliance org 080793 VI elektor 11 2008 60 years of experience ISIA E Antex offer a wide choice of input voltages and bit profiles for our soldering iron range 3n 02 x31u E AMAM www antex co uk FREE shipping on all orders It may surprise you but buying an Antex soldering iron costs less than you think in the long run British made to exacting standards they last significantly longer than many imported brands With a w
36. parts can be found in separate files So for exam ple motor c contains the various func tions for switching the motor on and off In buttons c are all the definitions and functions for the RC 5 codes from the remote control The design of the program is quite sim ple An interrupt routine takes care of receiving the RC 5 bits This routine also checks whether the received code conforms to the RC 5 standard If this is the case then the received code is stored so that it can be used for fur L A A A 6 AA R A R A Code tangle Not everyone will have a remote control from a Philips receiver or tu ner or another brand that uses RC 5 handily available to use for this application Fortunately there are cheap alternatives in the form of a pre programmed universal remote control The author had a closer look at a type EuroSky 8 which is sold by Conrad among others for about 14 Euro they call it a Universal Remote Control MF 8 Black This seems to work well with most devices although the range could have been a little greater However it turned out that the
37. pedalling at all We should now try it without the limiter Unfortunately our dilapidated mountain bike was not trans formed into a barely controllable speed demon but it did go a little faster nonetheless We got up to about 30 kilo metres per hour provided there is no wind The torque of the motor remains the same so you won t go faster up a steeper hill compared with the limiter enabled The other thing we noticed is that once the 30 km h mark was reached additional pedalling to help the motor a little was pointless That means the kilometres in excess of 30 you have to do all yourself This is nevertheless not a poor performance from a standard bicycle considering that you do not require a permit insurance or whatever at least in The Netherlands although third party insurance is recom mended because accidents will happen We couldn t find any problems with the front wheel driven bike The bike behaves like normal in all other respects A few hints for the batteries For the application in electric bicycles it is best to use batteries with fast charge and dis charge curves The company Huijzer Components recom mended us to use the EVZ series made by CSB The bat teries are connected in series to obtain the required 36 V Note although this voltage is not lethal the current that the batteries can supply can be used to weld For those among you who are considering obtaining such a kit directly from China take in
38. potential divider made up of R4 and the photoresistor R5 which enables us to vary the dis play backlighting depending on the ambient light level The backlight is adjusted by means of the signal on one of the PIC s two PWM outputs The other output is used to drive the sounder The bi colour LED D2 uses another two outputs of PORT A RAS and RAD EEPROM chip IC6 contains the posi tion of the POIs each listed by lati tude and longitude to 6 bits For our elektor 11 2008 project we ve chosen the 24FC1025 from Microchip a 1 024 kbit memory that allows us to store the position of 21 845 POIs The most expensive part in the whole project is the EM406 A GPS receiver module with built in antenna from Glo balSat already familiar to regular Ele ktor readers 4 It interfaces directly to a microcontroller via its almost TTL level serial port The USB RS 232 interface is taken care of by an FT232BL IC from FTDI IC3 This forms the interface between the PIC and the PC and requires a driver to be installed on the PC in order to be used as a virtual COM port And lastly the project is powered via a 7805 regulator Construction It ll take you just a few hours to build this project Refer to Figure 6 for the board component layout Note the use of a wire wrap socket to bring the display up to the height of the housing and the same for the bi colour LED The first step is to solder the SMD components The FT232BL I
39. slotted hole M3 screw 10 mm with nut for securing heatsink Blue transparent enclosure 150x80x50 mm LxWxH e g Conrad Electronics 522498 PCB Elektor Shop 080324 1 or kit incl PCB 080324 71 ba ae ee ee es er en a ee SS re id ee es eS Sh ee Ss ee ae SS Se SS Sr a aes Ss a Ss a er ee Sr a ee ees ae are ae d eS a ees es ede ee as ea es as ee 11 2008 elektor 33 CELLPHONE Firmware for hardware The software for the GSM remote controlled switch was written in C for which the free development environment WinAVR release 20060125 was used this includes AVR GCC a version specially opti mised for Atmel AVRs The main task of the processor is to commu nicate using a serial interface with the modem in the mobile handset connected Basic functions such as recognising incoming calls man aging the address book etc make use of a Hayes compatible com mand set composed of AT commands that were formerly used widely in PC modems After connecting your mobile phone to the PC using a serial data cable controlling the mobile requires only a simple termi nal program something that later on the microcontroller can take care of Individual models of mobile phone may be programmed to recognise additional commands outside the standard set However these are deliberately not included here as they are not usable with the majority of handsets While we were developing this project we became aware that telephone man
40. we built a prototype the ATM18 12C tester our next project stay tuned RESES R en cn E e mut fie qmd im en i t d i ds Rm um i men wey m M ey a yo s i i n once again proved its worth in the first functional tests The slave address of the Wiimote IR sensors is OxBO Software The source code of the software in C Code Vision AVR and Basic Bas com AVR is available on the Elektor website The C project ATM18 Wii Remote IR Sensor demonstrates the use of the sensor with the ATM18 It utilises the internal I C unit of the Mega88 which means that the pin assignments are fixed the data line SDA is on PC4 while the clock line SCL is on PC5 Two additional lines must be connected for the supply volt age If the LCD module is connected it will display the blob coordinates detected by the sensor The ATM18 also outputs the blob posi tions in the form of four pairs of values X Y on the USART interface with the format X1 Y1 X2 Y2 X3 Y3 X4 Y4 lt CRLF gt This string is output repeatedly The value of X can range from 0 to 1023 while the value of Y can range from O to 767 If X 1023 and Y 1023 this means that the associated blob is not active The program Wii Blob Irack which is also available on the Elektor website 9 SCL GND 2 o c m ep K e u COMPONENTS LIST Resistors R1 R2 2kQ2 R3 22kQ Capacitors C1 C2 10uF 25V C3 100nF Semiconductors D1 D
41. we redesigned the cir cuit without the actual E blocks Fig ure 5 the EBOO6 E block has been replaced by a 16F876A PIC IC2 run ning at 20 MHz and the EB005 E block by a standard alphanumeric LCD with backlight LCD1 the contrast can be 26 oO w o scd i G OTOTOT TOT OTG 16 WP A0 24FC1025 a EM 406A 2 Figure 5 The full circuit diagram of the speed camera warning device adjusted with potentiometer R17 We have eliminated the components that are no longer needed like the MAX232 replaced the manual multiplexer by a 74HC241 and added photoresistor R5 The PIC connects to the IC EEPROM via its special I C bus inputs SCL and SDA The GPS receiver and the USB RS 232 interface IC3 are connected to the PIC USART by way of the mul tiplexer IC4 In normal mode the mul tiplexer connects the PIC RX input to the GPS TX output to receive the GPS frames In IC memory update mode the RX input is connected by the mul tiplexer to the TX output of the USB RS 232 converter The PIC TX output is directly connected to the RX input of the convertor IC3 Switch 1 lets you DSR FT232BL DCD USBDM PWREN USBDP TXDEN SLEEP TEST 3V3OUT PWRCTL AGND GND XIN XOUT GND EM 406A 080615 13 choose between normal and update mode and at the same time controls the EEPROM write protection at the same time The display is connected to PORT B of the PIC in 4 bit mode Input ANO of the ADC is connected to a
42. which the case is open Figure 3 After you tip the board out of the case you will see the infrared sensor at the upper end on the bottom of the board Figure 4 The case of the remote con trol unit has a filter insert that screens the sensor against visible light With the filter the maximum sensitiv ity lies in the range of approximately 850 920 nm With a bit of caution and careful work you can unsolder the sensor undamaged For this purpose the authors sawed off the end of the PCB before unsoldering the sensor In the Elektor lab we man aged without sawing the board in two as you can see from the photos As the Wii PCB is assembled using lead free solder you should first apply normal Figure 7 The unsoldered camera sensor 44 lead based solder to all of the sensor pins and screen tabs before you start desoldering Don t be too stingy with the solder but on the other hand don t bake the solder joints as otherwise you may overheat the sensor After all the pins have been properly treated with solder you can begin des oldering Start by using a solder sucker or solder braid to remove the solder from all of the sensor s solder joints The eight signal and power pins can be freed completely in this way Now the sensor is only held in place by the two solder tabs of its sheet metal screen Figure 5 They can also be desoldered While heating the solder joint use a screwdriver to cautiously lev
43. with the sounder Automatic backlight One option that deserves to be men tioned here is the automatic adjust ment of the display backlight depend ing on the ambient light level This was easily achieved using the PIC s ADC which measures the voltage at the terminals of the light depend ent resistor LDR and a PWM pulse width modulation output to control the backlighting via a transistor The ADC and PWM are component rou tines included within Flowcode Simulation Virtually the whole of the program can be simulated in the Flowcode environ ment except for the reception of the characters during transfer of the file containing the POIs where we have used some assembler code Each com ponent of the project can be simulated the LCD the PWM output reading the PC memory GPS frame reception and even the ADC for use with the LDR ATITUDE lij LONGITUDE Figure 4 The full program is much too long to be shown complete So we ll just give the most interesting part the detection algorithm 25 E BLOCKS VCC BH 7 vehicle L o batter y RB6 PGC RB7 PGD To simulate decoding a GPS frame we need to input a GPS frame to the RS 232 component module We can then see the reading of the memory in the I C routine byte by byte The values of the variables can be displayed or changed and simula tion can be performed in step through mode Circuit Once our E block prototype was operational
44. 0 GO 6 9 6 GO 0 6 G6 6 GO 9 06 GO 6 06 6 6 9 6 GO 9 06 6 9 6 6 0 6 G 6 06 GO 9 6 0 6 GO 9 06 0 0 O6 GO 6 6 O 9 6 0 9 6 0 9 6 6 6 0 0 6 G6 6 6 GO 6 9 6 GO 6 G6 6 G 9 6 GO 0 0 9 6 0 6 GO 9 GO GO 9 6 6 0 0 9 06 0 9 6 GO 6 6 06 O 9 0 0 0 6 O0 6 9 6 O 6 06 0 6 6 6 9 6 6 6 6 6 6 9 6 6 SUBSCRIPTION RATES FOR ANNUAL SUBSCRIPTION Standard Plus United Kingdom 42 00 49 00 Surface Mail Rest of the World 56 00 63 00 Airmail Rest of the World 71 00 78 00 USA amp Canada For US prices please check www elektor com HOW TO PAY SUBSCRIPTION CONDITIONS Bank transfer into account no 40209520 held by Elektor Electronics with ABN AMRO Bank London IBAN GB35 ABNA 4050 3040 2095 20 BIC ABNAGB2L Currency sterling UKP Please ensure your full name and address gets communicated to us Cheque sent by post made payable to Elektor Electronics We can only accept sterling cheques and bank drafts from UK resident customers or subscribers We regret that no cheques can be accepted from customers or subscribers in any other country Giro transfer into account no 34 152 3801 held by Elektor Electronics Please do not send giro transfer deposit forms directly to us but instead use the National Giro postage paid envelope and send it to your National Giro Centre Credit card VISA and MasterCard can be processed by mail email web fax
45. 0 programmer for PIC microcontrollers Continuing its tradition as one of the fastest PIC programmers on the market a new PICFlash with mikrolCD supports more PIC MCUs giving developer a wider choice of PIC MCU for further prototype development mikrolCD debugger enables you to execute mikroC mikroPascal or mikroBasic programs on the host PIC microcontroller and view variable values Special Function Regi sters SFR memory and EEPROM while the program is running All of our products are shipped in special protective boxes On line secure ordering provides fast and safe way of buying our products www mikroe com en distributors Find your distributor UK USA Germany Japan France Greece Turkey Italy Slovenia Croatia Macedonia Pakistan Malaysia Austria Taiwan Lebanon Syria Egypt Portugal India Thailand Taiwan Czech and Slovak Republic www mikroe com SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD You only have to read a few of Umberto Eco s books to be reassured that in mediaeval times things invisible like vacuum gravity time the plague and static electricity were awe inspir ing if not a cause of great fear to the uninitiated wonder if the same applies to such seemingly unrelated stuff we struggle with in today s electronics like surface mount components electromag netic radiation microcontroller firmware and buried vias Invisibility and tiny di
46. 08 it says that you can have only one DigiButler or more generally only one server on your network However this is not strictly true it is actually possible to connect several but lers and possibly other servers as well if you use a trick This is based on the fact that an IP address and port can be accessed from any desired web browser As noted in the article to do this you have to enter the IP address assigned by your provider and instruct your router to remap port 80 to port 80 of the IP address of your DigiButler However a specific IP address and port can be accessed from any web browser and you can take advantage of this to allow several butlers to operate on a single network An example of how this works may help clarify this The normal situation when only one Digibutler is connected is as follows IP address assigned by pro vider 86 131 222 120 DigiButler IP address 192 168 0 2 Access address in the web browser 86 131 222 120 Resulting remapping in the router external port 80 to internal IP 192 168 0 2 with internal port 80 However it is possible to run two DigiButlers on the same net work and in particular on two ports of your ISP such as ports 1024 and 27888 The first DigiButler sits on port 1024 and the second one on port 27888 In this case you have IP address assigned by pro vider 86 131 222 120 DigiButler 1 IP address 192 168 0 2 DigiButler 2 IP address 192 168 0 3 D
47. 10 amps e Screw terminal access e abVIEW VB VC e Free shipping e From 38 Design amp supply of USB USB Wireless Ethernet amp Serial DAQ Relay amp DIO card products info easydaq biz EASYSYNC http www easysync co uk EasySync Ltd sells a wide range of single and multi port USB to RS232 R 422 and RS485 converters at competitive prices ELNEC www elnec com e device programmer manufacturer e selling through contracted distributors all over the world e universal and dedicated device programmers e excellent support and after sale support e free SW updates e reliable HW e once a months new SW release e three years warranty for most programmers YOUR ELECTRONICS OPEN SOURCE http dev emcelettronica com Website full of Projects and Resources for Electronics Engineers and DIY e Tutorial pru erg e Hardware Schematic amp Gerber e Firmware Asm amp C e Reference Design Everyone can submit a story as a useful source Share for life FIRST TECHNOLOGY TRANSFER LTD http www ftt co uk PICProTrng html Microchip Professional C First and Assembly Technology Programming Courses Tronsfer Lid The future is embedded Microchip Consultant Training Partner developed courses e Distance learning instructor led e Assembly C Programming of PIC16 PIC18 PIC24 dsPIC microcontrollers e Foundation Intermediate FLEXIPANEL LTD www flexipanel com TEAclippers the smal
48. 2 1N4148 CG1 25MHz oscillator module IR1 Wii Infrared image sensor see text Miscellaneous K1 K2 2 way SIL header PCB order code 080358 1 from Elektor SHOP Free artwork download from www elektor com Figure 10 Lab prototype of the PCB with the camera sensor Figure 11 Sensor pin assignment Pin 1 V 3 3 V Pins 2 and 3 GND ground Pin 4 not used Pin 5 SCL I C Pin 6 SDA IC Pin 7 CLK 25 MHz Pin 8 Reset 45 1957 MICROCONTROLLERS plicity of this Wiimote based solution and especially its excellent cost per formance ratio You can test the operation of the unit by wandering around the room with a lit cigarette lighter in your hand while someone logs your travels or you can fit an IR LED and battery on the back of your pet cat and observe the move ments of your experimental feline sub ject in full darkness 080358 11 c ELEKTOR CC2 e prO DU HG VA LCD 20 x 4 LUDBDUUEBUBDUCETLL ERSEEEEEESEEEENNNE Hududi ion n00 Hodod non no USART R R4 R6 R8R10R11R12R13 POOeooo DeOS020S020008 ct saute Bascom example As usual we also developed a Bascom application program that provides func tions similar to the basic functions of the C program We also wrote a specific property monitoring application for use with the sample Bascom program Unlike the C program the Bascom pro gram does not use the hardware I C interface but instead creates an equiv ast alent fun
49. 6 D2 amp H90 Send2bytes Waitms 10 X2 X2 Din 5 D1 amp HO8 D2 amp HCO Send2bytes Waitms 10 Y2 Din 7 And amp HCO D1 amp H1A D2 amp H40 Send2bytes Waitms 10 Y2 Y2 4 D1 amp H33 D2 amp H33 Send2bytes Waitms 10 Y2 Y2 Din 6 Waitms 100 End Sub Sub Readsensor I2cstart I2cwbyte Slave D1 amp H36 I2cwbyte D1 I2cstop Waitms 1 l2c0Sstart I2cwbyte Slaverd For N 1 To 15 I2crbyte Din n Ack Next N I2crbyte Din 16 Nack I2cstop 11 2008 elektor peter ee ee ee Be ew ee ee eB ee ee ee ee ee ee ee ee ee ee ee ee ee The ATM18 project at Computer club ATM18 is a joint project of Elektor and Computer club www cczwei de in collaboration with Udo J rsz the editor in chief of www microdrones de The latest developments and applications of the ATM18 are presented by Computer club member Wolfgang Rudolph in the CC2 tv programme broadcast on the German NRW TV channel The ATM18 AVR board with the IR camera was described in Instalment 23 of CC tv which was broad cast on 18 September 2008 cr xr pcc pm cT EM The program constantly monitors the bright spots to see whether they change If they do an alarm signal is output on PBO and it can be used to drive the ULN2003 This could be con nected to a siren a fire extinguisher or some sort of pyrotechnical system If you want to protect your art collection for instance all you need is four infra red LEDs that ar
50. 8 All the same the PCB itself Figure 2 is not exactly compact partly because we have not used sur face mounted devices SMDs and also because the AC mains 110 V 230 V section of the circuitry needs ade quate room for the relatively large relay and interference suppression components Switches 1 and S2 have already been described The reset switch S3 plays a relatively crucial role here as far as the microcontroller is concerned the set tings of switches S51 and 52 become valid only following the reset opera tion or applying power Every change to the settings of S1 and S2 requires a fresh reset to take effect LED D5 indicates reception of GPS data if a GPS module is connected to elektor 11 2008 owvoooooN ou TK NMOTOO P4 P8 P3 P5 RI PTY NRZ D4 BI AJD AS Mini DIN connector K7 flashing light denotes poor reception inadequate signal or interference but continuous illumination signals valid coordinates After switching on or reset the LED flashes rapidly for about two seconds to indicate that the mobile be con nected is making a connection which can take up to 30 seconds or so If the LED remains unlit the mobile is not responding and the remote switch is not working properly Sub D connector K6 is provided for making a serial connection to the mobile and since we are dealing with RS 232 signals the level changer MAX232 IC2 must not be omitted Test points are provided for the sig nals
51. 8 00 More information on the Elektor Website www elektorcom Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel 44 20 8261 4509 Fax 44 20 8261 4447 Email sales elektor com SHOP lektor From LED to graphical LCD Universal Display Book for PIC Microcontrollers This book begins with simple programs to flash LEDs and eventually by stages to use other display indicators such as the 7 seg ment and alphanumeric liquid crystal dis plays As the reader progresses through the book bigger and upgraded PIC chips are introduced with full circuit diagrams and source code both in assembler and C A tutorial is included using the MPLAB progra mming environment together with the PCB design package and EAGLE schematic to enable readers to create their own designs 192 pages ISBN 978 0 905705 73 6 23 00 USS 46 00 PIC Microcontrollers Silent alarm poetry box night buzzer and more PIC Microcontrollers This hands on book covers a series of exciting and fun projects with PIC micro controllers You can built more than 50 projects for your own use The clear expla nations schematics and pictures of each project on a breadboard make this a fun activity The technical background infor mation in each project explains why the project is set up the way it is including the use of datasheets Even after you ve built all the projects it will still be a valua
52. 905705 68 2 29 95 USS 59 90 Ce a Co Lam ene a ze ge beh i Modern technology for everyone FPGA Course FPGAs have established a firm position in the modern electronics designer s toolkit Until recently these super components were practically reserved for specialists in high tech companies The nine lessons on this courseware CD ROM are a step by step guide to the world of Field Pro grammable Gate Array technology Sub jects covered include not just digital logic and bus systems but also building an FPGA webserver a 4 channel multimeter and a USB controller The CD also con tains PCB layout files in pdf formot a Quartus manual project software and various supplementary instructions ISBN 978 90 5381 225 9 14 50 USS 29 00 Software Tools amp Hardware Tips Ethernet Toolbox This CD ROM contains all essential in formation regarding Ethernet interfaces Ethernet Toolbox includes a collection of datasheets for dedicated Ethernet inter face ICs from many different manufac turers It provides a wealth of information about connectors and components for the physical layer PHY and specific software tools for use with the Ethernet Software To help you learn about the Ethernet in terfaces we have compiled a collection of all articles on this topic that have ap peared in Elektor and complemented them with additional documentation and links to introductory articles on Ethernet interfaces
53. Atmel Corporation s ATA2QT1060 is a touch control chip that integrates 6 channels of touch sensing with the ability to drive up to seven low current LEDs directly through a pulse width mod ulated PWM output function The device operates from 5 5 V down to 1 8 V and consumes less than 1 pA in standby mode to give long battery life it comes in a tiny 4x4 mm MLF28 package making it ideal for use in mobile phones and other handheld devices The AT42QT1060 is the latest addition to Atmel s comprehensive range of capacitive touch controllers based on Quantum Research Group s charge transfer technology These include QTouch and QMatrix based controllers for single and multiple touch buttons touch slid ers and touch wheels The AT42QT1060 is designed for use in portable electronics prod ucts An inbuilt capacitive guard channel feature helps prevent false small as 0 2 K Basically they function on a par with electronic controllers The thermostat s IP64 plastic hous ing can be readily fixed to the side of a battery and so each one can be safely monitored www atcsemitec co uk 080793 V ideal single chip solution for wire less applications including mice keyboards remote controls game controllers sports healthcare sen sors toys and active RFID tags Engineering samples of the nRF24LE1 and development tools are widely available today www nordicsemi com 080793 11 triggering for example where m
54. C BI EM mU Arr m ies m cian t aus ET ERE i X j J mimi ETARA ha PS aeea 1 il eee a a eet a ronis oe E aud E mlt ed Sel ro pisan t I Ri as UEM i u a eum Bt WI CN 1 1 a EP ies gu H mn IH I a Ld oi inp J prERT Sele ot le T e aie 1 E ide Li tatu i E HI E i fa ie pru THNT Wo s bets r in less than 5 minutes All levels of the Proteus Design Suite now include a world class fully integrated shape based autorouter at no additional cost The Proteus Design 5uite also incorporates m Professional schematic capture m Highly configurable design rules m Publication quality schematics m Interactive design rule checking m Fully configurable bill of materials m Polygonal and split power planes E Large component libraries for both m RS274X Excellon and ODB simulation and PCB layout database export m Mixed mode SPICE circuit simulation amp 3D Viewer with 3DS Ep Co simulation of PIC AVR 8051 and and DXF export e 22 5 5 ARM microcontroller firmware a 2 27 A RM 23 m Automatic component placement and CD m a gateswap optimization Prices start from just 150 visit our website for full details or to download a free demo En nr LVAVAVA www labcenter com Electronics Labcenter Electronics Ltd 53 55 Main Street Grassington North Yorks BD23 5AA Registered in England 4692454 Tel 44 0 1756 753440 Email info labcenter com exc VAT amp deli
55. C is the trickiest but with a very fine tip and a bit of patience it can be done you can use solder flux to help The other SMD components ought not to present any real problem Next solder the discrete resistors non polarised capacitors and then the electrolytic ones observ ing the correct polarity carefully After soldering all these components check that the supply voltage is reaching the ICs on the appointed pins Two HEX files are available for pro gramming the PIC see components list The executable called 080615 11 2 can be used with downloaded POI files directly The 080615 11 1 file requires a POI file sorted by increas ing longitude which speeds up the POI detection algorithm With the circuit powered and the PIC programmed the green LED D1 lights and the display shows a start up mes sage depending on the position of S1 If the display appears blank adjust the contrast using R17 First steps The first time the circuit is pow ered up the EEPROM has to be pro grammed with a POI database Close 51 and connect the circuit to your com puter s USB port Never connect the USB cable and the cigarette lighter plug at the same time Now s the 11 2008 elektor R9 R10 R6 Cap Ik 4 o 4 080615 1 V1 6 Cie e Ea E pi FEIRET TITIES F SE fee x a re Ki P B m 4 J X Hrg tiiiiiiiii x n tele C aW s m P COMPONENTS LIST Resistors 0 25W 5 R1 R8 R12 10
56. C3 Development Board with on board USB 2 0 programmer System supports 8 20 28 and 48 pin microcontrollers supplied with CY8C27843 Every jumper element and pin is clearly marked on the board EasyPSoC3 is an easy to use PSoC development system On board USB 2 0 programmer provides fast and easy in system programming Uni DS 3 Development Board Complete Hardware and Software solution with on board USB 2 0 programmer E I rm System supports PIC dsPIC AVR 8051 PSOC and ARM microcontrollers with a large number of peripherals In order to continue working with different chip in the same development environment you just need to swich a card UNI DS3 has many features making your prototype development easy You can choose between USB or External Power supply Each MCU card has its own USB 2 0 programmer EasydsPIC4 Development Board Complete Hardware and Software solution with on board USB 2 0 programmer and mikrolCD System supports 18 28 and 40 pin microcontrollers supplied with dsPIC30F4013 general purpose microcontroller with internal 12 bit ADC EasydsPIC4 has many features that making your prototype development easy Many of these ready to go examples in C BASIC and PASCAL language guarantee successful use of the system Ultra fast on board USB 2 0 programmer and mikrolCD In circuit Debugger enable very efficient debugging and fast prototype development EasyARM Development Board Complete Hardware
57. IP etc Elektor has already published numerous arti cles about this product For myself I was quite surprised by how power 22 ful user friendly and easy to learn this software is Of course it s not a magic tool it does have its limita tions for example the PIC interrupt library is not comprehensive enough and it only recognizes whole number values to a maximum of 16 bits but these are fairly easy to work around It s up to you The project described in this article may be used as a warning device for fixed speed cameras which is perfectly legal in France at the time of publication of this article However this does not mean to say that the use of this project is legal in other countries nor that it is going to remain legal for use in France In addition the Flowcode simulation mode allowed us to test the code for this project except for the serial con nection interrupt part before imple menting it Thanks to Flowcode we ve been able to produce a quite substantial project in a limited time The use of a tool like Flowcode in an educational context was a first for us most students appreciated it and some of them actu ally managed to see the project right through to the end Block diagram As the block diagram Figure 1 shows the system is fairly simple a GPS receiver provides the sys tem s geographical position once a second This position is then compared to the POI location
58. Pevieww J WE ui noa bf and analyse up to TOUD captures t effer Welt LI p n P within its was Mcd Ead portable law cos1 solutions t general purpose testing The a PEE dg Hine i Ml Fa h in dhe d F ca Scar 210 5 fits m Tel MT Mim of your Ahamd yet stii includ TP QU VE ur un ua ua Te pow ul E LETT found i ire Over Technology to check out our full line of PC based instruments or call O1 480 396 395 for information and a product catalogue LL DEVELOPMENT TOOLS COMPILERS BOOKS EasyPIC5 Development Board Complete Hardware and Software solution with on board USB 2 0 programmer and mikrolCD Following the tradition of its predecessor EasyPIC4 as one of the best PIC development systems on the market the EasyPIC5 provides newly revised features for the same price System supports 8 14 18 20 28 and 40 pin PIC microcontrollers supplied with a PIC16F887 USB 2 0 on board programmer with mikrolCD In Circuit Debugger enables very efficient debugging and very fast prototype development Examples in C BASIC and Pascal language are provided with the board Touch screen controller with connector is available on board LV24 33A Development Board Complete Hardware and Software solution with on board USB 2 0 programmer and mikrolCD System supports 64 80 and 100 pins PIC24F PIC24H dsPIC33F microcontrollers supplied with PIC24FJ96GA010 PIC24 16 bit Microcontroller 96 KB Flash Memory 8 KB RAM
59. RC 5 system address 17 dec which can be programmed for device AMP enter code 1112 on the remote control did not work entirely according to the standard The volume buttons channel buttons and stand by button proved to work correctly These are very important for us but the operation of the other functions of an audio device requires the number buttons Unfortunately the code that is transmitted for these buttons is a complete surprise While we expected code 1 for button 1 code 2 for button 2 etc something completely different was trans mitted instead see the following table EuroSky 8 AMP code 1112 RCS Tuner Address hex Command Address hex Command rx EB E e EN The author noticed this too and he adapted the software in the con troller accordingly However this results in problems when we use a remote control which does transmit the correct codes This is why the Elektor lab has modified the controller software in such a way that it only reacts to the correct commands of system address 17 For the o j eu NAA ABA e1G rs tests we used a universal remote control from Philips type SBC RU 865 code 0001 for TUNER Using this the circuit works as expected other universal remote controls should also work well with this circuit 9UcoDIEBE BEC B a To check whether a remote control transmits the correct codes you can use the circuit from the Elektor October 2001 issue IR Code An
60. SAR The ieee Kit ieri Since 1993 otor Drivers Controllers ere are just a few of our controller and river modules for AC DC Unipolar Bipolar tepper motors and servo motors See ebsite for full range and Pdetails Drives any 5 35Vdc 5 6 or ius 8 lead unipolar stepper motor rated up to 6 Amps Provides speed and direc 9 tion control Operates in stand alone Or PC controlled mode for CNC use Connect up to six 3179 driver boards to a single parallel port Board supply 9Vdc PCB 80x50mm Kit Order Code 3179KT 12 95 Assembled Order Code AS3179 19 95 Drive any 5 50Vdc 5 Amp bi polar stepper motor using f externally supplied 5V lev els for STEP and DIREC TION control Opto isolated t inputs make it ideal for CNC apace using a PC running suitable software Board supply 8 30Vdc PCB 75x85mm Kit Order Code 3158KT 17 95 Assembled Order Code AS3158 27 95 Controls the speed of most common DC motors rated up to 32Vdc 10A in both the forward and re verse direction The range of control is from fully OFF to fully ON in both directions The direction and speed are controlled using a single potentiometer Screw terminal block for connections Kit Order Code 3166v2KT 17 95 Assembled Order Code AS3166v2 27 95 Control the speed of almost any common DC motor rated up to 100V 7 5A Pulse width modulation output for maximum motor torque at all speeds Supply 5 15Vdc Box supplied
61. Services Flex PCA 11 2008 elektor Advertisement rswww com electronics 08457 201 201 41 MICROCONTROLLERS Kae are es T o 9 CPGE 32 anda Em Udo J rsz and Wolfgang Rudolph Germany JEN NM LIMES EE 2 amp JOTYXYTITTID 6 In this instalment we add a miniature infrared camera with integrated image processing capability to the ATM18 system This makes it possible to identify the positions of up to four infrared sources display the positions on a monitor and output their coordinates Assembling a high tech camera system of this sort is certainly affordable if you take advantage of mass produced high tech toys When you hear the term hot spot you probably think of a wireless Internet access point but this term also has other meanings In a nuclear power plant it means a tiny highly radioac tive particle in a database it means a data element and in geology it means a centre of volcanic activity However the hot spots we are have in 42 mind here are literally hot locations Anything that is hot emits infrared radiation There are three generally rec ognised classes of infrared radiation IR A covers the range from 0 78 um to 1 4 um IR B covers the range from 1 4 pm to 3 pm IR C covers the range from 3 pm to 1 pm The terms thermal radiation and infrared radiation are often confused with each other Thermal radiation is the electromag
62. TG The board and sup porting materials provide a complete platform for imple menting capacitive touch sensing inter faces without the need for external components Addi tionally with the PIC24FJ256GB110 family s rich periph eral integration and 256 kBytes of Flash memory and Microchip s broad portfolio of free and low cost software libraries embedded designers can use a sin gle MCU to cost effectively imple ment a wide variety of additional user interface functions includ ing QVGA touch screen displays speech based audio prompts and USB connectivity The PICDEM Touch Sense 2 demo board Part DM164128 can be purchased for 99 99 from Microchip This price includes the mTouch Sensing Solution SDK and a USB cable www microchip com mtouch www microchipdirect com 080793 II New industry alliance promotes use of IP in networks of smart objects A group of leading technology vendors and users have formed the IP for Smart Objects IPSO Alliance whose goal is pro moting the Internet Protocol IP as the networking technology best suited for connecting sen sor and actuator equipped or smart objects and delivering intormation gathered by those objects Smart objects are objects in the physical world that typi cally with the help of embed ded devices transmit infor mation about their condition or environment e g temperature light motion health status to locations where
63. The heart of the circuit consists of an ATmega88 which is con nected directly to the USB port If we look at the datasheet for this AVR we will however not find any mention of hardware to support USB So how does this work then The solution is to be found in a trick with some clever programming most of the AVRs can be made to mimic a low speed USB device There even exist special libraries for this purpose 1 Several projects have been made around these libraries USB program mers bootloaders display controller just name it One of these projects is called AVR CDC and its purpose is to implement a USB to serial converter in software That s just what we need The software is licensed under the GPL which means that if you build a device using it you also have to supply the source code That is not a problem for this project An RGB to HSV converter is also eas ily picked from the Internet There are multiple solutions on various websites but they are often based on floating point which means that the already busy AVR has to do even more After an extensive search we fortunately also found an integer version which costs far fewer clock ticks This soft ware is released under the MIT license which after a little searching appears to be compatible with the GPL So after a copy paste operation we ve already gathered half of the required code The code to control the wireless chip is all that remains Because this
64. a lyser article number 010029 If you would like to make your own n iu lu g simple remote control without microcontroller you can have a look whether an SAA3010 PT2211 or HT6230 can be obtained from so mewhere One example for such a circuit is in the December 2003 issue Small RC5 Transmitter article number 024034 rer cep 40 elektor 11 2008 ther processing by the main program If the code is incorrect the value 0 is stored This causes the main program to ignore this code After the initialisation of the vari ous peripherals comes the main pro gram loop of the firmware This loop is repeated indefinitely Once a valid RC 5 code has been received it is split into device code key code and the toggle bit The software subsequently checks based on a table stored in EEPROM whether an RC 5 code has been received that is relevant to this Circuit By the way these codes can be freely selected For this you need to change the table in buttons c and recompile the firmware and program the control ler again For the latter you will need AVR Studio or WinAVR When the received code matches one of the codes in the EEPROM the micro controller will execute the correspond ing command The software contains also a second A AA A A A A A A AAAA AAA AA AA AA AA A
65. adjusting the audio volume It would be even nicer if this potentiometer could also be controlled remotely This is possible with a high quality motorised potentiometer from Alps and a handful of electronics as is described here Controlling the volume in high quality audio equipment is always a critical part of the audio path The potentiom eter that is to be used for this has to be first rate to give excellent match ing between the two channels and at the same time it needs to function for a long time without generating any crackling or other noise These days it is more common that electronic potentiometer ICs and resistor net works with relays are used but these solutions are rather involved Many audio enthusiasts still swear by a good old fashioned potentiometer Whenever you start looking for a good specimen you will quickly arrive at the 38 Alps brand Alps truly make excellent potentiometers both without and with motor control The latter is very nice to enable you to conveniently control the volume remotely from your listen ing position In this article we present a small circuit that can control such an Alps motorised potentiometer using a standard RC 5 remote control In addi tion to turn the volume up or down the circuit also has 5 outputs for switching between different input channels One IC Not counting the voltage regulator IC the entire circuit contains only one IC that takes care of all the oper
66. ail subscriptions elektor com Rates and terms are given on the Subscription Order Form Head Office Elektor International Media b v PO Box 11 NL 6114 ZG Susteren The Netherlands Telephone 31 46 4389444 Fax 31 46 4370161 Distribution Seymour 2 East Poultry Street London ECA England Telephone 44 207 429 4073 UK Advertising Huson International Media Cambridge House Gogmore Lane Chertsey Surrey KT16 9AP England Telephone 44 1932 564999 Fax 44 1932 564998 11 2008 elektor b Email p brady husonmedia com Internet www husonmedia com Advertising rates and terms available on request Copyright Notice The circuits described in this magazine are for domestic use only All drawings photo graphs printed circuit board layouts programmed integrated circuits disks CD ROMs software carriers and article texts published in our books and magazines other than third party advertisements are copyright Elektor International Media b v and may not be reproduced or transmitted in any form or by any means including photocopy ing scanning an recording in whole or in part without prior written permission from the Publisher Such written permission must also be obtained before any part of this publication is stored in a retrieval system of any nature Patent protection may ex ist in respect of circuits devices components etc described in this magazine The Publisher does not accept responsibility for failing to iden
67. ance The open loop output impedance of the buffer plus the output stage is shown in Figure B As R has a large influence on the non ideal behaviour of the buffer and output stage a value of 1 for G can reasonably be assumed for the purpose of calculating the output impedance The current source i shown here for the sake of the analysis connected to the output produces a voltage across R A replica of this voltage just as with the error correc tion feedback loop is generated at the Z terminal This can be expressed by the following formula Z R x l R25 R34 R x 1 K 2 The output impedance Z is positive if K is less than 1 zero if K is 1 and negative if K is greater than 1 A positive output impe dance causes overdamping of the loudspeaker while a negative Please include this software in your next review engineering found DIPTRACE was by far the most intuitive CAD package tested DIPTRACE is free for smaller projects up to 250 pins David G3ZOI United Kingdom elektor 11 2008 output impedance causes underdamping As a result an amplifier with a negative output impedance and a mediocre impulse response will cause overshooting if it is loaded with an LCR network i e a loudspeaker and in the worst case it can oscillate Conclusions and recommendations From the above it can be seen that the error correction feedback loop is stable but the output impedance is negative in the presence of
68. and Software solution with on board USB 2 0 programmer and mikrolCD WAD System supports 64 80 and 100 pin PIC18FxxJxx microcontrollers supplied with PIC18F87J60 PIC18 Microcontroller with an integrated 10Mbps Ethernet communication peripheral 80 Pin Package LV 18FJ is easy to use Microchip PIC18FxxJxx development system On board USB 2 0 programmer with mikroICD In Circuit Debugger enables very efficient debugging and fast prototype development Examples in C BASIC and Pascal language are provided with the board dsPICPRO 4 Development Board Complete Hardware and Software solution with on board USB 2 0 programmer and mikrolCD System supports dsPIC microcontrollers in 64 and 80 pins packages It is delivered with dsPIC30F6014A microcontroller dsPICPRO4 development system is a full featured development board for the Microchip dsPIC MCU This development board has an on board USB 2 0 programmer and integrated connectors for MMC SDmemory cards 2 x RS232 port RS485 CAN on board ENC28J60 Ethernet Controller DAC etc Touch screen controller with connector is available on board Examples in C BASIC and Pascal language are provided with the board BIGPIC5 Development Board Complete Hardware and Software solution with on board USB 2 0 programmer and mikrolCD System supports the latest 64 and 80 pin PIC microcontrollers supplied with PIC18F8520 Many of these ready to go examples in C BASIC and Pascal
69. and complete component data This CD ROM is a must have for all electronics enthusiasts ISBN 978 90 5381 159 7 17 50 USS 35 00 elektor 11 2008 November 2008 No 383 t USS Motorised Volume Pot 071135 41 Programmed controller ATMEGA8 16PU 5 90 11 80 Speed Camera Warning Device 080615 1 Printed circuit board sss 15 50 31 00 080615 41 Programmed controller PICT6F876A I SO 11 80 23 60 Remote Control by Mobile Phone 080324 1 Printed circuit board ss 17 80 35 60 080324 41 Programmed controller ATMEGA8 16PU 5 90 11 80 08032471 Kit of PariS see eee ne ere ee see www elektor com Tracking Hot Spots 080358 1 Printed circuit board ss 9 10 18 20 ATmega meets Vinculum 07115291 VDIPAmodulg tec cette 22 5 45 00 October 2008 No 382 Communicating with CAN 071120 71 PCB partly populated 54 90 109 80 Elektor SMT Precision Reflow Oven 080663 91 Ready to use oven 230VAC only 882 00 1525 00 Multi purpose GPS Receiver 070309 41 Programmed controller PICT8F2520 11 60 23 20 ATM18 Relay Board and Port Expander 071035 72 Relay PCB with all components and relays
70. and telephone Online ordering through our website is SSL protected for your security The standard subscription order period is twelve months If a perma nent change of address during the subscription period means that copies have to be despatched by a more expensive service no extra charge will be made Conversely no refund will be made nor expiry date extended if a change of address allows the use of a cheaper service Student applications which qualify for a 20 twenty per cent reduction in current rates must be supported by evidence of student ship signed by the head of the college school or university faculty A standard Student Subscription costs 33 60 a Student Subscription Plus costs 39 20 UK only Please note that new subscriptions take about four weeks from receipt of order to become effective Cancelled subscriptions will be subject to a charge of 25 twenty five per cent of the full subscription price or 7 50 whichever is the higher plus the cost of any issues already dispatched Subsciptions cannot be cancelled after they have run for six months or more January 2008 oldering couk NEW IN STOCK poma eR PCB Soldering i Equipmeni amp Rework Stations 328 Working Pla tform Online Price 44 95 Kit Incipdaes Hot Aer Gun Al 62 Am Norte Z 7UW Soldering Iron with Fume Atsorber Solde inan Staned Soldering tron Tip with Heating Element Vacuum Suction Pen z Heat Fasitant Pad IC Rermor
71. are fabricated using a CMOS process and operate from a 5 V supply The sig nal processing logic is integrated onto the device see block diagram in Fig ure 4 Internal compensation assures reliable performance from 40 C to 125 C with parts for automotive ap plications specified for operation up to 150 C The differential measurement technique inherently compensates for external magnetic fields ageing of the magnet and variations in temperature The devices offers eight bit resolution distinguishing 256 angles over a 360 revolution this corresponds to an an gular resolution of 1 4 In addition to angle the device also measures the overall field strength which it reports using a six bit code This allows the distance to a rotating magnet to be estimated or the implementation of a contactless pushbutton feature as de scribed above The position value can be output over a serial digital interface two wire or three wire or using a PWM one wire output A zero position can be pro grammed into the device s OTP one time programmable memory to sim plify assembly by obviating the need to align the magnet precisely A low power sleep mode with rapid wake up allows the device to be used in bat tery powered applications The device can be used with hard wired logic rather than a microcon troller for fail safe operation ideal for safety critical applications employing redundant systems A diagnostic
72. ations an ATmega from Atmel which is respon sible for decoding the RC 5 signals and driving the potentiometer and the optional input relays Apart from that there isn t much to the schematic shown in Figure 1 but we will never theless walk through it IC1 is the brains in this circuit an ATmega8L which is running here at a clock frequency of 4 MHz thanks to crystal X1 An IR receiver module type SFH5110 36 is connected to port PD7 This receives the signals from the RC b remote control polishes them into clean digital pulses and then passes elektor 11 2008 them on to the controller for further processing The software has been written so that the processor reacts to RC 5 commands from a remote control from a tuner amplifier receiver RC 5 system 17 decimal Port pins PD2 through PD6 are made available externally via connector K3 for switching the pre amplifier inputs Driving the motor of the Alps potenti ometer is done from ports PBO through PB5 and PCO through PC5 Six outputs from each of the ports B and C are con nected in parallel to provide sufficient drive current for the motor this also reduces the number of parts The maximum current through the motor when it is stalled is 150 mA according the Alps data sheet 100 mA when rotating normally The absolute maximum current per I O pin is 40 mA according to Atmel So by connecting 6 pins in parallel more than 200 mA can be delivered To ind
73. b drive The Vinculum controls the FAT file system and relieves devel ADE 33 MM LJ e LJ LI LJ LJ L LI Ld Figure 1 Connections of VDIP1 Source Data sheet 2 52 opers of a significant amount of devel opment work Experimenter friendly The name Vinculum comes from the Latin and has the meaning of bond fet ter tie or leash In that same spirit we can use this chip to attach a USB stick to a small 8 bit microcontroller with Cruzeraman le8Me OX ee a emat A pen Se Hh Sa a BIETET x A Sa E out any problems at all In this way an Atmel ATmega88 can now enjoy sev eral Gigabytes of external memory For developing applications of this kind the VDIP1 module 2 is well suited as all connections from the Vinculum can be taken to a DIP connector see head ing photo and Figure 1 You can also carry out initial tests on a breadboard or stripboard a k a Veroboard Vector BEEF SHEE oe ee ee B summ m mM Ree ee ee d Hn ans a ee 2 L PRE BREAK E OG HN E ee ee a H PTEERIEITI risa CUO xu E S 4o Ww RR Eae cen 2 ierg ae WWE RM riiai IDEBEE Stitt ER HR REM EKEERKRENEENRNENENENENEWESMBEENNH Figure 2 First tests with a USB serial adapter elektor 11 2008 uzefr mino iB and a micro Board perfboard if you wish The main connections are set out in Table 1 The chip handles a number of serial an
74. ble reference guide to keep next to your PC 446 pages ISBN 978 0 905705 70 5 27 95 USS 55 90 81 SHOP PRODUCT SHORTLIST BESTSELLERS Prices and item descriptions subject to change E amp O E 82 Computer Vision Principles and Practice E Principles and Practice Computer Vision Computer vision is probably the most ex citing branch of image processing and the number of applications in robotics auto mation technology and quality control is constantly increasing Unfortunately enter ing this research area is as yet not simple Those who are interested must first go through a lot of books publications and software libraries With this book howev er the first step is easy The theoretically founded content is understandable and is supplemented by many examples 320 pages ISBN 978 0 905705 71 2 32 00 USS 64 00 Visual Basie Wie et H repa lor Electronics Engineering 5 0 6 0 VBA NET 2005 Visual Basic for Electronics Engineering Applications This book is targeted towards those people that want to control existing or self built hardware from their com puter After familiarizing yourself with Visual Basic its development environment and the toolset it offers are discussed in detail Each topic is accompanied by clear ready to run code and where nec essary schematics are provided that will get your projects up to speed in no time 476 pages ISBN 978 0
75. chip has a comprehensive datasheet and we have a good example obtained by eavesdropping on the data from the re mote control this is not a big deal Hardware Because we ve solved a number of requirements in software the circuit that remains is not tricky at all Fig ure 1 On the left is the USB connec tion which is connected with a few and according to the USB specification mandatory resistors to the AVR The CS2500 and the USB data lines require a power supply voltage of 3 3 to 3 6 V This is obtained in a simple way from the 5 V on the USB connector Connect two diodes in series with this 5b V and the voltage drops to about 3 5 V On the right of the schematic is the CC2500 in a configuration which is nearly entirely a direct copy from the datasheet The loop between RP P and RP N is the antenna Although there are quite specific requirements for this antenna in the datasheet a wire about 11 cm long and bent into the shape in dicated suffices in practice and works well over a short distance The schematic looks quite simple but the assembly of the circuit is much trickier than it looks This is because the CC2500 chip which deals with the necessary RF communication is only available in a OFN package For those that are not familiar with SMD pack And the end result the Living Colors lamps elektor 11 2008 ages the five pins on each side of this tiny chip all fit between two pins of a normal DIP pac
76. ckage containing a motor driver controller circuit a set of handbrakes with switch an accelerator han dle a pedal sensor and a wheel with built in motor The package finally arrived at our lab via a German importer where after having travelled half way around the world it is mounted on a second hand bicycle that was hurriedly acquired from somewhere for this purpose The wheel with regards to its diameter 24 inch is not quite right for this bike but that won t spoil the fun Technology From the three power cables that leave the controller box and go to the motor we concluded that we are dealing with a brushless motor Although the XLR plug for the connec tion to the batteries is of reasonable quality the plugs that connect to the motor are unfortunately not the best quality There is a not inconsiderable chance that these will burn out after a while Inside the controller enclosure we find an ATmega48V 10 an 8 bit AVR microcontroller with 8 k of in system program mable Flash ROM There is a strong indication the header on the board is suitable for updating dare we say hack ing of the controller There are also six substantial N channel MOSFETs from STMicroelectronics type P75NF75 which are rated for as much as 80 amps The enclosure is made from one piece of extruded alumin ium and has a cover at both ends The power MOSFETs are clamped with electrical isolation against one side of the enclosure so that the
77. ct has been de signed with open source in mind and doubles as a powerful Coldfire develop ment system using free CodeWarrior soft ware from Freescale DigiButler activates electrical appliances in and around the home accepting on off commands from a WAP phone through an Ethernet net work or via a webpage at an allocated IP address and with full access security Kit of parts including SMD stuffed PCB programmed microcontroller all leaded parts and CD ROM containing both Elektor articles TBLCF documentation datasheets application notes and source code files Art 071102 71 29 00 USS 58 00 11 2008 elektor A DIY system made from recycled components Design your own Embedded Linux control centre on a PC This book covers a do it your self system made from recycled components The main system described in this book re uses an old PC a wireless mains outlet with three switches and one controller and a USB webcam All this is linked to gether by Linux This book will serve up the basics of setting up a Linux environ ment including a software develop ment environment so it can be used as a control centre The book will also guide you through the necessary setup and configuration of a webserver which will be the interface to your very own home control centre All software needed will be available for downloading from the Elektor website 234 pages ISBN 978 0 905705 72 9 24 00 USS 4
78. ct s components we ve created our own E block connected to the PIC PORT C In this DIY E block Figure 2 we find the I C memory the FT232BL USB RS 232 interface the bi colour LED the sounder and a 11 2008 elektor MAX232 to allow us to dispense with the USB port in the first instance and be able to simulate the GPS frames on a PC Figure 3 shows the prototype in all its splendour re E G PYL O Pe ts j FT 5 ul okamae MESI A UES C fs The program The program developed under Flow code comprises two distinct sections The first and most important section handles the dialogue with the GPS module compares the data from the GPS with the locations stored in the ISP connector PIC programming ane ems ckground PIC16F876A PWM1 position saving Transmitted Data i o iio GPS frame reception Multiplexing GPS receiver USB connector p USB RS232 a 4 GPS communication 1 or PC communication 080615 11 Figure 1 Block diagram of POI warning device 23 ei sees E BLOCKS V R1 O RC5 JP1 O SCK Q SDA WP 24LC256 100n 100 RXLED TXLED RSTOUT EESK EECS EEDATA FT232BL USBDM PWREN USBDP TXDEN SLEEP TEST 3V30UT PWRCTL AGND R1OUT R1IN T1IN T1OUT T2IN T20UT R20UT R2IN C24 MAX232 GND XIN XOUT GND 080615 12 bicolour LED Figure 2 Circuit diagram of the home made E block The serial data input is selected ma
79. cted to the PCB requires an RS 232 interface Permissi ble data rates are 4 8 9 6 19 2 38 4 and Figure 4 The connections for mobile handset GPS module and plug in mains unit are on the forward side of the PCB 36 elektor 11 2008 Ta Gps Tracker Status TelTvp O Exit2Typ 1 Time 20mn Exit 1 0 Exit2 0 Exit3 1 0 ANA N21 JU Figure 5 Status acknowledgement by text message looks like this on the mobile s display 57 6 kilobaud For the data format of SMS Text messages you require some understanding of the PDU language which is used on most mobile phones We tested the circuit with the widely available Siemens models C55 data cable and S35 Some other mod els might not work with our remote switch as inevitably some minor vari ants occur in control systems The mobile needs to be equipped with a SIM card switched on and sub scribed to a network Ringtones are best dispensed with and the keypad lock activated It is important to store the telephone numbers used to initiate the switch operation and send a text not in the mobile s memory but on the SIM card itself These telephone num bers must be entered in the interna tional notation not in any other for mat as shown in the inset on how to create an SMS text message Further more the telephone numbers must occupy the memory slots on the SIM card in ascending order without any gaps The first authorised telephone number to which alarm and
80. ction in software This means that you can use any desired set of pins for the I2C bus In our case we use the same pins as for the C program The microcontroller sends several Figure 12 Connecting the sensor and LCD board to the ATM18 board Here the LCD is connected to PD5 clock and PD6 data can be run on a PC under Windows to display the recognised hot spot posi tions This program receives the X Y coordinates from the ATM18 board and converts them into graphic form Any one who has ever tried to determine the position of an object from a camera image can appreciate the clever sim bytes to the sensor for initialisation After this date is read out at regular intervals in sets of 16 bytes Each blob requires three bytes As each coordi i e 8 Contig Scl Portc 5 Listing Config Sda Portc 4 I2cinit Sensor data processing with Bascom ATM18 CCD sensor I2C SCL PC5 SDA PC4 Config I2cdelay 15 T2C sensor address amp HBO Slave Slaverd Print ATM18 I2C Wii IR Sensor amp HB1 Sregfile m88def dat Sensorinit sorystal 16000000 Baud 38400 Do Readsensor Dim Slave As Byte Convertdata Dim Slaverd As Byte Print PI Str x1 Str y1 Dim D1 As Byte Print P2 4 Str x2 4 4 BStr y2 Dim D2 As Byte Print P3 Str x3 o Str y3 Dim Din 16 As Byte Print P4 Str x4 Str y4 Xyl X1 Y1 Dim X1 As Word Xyl Xyl X2 Dim Y1 As
81. d 3 3 3 5 V on C2 The obliga tory pull up resistors for the I2C bus are also located on the PCB Here this bus operates with 3 3 V signal levels This is compatible with the 5 V operating volt age of the Mega88 because the active signal level on the bus lines is obtained by pulling them to ground while the high level is obtained by switching the output pins to the high impedance state The 3 3 V level is far enough above the switching threshold voltage Pe e eee ee eB ee ee eB eB ee eB eB eB eB ee eB ee ee eB eB eB eB eB eB eB eB eB eB ee ccc a ee ee ee 2 5 V for reliable data transfer The optical sensor from the Wiimote is a system on chip SOC device designed by PixArt as an application specific IC for tracking multiple objects multi object tracking sensor that includes an integrated signal proc essor in addition to the CMOS image sensor The signal processor con stantly searches for the brightest spots and determines their coordinates Up to four bright objects blobs can be recognised and tracked concurrently The sensor is also sensitive to visible light if the filter is not used but this capability is not used here Communication The I2C interface makes communica tion between the sensor and the micro controller relatively easy The camera generates an X Y coordinate set for each blob within its field of view of 1024 x 768 pixels and sends this data via the interface for further proc
82. d parallel operating modes which are selected using J3 and J4 In our application we need to use the serial interface of the Vinculum so we must plug J3 and J4 up to Vcc pins 13 14 Signals are processed at TTL level meaning that the microcontroller can be operated without the need for a separate interface adapter module For a first test we need to talk to Vin culum using a PC terminal program Terminal exe 3 Since most computers are no longer equipped with a serial interface a USB to serial adapter is used for example in the form of the DIP module UM232R as shown in Fig ure 2 An equally good solution is the Table 1 Vital Vinculum connections data output TXD Pin 1 VCC Pin 6 AD2 Pin 7 GND Pin 8 ADI data input RXD Handshake line CTS to GND USB Serial cable supplied by Elektor 4 The VDIP1 module needs to be fed with a 5 V supply Internally it is in fact looking for only 3 3 V but it is fully 5 V tolerant meaning that it can later be hooked up without modification to a microcontroller running on 5 V Before we go any further here s a vital warning always remember to remove the USB memory stick before Pin 10 ADA 11 2008 elektor you switch off the Vinculum module Painful experience indicates that total memory loss may occur otherwise maybe you need to put some mark ing on the stick to remind you As soon as you then connect the stick to a PC the latter will then attempt
83. d pin layouts prepared by R P Blackwell 1 With regard to packaging we can keep our remarks quite short as SMDs are usually processed by automated machines it is essential to standardise the containers used 080667 12 Figure 1 Wire bond or flip chip Flip chip technology is often used in processors due to high clock rates Figure 2 The tombstone effect is caused by unbalanced forces 19 LUE ood SMD Advertisement to supply the components to the machines There are four common types Tape or reel the components are located on a tape that is wound on a reel just like the tape of an old fashioned tape recorder Tray or pallet components with a small pin spacing or BGA are usually packaged in this sort of container Stick or tube IC with edge mounted pins are often sup plied in a plastic tube to prevent accidental bending of the pins Bulk a large number of the same type of component which are not packaged in an orderly manner Often used in the past with large quantities Requisites In the old days enthusiasts went to an electronics shop to purchase their components As there are often a large number of package options available now for components it is simply impossible for an average shop to keep all types of components in stock Fortunately they can usually supply the desired version on request Online shops often have a larger selection but there is a chance tha
84. da Device a E v RIT E EE al Remote Control by Mobile SS b Phone Motorised Volume Pot Tracking Hot Spots Lazy on the Bike ATmega meets Vinculum Bascom AVR Course 3 Colourful Computer Light Universal Remote Switch Water Alarm mini project 62 Friction free Angle Measurement Colophon 8 Mailbox 10 News amp New Products 18 An introduction to SMD 80 Elektor SHOP When it comes a to matters Ji cruzer micro CHEERET ue 84 Sneak Preview of memory cec microcontrollers n tend to be rather Luc poorly endowed A external USB memory stick is the ideal remedy offering Electric bikes have become popular in recent times But an off the shelf contraption is not nearly as much fun as one which we have to build 6 ourselves So on the look out for DIY kits j straightforward data transfer to QU your PC Now if bonding the r Hexadoku memory stick to a micro was r sS somewhat problematic until recently it s Retronics Tektronix 7DO1 now totally stress free with the Vinculum chip from FTDI Logic Analyser 1978 ELECTRONICS WORLDWIDE elektor international media Elektor International Media provides a multimedia and interactive platform for everyone interested in electronics From professionals passionate about their work to enthusiasts with professional ambitions From beginner to diehard from student to lecturer Information education inspiration and entertainment
85. does not follow the official standard entirely Although the saturation and value are correct there is a certain non linearity in the hue curve Fortunately this can be fixed After a few observations of the differences in colour a table can be constructed which converts real hue values to their equivalent Living Colors hue values The table is not really an ideal solution but if you notice the col our differences when watching a movie you will have to ask yourself whether that movie is really worth your time Because there is little chance that oth er lamps have the same addresses as the lamp we used there is a learning routine in the AVR This works as fol lows First make sure that all lamps that have to be controlled can be oper ated with one remote control You can add a lamp to a remote control by holding the remote against the Philips logo on the front and pushing the 1 button on the remote Do this for all the lamps and if all is well all lamps will now react to that remote control Once the remote control knows all the lamps it is possible to transfer the ad dresses to the AVR push button 5S1 and press the 0 button on the remote control until the LED on the PCB D1 turns off What is happening The re mote control attempts to turn off all the lamps by sending each lamp the off command The AVR also listens on this channel and stores every passing ad dress These addresses are saved in EEPROM Acqui
86. e Your reasoning with regard to the output impedance is also cor rect Here again it is enlightening to consider a few practical figures A quick simulation shows that the open loop output impe dance of the circuit shown in Figure B is approximately 0 4 ohm at 10 kHz If the value of R25 is 1 larger than it should be rela tive to R34 this yields a negative output impedance of 4 milli ohms For comparison the resistance of 1 metre of speaker cable with a 2 mm wire diameter is approximately 10 milli ohms Here you could say that the negative output impedance offsets the resistance of the first half metre of the speaker cable If it has any effect at all it is to improve the damping In summary it appears that a mismatch of the error correction resistors by a few percent does not create any problem at all with regard to latch up or output impedance A matching level of 1 can be achieved by a clever choice of standard resistance values All of this is confirmed by the trouble free operation of several dozen amplifiers that have been built according to this design Jan Didden Thanks for that David will do By the way for those keen on statistics the chunks to com pile the ISO file and from there burn your own DVD were down bowled over our web servers 11 2008 elektor loaded 2 880 times and almost Multiple Digibutlers on the same network Dear Editor in part 2 of the DigiButler article Elektor May 20
87. e constantly observed by the sensor A checksum is formed from the set of eight coordinates If it changes from the value of the previ ous measurement by more than 10 an alarm is generated This can happen if for example a thief passes through one of the invisible infrared beams or uses Waitms 30 End Sub Sub Convertdata X1 Din 4 And amp H30 Xl Xl 16 X1 X1 Din 2 Y1 Din 4 And amp HCO Y1 Y1 4 Y1 Y1 Din 3 X3 Din 10 And amp H30 X3 X3 16 X3 X3 Din 8 Y3 Din 10 And amp HCO Y3 Y3 4 Y3 Y3 Din 9 X4 Din 13 And amp H30 X4 X4 16 X4 X4 Din 11 Y4 Din 13 And amp HCO Y4 YA 4 Y4 Y4 Din 12 End Sub CC2 tv is broadcast live by NRW TV via the cable television network in North Rhine Westphalia and as a LiveStream programme via the Internet www nrw tv home cc2 CC2 tv is also available as a podcast from www cczwei de and a few days later from sevenload de je ee ee ee ee ew ee ee ew ee ee eB ee ee ee ee ee ee ee ee eB ee HK AH Sea Se SS aa ee a a a UR cx ee eel a fishing rod to drop a line through a skylight and snag one of your Picassos that is protected by the IR system Now that we ve laid the groundwork we look forward with considerable anticipation to applications developed by Elektor readers 080358 1 Internet Links 1 http en wikipedia org wiki Wii_Remote 2 www pixart com tw 3 www analog com en me
88. e most important file commands Source Firmware manual 5 Command Set SCS SCS lt Enter gt Vinculum responds in like manner in small Bytes for example 13 corre sponds to CR 62 13 To return to Extended Command Mode you use the command ECS Other com mands can be found in the Vinculum Firmware User Manual 5 as seen in Figure 4 54 Firmware update It s always a good idea to use the lat est version of the firmware On the Vinculum download page 6 you can always find the most recent VDAP firmware file as we went to press this was ftrfb main 03 65VDAPF ftd Loading the new firmware is easy with the USB memory stick Copy it to the root directory of the medium and rename it as ftrfb ftd 7 When you connect the stick the follow ing reports appear Device Detected P2 Found It Change MAIN Reflasher Active Rebooting Ver 03 65VDAPF On Line Device Detected P2 No Upgrade Deis Vinculum and ATmega in harmony That s enough playing around now it s time for an actual application A microcontroller an ATmega88 in this case for instance on the Elektor ATM18 AVR Board is connected via its RXD PDO and TXD PD1 lines to the VDIP1 These need to be cross connected i e TXD to RXD and RXD to TXD see Figure 5 The microcontroller should read the file ToDo txt in order to capture the data included as instructions for measure ment and to write the test data into a second file Log
89. ead not included Assembled Order Code AS3128 44 95 PICALL will program virtu ally all 8 to 40 pin serial mode AND parallel mode PIC16C5x family pro grammed PIC micro control lers Free fully functional software Blank chip auto detect for super fast bulk programming Parallel port connection Supply 16 18Vdc Assembled Order Code AS3117 24 95 Uses serial port and any standard terminal comms program Program Read Verify Code Data Write Fuse Lock Bits Erase and B s Blank Check 4 LED s display the status ZIF sockets not included Supply 16 18Vdc Kit Order Code 3123KT 24 95 Assembled Order Code AS3123 34 95 sees MICROCONTROLLERS a a 1C Almega meets Vinculum Recording data values with a USB stick Burkhard Kainka Germany When it comes to matters of memory microcontrollers tend to be rather poorly endowed An external USB memory stick is the ideal remedy offering straightforward data transfer to your PC Now if bonding the memory stick to a micro was somewhat problematic until recently it s now totally stress free with the Vinculum chip from FTDI The Vinculum chip has been devel oped by the FTDI company for adding not merely an uncluttered USB inter face but full USB host functionality to all conceivable embedded applications 1 Boards and devices equipped in this way can be enhanced further for example with a USB memory stick or thum
90. ed again Since the time RAX C3 required to recharge C3 is longer than the time set by R5xC2 the expected time of R6XC3 is there fore shorter The theoretical times in an optimal case may be calculated from ln 2XR5xXC2 and In 2XR6XxC3 The expected time would have been 15 seconds but has been reduced to 10 seconds by the combination of val ues chosen for these components In creasing the value of C3 to lengthen the off time does not work R4 would have to be reduced by the same ratio and that would increase the current consumption elektor 11 2008 You could experiment with the value of R6 but make sure that T3 still switch es on properly The voltage drop will be around 0 8 V For the sensor for this water alarm you can use two short wires with the insulation stripped off The circuit is sensitive enough to sense a drop of tap water on a table with the ends of the sensor wires To prevent the circuit from drowning in a large pool of water and therefore won t work properly any more you can build it into an enclosure that floats Alternatively you could mount the PCB buzzer and battery on a block of polystyrene The wires for the sensor can be pushed through the block and bent over on the underside The block of polystyrene has to be big enough to carry the weight of the circuit of course A third possibility is to mount the circuit sufficiently high up in the room The sensor can be connected to the circu
91. editor elektor com or Elektor The Editor 1000 Great West Road Brentford TW8 9HH England WOE NEWS amp NEW PRODUCTS Complete IEEE802 15 4 solution for wireless networking 10 Microchip announces the MRF24J40MA FCC certified Radio Frequency RF transceiver module and the MiWi Peer to Peer P2P Wireless Protocol Stack based upon the IEEE 802 15 4 specifi cation Together the MRF24J40MA module and MiWi P2P stack can target a variety of wireless network ing applications such as industrial monitoring and control home and building automation remote con trol low power wireless sensor net works lighting control and auto mated meter reading The MRF24J40MA transceiver mod ule is surface mountable and can be used with hundreds of 8 bit 16 bit or 32 bit PIC microcontrollers MCUs It includes discrete biasing components and an integrated PCB antenna to be used in sensor and control network environments The module is fully regulatory agency certified for the US FCC Can ada IC and Europe ETSI and is expected to save designers time and money by eliminating the need to receive FCC certification for their wireless products The MiWi P2P protocol stack sup ports star and peer to peer wire less network topologies with an ultra small code implementation of 3K bytes for Microchip s PIC micro controllers MCUs As a result the stack provides shortrange wire less customers with hundred
92. ektronix 7D01 Logic Analyser 1978 Martin Cooke United Kingdom Back in the 70 s when engi neers were bread boarding their designs using the new fan gled microprocessors they soon found that the traditional diag nostic tools were falling a lit tle short of the job Many found themselves in the equipment store rummaging in vain for an eight chan nel storage scope In 1973 Hewlett Packard announced their HP5000A logic analyser US ana lyzer which was a basic two channel machine designed for use with combi national logic and using LEDs to rep resent digital levels Tektronix had for a long time been using a modular approach to their oscilloscope designs a scope chassis housed the CRT together with its high and low ten sion supplies and a number of bays which accommodate plug ins to amplity the input signal and generate the time base If you wanted more bandwidth or channels it was a simple job to swap the plug ins Around 1976 Tek tronix announced the type 7D01 logic analyser plug in for their 7000 series oscilloscope chassis The 7DO1 can dis play and store up to 16 channels of dig ital data Triggering options include a 16 bit word recogniser which is set up from a row of three way switches hi lo don t care on the front panel The word recogniser also has a BNC output on the front panel useful for triggering other test equipment A cursor knob scrolls through the captured data Storage o
93. electronics 17 29 41 Elnec Showcase WWW INEC COM 2 ee 78 ScanTool Showcase eee eee www obd2cables com www scantool net 79 EMCelettronica Srl Showcase www emcelettronica com luu 78 Shawease 78 79 Eurocircuits 2 sace de trm mms WWw eurocircults Com ess 75 USB Instruments Showcase Wwwensbdiethlfents COIN lt 5 sott is 79 First Technology Transfer Ltd Showcase WWW ftt CO UK llle 78 Virtins Technology Showcase VE E 79 FlexiPanel Ltd Showcase www flexpanel com ees 78 Future Technology Devices Showcase www ftdichip com c i eee 78 Advertising space for the issue of 15 December 2008 may be reserved not later than 18 November 2008 ILP Electronics Ltd Showcase www ilpelectronics com lsssss 78 with Huson International Media Cambridge House Gogmore Lane Labcenter 1e lorisserbexdue couches Wwww labcentercom sese 88 Chertsey Surrey KT16 9AP England Telephone 01932 564 999 Fax 01932 564998 e mail p brady husonmedia com to whom all London Electronics College Showcase www ec org uk lle eese 79 correspondence copy instructions and artwork should be addressed 11 2008 elektor 87 Our new autorouter will turn this into this oS 2 889 62 6 69 X Lu H T EDS il md nra med mmu A m a i a ll LES LR d LER zur T d B
94. enham Hundred Business Park Watchfield Swindon Wiltshire SN6 8TZ UK Ax XBnGG Tel 01793 784002 www axxessid com Identifiratinr 11 2008 elektor 21 daN E BLOCKS Speed Camera W Drive wisely Gilles Le Maillot France The little module described here lets you detect geographical points te a 2 R i og of interest POIs using the frames output from a GPS receiver module These POIs might be restaurants petrol stations or why not the positions of fixed speed cameras Having found it hard to find fully devel oped ambitious projects every year the circuit published online by Chris tophe Le Lann 1 seemed to me a good starting point So we adapted this Elec tronics Design project for the course taught at our College ENSIETA 2 We ve used a PIC microcontroller and added several new options like a bigger memory the pos sibility to update the memory via USB speed display etc In addition we produced the pro gram under Flowcode using E blocks 3 Flowcode is a high perform ance graphical development environment for microcon trollers PIC and AVR that makes it possible to swiftly create quite complex electron ics systems and above all to simulate them The program description is in the form of a stand ardized ISO5807 flowchart using macros that make it easier to control complex peripherals like 7 segment displays motor controllers LCD dis plays Bluetooth TCP
95. er up the sensor on the component side Figure 6 Then repeat this proc ess with the tab on the other side With a few back and forth repetitions you can quickly pull the sensor free from the board Figure 7 The screen sheet metal enclosure of the sensor PC5_SCL Supply Figure 6 The solder tabs of the sheet metal screen are a bit more stubborn must be left in place as otherwise it will quickly and permanently turn into dead silicon If you leave the rest of the remote con trol board undamaged when removing the sensor the remainder of the cir cuitry will still function normally What you have left over then is an interest ing Bluetooth device with an accelera tion sensor for which you can probably think of some useful applications PCB In order to use the IR camera sensor with the ATM18 board you need a bit of simple circuitry Figure 8 which can be built on a small PCB Figure 9 A 25 MHz crystal oscillator CG1 pro vides the sensor clock signal CLK The crystal oscillator can be powered directly from the 5 V supply voltage of the ATM18 board via PCB connector K2 with the voltage decoupled by C1 but the camera sensor IR1 requires an 080358 11 Figure 8 The circuit for connecting the camera sensor elektor 11 2008 operating voltage of approximately 3 3 V This is obtained by wiring two sili con diodes in series D1 and D2 type 1N4148 to reduce the 5 V level on C1 to aroun
96. eral electronics interest and provides the features of six instruments in one compact PC based unit at an incredibly low price The PoScope connects to one of your desktop or laptop PC s USB interfaces USB 1 1 or USB 2 0 is Windows XP and Vista compatible and comes with easy to use software The PoScope provides two BNC connectors for oscilloscope spectrum analyser and chart recorder inputs and a 25 way female D connector for logic analyser and pattern generator input outputs Supplied with USB connecting cable and software and manual on CD ROM A PoScope Bundle is also available for 119 which additionally includes two high quality oscilloscope probes and a logic analyser test lead and clip set The dual channel oscilloscope provides voltage and frequency measurement absolute differential and external trigger ing adjustable pre trigger marker meas urements and filtering Specifications include a 100Hz 200kHz sampling rate 1126 samples channel 1 channel or 563 samples channel 2 channel memory depth with pipe reading of 64k samples per channel 10 bit resolution A D and input voltages from 20 20V The spectrum analyser provides Ham sof d e ming Hanning Blackman and Blackman Harris window functions Dual channel oscilloscope view The chart recorder provides dual channel recording at sampling rates from 0 01Hz 200kHz with a maximum record time of 24 hours at Fs 100Hz A D resolution and input v
97. ere in Bascom AVR 8 for an A Tmega88 In principle the only com Computer Vision E Principles and Practice rare E EI MITT IE w sg T Li 3 qu i Computer Vision principles ond Practice ler Auto Reference Off Start Adc Echo Off Do Input S Loop Until S D gt Portb 0 1 Waitms 1000 Print rd todo txt Chr 13 Input Samples Get 1 L Input Channels Get 1 L Input S Print OPW Log txt Chr 13 Input S For N 1 To Samples S w For I 1 To Channels mands necessary to share serial data with Vinculum are Print and Input also Put and Get for single bytes A small devil lies in the detail in Bascom the Print command as in the other BASIC Getadc i S Str ad If I lt Channels Then S S Chr 9 Next I S S Chr 13 Chr 10 L Len s Print WRF Put 1 Put 1 Put 1 Put 1 Put 1 Print 8 Input S Waitms Delayms Next N Print CLF log txt Chr 13 Input S Portb 0 0 End dialects at the end of a line is inex tricably linked with CR ASCII 13 and LF ASCII 10 Vinculum does not take kindly to the final LF symbol how ever It is always treated as the first Advertisement Computer vision is probably the most exciting branch of image processing and the number of applications in robotics auto mation technology and quality control is constantly increasing Unfortunately entering this research area is as ye
98. ess ing The only question now is how this works because Nintendo is totally silent on this subject We started by using a logic analyser to record the data traffic between the master and slave devices on the I C bus After around two hours we had a clear understanding of how the module is initialised and how to read the data from it We identified the signals on 11 2008 elektor The nature of the I2C bus and how to use will be described in future instalments of the ATM18 series of articles Here we only want to briefly note that the I2C bus is a serial data transmission bus consisting of two lines SDA data and SCL clock Data can be transmit ted in both directions from the microcontroller to the peripheral devices and from the pe ripheral devices to the microcontroller Several devices can be controlled via the bus For this purpose each I2C device has an address that is sent when a link is established the pins as Ground two pins 43 3 V SCL SDA and three other unknown signals Two of them were quickly identified as the clock input and the Reset signal The function of the third pin remained unclear Naturally after all this research a colleague sent us the address of the website at http kako com neta 2007 001 2007 001 html which describes the pin assignment of the sensor Figure 10 That s how it goes but at least this information matched our findings The rest was just a matter of routine effort After
99. etermines to whom the text message is sent see paragraph above on call recognition Connection of a GPS receiver module is entirely optional If you decide to do this the data sent from the GPS module is examined and if reception is good enough to decode the geographi cal coordinates these are included in the text message If the status of the GPS module means the coordinates are inexact but available then these are sent in the text along with details on the quality of the coordinates There are various ways of converting the GPS coordinates see penultimate Web link at end of article or else you can enter them direct into Google Maps to find their position on the map for exam ple N51 00 9892 E005 50 3189 gives the location of Elektor House A typical status text including GPS data is shown and explained in Table 1 sending an SMS text can also be trig gered via the alarm input at K2 in Fig ure 1 This input is protected by an optoisolator and reacts to changes in signal Every change in signal level during operation sets of an alarm In this situation an alarm alert is sent by SMS to the first phonebook entry on the SIM card of the mobile connected to the remote switch The text noti fies the alarm and if a GPS module is connected the location coordinates as well Circuit and printed circuit board The schematic Figure 1 is extremely straightforward since most functions are handled in software within the ATmega
100. fa cility provides a warning if the mag net works loose or is not present A basic accuracy of 0 5 means that in many applications calibration is unnecessary A complete position measurement system can be made using just an AS5030 see pinout in Figure 5 a de coupling capacitor and a bipolar mag net mounted perpendicular to the ro tation axis Sources for the AS5030 and two kinds of magnet can be found at 2 while Figure 4 Block diagram of the AS5030 angle encoder IC elektor 11 2008 data sheets and other downloads can be found at 3 Magnets The magnet can be press fitted or glued directly to a non magnetic axle Rare earth magnets are recommended be cause of the higher field strengths ob tainable neodymium iron boron mag nets are cheaper than samarium cobalt magnets but have a higher temperature coefficient and lower maximum work ing temperature The main parameters when selecting a magnet are 0 temperature coefficient dependence of field strength on ma gnetic field strength automatically compensated for by AS5000 series encoders e Curie temperature maximum working temperature e field strength measured in Tesla or kilogauss In addition to the sample magnets available at 2 a wide selection is available at 4 and 5 Software for si mulation of magnetic fields is availa ble at 6 Demonstration board AMS produces demonstration boards for all its
101. he appropriate command with certain HSV values the desired colour can be set immediately And because the wireless connection operates at a speed of 500 kbaud this is relatively quick as well Control Okay we have the protocol we have the initialisation data and we know how we can set the colour of the lamp What are we now going to do with that knowledge The author decided that an Ambilight ish functionality would be nice to do The plan therefore was to build a device that could be con nected to the PC and control several lamps For the control we can use existing software on the internet there is a community of people who make their own PC controlled Ambilight clones This has resulted in a few nice Linux and Windows applications that are very useful for this project The most 68 common protocol used in this software is the MoMoLight protocol which is actually nothing more than sending the RGB values for three different light sources directly to the serial port To be compatible with the software we need a few things Firstly we ll have to emulate a serial port over the USB bus and secondly we ll have to convert the incoming RGB data to the HSV format that s expected by the lamps The first requirement is easily met with one of several ready made solu tions a number of companies make USB to RS232 converter ICs that can be directly connected to the bus For this project however we chose a differ ent approach
102. ial is included using the MPLAB programming environment together with the EAGLE sche matic and PCB design package to enable readers to create their own designs using the book s many case studies as wor king examples to work from 192 pages ISBN 978 0 905705 73 6 23 00 USS 46 00 Professional lt Solutions 4h ages 18 experts and curious GEN y readers F y allowed only m d Upd ted For instant access t o over 80 000 price reductions visit our electronics range online today rswww com electronics 08457 201 201 RS 11 2008 elektor 17 http WWW propox com DESIGNING OF ELECTRONIC DEVICES CNC MACHINING CAD CAM COMPOUND OF KW iom EZ H Ae Or ME e um z O OR 23 Y Z LU P 25 TTT 22 QA lt LU mpa Z LL LO LU Or z in MEO On xk H OT FL ies 65 On OO Oz X 2p 50 c x E LL O2 uz us Many ideas one solution LUE LOO SMD 18 Thijs Beckers Elektor Netherlands An Introduction to SMD The first step is always the hardest so we re providing a brief introduction to SMT to help you out Here we introduce you to some of the jargon pitfalls and packaging so you can hold your own in discussions of this technology which has become indispensable in the production of modern electronic equipment IF you want to work with surface mount technology SMT you need to have a bit of basic knowledge This article explain
103. ible of eight channels is clearly less than 255 symbols In fact we need only one byte so for a line length of for example 16 symbols you can send four times Put with the bytes O 0 O and 16 Why send these bytes with four Put commands and not as a text string Well a Null byte in a String indicates its end For that reason Put is used only when Nulls need to be sent Problemette solved A further small problem ari ses when reading the Com mand File The BASIC indi cator Input Samples reads a total value into the variable samples The issue is closed out when a CR appears In the file this is followed with a LF however This must now be trapped with a Get to avoid upsetting the entry follo wing Likewise in the source text we find repeatedly an obviously superfluous Input S It is entered at locations where Vinculum quits a com pleted action with D gt t In this manner we ensure on the one hand that the ATmega does not new data until the old has first been processed and on the other hand that no junk is left to remain in the data buffer of the microcontroller The end result can be seen at the end of Listing 1 Now we shall try out everything 56 E Microsoft Fcol Mappe 100 RXD PDO TXD PD1 ATmega88 ADC1 ADC2 CTS AD10 usn usn 071152 11 Figure 5 Connections between VDIP1 and ATmega88 RXD PDO TXD PD1 ATmega88 ADC1 CTS AD10 ma 071152 16 Figu
104. icate that the motor is turning a dual colour LED D1 is connected in parallel with the motor Depending on the direction of rotation the LED will illuminate red or green The current through the LED is about 10 mA this is therefore not a problem for the driver stage in the microcontroller You can make an RS232 connection via K2 which is connected to PDO and PD1 for debugging or other purposes however you will have to write the software routine to do this yourself The power supply consists of a bridge rectifier a 5 V regulator IC3 and a few capacitors For the power supply you can use a transformer a suitable DC voltage already present in the ampli fier or a mains adapter Practical matters Figure 2 shows the PCB layout for this circuit The board is split into two parts one for the processor section and one for the potentiometer For the latter all the connections for the potentiome ter are implemented as a row of pins Separate ground connections have also been added in case you would like to add additional screening K7 K8 for each channel separately There is also a separate connection for the screen of the motor section implemented as a separate PCB pin For the motorised potentiometer we assumed the version with the connec 11 2008 elektor SFH5110 36 Lye J 10 PB4 MISO re PB5 SCK 071135 11 Figure 1 The schematic for the remote volume control An ATmega8 does all the work he
105. ide range of thermally balanced models and temperature controlled irons too you can always be sure to find an iron that meets your needs A large range of replacement tips are available tor most irons and technical help is on hand from our offices in Devon UK Buy Online Our new website has all of our irons and soldering spares and accessories available 24hrs a day Most items are shipped next day and we offer free carnage throughout Europe Why not give antex co uk a try 1 EUROCARD 160 x 100 mm Tooling Photoplots VAT 49 Price example Any size and contour possibl Optional e Soldermask e Fast turnaround e Silkscreen e 4 Layer Multilayer DOWNLOAD GUR FREE LAYOUT SOFTWARE Freephone Q ET 0800 3898560 e mole CS sume EE gf Os orat zaur ro Kp eornm NEPOS Simply send your files P C z p L C M and order ONLINE E 11 2008 elektor Antex Electronics Ltd 2 Westbridge Industrial Estate Tavistock Devon PL19 8DE UK Tel 44 0 1822 613565 Fax 44 0 1822 617598 Email sales antex co uk Web www antex co uk tel 01298 70012 NE fax 01298 70046 www peakelec co uk sales peakelec co uk e o r electronic des Special Offer Prices Limited Time Atlas DCA lt 9 includes new premium probes Atlas DCA Model DCA55 Atlas ESR Model ESR60 Semiconductor Analyser Identifies type and pinout ESR and Capacitance Meter Resolutio
106. ifier always 00 O 6F 1101111 a Oe 00 Data Coding Scheme always 00 20 010 0000 00 00010 AA Expiry time message is valid for four days W 57 101 0111 11 10101 OB Number of septets not bytes following with the actual O 6F 110 1111 11 11011 message text The number corresponds to the total text z 72 111 0010 01 00111 characters of the SMS text message Hello World con sists of 11 OBh characters 6C 110 1100 00 11011 C8 32 9B FD 06 5D DF 72 36 19 Method of writing the bytes d 64 110 0100 00 10011 of a message coded in septets Particular attention must be paid to the coding of the telephone 4 The mirrored bits are written one after another as a bit sequence number and the actual text message The telephone number is coded relatively simply first check whether the number of digits is even If not an F is appended to the end of the digit sequence Following this every two pairs of digits are switched with one another 5 Onto this chain are added on the right as many zeros as neces sary to make up the total number of bits that can be divided by 8 without any remainder For the sample text three filler bits are required 000100110100110011011001101111110110000010111010 11111011010011100110110010011000 6 The bit sequence is divided into bytes of 8 bits each 000100110100110011011001101111110110000010111010 11111011010011100110110010011 See also http www gsm modem de sms pdu mode html and http www developershome com s
107. igiButler 1 access address from the browser 86 131 222 120 1024 DigiButler 2 access address from the browser 86 131 222 120 27888 Resulting remapping in the router for DigiButler 1 external port 1024 to internal IP 192 168 0 2 with internal port 80 for DigiButler 2 exter nal port 2788 to internal IP 192 168 0 3 with internal port 80 Now you can log in to two DigiButlers from any desired location Naturally this scheme can also be expanded if your router allows it Tim Geerts The Netherlands A really handy trick It s cer tainly worth mentioning here The DigiButler project seems to have gone down well witness the flurry of activity in our forum where you can read how read ers got DigiButler to be less hot around the collar one heatsink and better prepared to relocate to other IP addresses DHCP compatibility It s exactly the objective we had in mind for these articles cheap hardware and fun in programming At the time of writing about 750 units have been sold Thanks all for making this a success MailBox Terms e Publication of reader s orrespondence is at the discretion of the Editor Viewpoints expressed by correspondents are not necessarily those of the Editor or Publisher Correspondence may be translated or edited for length clarity and style When replying to Mailbox correspondence please quote Issue number Please send your MailBox correspondence to
108. in 100 Pin Package Examples in BASIC PASCAL and C are provided with the board You can choose between USB and external power supply LV 24 33A has many features making your prototype development easy USB 2 0 on board programmer with mikroICD In Circuit Debugger enables very efficient debugging and very fast prototype development Touch screen controller with connector is available on board PICPLC16B Development Board Complete Hardware and Software solution with on board USB 2 0 programmer and mikrolCD PICPLC16B is a system designed for controlling industrial systems and machines 16 inputs with optocouplers and 16 relays up to 10A can satisfy most industrial needs The ultra fast mikrolCD In circuit Debugger enables very efficient debugging and very fast prototype development Features RS485 RS232 Serial Ethernet on board USB 2 0 programmer and on board mikrolCD In Circuit Debugger EasyAVR5 Development Board with on board USB 2 0 programmer n lar ls a 1 System supports 8 14 20 28 and 40 pin microcontrollers supplied with ATMEGA16 Every jumper element and pin is clearly marked on the board It is possible to test most industrial needs on the system temperature controllers counters timers etc EasyAVR5 is an easy to use Atmel AVR development system On board USB 2 0 programmer makes your prototype development easy Examples in BASIC and Pascal language are provided with the board EasyPSo
109. includes this out put it is simple to add a contactless pushbutton feature to a contactless ro tary switch Shaft encoder ICs Austriamicrosystems AMS based in Unterpremstaetten near Graz in Aus tria 1 has developed a family of mag netic shaft encoder ICs along the lines illustrated in Figure 3 The AS50xx se ries of shaft encoders offers resolu tions from 8 bits to 12 bits and a range of output interfaces serial PWM ana logue incremental or combinations of these As well as high accuracy and wide operating temperature range the sensors also feature rapid processing 63 i26 10100 07 SHAFT ENCODERS Accuracy of a shaft encoder system There are two parameters of a shaft encoder that are often confused resolution and accuracy The two are not necessarily related to one another Resolution is the size of the smallest step or the number of equal steps per revolution that the encoder can distinguish A 12 bit encoder therefore has a resolution of 212 4096 steps per revolution or 0 08789 per step The resolution is chiefly determined by the analogue to dig ital converters ADCs and by the precision of arithmetic used in the CORDIC calculation Accuracy is a measure of the deviation from the reported angle value from the true angle Many factors affect the accuracy of a magnetic shaft encoder jointly determining the overall quality of the device The most important factors are as follows Phase error
110. inculumFirmware V205 pdf 6 www vinculum com downloa ds html 7 http staff Itam lu feljc electronics bas com vinculum pdf if you don t read German you can still understand the pictures and use the Google translation engine at http www google co uk language tools hl en 8 www mcselec com elektor 11 2008 BI UK 1 THE MAGAZINE FOR SPECIALISTS SD Card ME Saratas g n h The Elektor PLUS subscription Keep 44 80 in your pocket Elektor PLUS advantages Cheaper than 11 issues from the newsstand 2q Fi More than 10 discount on the new Annual CD ROM With every issue subscribers get up to 40 discount on selected Elektor products As a welcome gift you get a free 2GB MP3 player worth 31 50 You save Subscription PLUS c39 00 10 Magazines p c5 go 1 Double Issue July Augu E 17 50 Annual CD ROM 31 50 oGB MP3 player No queues travelling parking fees or sold out Elektor is supplied to your doorstep every month O O O OO O Always up to date read your copy before everyone else individual items tal value of Ind S ree dat year subscription m www elektor com subs Tel 44 0 20 8261 4509 Or use the subscription order form near the end of the magazine lektor electronics worldwide PROJECTS 58 BASCOM AVR Burkhard Kainka Germany Timers and Interrupts Many practical tasks can only be solved by using accurate
111. ion to Elektor and receive a free 2GB MP3 player would like L Standard Subscription 11 issues _ Subscription Plus 11 issues plus the Elektor Volume 2008 CD ROM Offer available to Subscribers who have not held a subscription to Elektor during the last 12 months Offer subject to availability See reverse for rates and conditions Name Address Post code Tel Email Date Signature EL11 METHOD OF PAYMENT see reverse before ticking as appropriate C Bank transfer L Cheque UK resident customers ONLY L Giro transfer EN D VISA Pm DE HEEL ELE LT Expiry date Verification code Please send this order form to see reverse for conditions Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel 44 20 8261 4509 Fax 44 20 8261 4447 www elektor com sales elektor com USA and Canada residents may but are not obliged to use prices and send the order form to Elektor US PO Box 876 Peterborough NH 03458 0876 Phone 603 924 9464 Fax 603 924 9467 E mail custservus elektor com 2 METHOD OF PAYMENT see reverse before ticking as appropriate L Bank transfer C Cheque UK resident customers ONLY Giro transfer ss In LITE VISA MES Fa mE HEEL LLL T Expiry date Verification code Please send this order form to Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH
112. it with twisted wires prevent ing them from picking up noise Current consumption For the buzzer we used a type that can be found at Digi Key the CEP 2260A This buzzer at a power supply volt age of 9 V uses less than 5mA The actual buzzer that we have used even less only 4 mA There are however 12 V buzzers that use 20 mA or more Us ing one of these would considerably reduce the amount of time that the alarm can remain active The current consumption of our pro totype averaged less than 0 5 mA so with a standard 9 V PP3 battery rated at 500 mAh it will run continuously for 1 000 hours If nobody has taken any action after the alarm has been going for 40 days well then Prototype amp small series PCB specialists BC547B Since the current consumption in the idle state is negligible lt 1 A there is a risk that the battery may leak after a few years So keep an eye on the life expectancy of the battery and make Simple online pricing Fast online ordering Clear online order tracking Call us 020 8816 7005 Email euro eurocircuits com WWW eurocircuits com 11 2008 elektor Order pooling All services On demand BC517 071094 11 sure it is mounted in the separate com partment or a plastic bag so should the battery leak it cannot cause any damage 071094 1 Advertisement low pooling prices wide pooling choices 1 8 layers no tooling charges no minimum order
113. iting data you must indicate the number of bytes to be stored accu rately The total is entered as a 32 bit figure dword If the file is still open you can repeat the WRF operation if you wish to enter data in blocks An example is given in our BASCOM application below A faster means of entering data is achieved by switching to the Short r A RKS2JA Terminal OTRI RTST TO I CTs DSAI M DCD Figure 3 Communication with the Vinculum using Terminal exe 53 PROJECTS MICROCONTROLLERS List files in current directory List specified file and size Change current directory Make a new subdirectory in the current directory Also specify a file date and time Delete a file Write the number of bytes specified in the 1 parameter to the currently open file Open a file for writing or create a new file Open a file for writing or create a new file Also specify a file date and time Close the currently open file Read the number of bytes specified in the 1 parameter from the currently open file Rename a file or directory Open a file for reading Open a file for reading Also specify a file access date Seek to the byte position specified by the 1 parameter in the currently open file Returns the free space available on disk if less than 4GB is free Returns the free space available on disk Display information about the disk if disk is less than 4GB Figure 4 Th
114. kQ R2 R3 R7 220Q R4 3kQ3 R5 NSL4960 LDR R 1kQ R9 RIO 1kQ8 RII 470Q R13 15kQ R14 1kQ5 R15 R16 27Q R17 4kQ7preset vertical mounting R18 680 Capacitors C5 C6 C7 C8 22pF C1 C2 22uF 50V C3 C4 C8 C12 100nF CIS 33nF Semiconductors D1 LED 3mm green D2 LED 3mm bi colour TI BC547 IC 7805 IC2 PIC16F876A I SO programmed Elektor SHOP 080615 41 IC3 FT232BL IC4 74HC241DW IC5 EM406A GPS receiver Sparkfun Lextronic IC 24FC1025 Miscellaneous X1 20MHz quartz crystal X2 6MHz quartz crystal LCD1 LCD general purpose 2 lines 16 characters with backlight BZ1 KPEG110 buzzer Farnell K1 cigarette lighter plug K2 USB B socket K3 K4 6 way SIL socket strip S1 switch 1 pole 2 positions Enclosure Hammond type 159 1XXCBK Farnell PCB Elektor SHOP 080615 1 Project software free download from www elektor com 080615 27 daN E BLOCKS m Transfer Positions Baki Transfer started POINT N 2486 50 87989 1 86347 stor Figure 7 The database is updated using the Transferexe program moment to install the FTDI drivers if needed Then in the Windows Device manager set the speed of the vir tual COM port to 115 200 bits s and under advanced settings change the latency to 1 ms then click OK Now run the Transfer exe program Fig ure 7 available on the web page fo
115. kage As if that is not bad enough most of the 20 connec tions to the IC have to be actually con nected as well How do we solve this as hobbyist without access to an ex pensive SMD equipped workshop Of course there are conversion PCBs available but they are generally quite expensive and certainly the versions for OFN are not readily available The author therefore chose for the dead bug method the chip is glued upside down with a drop of instant glue to a small piece of prototyping board The connections are now made with thin wire to the copper tracks of the proto typing board This type of wire is sold with the name Kynar or wirewrap wire but a cheaper alternative is sal vaging an 80 way IDE cable the indi vidual wires are about the same size Once the module with the CC2500 is done the remainder is not too much trouble That is because these are all through hole parts In the end the dili gent effort results in a little PCB about the size of a match box with the USB connector as its only connection Compatibility problems All that is left to do is plugging in the connector and testing of the assem bly The first tests appear to go real ly well but several colours look abso lutely nothing like those on the screen How can this be A quick test with a graphics program that can generate in use as an Ambilight clone 11 2008 elektor HSV colours indicates that the HSV to RGB conversion in the lamps
116. language guarantee successful use of the system Touch screen controller with connector is available on board This development board has an ultra fast on board USB 2 0 programmer mikrolCD In circuit Debugger and integrated connectors for MMC SD memory cards 2 x RS232 port RS485 CAN on board RTC PS 2 connector DAC etc ilers mikroElektronika Comp Pascal Basic and C Compilers for various microcontrollers Supporting an impressive range of microcontrollers an easy to use IDE hundreds of ready to use functions and many integrated tools make MikroElektronika compilers one of the best choices on the market today Besides mikrolCD mikroElektronika compilers offer a statistical module simulator bitmap generator for graphic displays 7 segment display conversion tool ASCII table HTML code export communication tools for SD MMC UDP Ethernet and USB EEPROM editor programming mode management etc Each compiler has many routines and examples such as EEPROM FLASH and MMC reading writing SD and CF cards writing character and graphics on LCDs manipulation of push buttons 4x4 keyboard and PS 2 keyboard input generation of signals and sounds character string manipulation mathematical calculations 12C SPI RS232 CAN USB RS485 and OneWire communications Manchester coding management logical and numerical conversion PWM signals interrupts etc The CD ROM contains many ready to go and tested programs to use with our de
117. lest PIC programmers in the world from 20 each e Per copy firmware sales e Firmware programming amp archiving e n the field firmware updates e Protection from design theft by subcontractors FUTURE TECHNOLOGY DEVICES http www ftdichip com FTDI designs and sells USB UART and USB FIFO interface i c s Complete with PC drivers these devices simplify the task of designing or upgrading peripherals to USB ILP ELECTRONICS LTD www ilpelectronics com Tel 441233750481 Fax 441233750578 ILP have been manufacturing audio modules since 1971 and apart from our standard range we also offer a custom design service for the OEM market LONDON ELECTRONICS COLLEGE Vocational training and education for national qualifications in Information Technology BTEC First National Higher National NVQs GCSEs and GCEs Also http www lec org uk z Electronics Engineering and EL Technical Management and Languages elektor 11 2008 products and services directory MQP ELECTRONICS 77753 ROBOTIO SCANTOOL NET Www mqp com j http www robotig co uk http www scantool net e Low cost USB Bus Analysers Build your own Robot ms ScanTool net offers a complete line e High Full or Low speed captures Fun for the whole family E SB Ai of PC based scan tools for under 50 e Graphical analysis and filtering e MeccanoTM Compatible ag ja e 1 year unconditional warranty e Automatic speed detection e Computer Control
118. lets you display and edit the contents of a POI file downloaded can be directly read by the transfert exe update program This website also has lots of links to other sites where you can get hold as described eleawhereiaahie article i l l lI e u u u E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E E al 24 elektor 11 2008 IC memory Figure 4 looks after displaying the data and drives the sounder and bi colour LED The sec ond section is used for updating the IPC memory with the help of a compu ter A switch determines which section of the program is run Primary loop Out of the NMEAO183 frames pro vided by the GPS we re going to use the RMC frame 4 This frame contains all the information we need latitude longitude time date and speed After decoding an RMC frame we then need to read the I C memory If we find a location corresponding to our current position minus a certain margin of course otherwise it s too late that means we are near a POI In this event we leave our read loop and set off the alarms i e the sounder sounds the bi colour LED light up red and a mes sage is displayed on the LCD warning of a POI close by Next time a GPS frame is received we start again and decode read the I C memory compare etc Updating the database The second section of the program is used for updating the database via a
119. ling it with a PC offers many other possibilities Turn the room red when you ve received mail let the col our of the wall follow the movie you re watching illuminate the room when it s time to get up you mention it Lively colours For those who missed the article men tioned earlier a Living Colors lamp is an appliance made by Philips that with a few bright coloured LEDs can illumi nate a room in just about any conceiv able colour In this way you can create or enhance a particular mood The Liv ing Colors lamp comprises the lamp it self and a remote control The two are linked via a CC2500 a little IC from Texas Instruments which can send data over a 2 4 GHz radio link To be able to control the lamp we will first have to figure out how the data is sent Measuring this without open In the remote control we find two printed circuit boards that are interconnected with a ribbon cable 66 This is how we reverse engineer the protocol It may not look like it but apart from the wires the remote control is still completely intact The all important 662500 chip They don t come any bigger than this unfortunately elektor 11 2008 ing the device is difficult Firstly be cause the CC2500 has several methods available for sending the data MSK FSK OOK with or without data whit ening Manchester encoded etc so it is a lousy job trying to dig out the transmitted data from the actual ra dio signal t
120. ll must not come up as Number Withheld The remote switch reacts only to calls from mobiles whose numbers are stored on the SIM card of the mobile associated with the remote switch Calls from unrecognised numbers are ignored The SMS status alert is sent back to the number that called 2 TelTyp Off S2 2 open Every call received in the 90 second time window is counted For extra security however the device must be called one time more often than when TelTyp On for the same function This is because it s unlikely that an invalid caller would ring more than once within 90 seconds So to switch Out put 1 two calls are required and so on The SMS status alert is sent to the first number appearing in the phone book on the SIM card of the mobile attached to the remote switch device Control functions As already mentioned the switched outputs Outputs 1 3 on the sche matic in Figure 1 are controlled by the number of telephone calls received The switching functions for the three outputs are not the same however 1 call Output1 is on each occasion switched only briefly relay RE1 oper ates for just one second 2 calls Output2 can be controlled in one of two different ways depend ing on how switch 82 1 on Pin 28 PC5 of the ATmega8 is set If the switch denoted in the software as Exit2Typ is closed Exit2Typ On the output 32 Table 1 e Typical Status SMS with a GPS module connected Me
121. lus Logic Analysers suit all needs and budgets A range of powerful 16 and 32 channel logic analysers with advanced serial bus protocol decoding including CAN LIN USB UART SPI I2C 1 wire and more With prices from only 125 there s a logic analyser in this range to Universal Development System The UNI DS3 is a versatile micro controller development system supporting PIC dsPIC 8051 AVR ARM and PSoC devices with an extensive range of built in I O features and on board USB programmer priced from 109 Paltronix Limited Unit 3 Dolphin Lane 35 High Street Southampton SO14 2DF Tel 0845 226 9451 Fax 0845 226 9452 Email sales paltronix com Product information and secure on line ordering at www paltronix com Major credit and debit cards accepted Prices exclude delivery and VAT 11 2008 elektor 13 WOVE NEWS amp NEW PRODUCTS New Capacitive Touch Demo Board 14 Microchip announces the PICDEM Touch Sense 2 Demo Board Part DM164128 for capacitive touch sensing applica tions The easy to use board comes with the royalty free mlouch Sensing Solution Soft ware Development Kit SDK and is pop ulated with a 16 bit PIC24FJ256GB110 microcontroller MCU which fea tures an integrated Charge Time Measurement Unit CTMU periph PIGDEM usn anis 2 PATER DESEE EA eral for fast capacitive touch sens ing This is also the world s first 16 bit MCU family with USB On The Go O
122. mad in life Second thoughts yes you do Elec tronworks have taken some of life s insanity and lots of their own and put it into electronic kits Electron works aim is to make learning electronics fun and to bring you a range of kits that are both practical and educational A whole tonne of kits and ideas is available for unleashing in the PROPOX from Poland introduce a new family of modules based on microcontrollers with the ARM9 core The modules were designed to achieve 100 compatibility with the mmTm socket already used and promoted by PROPOX for few months in their EVBmmTm boards The MMnet1001 mini mod ule has been equipped with Atmel s AT91SAM9260 AT91SAM9G20 microcon troller with an internal clock of up to 210 MHz 400 MHz The Memory NEWS amp NEW PRODUCTS from 0 99 and an in car power 12V input and many more supply so you can power all your battery powered electronics froma www electronworks co uk coming months so if you are young or old new to electronics or a seasoned veteran you will find something to suit your needs For example Electronworks MP3 booster amplifies the output of your MP3 player so you can fill the room with music via your PC speakers Also available are a ran dom number generator that gener ates a completely random number Management Unit MMU allows the micro to run operating systems like Linux and Windows CE The External Bus Interface EBI
123. mensions both cause the same feeling of unrest When the transistor took over from the valve a frequently heard complaint was that it sure is much more efficient but your can t see if the thing is alive or not and these things die with not so much as a whisper Reportedly some radio amp TV servicemen actually opened up faulty transistors to see if they could be fixed Although far from being invisible in the case of SMD components we heard reports like more ended up in mum s vacuum cleaner that on my printed circuit board Being able to view SMD parts is the first requirement to using them next come handling position ing them on a board and only then soldering The soldering having been covered in great detail in last month s issue on the Elektor SMD Reflow Oven we figured a magnifying glass might open up a world to you if you still feel those minuscule parts are encroaching upon the hobby The card shaped flex ible lens attached to this month s front cover is a free gift included with the full 125k print run of Elektor in all language editions newsstands sales and sub scriptions Personally am near sighted to the degree of being able to scrutinize SMD solder joints with my nose almost on the board surface so the magni fier saves me the trouble of raising my expensive glasses to an insecure posi tion on my forehead On 18 September 2008 Guy Raedersdorf editor of the French editio
124. mer Interrupt This exercise programs the controller to generate an accu rate 1 second clock The 16 bit Timer 1 is not necessary for this application we can use 8 bit Timer O The timer will be programmed to overflow every 1000 ps and generate an interrupt elektor 11 2008 An interrupt causes a forced interruption of the main pro gram and directs the controller to execute a sub routine Interrupt Service Routine or ISR to service the interrupt Different events can be programmed to generate an inter rupt and an ISR is required to respond to each type of inter rupt Here TimO isr would be the subroutine name but in this example we have just used TimO_isr as a label which indicates where the program jumps to on interrupt The last instruction of the interrupt routine must be a RETURN In this example further interrupts will not be serviced until the return is executed Test 2 configures timer O with a prescaler of 64 which gives it a clock frequency of 250 kHz The counter is 8 bits wide so without further programming it will generate an overflow interrupt every 256 clock cycles We need the counter to interrupt every 250 clocks for an accurate 1 ms timebase so it is necessary to load the counter with the value 6 each time it overflows A word variable called Ticks is incre mented every time the counter overflows When this vari able reaches 1000 it indicates that one second has elapsed and the variable called Seconds is increme
125. ms and sensors imems accelerometers adxl330 products product html a a a a a a a a a a ea a ae a el l 102 011 555 500 0 ana um 47 cee ELECTRIC BICYCLE REVIEW The kit contains a wheel with built in motor two handles with built in switch a sensor for the movement of the pedals an accelerator handle and 48 a controller Lazy on DIY e bike Thijs Beckers Elektor Netherlands the Bike We wouldn t be Elektor if we didn t do a little experimenting with e bikes which have become popular in recent times But an off the shelf contraption is not nearly as much fun as one which we have to build ourselves So on the look out for DIY kits And where would you find one of those Exactly eBay Electronics is still hot Witness the Segway and the ever increasingly frequent appearance on the street of bicycles with an auxiliary electric motor A Segway may be a bit difficult to build yourself but changing a wheel because it is hardly more than that is not really a big deal for most people So get started with the DIY electric bike kit Dear bought and far fetched are dainty for ladies at least that is how the saying goes The kit that we ordered for this review is manufactured in China It is a pa
126. ms operatingMode asp Coding a text message involves more effort In contrast to normal practice elsewhere only seven instead of eight bits are used per character The seven bits used for each character are known as a septet However the telephone always expects a byte 8 bits to be Now each byte is mirrored again 8 Each byte is represented in the hexadecimal system and when written in sequence produces the coded information target number completed with F because of odd number of figures C8329BFD065DDF723619 4 9 1 2 3 1 2 3 4 5 6 7 8 9 0 F Binary 8 bits mirrored Hex 0001 0011 1100 1000 C8 SIRITHISISIZISI4I7IST8 STIS 1001100 oarr 0010 2 coded target number TOUT 1101 1001 1001 1011 9B 1011 1111 LN TOI FD 0110 0000 0000 0110 06 sent To achieve this the eighth bit HSB of the first byte is filled with the LSB of the following byte In the second byte there are now two 1011 1010 0101 1101 5D bits free which are filled with bits from the third byte This process of 1111 1011 1101 1111 DF transformation is carried out in a number of steps These are tedious but simple to understand like this 0100 1110 0111 0010 72 1 First we convert individual symbols into their ASCII hex values 0110 1100 0011 0110 36 1001 1000 0001 1001 1 2 These hex values are then transformed into binary digits in which the HSB is always O and omitted since only the first 127 charac DC o
127. n Elektor officially retired Guy was Monsieur Elektor for 27 years not just to his French readership but also to all Elektor staff struggling with the fine points of the French language Guy s helpful attitude sheer speed inventive ness and accuracy down to the last comma made him an exemplary editor totally dedicated to his audience whilst exerting precision in expression now a fast disappearing skill it seems Merci Guy and bonne chance from all of us Jan Buiting Editor lektor electronics worldwide The little module developed using e Blocks lets you detect geo graphical points of interest POls using the frames output from a GPS receiver module These POls might be restaurants petrol stations or why not the positions of fixed speed cameras This ingenious new design combines powerful capabilities with low technical overheads It has programmable AC mains switching outlets plus status reports by text message and alarm activated delivery of GPS data Remote control by mobile was never easier cheaper or more reliable Many audio enthusiasts still prefer a good potentiometer for adjusting the audio volume It would be even nicer if this potentiometer could also be controlled remotely This is possible with a high quality motorised potentiometer from Alps and a handful of electronics as is described in this article GO Nite NIRS um no 383 Speed Camera Warning dac di asd
128. n of 0 01 ohms aoe 369 Atlas SCR Model SCR100 Inductor Capacitor Resistor Analyser Triac and Thyristor Analyser Atlas LCR Model LCRAO Automatic part identification Auto gate test current up to 100mA UK Please add 1 00 p amp p to your order Prices include UK VAT Please see website for overseas pricing 15 WOLVES NEWS amp NEW PRODUCTS 16 When a power cut hits a company they need to be sure that their UPS system performs immediately and Thermostats for UPS Battery Back Up Systems for as long as possible until mains power is re established The life of a battery back up system is partly dependant on its stable temperature control which is often achieved using electronic means As an alternative to electronic sen sors the Matsuo MQT thermostat supplied by ATC Semitec Ltd offers ULP wireless SoC solution The nRF24LE1 from Nordic Semi conductor integrates a fully fea tured nRF24L01 2 4GHz trans ceiver core including Nordic s proven Enhanced ShockBurst hardware link layer It delivers true ULP operation with peak cur rents low enough to run on coin cell batteries The nRF24LE1 also integrates an enhanced 8051 mixed signal MCU core featuring fewer clock cycles per instruction than legacy 8051 devices Most instructions need just one or two clock cycles leading to an average perform ance improvement of 8x using the MIPS Million Instructions Per Sec ond benchmark This high
129. ncluded both simultaneously The direct con nection passes through JP2 for RS 232 operation or JP3 for TTL level and onwards either JP2 to pin 8 of IC2 designated RS 232 or else from JP3 to pin 4 of IC3 labelled TTL In each case the other pin of JP2 or JP3 is then isolated and out of circuit The heading photo shows the remote switch con nected to a Siemens mobile and the Navilock GPS Mouse The red wire of the data cable is for charging the mobile s battery 5 V to pin 1 on the mobile connector 080324 1 Internet Links Google can translate pages for you WinAVR http sourcetorge net projects winavr AT command set for GSM GPRS telephones www communica se multitech gprs_at pdt Technical specification GSM 03 38 www mobilecity cz doc GSM 03 38 5 3 0 pdf Technical data on mobile handset models www mikrocontroller net articles Handy Hersteller 2 manufacturer Systemstecker system connector Ladespannung charging voltage nur only Schnittstelle interface Besonderheit special feature Online PDU Encoder and Decoder http twit88 com home utility sms pdu encode decode Online coordinate conversion www cache test dummies de tools koordinatenumrechnung Author s own project page www blafusel de misc mc gsm html 37 PROJECTS Motorised Vo igh end with remote control design Frank Link Germany Many audio enthusiasts still prefer a good potentiometer for
130. netic radiation emit ted by a body as a function of its tem perature Infrared radiation occupies elektor 11 2008 Figure 1 The Nintendo Wii remote control unit only a small portion of the total ther mal radiation spectrum For the pur poses of the present project the IR A range is especially interesting because we intend to use a tiny camera that is fitted with an optical filter so it can only see light in the range of 850 nm to 920 nm and which has integrated sig nal processing circuitry Such a compo nent can provide the basis for innumer able applications such as a fire alarm an intrusion alarm an object tracker a gesture controlled input device an instrument for measuring the speed of objects and much more But how can you get your hands on this sort of high tech camera By the end of 2007 Nintendo had already sold more than 15 million Wii game consoles As a result the asso ciated remote game controller Wii Remote often referred to as Wii mote Figure 1 has become a very widely used computer input device 1 Among other things it includes an infrared camera with a resolu tion of 1024 x 768 pixels and built in hardware blob tracking for up to four objects at the same time This CMOS Camera sensor which is made by Pix Art Technologies 2 is in a different league than your average PC compat ible webcam The Wiimote also con tains a three axis acceleration sensor Analog Device
131. ns without compromising size performance and battery life It is compatible with both active and passive antennas The receiver con sumes 50 mA during signal acqui sition and 30 mA during full power continuous tracking The dedicated signal parameter search engine within the Venus634LP is capable of performing 8 million time fre quency hypothesis testing per sec ond offering ultra fast 1 second hot start and 29 second cold start under open sky The advanced track engine allows tracking sensi tivity of 158 dBm enabling con tinuous navigation in harsh envi ronments such as urban canyon ule It represents Microchip s third free software protocol stack for IEEE8O2 15 4 transceivers join ing its ZigBee stack and existing MiWi stack As well as Microchip s free Zig Bee MiWi and new MiWi P2P software protocol stacks the mod ule is supported by Microchip s PICDEM Z Demo Kit and the ZENA Wireless Network Ana lyser When combined with these development tools the module ena bles designers with little or no RF design experience to design low power wireless networking prod ucts quickly and inexpensively Designers can also use Micro chip s PICDEM Z Demonstration Kit DM163027 with all of the compa ny s free stacks and MRF24J40MA module The kit includes a pair of development boards with a PIC18LF4620 MCU along with the ZENA Network Analyser and wireless network configuration util ity DM183023 The ki
132. nted The value of either variable can be read by the main program In this example the program sends the value of seconds to the ter minal every second starting from zero at program start It is necessary to allow the interrupts to occur by enabling the global interrupt Enable Interrupts and also allow the timer O overflow condition to generate an interrupt Enable TimerO The display shows the value of seconds w NEO All interrupt sources can be disabled by using Disable Interrupts Measurements made of analogue signal levels are often affected by a 50 Hz mains signal superimposed on the volt age level The unwanted 50 Hz component can effectively be cancelled out by sampling the analogue voltage level several times during a complete cycle of the mains voltage 20 ms and then averaging all the measurements 11 2008 elektor Count Control Logic clk BOTTOM N BEENINE UN L OCRnA A i Fixed TOP Values Timer Counter TCNTn TOVn Int Req Edge Detector From Prescaler OCnA Int Req Waveform Generation OCnB Int Req L L 0 i 2 i lt i lt I Comparator Ouput ICFn Int Req L L Ed pnm Figure 1 Block diagram of the timers Bascom ATmega88 Timer Sregfile m88def dat Scrystal 16000000 Baud 9600 Goto Testl Test1 Config Timerl Timer Prescale 256 Start Timer1 Do Print Timer1 Waitms 200 Loop 59 Figure 2 Measuring an ac v
133. ntry Giro transfer into account no 34 152 3801 held by Elektor Electronics Please do not send giro transfer deposit forms directly to us but instead use the National Giro postage paid envelope and send it to your National Giro Centre Credit card VISA and MasterCard can be processed by mail email web fax and telephone Online ordering through our website is SSL protected for your security COMPONENTS Components for projects appearing in Elektor are usually available from certain advertisers in this magazine If difficulties in the supply of components are envisaged a source will normally be advised in the article Note however that the source s given is are not exclusive TERMS OF BUSINESS Delivery Although every effort will be made to dispatch your order within 2 3 weeks from receipt of your instructions we can not guarantee this time scale for all orders Returns Faulty goods or goods sent in error may be returned for replacement or refund but not before obtaining our consent All goods returned should be packed securely in a padded bag or box enclosing a covering letter stating the dispatch note number If the goods are returned because of a mistake on our part we will refund the return postage Damaged goods Claims for damaged goods must be received at our Brentford office within 10 days UK 14 days Europe or 21 days all other countries Cancelled orders All cancelled orders will be subject to a 10 handling charge wi
134. nually by the position of the jumpers on J1 ee mns s eee ee ee ee ae eee ee a ee ee a a EN a a a a oe c oe a tt a a cm n ee s ee ee a n a a er a ne ee ct s c j F Poit dn 2008 Dnote Sofware RF E of POI files for free To display POI files Sass 3 11 UM gt gt said Ac Ree E Tc con AES a POI file all you have todo is There are lots of different types of POI files but Arv ERN W NC NI load it into PoiEdit and pick Se the ones we re using contain nothing more than a ima nite lect All in the Edit menu Don t list of geographical positions in ASCII hence their T xen sem forget to load and if necessary i ASC extension On one line of this list we find three calibrate a map Some maps comma separated fields longitude latitude and a ro aoa are also available on the PoiEdit name often a number acces 35 website l I x Se I 2 68111 44 43686 Num 40235 sie 1m To sort a POI file by longitude if i l m X you re using the 080615 11 1 1 The longitude and latitude are in decimal degrees T NEP program all you have to dois I pu wl Xu dz I The simplest way to obtain a POI file that can be ee m Se click on the Longitude bar and used by our project is to pay a visit to the PoiEdit ete Map Higa taa Man F Ent r save the file in ASC format l uM A404 9 1955 95 29 10960 fer l website 5 PoiEdit is a shareware application that Tha POL file th s created or l i
135. oC makes developing code for PICs easier than ever When used in conjunction with the EasyPIC5 development board mikroC provides full in circuit debugging capabilities mikroC also provides a library of ready written routines that provide support for all of the EasyPIC5 s on board I O devices and optional add on boards This enables programs to be quickly constructed even when working with advanced features such as CAN Ethernet and USB communications character and graphic LCDs and touch screen and EEPROM MMC SD and Compact Flash data storage mikroC also incorporates useful tools such as LCD custom character generator GLCD bitmap generator USART HID and UDP terminals and 7 segment display decoder EasyPIC5 BASIC Starter Pack and EasyPIC5 Pascal Starter Pack also available at 149 each Similar starter packs also available for 8051 AVR and dsPIC please see our website at www paltronix com for prices and full details 0845 226 9451 Get an oscilloscope logic analyser and much more with the PoScope USB based Instrument for only 79 With a PoScope you get 9 Dual channel oscilloscope Spectrum analyser 9 Dual channel chart recorder 9 16 channel logic analyser with UART SPI I2C and 1 wire serial bus protocol decoding 9 8 channel pattern generator Square wave PWM generator This latest version of the popular PoScope is a must have tool for those developing microcon troller based projects or with a gen
136. ode 3180KT 44 95 Assembled Order Code AS3180 54 95 Call your phone num ber using a DTMF phone from anywhere in the world and re motely turn on off any of the 4 relays as de U sired User settable Security Password Anti Tamper Rings to Answer Auto Hang up and Lockout Includes plastic case Not BT ap proved 130x110x30mm Power 12Vdc Kit Order Code 3140KT 54 95 Assembled Order Code AS3140 69 95 Individually control 12 on board relays with included infrared remote control unit Toggle or momentary 15m range 112x122mm Supply 12Vdc 0 5A Kit Order Code 3142KT 47 95 Assembled Order Code AS3142 59 95 PIC amp ATMEL Programmer We have a wide range of low cost PIC and ATMEL Programmers Complete range an documentation available from our web site Programmer Accessories 40 pin Wide ZIF socket ZIF40W 14 95 18Vdc Power supply PSU010 18 95 Leads Parallel LDC136 3 95 Serial LDC441 3 95 USB LDC644 2 95 USB Serial connection Header cable for ICSP Free Windows IXP software Wide range of isupported PICs see website for IT complete listing ZIF Socket USB lead not included Supply 16 18Vdc Kit Order Code 3149EKT 39 95 Assembled Order Code AS3149E 49 95 USB PIC programmer for all Flash devices No external power supply making it truly portable Supplied with box and Windows Software ZIF Socket and USB l
137. of the Hall signals This error would be expected to be small since the Hall elements are arranged exactly at right angles to one another However a problem can arise with a rapidly rotating magnet if there is a differential delay in the paths taken by the sine and cosine signals This can happen if a sin gle analogue to digital converter is used to sample the signals alternately The AS5030 uses parallel converters keeping the phase error negligibly small even at high rotation speeds Matching error between Hall sensors or amplifiers This error is minimised by a carefully optimised IC layout and advanced semiconductor manu facturing technology Offset errors in the signal path An offset error will add a DC component to the sine or cosine signal Such errors generally originate in the Hall sensors themselves or in poor matching between transistors in the ana logue signal path and can be minimised by design techniques such as spinning current com pensation in the Hall element chopper amplifiers and on chip trimming adjustments Non linearity of the ADC Non linearity in the ADCs can only be compensated for by a tedious calibration process and so the linearity requirement on these components is correspondingly demanding Non linearity of the magnet If we consider the vertical component of the magnetic field to which the Hall elements are sensitive parallel to the rotational axis the maxima are at the poles In between the poles
138. oidally with angle and if the sensors are accurately aligned the two gradients will be 90 out of phase with one another giving a sine and a cosine signal These two signals are digitised and a low pass filter reduces jitter and noise A DSP device imple menting the CORDIC algorithm can be used to perform the coordinate trans 11 2008 elektor Fm magnetic field B force on negative charge carriers F m direction of conventional electric current d magnetic x 4 Fe electric force from charge buildup 070480 11 Figure 1 Principle of operation of a Hall element In contrast to electromagnetic induction the Hall element produces a voltage in a stationary magnetic field integrated linear Hall sensor quasi linear range 070480 12 Figure 2 When a single Hall sensor is used the measurement range is limited to between 45 and 45 Frontend Verstarker ADC Digitales Filter 070480 13 Figure 3 Measurement independent of stray fields using four Hall sensors formation from the sine and cosine sig nals to give amplitude and phase in formation The amplitude output can be used to control the current source feeding the Hall sensors so that the device s sensitivity is independent of the magnetic field strength as well as to give an indication of the distance between the magnet and the sensor circuit If a sensor IC
139. oisture is an issue This feature also prevents against erroneous commands that can occur when devices such as MP3 players are carried in a pocket or in the case of a cellular phone when it is held against the ear The highly integrated ATA2QT1060 reduces component count cutting design complexity and cost and enabling faster product development The AT42QT1060 functions through any insulating panel including glass or plastic up to 3 mm thick Electrodes can be made from copper silver carbon indium tin oxide ITO or Orga con conductive ink and must be 6x6mm or larger Widely differ ent electrode sizes and shapes are possible giving the product designer great flexibility in tailor ing the user interface WWW qprox com 080793 VII elektor 11 2008 The newcomer to Microchip s PIC microcontrollers invariably gets an LED to flash as their first attempt to master this tech nology You can use just a simple LED indicator in order to show that your initial attempt is working which will give you confidence to move forward This is how the book begins simple programs to flash LEDs and eventually by stages to use other display indicators such as the 7 segment display alphanumeric liquid crystal displays and eventually a colour graphic LCD As the reader progresses through the book bigger and upgraded PIC chips are introduced with full circuit diagrams and source code both in assembler and C In addition a small tutor
140. ol commands The only costs are for sending the sta tus alert text messages which are charged according to the tariff relat ing to the SIM card of the mobile used MF R 1A1 2A2 C1 T1OUT TAIN O T20UT T2IN R1OUT ol pat C2 O MAX232CPE 2 GND w gt GSM SUB D9 JP2 RS232 DATA JP3 TTL DATA Pe ee ee ee ee ee eB ee ee eB eB ee eB eB eB X Characteristics max 230 VAC 6A Sample applications Activation of garden watering systems Heating control in holiday cottage Opening garage doors and driveway gates Building protection break in surveillance Tracking following route taken by vehicle c e NU EM ote Pco ADCOo IC3 PC1 ADC1 PC2 ADC2 PC3 ADC3 PC4 ADC4 SDA PD6 AINO PC5 ADC5 SCL PD7 AIN1 ATmega8 16PU PBO ICP PB1 OC1A PB2 SS OC1B PB3 MOSI OC2 PB4 MISO PB5 SCK PD3 INT1 PD4 XCKITO PD5 T1 TELTYP x 2 AREF EXIT2TYP PD2 INTO PD1 TXD PDO RXD PC6 RESET a z P1 5V P2 5V P3 GND P4 GND P5 RXD RS232 P6 TXD RS232 P7 TXD TTL P8 RXD TTL Worldwide remote control from a mobile phone GSM Cellphone without incurring call charges Three switched outputs with on off switching changeover switching and timed switching GPS data transfer indicates location GPS tracker function Status SMS reports indicate state of device outputs plus optionally GPS coordinates Alarm function b
141. oltage 60 MICROCONTROLLERS 080672 12 For this exercise we will use a timer interrupt again to gen erate an accurate timebase The average value is achieved by sampling the analogue signal 25 times in a 20 ms time window The sampling interval is therefore 800 ps Timer 2 will be used with a prescale value of 64 Each time it over flows Timer2 is loaded with the value 56 so that the next overflow occurs 200 clocks later 800 ys is more than enough time to make the analogue measurement and calculate the sum and mean value The variable Ticks is incremented each time a measurement is taken every interrupt After 25 measurements the sum stored in ADO is transferred to the variable ADO mean The main program averages the value and then sends it to the screen Averaging in this way gives such good suppression of the 50 Hz components that by using half wave rectification the system can be used to measure ac signals The low volt age AC signal is connected to the ADCO input via a 1O k Listing 2 Exact seconds using interrupts Test2 Dim Ticks As Word Dim Seconds As Word Dim Seconds_old As Word Config TimerO Timer On OvfO TimO isr Enable Timero Enable Interrupts Prescale 64 Do If Seconds lt gt Seconds old Then Print Seconds Seconds old End If Loop Seconds TimO isr 1000 us Timer0 6 Ticks 1 1000 Then Ticks If Ticks Ticks 0 Seconds End If Return Seconds 1 Li
142. oltage range are again 10 bit and 20 20V respectively The logic analyser provides 16 channels eight when pattern generator in use with a sampling rate of 1kHz 8MHz internal and external clocking versatile triggering and an input range of 0 5V Memory depth ranges from 1544 bits channel Fs lt 1MHz to 128 bits channel Fs lt 8MHz Built in serial bus protocol decoding facilitates the decoding of UART SPI I2C and 1 wire serial buses Sixteen channel logic analyser view The pattern generator allows eight of the logic analyser s channels to be used to provide output waveforms from 1kHz 1MHz with a memory depth of 1544 bits r channel and an output voltage of OV for eed logic 0 and 3 3V for logic 1 The PWM generator provides a 7 8125kHz output with a 1 100 adjust able duty cycle Square waves can also be output with a 50 duty cycle and an adjustable frequency ranging from 3 91kHz to 1MHz a bo UART SPI I2C and 1 wire re decoding view Please see our website at www paltronix com for further products including components microcontroller development tools prototyping aids educational robot kits test equipment and wireless communications products Pix Cell GSM Controller New product the Pix Cell is a stand alone controller offering GSM GPRS communications three digital inputs three 10 bit analogue inputs SPDT relay output and RS 232 interface priced at 129 ZeroP
143. omewhere where it doesn t belong What are the most important design criteria to keep in mind when design ing a flood alarm Seeing that it could be years or hopefully never before there is a leak the circuit has to be al ways ready and should not rely on the mains voltage If the circuit is powered from batteries it is very important that the circuit has very low or no power consumption when everything is dry To detect the water we make use the fact that non distilled water is con ductive to an extent The Design Water is a poor conductor then and consequently we should be able to measure a relatively large resistance between the two electrodes The best way to do this is to make the gate of a MOSFET the input of our circuit We prefer to measure with respect to ground so we use a P channel version for T1 in the form of a BS250 This FET switches the oscillator that follows When it is dry T1 has to stay off This is achieved with R1 C1 prevents the circuit reacting to noise With a value 74 of 10 MQ the circuit is sensitive enough and the current that flows is less than one micro ampere 1 uA R2 protects the gate from high voltages when the electrode it touched for example and forms in combination with C1 a low pass filter so that any AC noise volt ages are filtered out and the oscillator that follows is switched cleanly R3 en sures that this oscillator is completely off no current consumption at all
144. onics Engineering Applications ISBN 978 0 905705 68 2 29 95 US 59 90 USS 35 00 Home Automation ISBN 978 90 5381 195 5 13 90 USS 27 80 DigiButler Art 071102 71 USS 58 00 DCC Command Station Art 070989 71 88 50 US 177 00 SAPS 400 Art 070688 91 159 00 USS 318 00 Order quickly and safe through www elektorcom shop or use the Order Form near the end of the magazine Elektor Regus Brentford 1000 Great West Road S a O p Brentford TW8 9HH United Kingdom Tel 44 20 8261 4509 Fax 44 20 8261 4447 Email sales elektor com 83 LOSE SNEAK PREVIEW Free Supplement the i TRIXX Collection If you hate those complex projects rejoice This year too the December issue of Elektor comes with a 24 page supplement called i TRIXX Collection These free pages contain about 20 circuits supplied by the Elektor lab and selected free lance contributing authors This year s collection is again aimed at those of you starting out in electronics or on a modest budget If you like scavenging components from the junk box the circuits presented are just the ticket to making something quickly in an afternoon or so B et Aw ow 8 qT Z Wireless HiFi Until recently radio links were rare birds in the audio hi fi scene probably because of issues with the transmission quality Some manufacturers did manage to bite the bullet however and now supply surround s
145. or my PC First I built the receiver by Holger Klabunde 1 but I was really disappointed with the soft ware that comes with it After much looking around I came across UIR on the website of Srdan Milostic now no longer on line The hardware was practically identical but UIR could handle all kinds of remote control After replacing the PIC I had a good remote control for my PC Later on I had the idea of using UIR with a second microcontroller for a remote switch box that doesn t require a PC But two microcontrollers that is just a little bit extravagant Because only the HEX code was available I converted the original code into assem bler Around this assembler code I sub sequently built a additional shell And with this the Universal Remote Switch Box was born 70 The schematic The hardware is straightforward a TSOP1736 receives and demodu lates the IR signals with a dip switch and three push buttons the circuit can learn different codes three bi colour LEDs are used as status indicators there are two ULN2803 output buf fers for driving the outputs an LTC485 or similar is used for the RS485 port the brain of the whole thing is the PIC16F877 There is not much else to say about the schematic except that the output buffers are capable of driving relays directly The learning of the different IR signals and the RS485 connection are described a little bit later on To
146. ot allowed to contain certain substances This is stipulated by the Restriction of Hazardous Sub stances directive usually abbreviated as RoHS In col loquial language this is also described by saying that the equipment and components must be lead free The fact that a component is lead free or fulfils the RoHS stand ard does not necessarily mean that it is suitable for lead free processing It only says something about the chemical composition of the product but not that it can withstand the relatively high temperatures used in lead free soldering Consider yourself warned A good reference source for industrial standards related to components is the Institute for Interconnecting and Packag ing Electronic Circuits IPC see the web link at the end of this article The standards in the IPC 7351 to IPC 7359 series are especially important for PCB design They pro vide information about suitable dimensions shapes and 11 2008 elektor WIRE BOND Die Die Attach Wire Bond Solder ball Rigid Laminate Substrate FLIP CHIP Epoxy Underfill Die 080667 11 tolerances of pads for SMDs so that they provide enough surface area for soldering but not too much which would create a risk of tombstoning Packages and packaging We could fill dozens of pages with information about SMD packages it s an almost endless subject Here we recommend that you read through the overview of the most common SMD codes an
147. ound sets incorporating remote speakers on a wireless link If if looked like high quality audio transmission over RF is outside the realm of home construc tion new modules from Aurel make it all possible and Elektor who else is the first to come up with a tried and tested DIY project Electronic Spinning Top A really impressive gadget this electronic spinning top capable of displaying a text if you make it spin at good speed A round circuit board with a diameter of about 70 mm accommodates a microcontroller 2 button cells 2 LED bars and a number of components The earth s magnetic field is detected in an inge nious way to enable the LEDs to be driven such that the toy actually produces legible text The December 2008 issue comes on sale on Thursday 20 November 2008 UK distribution only Article titles and magazine contents subject to change please check Magazine on www elektor com UK mainland subscribers will receive the issue between 15 and 18 November 2008 Elektor on the web All magazine articles back to volume 2000 are available online in pdf format The article summary and parts list if applicable can be instantly viewed to help you positively identify an article Article related items are also shown including software downloads circuit boards programmed ICs and corrections and updates if applicable Complete magazine issues may also be downloaded In the Elektor Shop you ll find all other products sold by the p
148. overcompensation This is undesirable espe cially with a problematic speaker load such as an electrostatic speaker The output impedance can easily be checked by connecting an audio signal generator to the input of the ampli fier When a load is connected to the amplifier the amplitude of the output signal will decrease if the output impedance is positive or increase if the output impedance is negative If the output impedance is found to be negative the cure is to reduce the value of K by decreasing the value of R25 or increasing the value of R34 Wim de Jager The Neterlands Response from Jan Didden the designer of the paX amplifier Dear Wim Your reasoning with regard to the output impedance is correct However if you attach a few values from actual practice to it it turns out to not be a real problem You raise two issues with regard to the stability of the error cor rection amplifier implemented in my design The error correction resistors R24 and R25 should be matched as closely as possible for maximum error correction In practice 176 matching can be achieve without having to use adjustable resis tors or trimpots This yields an error correction of 40 dB Further more the loop gain of 0 05 that you mention with an open loop output stage gain of 0 95 means that the values of these resistors can differ by up to a factor of 20 or 200075 with regard to stabi lity considerations Consequently latch up is not an issu
149. ows the neatly arranged design of the PCB The serial connection operates with the settings 9600 Baud no parity 8 data bits 1 stop bit 9600 N 8 1 The pro tocol is as follows OxFF start byte 0x40 output number OxFE stop byte The RS485 driver is always active except in edit mode This is therefore effectively only an output For future possibilities the RX and TX pins are already connected to RC6 and RC7 of the microcontroller The programming mode Normally the outer two LEDs are illu minated green When receiving a valid code the middle LED briefly b ms fla shes red With a invalid code the outer two LEDs turn off briefly but this is barely visible 1 ms these times were deliberately chosen to be this short because of the receive routine The programming or learning is ini tiated by pressing the left push button the left LED will turn red On recep tion the middle LED briefly flashes 1273 n R12 10k Ky R11 1k i RIB Figure 3 On the bottom of the board we recognise the SMD parts Universal IR receiver UIR stands for Universal Infrared Receiver This is a PIC12C508 connected to the COM port of a PC which can be used in conjunction with the appropriate software to operate multimedia programs Originally this was probably made by Srdan Milostic although there is no further information because his website has been gone for years More information about UIR can be found on the
150. perform ance combined with 16 kBytes of on chip flash plus 1 kByte of SRAM ensures the processing platform is powerful enough to run both the RF protocol stack and application layer with ease A wide range of peripherals and power saving modes support the RF protocol stack A ULP 32 kHz crystal oscillator provides high accuracy timing for low report rate synchronous protocols and a 16 MHz RC oscillator pro vides fast startup times from idle The 32 kHz oscillator can pro vide timing accurate enough for UPS system installers a simpler and more cost effective solution Matsuo thermostats have a unique twin bimetal system that creates a control which is capable of switch ing over 1 million cycles Accura cies of x1 5 K and differentials down to 3K x1 K are readily available with repeatability as higher report rate protocols with out requiring an external crystal A security co processor supports AES encrypted wireless communi cation The nRF2ALET provides a range of nanoamp and microamp idle modes specifically designed for ULP RF protocol stacks Further benefits include higher precision protocol timing lower power con sumption and improved co exist ence performance For the application layer the nRF2ALET offers a rich set of inter faces and peripherals including an SPI 2 wire UART 12 bit ADC PWM and an analogue compara tor As such the nRF24LE1 is the 6 channel touch controller with integral LED driver
151. pics 0229 place index html X basic skills in complementing your design with an explanatory text 3k a PC email and Internet access for efficient communication with our in house design staff then do not hesitate to contact us for exciting opportunities in getting your designs published on a regular basis Elektor Electronics Jan Buiting Editor PO Box 11 NL 6141 AV Susteren The Netherlands Fax 31 46 4370161 Email editor elektor com 20 elektor 11 2008 Design your own e This book is not about X10 ZigBee Z wave or any that s F m hed d ed F n UX available commercially Instead it covers a do it your self sys tem made from recycled components The main system descri t bed in this book reuses an old PC a wireless mains outlet with CO n ro ce n re three switches and one controller and a USB webcam All this on d PC is linked together by Linux as it can be obtained free of char ge This book will serve up the basics of setting up a Linux environment including a software development environment so it can be used as a control centre The book will also gui de you through the necessary setup and configuration of a webserver which will be the interface to your very own home control centre All software will be available for downloading from the Elektor website 234 pages ISBN 978 0 905705 72 9 24 00 USS 48 00 Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH Uni
152. ples and pricing Tel 01606 871680 Fax 01606 872938 AVIT RESEARCH www avitresearch co uk USB has never been so simple with our USB to Microcontroller Interface cable Appears just like a serial port to both PC and Microcontroller for really easy USB connection to your projects or replacement of existing RS232 Tu interfaces See our webpage for more details From 10 00 BETA LAYOUT www pcb pool com Beta layout Ltd Award winning site in both English and German offers prototype PCBs at a fraction of the cost of the usual manufacturer s prices C S TECHNOLOGY LTD www cstech co uk Low cost PIC prototyping kits PCB s and components DTMF decoder kits CTCSS FFSK GPS GSM radio equipment and manuals PCB design and PIC program development DECIBIT CO LTD www decibit com e Development Kit 2 4 GHz e Transceiver nRF24L01 e AVR MCU ATmega168 elektor com DESIGNER SYSTEMS http www designersystems co uk Professional product development services e Marine Security Tracking Monitoring amp control e Automotive AV Tracking peer p Gadget Monitoring amp control e e e Industrial Safety systems i A Monitoring over Ethernet e Telecoms PSTN handsets GSM GPRS e AudioVisual HD DVD accessories amp controllers Tel 44 0 1872 223306 Tni pen rh arms irra cun m rne Pral ha EASYDAQ www easydaq biz e USB powered 4 relays 4 4 DIO channels e Will switch 240VAC
153. ptions allow pre post or centre trigger and a varia ble data filter up to 300 ns helps to prevent false triggering when sampling in asynchronous mode Voltage threshold for the logic under test is adjustable between 4 4 Se mc 98 hk I Fi L fi wie eo Hes RED I tee plus and minus 12 V The DF2 display formatter in the left hand bay displays the cap tured data as a 16 channel tim ing diagram or as a state table in either binary hex octal there is also an ASCII display option or as a map It contains mem ory to store data captured by the 7D0O1 as a reference which can then be compared with succes sive captures to detect errors Connecting to the circuit under test was always the most frustrat ing aspect of this and most other early analysers the test clips supplied have a habit of pinging off the IC lead or shorting adja cent pins A much better solution is the spring peg type of IC test clip which fits over the IC body or RETRONICS better still is to design the PCB to include pin headers specifically for analyser connection Lifting the side panels on this unit is something of a revelation all of the gold plated connectors still retain their original lustre and the use of perforated aluminium panels allow optimum air circulation while pro viding EMI shielding A closer look shows a liberal use of the high speed Motorola MECL 10000 fam ily of chips includ ing the 4Kx1 data
154. r Prescale 256 The timer also begins counting so it is not necessary to use Start Timer Listing 1 is the first test as before we are using a Goto to reduce compilation clutter The listing as printed will only ever go to the first example you will need to change fifth line to Goto Test2 and recompile for the next exercise In Test timer counter just runs continuously and the coun ter value is displayed five times per second The values are in the range from O to 65535 and we can see that after roughly one second an overflow occurs 088 17864 30706 43547 56389 3695 16471 We know the clock frequency and the counter size so it is possible to work out the exact time between overflows the counter clock is 16 MHz divided by 256 which gives 62 5 kHz The counter overflows after 65536 clocks so the inter val between each overflow is 1 049 s In this application the counter produces a precise time ref erence We can now use this information to test how long the program takes to complete the two instructions Print Timer1 and Waitms 200 Using for example the con secutive readings 43547 and 30706 the interval is 43547 30706 12841 clock periods One clock period equals 1 62 5 kHz 15 267 ys The time between the two readings will therefore be 12841 15 267 ps 196 ms and not 200 ms We can see that the Waitms instruction should not be used if it is necessary to make accurate time measurements Ti
155. r the problem here is that a replica of the error signal must be generated As a result conversion stages are necessary to transform current into voltage and voltage into current This means that the accuracy of the replication process is dependent on the matching of pairs of transistors and or resistors As a result the replication factor K can be less than or greater than 1 This inaccuracy influences distortion reduc tion and possibly other characteristics of the circuit as well It is thus desirable to analyse the stability of the amplifier as a function of K 070987 11 070987 12 Feedback error correction The basic circuit shown in Figure 2 of Didden s article is based on a form of feedback My version of a simple equivalent circuit of the feedback loop is shown in Figure A As far as know this is the first time that the use of a current conveyor for this purpose has been described in a published article IF Z is connected to X the current conveyor acts as a current mirror with 10076 voltage feedback In order to analyse the feedback loop the input terminal is connected to ground The behaviour of the current conveyor is idealised in order to avoid complex formulae V V A 1 where Ais the current gain of the current mirrors in the current conveyor The error signal V which in this case is the signal between the Z and P terminals is converted to a current by R34 As a result You did not include DIPTRACE h
156. r this project When the program starts you need to select the serial port used by the FTDI IC driver double click on the port the window should close Click the Run button then select the file to be loaded into the EEP ROM Click Open to start the trans fer You can follow its progress on the PC screen At the end of the update the circuit beeps and the display shows the number of POIs in memory You can now go over to GPS mode open 1 and reset the circuit by briefly interrupting the power supply As soon as a GPS frame 28 About the author is received the bi colour LED will flash green and the display will show the position alternating with the time and speed It may take a while to receive the first frame from the GPS the EM406 module has a red LED that flashes each time the GPS receives a frame And there you have your POI warn ing device finished safe journey and above all remember to obey the speed limits 080615 I Gilles Le Maillot is an electronics design engineer in the DTN department at the ENSIETA He is passionate about electronics and computers The ENSIETA Higher National Engineering College is a multi disciplinary engineering col lege based in Brest France It trains mechanical electrical and IT engineers for all sectors of industry automotive naval aeronautics and so on The ENSIETA runs numerous research and development programs within its fou
157. r AC load As shown in the com ponent list the values of the capaci tors and resistors used in the R C net works that protect the relay contacts from arcing must be matched to the voltage and current flowing through the contacts For capacitors C12 to C14 you should allow around 0 1 UF per amp of load 11 2008 elektor current For example 2 A would require 200 nE The capacitor should be rated for the maximum voltage to be applied Mains voltage of 230 VAC would need a capacitor rated at around 630 V DC If the contacts are to pass 220Vat 2A we would choose an MKS 4 630 type of 220 nF value for example Several solder points are provided for each capacitor on the printed circuit board to enable you to use different form fac tors of capacitors For resistors R13 to R15 the best ones to use are 2 watt metal film types with a value of about 1 Q per V of load volt age For 230 V we would calculate 230 Q and actually use 220 2 2 W The alarm input on K2 is isolated elec 35 CELLPHONE trically from the alarm circuitry by optocoupler OC1 As the LED inside the optocoupler cannot be seen we have provided LED D6 to display the logic level on the output of the opto coupler An alarm is always triggered by a change in logic level If LED D6 lights after a reset quiescent state the alarm is given until it goes out and vice versa The alarm input must be a C CY HOOMIOF mil an S001 R9 R11 1
158. r feedback in the Elek tor forum elektor 11 2008 F LVVTAY A Electronics inside out The free e magazine about internet computers hacking tweaking modding gadgets geekstuff gaming and DIY electronics The e zine you have to check out now Receive i TRIXX in your mailbox FOR FREE each Wednesday m Play the i TRIXX Quiz and win Test your knowledge about internet MEER rocker er o computers and electronics Take your BEES chance now and play the i TRIXX Quiz M m There are great prices to win 9 From the Elektor labs i Simple useful and fun electronic 9 circuits i26 n 0500 A SHAFT ENCODERS Friction free encoder using the Hall eftect Josef Warta Angle Mensur a magnetic shaft _ with the assistance of Andreas Riedenauer Measuring angles has until now involved a choice between potentiometers and optical encoders Potentiometers are inexpensive but have the disadvantages that they require calibration and create friction optical solutions although offering high accuracy and long term stability are mechanically more complicated and considerably dearer In this article we describe a modern semiconductor based solution a magnetic shaft encoder using Hall effect sensors A potentiometer can measure a vary ing angle by converting it into a vary ing resistance This has the advantage that an absolute angle reading is avail able immediatel
159. r laboratories DTN E3I2 MSN SHI Acknowledgements Dominique Kerjean design engineer at ENSIETA Pierre Cambon research lecturer at ENSIETA Andr Mininno design engineer with Multipower Internet Links 1 www totofweb net robots projet 53 html 2 www ensieta fr 3 www matrixmultimedia com 4 Multi purpose GPS receiver p 34 Elektor 363 September 2008 5 www poiedit com elektor 11 2008 The Propeller chip from Parallax Simplify your embedded designs with the Parallax designed Propeller chip This high speed parallel processing microcontroller has eight 32 bit processors that can perform truly simultaneous tasks on t independently or cooperatively with deterministic timing d Milford Instruments Aw 44 1977 683665 S C4 4 http www milinst com m EPC 500 VIA 500MHz ULV CPU 512Mbytes RAM 1GB option Three USB ports Ethernet Bootable CompactFlash Socket Internal HDD dual RS 232 and Mini PCl options EB Windows XP and Linux compatible Compatte only 115x115x35mm Low Power less than 15Watts Totally ly fanl sBoperation cs s os ccm rswww com electronics 08457 201 201 www bvmltd co uk ba 11 2008 elektor P Ose CELLPHONE Remote Control by Mobile Phone Receive back confirmation and GPS position data A 2 amp amp D amp amp amp 4 amp 4 amp amp amp amp amp amp gt tinder a J 38 11 9 005 0000
160. ransmitted Secondly the author in contrast to the RF people at the editorial offices does not have SHF measuring equipment at his disposal something that s crucial with this ap proach We will therefore have to de code the information using some other method Eavesdropping Taking a look at the datasheet for the CC2500 we read that the chip gets its data from the host processor via a 4 wire serial connection with the option of two more wires for status informa tion If we eavesdrop on the traffic on this 4 wire bus we should be able to learn a whole lot more about what is being transmitted Although there are two CC2500s namely one in the remote control and one in the lamp itself we decided to listen only to the one in the remote control The reason for this is less phil osophical than you may think it proved to be impossible to open the lamp without damaging it but it turned out that opening the remote control was a lot easier The remote control consists of two printed circuit boards The PCB for the touch sensitive push buttons plus the controller for these a OT1106 is connected with a ribbon cable to the smaller main PCB that contains the MSP430 processor and the CC2500 Tapping into the bus is rather difficult but with the aid of thin wire and some instant glue it was eventually possible to make a mechanically strong tap Because interpreting the protocol us ing only and oscilloscope is rather tedi
161. re tions directly on the motor part solder eyelets On the PCB next to the motor are two PCB pins to which the motor can be connected with two short wires Next to that is the actual connection for the motor K9 which receives the drive signal from the microcontroller on the controller PCB K1 Indicator LED D1 is connected next to K9 to a pair of connections The LED can optionally be connected with two wires if it is to be mounted behind a front panel On the controller PCB K5 is the con nection for the power supply voltage The regulated 5 V is also made avail able K6 as an extra The five signals for driving for example input relays of a preamplifier are available at con nector K3 For this purpose the con troller decodes buttons 1 through 5 and channel program up down com mands 32 and 33 decimal respec tively so that you can either select an input directly or sequentially step through the inputs in either direction To make things easy pins 1 through 5 of K3 correspond to buttons 1 through b of the remote control The connections for the IR receiver IC2 that is used here is via a 3 way row of connections So you can either 39 0197 AUDIO elect to fit IC2 directly on the PCB or connect it with a short length of cable to a connector but make sure you get the polarity correct Software The firmware for this circuit is built up in modules The source code for the various hardware
162. re 7 Mini measurement circuit together and plug the USB stick into the microcontroller system After about a second the stick is recognised and the command file is read The ATmega sets its pin PBO high and for example lights up an LED to show that meas urement is now in progress and the stick should not be removed The LEDs on the VDIP mod ule indicate that data is being written regularly once a sec ond After a total of 100 sec onds the measurement proc ess is complete and PBO drops to zero volts Now you can remove the stick and plug it into the PC The newly cre ated file Log txt now contains the measurement data that has been captured Measurement data 11 11 11 11 11 11 54 1023 91 698 113 471 And so on Using the Tab symbol ASCII 9 as separator bet ween the individual channels renders this data easy to pro cess in Excel The Excel chart in Figure 6 shows the measurements taken using the small cir cuit in Figure 7 we are comparing the charge on two different capacitors that are linked by a resistor The smaller of the two is 100 uF and is charged repeatedly with 5 V via the press but ton switch Prize question what is the capacitance of the larger electrolytic 071152 I Internet Links 1 www vinculum com documents html 2 www vinculum com documents datasheets DS VDIPT pdf 3 www elektor com 071152 4 www elektor com 080213 5 www vinculum com documents fwspecs UM V
163. red addresses remain in the AVR until replaced by other ones after the learn button is pressed again The addresses are also retained when the power supply voltage is removed The last mile How does all this work on the PC side As already mentioned the AVR presents itself as a serial port that un derstands the so called MoMoLight protocol This means that any program that supports this protocol can control the Living Colors lamps A few exam ples of these are just like the firmware for the Atmel on the website of the author 2 and on the project page at www elektor com For programmers who would like to write their own software the MoMo Light protocol supports up to three RGB light sources To set the lamps to the desired colour the emulated seri al port needs to be opened at a baud rate of 4800 no parity and 8 data bits The RGB values for the lamps can now be sent in nine bytes in the order of R1 R2 R3 G1 G2 G3 B1 B2 B3 A final remark it has come to the au thor s attention that the software USB stack is not quite as compatible with all computers as it should have been Should there be a problem with a par ticular PC you can try to connect the device via a USB2 0 hub to the PC If this is all to no avail then there is also a serial version available on the au thor s website 070850 1 Web Links 1 www obdev at products avrusb index html 2 http meuk spritesserver nl projects livcol About
164. rue that a few models of mobile can also accept the information in plain text format but these are few and far between and their number is dwindling Once you have got to grips with PDUs you can then send SMS texts with every type of mobile without further restrictions To demonstrate how a PDU is formed we shall send the clas sic message Hello World to the German telephone number 441231234567890 The telephone number is given in internation al notation like this country code area code without leading zero destination number For normal text messages maximum 160 characters only 7 bit ASCII characters can be used You can find details of the character set In the official publication GSM 03 38 which describes how a PDU is made up It is assumed that the number of the messaging centre for texts is already programmed into the mobile This is the case if you currently can enter texts into your mobile and send them without any other formalities We will now use our terminal pro gram and enter two lines in order to send our SMS text message AT CMGW2 26 0011000F9194211332547698F00000AA0BC8329BFDO65DDF72 3619 PDU for an SMS message The first line is completed by pressing Return CR LF The telephone now responds with the symbol gt to indicate that it is standing by You can now send the second line which is ended with the control code Ctrl Z The telephone then confirms receipt and tells you the automatically genera
165. s Tel 44 208 261 4509 fax 44 208 261 4447 Elektor is published 11 times a year with a double issue for July amp August Luc Lemmens Daniel Rodrigues Jan Visser Christian Vossen Internet www elektor com 6 elektor 11 2008 Elektor SMT Oven Multi purpose and indispensable to professional and enthusiast From now on anyone can play SMD The Elektor SMT is at home where SMD boards have to be produced to d variety of requirements on size components and soldering materials lektor SHOP pi Selected tested amp certified by Elektor Including Elektor produced user manual Fully menu controlled e Ideal for R amp D laboratories schools small companies and electronics enthusiasts Product support from Elektor Customer Services Demo video on www elektor com smtoven Order before 1 November 2008 and get 83 100 US 75 discount You pay 799 995 US 1450 plus shipping Main technical specifications Line voltage 230 Vac 1650 W Line frequency 50 60 Hz Size 418 x 372 x 250 mm 16 5 x 14 6 x 10 inch Weight 16 7 kg net Effective PCB area 280 x 280 mm 11 x 11 inch Apart from the handle on the drawer giving access to the PCB tray the user interface consist of an LCD and five buttons on the front panel Art 080663 91 Price 882 1095 USS 1525 Further information and ordering at www elektor com smtoven Em
166. s ADX330 3 with a resolution of 8 bits and a measuring range of 3 g The remote control unit is a fascinating piece of technology and on top of this it is quite inexpen sive You can pick one up from various Figure 2 These screws in the battery compartment must be removed dealers or online auctions for less than 20 25 or at least you could before this article was published Before you can start properly disman tling the unit you have to expose the goodies Start by removing the two tri wing screws in the battery compart ment Figure 2 This type of screw head is sometimes called Y shaped or you may encounter it under its inter national designation POO WC45 You can purchase a suitable screwdriver at your local home improvement shop or you can buy a full set of bits at a dis count supermarket In the Elektor lab we discovered that an ordinary cheap screwdriver with a shaft diameter of around 2 mm can also do the job if you file the edges off slightly The first two screws are easy to remove but the two lower screws which are recessed are more difficult Figure 3 PCB ahoy 11 2008 elektor Figure 4 Camera sensor and IR filter 43 Figure 5 Desoldering the pins is not difficult Here it helps to enlarge the holes first with a drill in order to provide bet ter access You can use a flat blade screwdriver to release the two plastic locks at the upper end of the remote control after
167. s of possible MCU implementations for applications that require sim ple node to node communication Additionally the new MiWi P2P stack provides sleeping node The MiWi P2P protocol stack supports star and peer to peer wireless net work topologies with an ultra small code implementation of 3K bytes for Microchip s PIC microcontrol lers MCUs As a result the stack LED constant current demo board V I Chip Inc a subsidiary of Vicor Corporation has announced a con stant current CC PRM regula tor demonstration board for LED applications such as street amp sta dium lighting high end projectors active outdoor advertising and architectural installations The board provides a precisely regulated current as required for direct drive multi LED applications where the intensity and bright ness are controlled by regulating the current through the LEDs The board can be used to provide adjustable current up to 240 W 5 A at 48 V when employed as an standalone non isolated source or can be combined with the range of VIM transformers to provide an adjustable isolated current up to 100 A A PRM VTM pair uses less than watt for every 1 000 Lumens a N L 3 ae f TED E i KARUNA provides short range wireless cus tomers with hundreds of possible MCU implementations for applica tions that require simple node to node communication Additionally the new MiWi P2P stack provides sleeping node
168. s several terms discusses some of the things to watch out for and gives you some pointers for finding more information so you can learn to loosely mention the terms like a pro What does it mean To start off let s take two terms that many people tend to mix up surface mount device SMD and surface mount technology SMT SMT refers to the technology which means using components usually small that do not have leads designed to pass through holes in the circuit board while SMD refers to the actual component Another term you will see is SMA This stands for sur face mount assembly which indicates that a component is designed for mounting on the circuit board rather than with pins that pass through the circuit board The same term can also be used as an abbreviation of surface mount adhesive which is the glue used to attach SMDs to the cir cuit board so they don t slide around during soldering Jargon Nowadays SMDs are used in almost all electronic equip ment In fact there are probably more components avail able now in SMD form than in through hole form with individual pins or leads Naturally the reason for this is the extensive miniaturisation of electronic circuitry SMDs are also appearing increasingly often in the DIY world When you use SMDs you run into a considerable amount of insider terms In order to get your bearings in the SMD world you need to know these terms and understand wha
169. s stored in a database If there is a POI within around 500 m of the current position a visual and audible warning is triggered The heart of the system is a 16F876A I SO microcontroller from Microchip which receives the vehicle s positions from the GPS looks them up in the database and drives the man machine interface MMI This MMI consists of an LCD display a sounder and a bi colour LED If there is no POI in the vicinity the LCD just displays the position and the time or speed The bi colour LED flashes green every time a GPS frame is received In the event of a POI nearby the sounder elektor 11 2008 sounds the bi colour LED lights up red and steady and the LCD displays a warning message The MMI has one little unexpected extra automatic backlighting that adjusts itself to the ambient light level An I C memory is used to store the geographical position of the POIs A USB interface is available for load ing the POIs into the memory from a computer The GPS receiver which sends its data via a serial link shares the microcon troller s serial link with the USB inter face A multiplexer allows the serial data source to be selected using a sim ple switch E blocks The first platform was achieved using these E blocks an EB006 for the devel opment platform this is directly usa ble under Flowcode for programming the PIC and supports many types of PIC and an EBOOb for the LCD For the rest of the proje
170. serial link The transfer is initiated by the PC which sends the character 13h 19 in decimal to the PIC and the trans fer starts once the PC receives the same character back The PC then sends the file to the PIC which acknowledges each character received by sending the character 13h When 128 charac ters have been received the PIC writes them into the I C memory To do this we ve used the I C routine available in Flowcode which makes it very easy to use the I C bus The transfer ends with a special character FFh which is the signal for the PIC to display on the LCD the number of points stored in memory This number is also stored in the PIC EEPROM as we need it to be able to get out of our comparison loop correctly in the other section of the program For updating to be as fast as possi ble it is done at 115 200 baud But the component routine is already config ured to 4 800 baud for dialogue with the GPS We have got round this prob lem by inserting a little bit of assem bler code into our program Another complication concerned the interrupt used to detect the reception of a character The Flowcode library does not include this interrupt so we had to create a user source for it 11 2008 elektor 67 o ol d o Oj er ee IUE OMY INERT 1 CHIP AT n T w 77 7 eim 7 AA X pm n ry Figure 3 The speed camera warning device built using E blocks Our own E block is the one
171. ssage Meaning Status TelTyp 1 Exit2Typ 0 Time 15mn Exit1 0 Exit2 1 Exit3 1 GPS OK 15 50 23 N52058 0674 E012048 3217 TelTypsl Switch TelTyp is On Exit2Typ 0 Switch Output2Typ is Off Time 15mn On Output 3 a switching time of 15 minutes has been set Exit 1 0 Output 1 is enabled Exit2 1 Output 2 is enabled EXLt3 lt 4 Output 3 is enabled GES OK GPS reception is operational Data valid GPS INVALID if reception is disturbed 15150529 UTC time N52H58 0674 Minutes GPS coordinates 52 58 0674 Northerly latitude 52 Degrees 58 0674 E012848 3217 GPS coordinates 12 48 3217 Easterly longitude toggles or changes state on each acti vation If switch S2 1 is open Exit2Typ Off then Exit2 behaves like Output1 RE2 then operates for one second 3 calls Output3 is switched on and then off for the period set by the rotary switch S1 The following on periods can be selected 1 5 10 15 20 30 45 60 90 and 120 minutes 4 calls SMS status alert is generated and sent Status and alarm reports The status alert message provides information about the switching state of Output1 2 and 3 and the setting of 92 1 and 82 2 Exit2Typ and TelTyp Optionally the report can include infor mation about GPS coordinates The setting of TelTyp also d
172. ssible Multiple masters is possible but whether this is useful is questionable There is also a function for the middle button when in the idle state Press Figure 5 As can be seen here the SMD parts save quite a bit of space ing this button results in the code OxEEEEEEEEEEEE When this button is programmed using the PC program normal programming is not possible with this button it can be used as the local control for an output The table shows the protocol that has been used For connecting the RS485 port to a PC the Low cost RS232 to RS485 Converter in the January 2005 issue page 69 is eminently suitable 080063 1 Note This circuit has not been tested the Elektor Laboratory Internet Links 1 www holger klabunde de 2 www hdelectronics nl 73 MINI PROJECT Ton Giesberts Water is vital for humans but too much of it has an undesirable effect particularly when it turns up in the wrong places This is what two Elektor designers discovered after a blocked drain of a combination joiler and a leaking filter of an aquarium This will quickly suggest the idea of designing a small circuit ill give a clear signal when this type of flooding occurs in this case with a loud alarm It is not always possible to prevent a water leak of course But in this case it is essential to discover it as quickly as possible That is the purpose of this circuit a clear warning when water appears s
173. status alerts may also be sent as required is entered in memory slot 1 the next number then in slot 2 and so on This sequence is not the same as how the numbers are indicated in the mobile s phonebook list probably sorted in ascending numerical order The mem ory slots can be checked and amended either as they are being entered or else subsequently please check in the mobile s instruction book for details The mobile is connected using the RS 232 protocol Older models of 11 2008 elektor phone generally have this interface although they do need a suitable data cable for linking the system connec tor on the mobile to the sub D9 con nector K6 on the remote switch board If the data cable requires a supply of volts this can normally be taken from the sub D connector vampire feed with around 9 5 V on pins 4 and 7 this will require bridging JP1 Take time to check the connections of the data cable against Figure 1 to ensure it is correct for you In some cases using this vampire feed for the data cable will overload the MAX232 with the mobile una ble to talk to the remote switch You can confirm this by applying a reset to pin 14 of IC2 if the signal level does not reach around 10 V but hov ers around 5 V you have problems Another indication is if the voltage on pin 2 of IC2 measures less than about 9 5 V If this is the case you will have to supply volts into the data cable in some other manner
174. sting 3 Measuring averages Test3 Dim Ad0 As Word Dim AdO mean As Word Config Adc Single ference Off Config Timer2 On Ovi2 Tim2 isr Enable Timer2 Enable Interrupts Prescaler 64 Re Timer Prescale 64 Do Ad0 mean AdO mean 25 Print AdO mean Waitms 100 Loop Tim2 15r 800 us Timer2 56 Ticks Ticks 1 AdO AdO Getadc 0 If Ticks 24 Then Ticks 0 AdO mean Ado End If Return Ado protection resistor Figure 2 The program now finds the average value of the positive half wave which is equal to half of the absolute average value of the sine wave A typi cal sequence of measurements would be 226 227 226 226 226 Although there is some variation the measured average value is mostly 226 This can be converted into a real volt age level 5 V 226 1023 1 10 V The measured alter nating voltage therefore has an absolute average value of 2 20 V For a sine wave this equates to an RMS value of 2 44 V and a peak to peak value of 3 46 V p The rela tionship between the peak and RMS value of a sine wave is V2 1 414 For arithmetic averaging the relationship of the peak value to the average value is 1 221 571 so the absolute average value is 90 03 of the RMS 080672 1 Downloads and further information The programming examples and more information for this course can be downloaded from the project page at www elek tor com As always we look forward to you
175. t not simple Those who are interested must first go through a lot of books publications and software libraries With this book however the first step is easy The theoretically founded content is under standable and is supplemented by many practical examples Among other subjects the following are dealt with in the fun damentals section of the book Lighting optics camera tech nology transfer standards and stereo vision The practical sec tion provides the efficient implementation of the algorithms followed by many interesting applications 320 pages ISBN 978 0 905705 71 2 32 00 USS 64 00 Elektor Regus Brentford 1000 Great West Road Brentford TW8 9HH United Kingdom Tel 44 20 8261 4509 Order quickly and safe through www elektor com shop 11 2008 elektor 55 MICROCONTROLLERS symbol of the following line which is then rejected as a Bad Command However you can suppress the two end of line symbols by follow ing the Print command with a semicolon print dir The required CR must be added separately For example print dir Chr 13 The program Vinculum bas can manage quite well with out the Short Command mode in other words using the long text commands The problem of needing to enter the length of data lines in exactly four bytes dword is solved by using the Put command The length of a data line even when we are using the maximum poss
176. t and the ZENA Network Analyser are ovail able today at the website below www microchipdirect com for measuring the efficiency of the V I Chip components independ ent of load connect losses Oscil loscope probe jacks are availa ble for measuring output voltage including output voltage ripple The board has fused PRM inputs provision for mounting an optional V I Chip pushpin heat sink and system enable and disable www vicorpower com ccdemo 08624 IX and under deep foliage www skytraq com tw 080624 XI elektor 11 2008 CODE Pc Oscilloscopes amp Analyzers BitGen DSP Waveform amp Timing Generator for USB BitScope 100 Powerful waveform generation amp mixed signal data capture in one low cost USB test instrument Ds Digital Storage Oscilloscope Mixed Signal Oscilloscope 4 Multi Band Spectrum Analyzer 4 Jisplay analog wa Tor ns ana elt specira eee ae Gang cone BitGen is a comprehensive DSP based waveform and timing generation MR LIE P EPUM solution available as standard in BS100M or an option for BS100U Direct Digital Synthesis Generator From clocks sine square or triangle waves to sophisticated bursts A frequency sy M oeae cna hol chirps noise or user programmable signals BitGen supports them all Noise Dither and Entropy Generator as a a Lt umpet Voltage Clock and Logic Generator INFO amp MARKET 12 You don t have to be
177. t they do not have the part in inventory and will have to order it from a distributor In addition See your design in print Elektor Electronics Publishing are looking for Freelance Technical Authors Designers If you have an innovative or otherwise original design you would like to see in print in Europe s largest magazine on practical electronics 3k above average skills in designing electronic circuits experience in writing electronics related software there are usually shipping charges The really big play ers such as Farnell and Conrad Electronics can usually deliver from stock Finally you need solder paste if you want to solder PCBs with a reflow oven There is large selection of various pastes each with its specific properties The one may have a higher melting temperature while the other may have smaller solder particles and so on See reference 2 for more information on solder pastes You can also consult the web links listed below under Background information to learn more about the top ics discussed in this article Once you ve digested all this information you ll be a lot more knowledgeable and you won t be at a loss for words when the subject turns to SMT SMD or SMA 080667 1 Internet Links 1 www marsport org uk smd mainframe htm 2 www siliconfareast com solder paste htm Background information www answers com topic flip chip www Ipc org www ami ac uk courses to
178. t they mean Most likely you have already heard the term ball grid array but flip chip is probably less familiar With the latter technology the chip is mounted with its active surface facing downward Figure 1 which means that the active surface of the chip can be used directly for the connections This makes it possible to make a large number of connections to the chip and they have much lower inductance than with wire bonds due to the shorter distance Another recent development is called package on pack age PoP This consists of stacking one chip on top of another one usually discrete logic and memory which saves space and keeps the connections short to minimise inductance problems When boards are assembled automatically they must have fiducial marks A fiducial mark or simply fiducial is a symbol that is placed on the circuit board It can be used to determine the position of the board with high accuracy so that the solder paste can be applied correctly or a pick and place machine can place the components in exactly the right positions before the board goes into the oven for soldering Incidentally two standard methods have been developed for applying solder paste silk screening also called screening or stencil printing and direct printing In the silk screening process a stencil is created with openings exactly aligned to the copper track layout A rubber squeegee spreads the paste over this s
179. ted Kingdom Tel 44 20 8261 4509 AHORRE LAMOTHE E Leary Steerer How To Ez UIN e ARD OFS Tee ON VOCO OAM OOS Chea on irri pl r ud Es iha Ais BOO dep See X 5pnactr m E s RF 25 3 E a Apple I Coenmedores 641 1 E Parafac X Key Comgatibis Ch E Prag a Ai mri f Tacein araa X Lee PENER rcp A ER wher EE Fur 1 Aa fo Leam En iT nar Fun epum eeied Sten i x ry gt A an T BR Si com e ki on De n ipTHT7E mue quw ri i and Pier Supply lacta m l a ow rc 1s a ri is ui a bo J Te I 01 635 40347 Hiwhury Elechr nics Lid Fa d 16 55 35134 Fara Rode Hos Bere lis cab E e mil Cu Aneby teni pn uk urearen i3 LK Bppress c EN ewe We are a leading electronics design company in the Access Control and RFID Industry based in Watchfield near Swindon Our clients include Bosch Cooper BT Fujitsu and many other household names Due to further expansion we have the following vacancy PCB DESIGN amp LAYOUT SPECIALIST In a role that is both varied and interesting you will work in our Development Department on the design and layout of printed circuit boards Other skills such as microcontroller software development and product management would be an advantage Salary will depend on age and experience If you are interested in joining our team please send your CV with covering letter to our address below or e mail to info axxessid com NO AGENCIES Axxess Identification Limited 27 28 Shriv
180. ted reference number of the message if correctly transmitted This number would enable you to search the telephone s memory for the notification although generally this is not of any interest Note that with this control sequence the mobile does not actually transmit the text message but merely stores it This is an advantage during the test phase since the order of events is fundamentally iden tical to actually transmitting except that there is no cost involved and you can read and check the messages on the mobile s display Only when you replace the AT command CMGW with CMGS is the mes sage sent to the phone immediately upon data entry Creating a PDU message The digit following an AT command indicates the total number of bytes in the line following Here the first byte is always OO if no text E EEUU HyperTerminal Fie Edi View Cab Tander Help Ce ee oo mt T4CHGW 26 011000F515421133254 698FOD0000AROUBCH329SBRED GS5DDE 23619 fuso detect AH DH exchange SMSC Short Message Service Centre is indicated and is then not counted The 26 bytes following afterwards are arranged as follows 5 V regulator IC1 which can take care of higher surges from external battery supplies Fuse F1 protects the circuitry assisted by suppressor coil L1 protec tion diode D1 and the two Schottky diodes D2 and D3 F1 is a self healing PTC fuse that resets itself on power down or when the fault is cleared manufacturer names
181. temperature sensor and a 40 pin enhanced Flash PIC16F887 microcontroller all for just 189 The EasyPIC5 C Starter Pack is well suited to beginners and experienced developers alike and comes with high quality printed documentation and a large number of easy to understand example programs for a number of PIC microcontrollers The EasyPIC5 supplied in the starter pack is a full featured development board for PIC10F 12F 16F and 18F microcontrollers in 8 14 18 20 28 and 40 pin packages The EasyPIC5 incorporates an on board USB based PIC programmer and in circuit debugger as well as a useful selection of built in I O devices such as LEDs switches 7 segment displays potentiometers RS 232 interface PS 2 and USB connectors and provision for fitting of the included LCD displays touch screen and DS1820 tem perature sensor What s more all of the PIC s input output lines are available for connection to your own circuits or to any of our huge range of low cost optional add on boards such as Ethernet RS 485 CAN LIN IrDA and RFid communications EEPROM SD MMC and Compact Flash storage 12 bit A D and D A and many useful interfacing and prototyping boards Supplied in the EasyPIC5 C Starter Pack is a full version of MikroElektronika s mikroC a power PU ful integrated development environment and C compiler for PIC12 PIC16 and PIC18 microcon trollers With its built in user friendly features mikr
182. tencil with the result that it ends up exactly where it should be on the circuit board This method is fea sible for series production but producing a stencil of this sort is far too expensive for making a single PCB The direct printing method is more suitable in the latter case This involves using a special printer similar to an ink jet printer to deposit the solder paste directly on the PCB However these printers are rather costly Reflow problems There are several common problems with soldering SMDs including reflow soldering One of them is called the tombstone effect or tombstoning Figure 2 shows the forces acting on an SMD component during soldering They can cause the component to stand upright on the circuit board instead of remaining flat on the board when it is soldered Upright SMD resistors resemble miniature tomb stones which is where the term comes from The component will rise up if the sum of F and F is less than F or in mathematical terms M g D2 L2 2 cos a B y W cos a 2 lt y D sin a where M is the mass of the component and g is the force of gravity elektor 11 2008 Terminology There are several causes of tombstoning For instance light weight components are more susceptible to this effect Rela tively long solder pads can also cause this undesired effect because the portion of the pad that extends beyond the component causes an increased torque larger value
183. th a minimum charge of 5 00 Patents Patent protection may exist in respect of circuits devices components and so on described in our books and magazines Elektor does not accept responsibility or liability for failing to identify such patent or other protection Copyright All drawings photographs articles printed circuit boards programmed integrated circuits diskettes and software carriers published in our books and magazines other than in third party advertisements are copyright and may not be reproduced or transmitted in any form or by any means including photocopying and recording in whole or in part without the prior permission of Elektor in writing Such written permission must also be obtained before any part of these publications is stored in a retrieval system of any nature Notwithstanding the above printed circuit boards may be produced for private and personal use without prior permission Limitation of liability Elektor shall not be liable in contract tort or otherwise for any loss or damage suffered by the purchaser whatsoever or howsoever arising out of or in connexion with the supply of goods or services by Elektor other than to supply goods as described or at the option of Elektor to refund the purchaser any money paid in respect of the goods Law Any question relating to the supply of goods and services by Elektor shall be determined in all respects by the laws of England September 2007 9 0 6 9 06 0 6 6 0 9 6 6
184. the author Jeroen Domburg is a student at the Sax ion Technical University in Enschede the Netherlands He is an enthusiastic hobbyist with inter ests in microcontrollers electronics and computers In this column he showcases his personal handiwork modifications and other in teresting circuits which do not necessar ily have to be useful In most cases they are not likely to win a beauty contest and safety is generally taken with a pinch of salt But that doesn t concern the author at all As long as the circuit does what it was intended for then all is well You have been warned 69 451530 READERS CIRCUITS Switching with any remote control Jeroen Hoppenbrouwers Netherlands The Universal Remote Switch Box is a universal remote control receiver fitted with 16 open collector outputs Each of these can be configured either as a momentary or a toggle output In addition there is also a master slave function built in This Universal Remote Switch Box was inspired by the Easy Home Remote Control circuit in the 2006 July August issue page 72 This circuit has only 4 outputs howe ver and accepts only RC5 codes To eliminate the latter limitation the firmware of the circuit described here is based on the Universal Infrared Receiver UIR see sidebar which makes it suitable for all types of remote control How it began A few years ago I wanted to build an IR receiver f
185. the behaviour is broadly linear see illustration I linear range magnetic field As long as all the Hall elements are in this linear region the differential B p Sa magnetic field strength signal will be of constant amplitude Mee side view independent of the horizontal posi tion of the magnet Larger diameter magnets therefore allow for greater horizontal offsets E than smaller ones On the other hand the graph of field intensity against displacement is also flatter which means that the amplitude of the differential signal is reduced This in turn requires greater amplification resulting in poorer signal to noise ratio The best compromise is found using magnets with a diameter of approximately 6 mm experi ence indicates that the maximum error induced by an impertectly centred magnet is well un der 1 with a centred magnet the maximum error is under 0 5 Sin Sinn Cos Cosn Absolute Serial Interface SSI Power management 070480 14 64 allowing position measurements at ro tational speeds of up to 30000 revolu tions per minute We shall take the AS5030 2 as an ex ample device This costs around five pounds bought individually falling to just over three pounds each for fifty or more devices and is therefore an eco nomical solution in simple angle meas urement applications The Hall sensors
186. the informa tion can be analyzed corre lated with other data and acted upon Applications range from automated and energy efficient homes and office buildings fac tory equipment maintenance and asset tracking to hospital patient monitoring and safety and compli ance assurance Welcome to ine launch ol the INTERNET of THINGS Intended to complement the efforts of entities such as the Internet Engi neering Task Force IETF and the Institute of Electrical and Electron MLX90614 Infrared Thermometer Module The MLX90614 Infrared Thermome ter Module from Parallox is an intelli gent non contact temperature sensor with a single pin serial interface for connection to most microcontrollers The MLX90614 sensor is designed for non contact temperature measu rements of objects placed within the sensor s cone of detection The sen sor is comprised of an integrated ASIC and infrared sensitive ther mopile detector The sensor com municates with an SX20AC SS G coprocessor over a digital SMBus which Parallax has programmed to simplify an otherwise fairly com plex communication protocol With a temperature range of 70 C to 380 C auto baud detection and a programmoble alarm setting this module becomes very useful in many applications such as surface temper ature measurement human animal presence detection or HVAC Up to 100 modules can be connected on the same bus making multi zone tem perature measurement easy www
187. timing The ATmega controllers are well equipped in this respect the Mega8 to Mega32 controllers all have three timers Timer 0 and 2 are 8 bit while Timer 1 is a full 16 bit wide The ATmega controller s timer counter section looks a lit tle daunting at first sight Figure T They are highly con figurable and require a certain amount of care to ensure they are set up correctly for your application For those programming in Assembler this configuration procedure is quite involved but as you will see BASCOM simplifies things a lot The first thing to decide is the source of the timer counter clock signal It can come from the internal clock directly or via a prescaler or from an external source e g connect to pin P1 for Timer 1 The counters can count on either the ris ing or falling clock edge and the counter value can be read or changed at any time via the TCNT1 register When an overflow occurs it can generate an interrupt The counters are commonly used for generating Pulse Width Modulated PWM signals This is just a brief outline of some of the more basic properties of the timer counters as you become more familiar with the controller you will begin to get a bet ter appreciation of their versatility Reading the timer For the first exercise we are using the 16 bit timer driven by the system clock crystal and divided by 256 in the pres caler In BASCOM all this information can be written on one line Config Timer Time
188. tional to the magnetic field strength is developed across the sen sor when a current flows through it A rotating bar magnet or bipolar magnet will therefore give rise to a sinusoidal voltage just as a coil does in a rotat ing magnetic field In contrast to this induced voltage however the output signal of the Hall sensor can be meas ured statically since a stationary mag netic field gives rise to a constant Hall voltage A single Hall sensor can be used as an angle measuring device as shown in Figure 2 We are restricted to the quasi linear region of operation of the sensor between 45 and 45 High precision of mechanical construction and alignment between magnet and sensor is required Temperature varia tions can affect the magnet and hence the amplitude of the output voltage of the sensor reducing accuracy unless temperature compensation is used Ex ternal magnetic fields directly affect the amplitude and phase of the output voltage and so magnetic screening is essential Take four These obstacles to the accurate meas urement of angles can be solved el egantly using a circular arrangement of four or even more sensors The ro tational axis of the magnet should go through the middle of the circle Each pair of diametrically opposite sensors is connected to a differential amplifier Figure 3 and the difference voltage gives the gradient of the Z component of the magnetic field These gradients vary sinus
189. tity such patent s or other protection The submission of designs or articles implies permission to the Publisher to alter the text and design and to use the contents in other Elektor International Media publications and activities The Publisher cannot guarantee to return any mate rial submitted to them Disclaimer Prices and descriptions of publication related items subject to change Errors and omissions excluded Elektor International Media b v 2008 Printed in the Netherlands WOVEN MAILBOX PaX amplifier stability Dear Jan would like to comment on the article on the pax Amplifier by Jan Didden in the April 2008 issue of Elektor Error correction Around 80 years ago already before feedback was commonly used Black obtained a patent on feedforward error correc tion Due to the limited availa bility of suitable components at that time this principle was not used on a large scale until much later The basic scheme of Hawksford 1 as shown in Figure 1 of Did den s article is often used as the starting point If a O and b 1 feedforward error correction is present If a 1 and b O there is feedback error correction Accurate addition of the correction signal at the output is difficult with a power amplifier which is why the feedback approach is often used In Figure 2 of the article S1 and S2 are idealised functions whose purpose is to add the error correction signal to V at the input Howeve
190. to reformat it Terminal test Vinculum recognises two command sets The Extended Command Set is provided for text based operations whilst there are also byte commands the Short Command Set that can be used with microcontrollers for exam ple At switch on the text mode is always selected You can test out both modes using the Terminal exe pro gram very conveniently as it s easy to switch between byte communication and text Open the Terminal with the settings 9600 N 8 1 see Figure 3 Do not con nect a USB stick at this stage Now type DIR Enter it s immaterial whether you use small letters or capi tals as they are all treated the same Vinculum then reports that no data medium has been detected Now plug in a USB memory stick and Vinculum proudly announces Device Detected P2 No Upgrade D gt For a second time type DIR Enter and the directory of contents appears Just as in DOS only short filenames are supported in Format 8 3 Long filenames are displayed in an abbrevi ated format KAP1 DIR SDR DIR TEXT TXT D gt A text file with the content Hello lt CR gt is indicated as follows RD TEXT TXT Enter Hello D gt As you would expect the use of subdi rectories is equally simple Not quite so straightforward is enter ing data in a file The key commands are Open Write and Close OPW file lt Enter gt WRF dword Enter data CLF file Enter When wr
191. to account the shipping and import costs These will likely increase the price by 30 percent if not more depending on the shipping costs In conclusion we can state that such a kit for about 200 is a nice upgrade for a bicycle although the mounting of the control circuit and the batteries will require a bit of thought 071128 I Our thanks go to Huijzer Components www huijzer com for making the batteries available Internet Links www recumbents com wisil e bent default htm http zeept wordpress com www elektrischefiets be index html http www electric bikes com bikes legal html http en wikipedia org wiki Electric bicycle laws A AA A AAA A A A A O A A A A A R AAA AA A AAA amp A AAA R E EU regulations Within the European Union bicycles may be fitted with an auxiliary electric motor This is subject to the following requirements only assist the pedalling motion the maximum power of the motor may not exceed 0 25 kW at a speed of more than 25 km h the electric motor may the electric motor may not propel the vehicle on its own but not provide any additional power iu d e m i i Ti dd i i i i i i id i is in ni i mi ee Emi d mii meds Ten an i amni d ii mi Tien i ui Rm nd d mi Ten mi elektor 11 2008 QUA
192. txt The measure ment system is an installation that has already been set up somewhere The user edits a command file on the PC and saves this onto the USB stick Then he plugs the stick into the micro controller system and lets the meas urement operations take place At the appointed time the stick is removed along with the data collected These measurements are then evaluated on the PC This is how the Command File is built up Total number of measurement opera tions Word 0 65535 Interval between measurements in ms Word 0 65535 Number of measurement channels Word 1 8 For 100 measurements 1000 ms and two channels the file ToDo txt will then read 100 1000 2 This file can be created in Windows Notepad for instance It s important to close off the final line with lt Return gt just like the preceding ones The end of each line in the file is made up of the special symbol CR and LF which should be noted when the file is read in the microcontroller elektor 11 2008 Listing 1 Mini data logger Bascom ATmega88 Vinculum Sregfile m88def dat Scrystal 16000000 Baud 9600 Open coml1 For Binary As 1 Dim Samples As Word Dim Delayms As Word Dim Channels As Word Dim N As Integer Dim I As Integer Dim L As Integer Dim S As String 20 Dim Ad As Integer Config Porth Output Config Adc Single Presca Measurement program Our measurement program is imple mented h
193. ublishers like CD ROMs kits and books A powerful search function allows you to search for items e lektor M worldwide News Magozine and references across the entire website Reneses meereconte Parallax MLX90614 infrared thermometer module coat low pin count Posh eller Also on the Elektor website amp Electronics news and Elektor announcements lt o r c RN e Readers Forum HIT T Ever Ore nh Buster AEE peer FE Fe is o PCB software and e magazine downloads een ety tres parte aing Pomade mm arte yarn eise offers full text ecc RS ag ning using Z e Surveys and polls s Ma End valve emotes FAQ Author Guidelines and Contact nore e Sents vus a aE m Elektorjobs 10 200 84 elektor 11 2008 Order For pus Li co E ru Description Price each Qty Total Order Code Universal Display Book for PIC Microcontrollers Design your own Embedded Linux Control Centre on a PC CD ROM FPGA Course 14 50 Computer Vision 32 00 PIC Microcontrollers 27 95 Free Elektor Catalogue 2008 Sub total Prices and item descriptions subject to change The publishers reserve the right to change prices P amp P without prior notification Prices and item descriptions shown here supersede those in previous issues E amp O E Total paid Name Address Post code Tel Email Date Signature Yes I am taking out an annual subscript
194. ufacturers do not always stick to the rules laid down An example is the format in which a caller s telephone number is displayed CLIP the Siemens C55 presents the data in inverted commas 2 amp term HyperTerminal File Edit View Call Transfer Help D m Suto detect 9600 8 N 1 C RAGI CAPS NUM Connected 0 38 37 Activating the telephone number display by terminal pro gram and signalling a call Understandably it s impossible to look into every possible detail but during the development process we did manage to verify the software against several different models of phone Another consideration arises if a GPS module is to be connected cur rent AVRs provide only a USART making it necessary to control an ad ditional serial interface in software In this case it s advantageous that the GPS module transmits only data and also at a slow rate of 4 800 baud As the data from the GPS module is repeated continuously there is no need to buffer the characters received It suffices to simply wait until the required data set occurs as and when it is required In this way the code for data reception is much simplified Sending an SMS text A fair amount of effort is involved in sending a text message by mo bile telephone Before the message can be passed to the mobile for transmission it needs to be coded with the destination telephone number and various other details as a PDU Protocol Data Unit It s t
195. utput configuration 1 byte checksum Ack 0x06 or Nak 0x15 as confirmation Downloading OxAB download command Response from the circuit is the same as when uploading including start byte and checksum 72 elektor 11 2008 HERI Ln I Hi li CE E N E beats BERR REE Ee Figure 4 The prototype uses a rotary encoder but a DIP switch works just as well mode too the changes are only saved to the EEPROM when leaving the mode PC software In edit mode the microcontroller also listens to the RS485 port normally this is only an output as previously men tioned In this mode it is possible to read the configuration and to modify it This configuration is stored as an ini file A back up file in such a format can also be loaded When the PC program first starts it checks whether any of the ports COM1 through COM16 exist The result is shown in a combobox after which the first available port is opened With 11 2008 elektor Download you can retrieve the con figuration and with Upload you can load a configuration into the PIC Using the software you can also set the type of output There are four options Toggle press once on press again oft Pulse output active for about 262 ms Master the same as Toggle but when switching off all slaves turn off as well Slave when switching on the mas ters also turn on switching off is not po
196. val Toot 2xCwbonF pers zt Online Price 29 95 932 Vacuurn Pick Up 2 m WI E ra ae Online Price 139 95 Wide 5alectian Available i5 F 2738 CPU Controlled PCB Work Station Online Price 74 95 TEST PINS CO UK Sapp ern af Teper Fcepicles J Probes LI NS DER a co la E t im uhi a E For rotoli amp Probes a Visit www test pins co uk a Online Price 69 95 Online Price 44 95 Online Price 750 00 Above discunt coda aso applies i 5 Allendale Electronics Lid 43 Hoddesdon lndudiial Centme T 44 071942 450 780 V wwWw pcb so xdenng co uk www pcb sol deri na co uk Pindar Acad Hpddesdon Hertfordshire EN11 OFF F 44 0 18992 450781 E salesgipcb sotdemng oa uk INDEX OF ADVERTISERS Allendale Electronics Ltd WWw pcb soldering co Uk sss 87 MikroElektronika 005 www mikroe com 6 ene 3 Antex Electronics Ltd WWW AIMEX COUK 25s 23 2aG4o0G 4 oes Obes 15 MQP Electronics Showcase Wwww mqp com nononono nnana 78 ATC Semitec Ltd Showcase www atcsemitec CO UK 0 cc ee 78 Newbury Electronics www newburyelectronics cOo uk 21 Avit Research Showcase www avitresearch CO UK sss 78 Nurve Networks e 00 Www xgamestation com sss 21 Axxess Identification Ltd
197. velopment boards mikroElektronika manufactures and delivers competitive development systems across the globe Our satisfied customers are the best guarantee of our first rate service In addition the company is an official consultant on the PIC microcontrollers and the third party partner of Microchip company We are also an official consultant and third party partner of Cypress Semiconductors since 2002 and official consultant of Philips Electronics company as well All our products are RoHS compilant CAN 1 Board Interfaces CAN via MCP2551 CANSPI Board Makes CAN network with SPI interface RS485 Board Connects devices into RS 485 network Serial Ethernet Makes ethernet network with SPI Interface ENC28J60 IrDA2 Board Irda2 serves as wireless RS232 communication between two MCUs Storage RTC aa CF Board Provides easy way to use Compact flash in your design MMC SD Board Provides easy way to use MMC and SD cards in your design EEPROM Board Is serial EEPROM board via PAG interface RTC Board Is PCF8583 RTC with battery backup ADC Board Is 12 bit analog to digital converter ADC with 4 inputs DAC Board Is 12 bit digital to analog converter DAC with SPI Keypad 4x4 Board Adds keypad to your application Accel Board Accel is an electronic device that measures acceleration forces PICFlash tmn PICFlash programmer an ultra fast USB 2
198. very
199. www diptrace com As a non electronics amateur but one who has used AUTO CAD for many years in civil Panorama virtual CAD Dear Editor regarding your topic in the September 2008 issue on CAD of the current mirroring action of the current conveyor a current with the same value flows in R25 if A 1 This current produces a replica of the error signal across R25 if R25 R34 Now it is extremely important for the loop gain H to be less than 1 IF H is equal to or greater than 1 kein up will occur with a DC n drat sieh e he ome dhawm fn dre figure This means that depending on the polarity of the DC offset the output level will gradually increase until it reaches the positive or negative supply voltage With the previously mentioned simplifications the loop gain H is given by H 1 G x R25 R34 eerie il Here the replication factor K is equal to R25 R34 and G is the combined voltage gain of the buffer and the output stage This is a special form of feedback since feedback is present if G is gre ater than 1 the loop gain is zero if G is 1 and feedforward is present if G is less than 1 as in the paX amplifier If G is 0 95 which is a reasonable estimate of the transfer function of the buffer plus the output stage and K is 1 the loop gain is 0 05 This is well below the critical limit G 1 This means that the feedback loop is sufficiently stable with regard to latch up risk Output imped
200. www elektor com NOVEMBER 2008 AUS 12 90 NZ 15 50 AR 84 95 US 9 95 3 90 lektor electronics worldwide i 2 Motorised udio Volume Pot 3000 SERIES 5000 SERIES 2000 SERIES VISIT wwwW picotech com scope490 QW 2o USB Connected i High Speed scilloscopes ST ATT yi TNI PicoScope 5000 Series 250 MHz bandwidth The No Compromise 1 GS s real time sample rate PC Oscilloscopes 128 megasample record length With class leading bandwidth sampling rate memory depth and an array of advanced high end features the PicoScope 5000 PC Oscilloscopes give you the features and performance you need without any compromise Advanced aries idditiam fo the standard trigge the Fico ape 000 series con is standard with pulse width window dropout cian nd logic level triggering 250 MHz Spectrum Analyser High speed USB 2 0 Connection Automatic Measurements Arbitrary Waveform Generator m r Lehine your avn wavelorms of select irom B ALAS 5 and up to 1 PSs record lengths i i predefined signals with the 12 bit 125 M53 eneral purpose and portabk whitrary waveform generator applications Waveform Playback Tool al Ld ria mum i unu s HWW wat a Fail r Fa i Firei 7 Ihe Picoscape ZUDD series oscilloscopes Mw a FiceScope oltare new ee ee F i U EH E Wili ux I B ae k ria ae offer single and dual channel units i lloi you To go i
201. y SMS Text alert in case of alarm optionally with GPS coordinates Filtering of unauthorised callers prevents false operation Control of engine independent air heating system in cars Remote control of domestic apparatus lighting roller blinds etc Locating stolen objects of value cars boats etc UE Ro cU E P EET E E M E PETI 5V Q OC1 4 1 K2 2 a ALARM R5 PC817 E E see text D6 gt ALARM yellow OUTPUT yellow GND M RE D11 RE2 1N4148 T2 R8 cc Wn m pg BC337 Er OUTPUT yellow GND O VRE 1N4148 R10 Y t BC337 KH Ww OUTPUTS yellow GND 080324 11 Figure 1 The circuit diagram is remarkably simple since most functions are handled by software in the ATmega8 11 2008 elektor 31 CELLPHONE If this technique has any shortcoming then it is the time involved between the first call and switching an out put or sending an SMS alert a delay of between 90 and 180 seconds can occur Call recognition To avoid possible operation caused by false calls wrong numbers unwanted sales calls etc we use two different operating modes for evaluating calls received indicated as TelTyp in the software The choice of Teltyp mode is set using the switch S2 2 seen on circuit diagram Figure 1 next to pin 27 PC4 of the ATmegaS as follows 1 TelTyp On S2 2 closed The calling mobile must have caller ID enabled in other words the ca
202. y can dissipate their heat During our elektor 11 2008 test rides for which we put the circuit and batteries in pan niers to keep things simple the controller enclosure became quite warm This is therefore not appropriate as a perma nent solution and it would be much better if the controller was exposed to the passing air We do however question the water proofing of the enclosure The connectors aren t really suited for our damp climate either This could easily become a problem Via the phone number on the PCB we have been able to trace the manufacturer the Chinese company Jiaxing City There is a strong suspicion that the circuit has not been extensively tested for use in the EU evidenced by the absence of RoHS CE and other approval marks The wheel comes from the company Nine Continent in Wen ling China and does conform to the RoHS standard Practice The first problem we encountered was that the wheel was too wide Carefully we spread the front fork a little so we could fit the wheel in it And of course the motor initially 11 2008 elektor turned the wrong way so take note which way around the wheel is supposed to be fitted before you fasten all the cables in place The wheel turns with more friction than what we are used to with a normal wheel When buying the tyre we had to pay close attention 24 inch is apparently not always 24 inch These come in different sizes so it is best if you bring the
203. y when the circuit of which it forms a part is turned on The disadvantage is the friction created when the shaft is turned and further more poor tolerance means that cali bration is a necessity The optical ap proach offers much greater precision 62 service life and long term stability but on the other hand an absolute angle reading can only be obtained using a complicated optical system increasing overall costs It is possible to construct an angle sen sor by exploiting the Hall effect offer ing high precision and low cost There is a mechanical separation between the moving and fixed parts of the de vice which means that it is possible to make units sealed against moisture and dust for use in robotics industrial machinery medicine aerospace and many other application areas The basics Hall effect sensors for measuring mag netic fields are already in widespread use for example to determine the ro elektor 11 2008 tor position in brushless DC motors In these applications the sensors are simply used as switches to replace slow unreliable mechanical contacts The Hall effect is exhibited to some de gree by any electrical conductor the strength of the effect depends on the material and using modern semicon ductor technology we can build highly sensitive Hall elements into integrated circuits at low cost The principle of operation of a Hall ele ment is illustrated in Figure 1 A volt age propor
204. ys It was specially designed that forms the heart of a digitally control for use in environments where you have a lot of electromagnetic interference Despite the fact that led model railway the DCC Command the CAN protocol is a serial protocol it can t just be connected to the serial port of a computer Station The computing power in this de The all round USB CAN adapter described in last month s Elektor is a compact and simple solu sign is provided by a highperformance tion With the help of the accompanying software you can follow all data communications taking ARM7 processor place and carry out operations such as filtering and storage at the flick of a mouse switch Kit of parts incl programmed ARM PCB partly populated module Art 071120 71 54 90 USS 109 80 Art 070989 71 88 50 USS 177 00 Prices and item descriptions subject to change E amp O E 80 elektor 11 2008 SAPS 400 May 2008 With the SAPS 400 we offer a powertul adjustable symmetrical supply that s ide al for lightweight audio power amplifiers and happily sits in less than a quarter of the space taken by a comparable supply of conventional design PCB populated and tested ready mounted in aluminium U profile Art 070688 91 159 00 USS 318 00 LE LELE LSTELEL ETETETT eo DigiButler May amp April 2008 A low cost home automation server based on a Freescale Coldfire 32 bit mi crocontroller The proje
Download Pdf Manuals
Related Search
Related Contents
"取扱説明書" 取扱説明書 (5.57 MB/PDF) Sennheiser HD 457 PALAN ELECTRIQUE A CHAINE Manuel - Amazon Web Services 1 Pulse - Alpine Model No: EY3640/EY3641 - Tooled WL-366 Copyright © All rights reserved.
Failed to retrieve file