Home

ROBOTICS

image

Contents

1. ee 4 uam NE TT E a m jn I H a J T a n al g i IT dt FF ir it Ur dn m z Thon 0 Tn arg i i M Wm i z fo ir H T dn ha i ie 8 a ge oy iL dm la n H r Er 2 mim Wa Er ig Hua UC od ki T am M om m 13 of a ii n la i Mu T Lt Fy ha F kk ir Ar la iy A3 amp Y X Xi i X amp X X OR i ch X Lo X L X t X X4 amp X X amp X X X LG 4X EA amp X X m tri 8 8 24 Uses your PC RAM Hundreds on millions of samples 0 1 1 10 T 0o E N T E pum 2 800 1 000 1 200 1 400 1 600 1 800 2 000 Frequency Hz Figure 6 Horner s method is used to implement a low pass filter with a cut off of 300 Hz The response is depicted as a gain versus frequency plot and is shown to conform to the design ones in the multiplier The CSD format produces the same results for multiplies or divides with a slight reduction in CPU overhead The introduction of the CSD format introduces a small change in the way Horner s algorithm is implemented Because there would be a ternary set all 1s would be subtracts and all 1s would continue to remain adds This subtract when necessary would merely replace the add operation implemented at the end of each step IMPLEME
2. 2 1 500 least three times faster than the exist ing methods These methods have limited accuracy with the option of scaling and using 32 bit registers to improve accuracy The floating point library is almost not an option because it is almost 15 times slower To exhibit the performance of filtering using Horner s method two filter implementations have been shown The first example is a FIR low pass fil ter and the second is a FIR band pass filter In both cases the normalized gain in dB versus frequency is shown Limited frequency resolution has been chosen because the intent is to show the filter s performance for a pre fixed frequency sweep In a real world appli cation frequency resolution does not have a role to play The performance depends on the number of bits chosen for the coefficients and the filter order For every increase in order the increase in the number of CPU cycles can vary between 30 and 35 CPU cycles which also includes memory updates These are huge savings when compared to a floating point library implementation Figure 6 shows the response of a thir tieth order low pass filter with its cut off set at 300 Hz at a sampling frequen cy of 4 000 Hz The entire filter takes 1 030 CPU cycles with 31 integer real 2 000 2 500 3 000 3 500 4 000 Frequency Hz Figure 7 When Horner s method is used to implement a band pass filter to extract the voice band of 300 to 3 400 Hz the respo
3. Table 1 This is an example of a packet sent between the base station and the helicopter This packet when received and decoded by the helicopter will set the speed of the engine reliable communication between the base station and the helicopter Work on the communications protocol began even before the official start date of our project This was a large task which we needed to complete quickly so we could use it to test other aspects of the helicopter s operation The full code communications protocol is available on the Circuit Cellar FTP site The communications protocol is fairly simple in the sense that we did not incorporate any error checking This was possible because the radio modules we used have some good error checking routines of their own There are several bytes within the protocol that have spe cific tasks The header bytes are used to wake up the receiver so it can begin recording and decoding the incoming transmission The length byte tells the receiving station how many bytes are in the data portion of the packet and includes the command group command and payload portions The command group byte tells command byte for the base station to request a preflight packet P for pre flight The command group byte dif ferentiates the two The command byte then tells the receiving station exactly what command is sent In Table 1 0x45 indicates an engine speed change Hexadecimal number 0x45 is
4. Free Software Remove Expensive Sensors Free Software 4 S amp H ADC Integrate PFC and Motor Controller PWM with 2 Time Bases Cost Reduction Integrate Controller on Motor 6x6 mm Small Packages Easily Migrate to Other DSCs in Portfolio Optimized Feature Set Remove Crystal 1 Internal Oscillator Incorporate Field Oriented Control Free Software Better Torque Control Better Loop Response Multiple S amp H ADC Improve Reliability Migrate from Brushed to Brushless Motors Free Software Noise Profile Diagnostics DSP Resource On chip Purchase Microchip s motor control development solutions at microchip m gna MS RETE 67 www microchipdirect com MICROCHIP www microchip com DSCMOTOR Status bit combio LILI LI LIU LILI LILI LI LIU LIL cumbti LI LI LI LI LI LI LI L saus amp o JU LILI LI ULI _ Status amp 1 dL LI gt Figure 5 Driving an ultrasonic transducer directly requires a burst of pulses This type of output can also be used to reduce the filtering requirements for a PWM signal used to create an analog value filters that feed clean signals to the actual decoder Measuring the rotation of a shaft is one thing but what about sensing position relative to the rest of the world Contact sensors are easy because the state of the I O pins can be read at any time If you prefer an int
5. If you consider how the database is designed we first need to look into the INT8 CallOutGroup array to see if there is a first num design Let s look into the routines InitCallOutGroup No change ber entered or if the group is InitCallOutNumbsStruct No change as they are defined right now InitCallOutGroup ini DeleteCallOutGroup No change empty If there is a number we can start using the for tializes the CallOutGroup It void FindFreeNumber void New ward linkages to keep finding void AddCallOutGroupNumb INT8 Grp INT8 s No change takes no parameters and returns no parameters Init GetNextCallOutNumber Deleted the next number in the group So we really needed CallOutNumbsStruct INT8 GetFirstCallOutNumberlndex INT8 Grp New this change but it could cre initializes the CallOutNumbs INT8 GetNextCallOutNumberlndex INT8 Idx New ate other problems in the sys structure It takes no parame Table 3 Here s a list of the routines in the final version of the code and an indication tem Once again these are ters and returns no parameters of whats added deleted and changed 78 Issue 212 March 2008 CIRCUIT CELLAR the type of real world issues www circuitcellar com that you come across Now the next step is to redo the UML diagrams to keep them current with the tested design I ll leave that up to you CODE REVIEW The de
6. PC 104 peripheral 10 100 Ethernet 7 analog digital l Os 4 7 30VDC or Sleep Mode amp Wake on LAN with PoE opt 500 meter wireless Moe Hugged aluminum Program in ladder logic or C Web interface 36 x 2 1 2 1 2 4 Technologic SYSTEMS We use our stuff Visit our TS 7200 powered website at www embeddedARM com Photo 3a This lever enables the pen to touch the canvas b This is the motor that raises the pen lever 200 steps per turn Because of the pul leys I use 10 teeth per turn and the tooth distance 5 08 mm or 0 2 the spatial resolution is 10 x 5 08 mm 200 steps or 0 254 mm step or 0 01 per step So given the desired Cartesian coordinate it is easy to calculate the corresponding lengths for the left and right belts SOFTWARE You know how to build a painting machine and you understand the math to tell the stepper motors what to do but there are two more problems to resolve The first one is easy You need a way to establish the initial pen hold er position A home position has to be defined accurately because all of the belt s movements are relative to the previous location If that is not cor rect then you will get a pretty distort ed drawing which may be still usable if you are into the abstract art scene Like any other printer you might need to conduct an initial routine to Photo 4 I saved the PCB from an old floppy drive with the bipolar ste
7. the GUI coder The indicators library shows the user telemetry data from the helicopter It can display customizable dials a compass control an artificial horizon and indicator lights The over all indicator design mimics a helicop ter or airplane instrument panel The Google Maps user control defines way points for the helicopter and shows its position For base station hardware we used an antenna a USB to Serial module and a transceiver module mounted to a PCB The hardware on the helicopter for the communications system con sists of an antenna a transceiver module and a Microchip Technology dsPIC30F3011 microcontroller The com munications protocol is a rule set that governs the transmission of data between the base station and the helicopter HARDWARE We knew from the start that the most difficult aspect of this project would be the software For this reason we used simple pieces of proven hardware to get the job done so we could have more time to focus on the software The communications system hardware on the helicopter is virtually the same as the hardware in the base station Photo 2 This is the main control board of our helicopter Visible at the top right of the photo are the radio module and the antenna connector www circuitcellar com Remote Unit Hardware Host Ready Serial Data In Serial Data Out Base Station Hardware TXLED PORTVCC EXTVCC VOCC IO RXLED SLEEP Ground 3V30UT Gr
8. unlimited storage for wims set ups etc Built in Wi Fi Bluetooth IR 1990 100MHz 2 ch 400MS s DSO 2000 wfm s refresh rate Ultra Compact Design with small footprint saves bench space DS1102C 999 Low Cost Scope mc 2 ch 40 100 200MS s 8 bit scope range with 5 10 25MHz bandwidth and USB2 0 for fast screen updates Inc scope FFT logging software case probes PS2203 4 5 from 318 Automotive Testing Automotive Diagnostics Award winning Pico kits turn your PC into a powerful vehicle electrics diagnostic tool 2 amp 4 ch versions for components amp circuits PS3423 automotive kit 2293 Ethernet to 12C NM7010A LF REV 2 Complete hardwired 2 module Officads stack for hi speed Intemet enabling microprocessor systems Drop in W3100A based board for instant network speeds to 8Mbps 22 Ethernet to Serial WiZnet Ready to go serial to Ethernet Gateway Simple set up for 10 100Mbps Ethernet 230kbps serial Ethernet Internet enable any serial part EG SR 7150MJ 34 6 1 2 digit 50 5 5 2MS mem Opt 16 ch mux Automeasure DC AC 2 4 wire R C Continuity Diode Frequency Period Ratio Temp Sensor High Low Limit Math 795 100 200 300MHz 2 ch 2GS s DSO 2000 wfm s refresh rate Ultra Compact Design with small footprint saves bench space D81102A 1295 DS1202A DS1302A PicoScope 3206 PS3206 Is an impressive 2 ch 200MS s 8 bit PC scope adapter 10GS s for repetit
9. The MCU business isn t for the faint of heart and it is dominated by companies with decades of lead ership Conventional wisdom would say the idea of starting a new MCU company this late in the game is iffy at best It s testimony to the momentum behind ARM that the introduction of their latest and greatest Cortex M3 MCU core spawned a new MCU company namely Luminary Micro Like pregnancy being kind of in the MCU business isn t an option Dribbling out a part or two while watching the cash gauge bounce on E won t cut it Fortunately for Fw double sided pth 2 Days 5 90 6 8 Days 5 2 Standard PCB Pool Service SIMPLY SEND YOUR FILES AND ORDER OMLINE New Service Save vital time on design errors in advance of receiving your Prototype View high resolution photographic images of your PCB during each pro duction stage Be one step ahead use our realtime PCE monitoring service WWW cPRU PYOL 2 Protel Electronics orcad TARGET DIUI www circuitcellar com PCB POOL Price Example 16 Sq Inches CIRCUIT CELLAR J p ou i Issue 212 March 2008 81 LEARN TODAY DESIGN TOMORROW Conference April 14 18 2008 April 15 17 2008 Convention Center San Jose CA Embedded MON Conference Silicon 29 deliv comprehensive technical program focusing n 15 critical topics that affect your designs Lear
10. W W We brought you the world s easiest to use DOS controllers and now we ve done it again with Linux bh T The OmniFlash controller comes preloaded with Linux and our development kit includes all the tools you need to get your project up and running fast Out of the box kernel support for USB mass storage S a 3 ie and 802 11b wireless along with a fully integrated C 9 High Quality Clock Calendar puts the OmniFlash ahead of the j competition NN Competitive Price e Call 530 297 6073 Email sales jkmicro com 7 On the web at www jkmicro com URL WWW EZ PCB com mail salesiDnezpcb com el 86 139 1002 1704 HDI Up 50 Layers 2 5mil TA 0 1mm Hole Size JK microsystems Ota Pr AE Me regens i T 5 64 Issue 212 March 2008 CIRCUIT CELLAR www circuitcellar com i Ei pe re n M 2 al 4 i i I Sies Dy jm are se zi i 7 d n UE LII and oer Im s CALIL CIH Gt ae TH if um I LEJE ATA BTE EI Psed Eur Hhar dr Ld u zb 2 d m m I m u n M x E T zma mca mm H m m E gor ht T FF Gy DT r on Ene Ete m Eo 2 dd P Ai ce eee ee MM es i db Hu EL m m Efe piod rah fT NF of pum E Et ma nauis mn dj pui Ee 7 Ee s a a oe
11. HIP 11 767 Spectral F7 lb Ilv SB Apparent magnitude 1 97 Absolute magnitude 4 60 RA 2 h 31 84 min DEC 89 2640 Type Binary star Separation 18 4000 arc sec Table 1 SkyScout s database reveals plenty of infor mation about constellations including common and proper names as well as brightness and where it is located in the celestial coordinate system CIRCUIT CELLAR Trinity College presents 15th Annual Fire Fighting Home Robot Contest 5 5 of all ages as they gat G loin robot ent orm pete in di isions initv College Hartford CT See how Roboties Sump Efe vd Gh exciting robot inmeauation amp panday Issue 212 March 2008 71 Name Jupiter Here a fixed RA and DEC won t Diameter 139 822 km 86 833 7 miles work The RA and DEC must be Mass 1 90e 27 318 Earths calculated This is based on where Orbital period 11 86 Earth years the Earth is within its orbit and Rotation period 9 94 Earth hours where Jupiter in this case is within Orbit radius 1 557 million km its orbit A two line element TLE Apparent magnitude 1 85 is a data record that describes an RA 17 h 19 96 min orbit s features Date and time infor DEC 22 8579 Table 2 The planetary data
12. Se LL LI FERDE errs CANDIP AVRICAN _ y WT ACME FOX Boards s gt E ther iu AVR ee r VISA AMEX Start with www circuitcellar com microchip2007 ora ine Free one time setup subject to approval wwwimylydia com ATERN 1950 5th Street Davis CA 95616 USA __ Host USB Ethernet CompactFlash 5232 z Relays ADC DAC and TFT E E ies F Eas program in C C Two USB Host Ports for USB Flash Disk Keyboard mouse 100M Base T Ethernet 6 9232 1 0 5 7 TFT support 16 ch 24 bit ADC 11 ch 12 bit ADC 8 ch 16 bit DAC Sis U CompactFlash card with FAT file 3169 system support Solenoid drivers and Reed Relays 60 Low Cost Controllers with ADC DAC Solenoid drivers Relays CF LCD DSP motion control UARTs 300 1 05 Custom board software design Save time and money al preteen INC Tel 530 758 0180 Fax 530 758 0181 www tern com e ARGH com www circuitcellar com CIRCUIT CELLAR Issue 212 March2008 89 90 The 69 PLC Work as Stand Alone Ladder Logic PLC Or as Smart Remote 1 05 of PC PLCs RS485 allows 256 units to be networked ae RS232 RS485 Incredibly Easy to Program Our software is used by many colleges for teaching PLCs Get Free Ladder Logic Simulator Hi www tri plc com cci htm 7 Tel 1 877 874 7527 PLC specialist
13. Whereas the geo graphical coordinate system uses the prime meridian s intersection with the equator as the starting reference point the celestial coordinate system uses the arc between its poles that passes through the first star in the constellation Pisces as a reference of time zero 00 00 00 Twenty four wedges create a longitudi nal line every 15 degrees or one hour 360 24 hours see Figure 2 Thus time is used to indicate a right ascension to the west in hours minutes and seconds the amount of time it takes the Earth to rotate from the reference to the object of desire 00 00 00 to 24 00 00 Just like latitude lines in the geo graphic coordinate system declination DEC is given in degrees north and south of the equator Only in the celestial coordinate system the degrees are designated by using instead of and instead of S I like to think of the radius of this Figure 2 The celestial coordinate system uses time designated as right ascension RA and angle of declination DEC from a reference point where the celestial equator crosses the arc passing through the first star of the constellation Pisces Source www celestron com c2 images files downloads CPC800 11073 pdf www circuitcellar com Photo 1 You can clearly see the light pollution of the east ern seaboard as seen from the space shuttle as it passes over the Long Island Sound Source Earth Sciences and Image Analys
14. concept The only differ ence is in the search for ones The search is now from the leftmost bit to Figure 5 For any integer or fractional multiplier M the CSD conversion of multipliers is done to reduce overhead Stepwise grouping of adjacent binary 1s with the number of reductions in each case is shown The integrity of the multiplier after conversion to CSD is also verified www circuitcellar com Methods CPU cycles Code size Result Absolute error Horner s method 33 68 bytes 10656 0 38979 Horner with CSD 27 56 bytes 10656 0 38979 Existing method 14 107 54 bytes 9954 702 38979 Existing method 15 54 bytes 10665 8 61021 10656 38979 0 uses a ternary set 1 0 1 compared to a binary set 0 1 If looked at carefully the number of steps in Horner s algorithm depends on the number of 1s present in the multiplier The CSD format attempts C Floating point library 322 bytes to reduce the steps by grouping consec utive 1s in the multiplier and replacing them with a combination of the ternary set 1 0 1 This modification reduces the number of add operations for multi pliers that have groups of consecutive 1s By examination the CSD representation would never have adjacent 1s or 1s Table 1 This evaluation of Horner s method is done with comparisons to other methods on the MSP430 platform For consistency the same mul
15. embedded designer Combine these new age MCUS with other advances e g sensors wireless and Internet and the race for new applications is on You ve got some really strong horses to choose from Now it s time to ride al Register address eripheral reaist Clear bits Register address 4 t bit Register address 8 t bit Register address 12 Figure 6 1 the beginning RISCs were all about reducing hardware by doing things in software Unfortunately that doesn t work well for control tasks such as bit I O The solution as embodied in the PIC32 is simple reduce software by doing things in hardware www circuitcellar com Tom Cantrell has been working on chip board and systems design and marketing for several years You may reach him by e mail at tom cantrell circuitcellar com SOURCES Cortex M1 Soft core FPGA Actel Corp www actel com NIOS II Soft core FPGA Altera Corp www altera com CAP Metal mask programmable SoC Atmel Corp www atmel com Coldfire 32 bit Microcontroller Freescale Semiconductor Inc www treescale com IDE RTOS and TCP IP IAR Systems Software Inc www lar com PIC32 Microcontroller Microchip Technology Inc www microchip com LPC2900 LPC3000 and LPC3180 Microcontrollers NXP Semiconductors WWW nxp com H8 RX and SuperH Microcontrollers Renesas Technology Corp WWW renesas com STM32 Microcontroller S TMicroelectronics www st
16. first should be obvious from the cir cuit topology If circuit legs A and C or B and D are inadvertently active at the same time no current goes through the motor Instead there is a direct power to ground short through the drivers which will almost certain ly overheat and then destroy one or both of the drivers The second issue becomes a prob lem as a result of the first Motors usually require a fair amount of cur rent and this means that the drivers don t turn on and off very quickly So it isn t enough to guarantee that both drivers on one side of the H bridge are not on at the same time they must also have some non overlap time The RIO contains special circuitry that can be used to protect the user from inadvertently running afoul of either of these issues This function is called pin pair protection and is con trolled via a pair of global registers out side the normal channel register set After a device reset all of the chan nel I O pins are inputs If the four I O pins of a particular channel are con nected to the H bridge in Figure 2 the state of the four I O pins will be the default all off state because of the resistors Enabling the pin pair protec tion for the channel pins connected to the left and right legs of the H bridge samples this state and saves it for use by the pin pair protection circuitry From that point on until the next device reset the complement of the stored state which would t
17. integer multipliers were shown separate ly to distinguish their implementation Once this is established a real number multiplication can easily be realized using either of the two approaches The multiplier is scaled up or scaled down to either pure integers or pure fractions and Horner s method applied to them Once the multiplication is complete the result must be scaled accordingly The resulting error is extremely small similar to Equation 1 This makes filtering an easy task without the overhead of a C floating point library CSD REPRESENTATION The CSD format or representation is Visit us Complete Kits Available RZACI4 t H M kLow Cost kIn Stock www ReachTech com 510 770 1417 Bii 842 Boggs Avenue a Fremont CA 94539 Issue 212 March 2008 63 www circuitcellar com CIRCUIT CELLAR Don t be confused by the term terna b dus n Listing 1 This is a section of typical MSP430 microcontroller code for an integer real multiply The dedicated code mainly consists of add subtract and shift instructions only For MSP430 microcontroller the add subtract 1s in a number is merely to replace and shift instructions are single cycle some of the additions by subtractions the fractional case and four in the integer ria mov case This reduction is multiplier ar dependent and effective only when there END are a number of groups of consecutive Easy Emb
18. mu E m zi T SX Chips The SX features an 8 bit timer analog comparator watchdog timer interrupt capability and 75 MIPS With our free SX B compiler programming an SX chip is as easy as programming Calling all programmers Sign up to enter your project in the Propeller Design Contest See www parallax com go propellercontest for details rules and restrictions Last day to request a project number is a BASIC Stamp with a great September 01 2008 quantity price Available in 5 package types including 20 28 and 48 pin varieties Monday Friday 7 a m 5 p m PST BASIC Stamp is a registered trademark of Parallax Inc Propeller SX Parallax and the Parallax logo are trademarks of Parallax Inc To place an order visit www parallax com or call our Sales Department toll free at 888 512 1024 com
19. t a zero sum game see Figure 1 As long as Moore s law keeps deliver ing more for less there will be plenty of sockets to go around for everybody MCU VS MPU The emergence of the latest generation of 32 bit chips once again raises the question of just what s the difference between a microcontroller MCU 80 Issue 212 March 2008 and a microprocessor MPU In the old days the answer was pret ty simple If a chip had onboard mem ory and I O enabling it to run stand alone as a single chip it was an MCU Otherwise i e external memo ry and it was an MPU End of story As a practical matter for a long time you could safely say MCUs were general ly 8 bit and virtually all 32 bit chips were MPUs That simple sin gle chip criteria is still pretty valid but obviously the business about bit ness has changed Of late I ve adopted a more soft ware centric approach to the question These days I divide the world into two camps If a chip is designed to run big ticket software such as Windows Windows CE Linux and more it s an MPU If it isn t it s an MCU 2004 2005 2006 EJ 8 bit EJ 16 bit O 32 bit Figure 1 Development tool sales are a good leading indicator of design trends Today 8 and 16 bit MCUs still dominate unit shipments and indeed designs continue apace But as this sales data from tool supplier IAR Systems Software shows 32
20. to 90 S south of the equator For instance the location 0 longitude and 0 latitude defines a point off the shore of Africa It wasn t until 1884 that Greenwich Issue 212 March 2008 69 field From our vantage point all objects outside our solar system appear to be motionless If the first stargazers were able to take photographs of the constellations thou sands of years ago and we compared them to what we see today there would be differences That is because most stars in a constellation are at different distances from us Each moves at its own rate changing the general shape of the constellation s pattern by very small amounts Imagine for now that we had no sun and it was night 24 hours a day This means that we would always be able to see the stars In 24 hours we would see a complete tour of the constellations as the Earth makes one complete rotation If we picked out a star such as Betelgeuse in the constel lation Orion and timed how long it takes the Earth to rotate bringing Betelgeuse back to the same position in the sky it would not be 24 hours 24 00 00 but 23 56 04 Hmm Because the rotating Earth moves in an orbit around the sun it needs to rotate past 360 to get pointing back to the sun see Figure 1 So when we say the sun rotates 360 every day this is in reference to the sun a minor player This definition of a solar day is 24 00 00 in length From the per spective of the
21. www circuitcellar com error checking to the communications protocol would enable the protocol to be used on any radio module Users of the communications system would not have to worry about finding a radio module with error checking built in They would be able to find any radio module and plug it in Another important improvement would be to modify the protocol to allow for multiple slave devices enabling the multiple helicopter sce nario described in the introduction This would require changing the pro tocol packets and firmware to include an address byte or bytes The Google Maps control is coded specifically for our helicopter project so another recommended improvement would be to make the Google Maps control more general pur pose and extend its functionality There are several functions written in the JavaScript that are not yet implemented in the NET control One example is importing way points from an XML file We also have some recommendations to improve the indicators class Cur rently it is made to simulate an aircraft control panel It would be beneficial to make it more general purpose as far as how it looks Also adding more con trols such as thermometers seven seg ment displays or redline range events would add to the functionality il Michael Ghazi s michael ghazi ca six years as a naval communicator in the Canadian Forces prompted him to undertake the task of designing the RF system fo
22. 1 microcontroller programmer Create cash thru per copy licenses Secure delivery of your intellectual property to customers No rip off copies by subcontractors EZ archive Your code stays onboard Plug in mo wires m mol peim n pa ee penis Pending It can fly Airmail upgrades to customers Low cost From as litte as 32 each at Mouser amp Digikey mial Acts An exciting product for al microcontrot ar developers Damian Coccio NuWave Products Aw TEAclipper W iw exipgnel com wu mexwax com Electronic and Electro mechanical Devices Parts and Supplies Wall Transformers Alarms Fuses Relays Opto Electronics Knobs Video Accessories Sirens Solder Accessories Motors Heat Sinks Terminal Strips L E D S Displays Fans Solar Cells Buzzers Batteries Magnets Cameras Panel Meters Switches Speakers Peltier Devices and much more www allelectronics com Free 96 page catalog 1 800 826 5432 Controllers cee EVER ERE 1 SEU STA E pm e PE C TA a So dat mus ON Y pom 9 90 ncludes ATMegab4 Microcontroller 64kbytes Flash Program Memory Up to 53 VO Points Channel 10 bit A D deal As plug in Controller Direct Program Download Also Available ET AVH Stamp Development Board with P B s LED s LCD Connector etc wwWw futurlec com www circuitcellar com Solve complex s
23. CS700A signal generator 249 I2C for PCs di PCI93LV industry standard 12C card for PCs WINI2C PCI software gives windows interface to develop and debug 2C bus systems UCA93LV is USB version Transparently monitor at 400kHz 499 Fiveco TCP IP server with I2C 19 x digital I O 5 x 10 bit A D inputs and UART serial interface Connect I2C devices sensors to an Ethernet network FMod TCP from 250 Easily create mesh networks at 910 2 like Zigbee only better Complete RF solution for fast amp reliable data transmission B915FHtiny plus 40 SMD WA 64 B915FHtiny plus 40 DIP EA 804 ie world for unique time saving produ D display kits Ethernet IO USB enders line testers logic analyzers colo t to ask for your FREE Starbucks card w 15 20M 15 20MHz USB 14 bit Function Arbitrary wim Generators 10 built in wfms FM AM PM FSK SWEEP and BURST 6 digit 200MHz frequency counter DG1011 DG1021 650 795 Ce i Winner my PS5204 2 ch 250MHz Scope with 128 MS s and real time sampling of 1GS s Adv triggering 250MHz spec analyzer and 125MS s waveform gen PS5203 32MS buffer 2237 PS5204 128MS buffer 3360 Handheld Scope 20MHz or 60MHz rugged handheld USB scope with 3 8 color LCD Built in meter great for your tool kit HDS1022M 20MHz 499 HDS2062M 60MHz 699 Blue amp White LCD Comfile LED backlit 4 x 20 character display CuNET RS232 or 12C communication to 115Kbps BAS
24. H j There are Merally thousands of pages of imnovalive embedded systems applications crammed into one venue wew circultcollar com The expanded appli secban we ve created over Ihe years In cludes source code schematics and design insight from your peers It continues to grow by leaps and bounds delivering an amazing online supplement to Circuit Callar s print magazine It s all yours to view far free Start with the latest project postings from the Dessanttellaria2005 Contest With sa many applications from so many designers around the world you re bound to find a ton of useful tips and techniques Check back often for the latest addilions Start www circustcellar comicontests Contents Under Tiny Linux controller 16MB fast SDRAM 10 100 Ethernet 64MHz Coldfire MCU 3 serial ports R5232 4 5 MB flash memory 1 CAN port SD card socket to 2GB LCD KPD port Eclipse CDT dev env Free serial debugger 55 I O pins amp capabilities to burn pun Ea te T p 7 y a 24 STOS www circuitcellar com www schmartboard com KGI ANYON Can Now Easily Hand Solder Surface Mount Components instruments Even A 10 for PCs Year Old gt electr nica Weather www aagelectronica com TFT LCD TOUCH 219 5340 TPC 35 Linux 2 6 on ARM USB Host Dev SD 300 1885 processoy s 13 MHz DOS wi Flash Fi
25. Integrated LIN and CAN modules for networking Watchdog with dedicated On chip Oscillator Power on Reset Voltage Detection Circuits and Data Flash gt Motor Control Focused Product Groups Source Gartner March 2007 2006 Worldwide Microcontroller Vendor Revenue GJ07168 Get Started Today Go online and register to be eligible for a FREE R8C Tiny Starter Kit www america renesas com ReachR8C d Only available to customers in North and South America Renesas Technology Corp April 15 17 2008 A Microchip 1 O Bit Embedded Control Design Contest WINNERS ANNOUNCEMENT The Microchip 16 Bit Embedded Control 2007 Design Contest gave the world s most talented engineers a chance to test their design skills and learn more about Microchip s 16 bit microcontroller and digital signal controller DSC families Thank you to everyone who participated in this contest To see the complete projects and more www circuitcellar com microchip2007 FIRST PLACE Variable Speed Induction Motor Controller Variable speed drives for AC induction motors are readily available on the market But what if you need one for a single phase motor that operates in the 2 HP range This innovative controller is the solution Designed for use with a capacitor start capacitor run motor it includes active power factor correction PFC and inrush current limiting The motor drive hardware is built
26. PAR High select serial JOCS Chip select JOCS Chip select IORD Read strobe GPINIA General purpose In IOWR Write strobe GPIN S General purpose In A 2 Channel select 2 GPIN 2 General purpose In A 1 Channel select 1 GPIN 1 General purpose In A 0 Channel select 0 MSB LSB MSB First LSB First G C Global Channel select S RN Serial RabbitNet P l Pointer Indirect BIDI NORM 1 Wire 2 wire Data WAIT Wait request SERO Serial data out D 7 Data Bus 7 SERCLK Serial clock D 6 Data Bus 6 SERIO Serial data in out D 5 Data Bus 5 Ch6Port 3 Channel 6 I O D 4 Data Bus 4 Ch6Port 2 Channel 6 I O D 3 Data Bus 3 Ch6Port 1 Channel 6 I O D 2 Data Bus 2 Ch7Port 3 Channel 7 D 1 Data Bus 1 Ch7Port 2 Channel 7 D 0 Data Bus 0 Ch7Port 1 Channel 7 INT Interrupt request INT Interrupt request Table 1 The RIO can be used with either a parallel bus interface or a serial bus interface The parallel bus requires six of the 32 available channel 1 05 CIRCUIT CELLAR www circuitcellar com Match 0 Match 1 Match 2 Match 3 Dec end Status 2 Limit S EE ee 03 Figure 1 All eight identical channels are built around a 16 bit up down counter and four I O pins first the address and transfer direction information is written to the
27. Services Inc 91 Intec Automation Inc C4 Parallax Inc 49 Tibbo Technology Inc 1 Cypress MicroSystems Inc 86 Ironwood Electronics 86 Phytec America LLC 87 Tin Can Tools LLC 86 DLP Design 64 91 JKmicrosystems Inc 39 Pico Technology Ltd USA 88 Trace Systems Inc 74 DMM Technology Corp 2 90 Picofab Inc 90 Triangle Research Int l Inc 85 Decade Engineering 67 Jeffrey Kerr LLC 90 Pioneer Hill Software 71 Trinity College Robot Contest 87 Designnotes 5 Keil Software 40 Pololu Corp 92 VANTEC 68 EMAC Inc 23 Laser amp Electronics 91 Pulsar Inc 88 Willies Computer Software Co 82 ESC West 67 Lakeview Research 42 66 Rabbit A Digi International Brand 47 Wiznet 90 Earth Computer Technologies 87 Lawicel AB 87 Rabbit A Digi International Brand 86 Zagros Robotics 66 Elprotronic 18 Lemos International 63 89 Reach Technology Inc 90 Zanthic Technologies Inc 22 ExpressPCB 50 Linx Technologies 25 57 Renesas Technology 64 ezPCB 89 Loadstar Sensors Inc 87 Robot Power 86 FDl Future Designs Inc 73 Luminary Micro 50 58 Saelig Co Preview of April Issue 213 ATTENTION ADVERTISERS Theme Embedded Programming ATA 1 0 Use ATA Interfaces for General Purpose 1 0 Applications Simple Hardware Development Programmable Power Build a Simple USB DAC Do It Yourself Motion Controlled Gaming Part 2 Manipulate 3 D Graphics Video Stamp A Video Display for Debugging Programs Embedded Linux Development Part
28. Wii is built around the micro controller to support its operation and RAO ANO RAZ AN2 VREF CVREF RAS ANS VREF RA4 TOCKI C 1 OUT RAS AN4 SS HLV DIN C20UT RAG OSC2 CLKO RAT7 OSCT CLKI RB INTO FLTO AN12 RBT1 NT1 AN10 RB2 INTZ AN8 RB3 ANS CCP2 RB4 KBIO AN 1 1 RB5 KBI1 PGM RBS KBIZ PGC RB7 KBIS PGD REO RD ANS RE1 WR ANG RE2Z CS AN7 RE3 MCLR VPP VSS VSS PIC18F4520 Vpp MCLR Vdd Target Vss ground enable the delivery of standard embed ded systems labs see Figure 1 The center piece of the board is an Analog Devices ADXL330 Because of investigations by the folks at Spark Fun Electronics I know that this is the same accelerometer used in the Wii controller My excitement about using this part was tempered by the knowledge that it came housed in a difficult to solder 16 LFCSP package The bypass capacitors on the ADXL330 s outputs were selected to give the device a bandwidth of 50 Hz fast enough for most human move ments At the outset of this project I knew that Microchip s ICD2 module was capable of programming the part but at 160 it was not an option the students would be able to afford At 35 I thought the PICkit 2 would be a great programmer but I was not cer tain how it would perform in a pun ishing laboratory environment because VDD VDD D1 T1OSO TI3CKI RCO M White T1OSI CCP2 RC1 CCP1 P1A RC2 Q2 2N3904 SCK SCL RC3 SDI SDA RC4 SDO RC5 TX CK R
29. You can use GNAT Ada95 Microsoft Visu al Basic or Microsoft Visual C for laptop based glove applications ETHERNET Ada95 bindings are available for accessing the Internet and web based appliances using TCP IP and sockets I am in the process of building new Ethernet applications using the new WIZnet W5100 TCP IP stack for com munication and a Linksys wireless router for getting wireless telemetry using the Ada95 TCP IP bindings to receive telemetry on a laptop I am also developing new Ada95 applica tions using the bindings and the infor mation provided by Fred Eady in his www circuitcellar com Photo 6 1 plan to use Ada95 to process telemetry received from each of the telepod s sensors will incorporate an Ada95 data collection application This will enable me to remotely control the telepod by issuing wireless motor command messages recent WIZnet article iEthernet Bootcamp Get Started with the W5100 Circuit Cellar 208 2007 THE KERNEL The Windows runtime kernel evolved from a cooperative multitask ing operating system to the sophisti cated preemptive multitasking and multiprocessing operating system that it is today Windows is quite an amaz ing system that can automatically schedule daily weekly and monthly tasks such as maintenance disk defragmentation space compression and more Like the human body Win dows can also repair itself from dam age caused by hard disk bad sectors
30. You need these capabilities so you can use your laptop s serial USB or Ethernet ports to communicate with your embedded robot applications GNAT Ada95 TOOLS The GNAT IDE is easy to learn and use see Photo 1 It provides menus for editing compiling linking and running your Ada95 applications Out put is sent to the Ada output window Photo 3 My Vex Power Glove uses a wireless sensor controller connected to a ZigBee XBee PRO wireless UART that is used to transmit the telemetry to a laptop running an Ada95 data collection application CIRCUIT CELLAR www circuitcellar com www icoptech com Lowest Power Consumption Most Powerful Performance ET L mw em PEE B gi mi mance Enh TOU ams i Energy aav 1 and rerrormance enna Inm Sata Sa We Em Fh Maw tanssii TRON s frau LT TE Fanless Design Built in MTBF Flag Counter Onboard 2MB SPI Flash Disk Support PCI ISA SPI Bus Wide Operating Temp 40 85 C Embedded Vortex86SX PC 104 CPU Module all VartexBb5X U 300MI 2 128MB DOR Onboard supports Asl DB VOATLCD LANIGPIO 4 amp 5 Fully support ISA Bus 4 Support DOS Windows Embedded CE Windows XP Embedded Linux Vega86 6270 SEE VegaB6 5270 PC104 Module E as Low Power 45V 2 2A Onboard 128 SDRAM a 20 30 Graphics with MPEG Accelerator aa Supaaris 25 2 USB VGA LCD AUDIO LAM VartexBBSX CPU 300MHz unm Den
31. a Parallax serial servo controller PSC mounted on my Hero 2007 Robot which uses four Vex motors 4 WD for the motion subsys tem see Photo 5 I used a similar configuration to control the four Vex motors used on the motion subsystem of my telepod robot see Photo 6 I plan to use Ada95 to process the telemetry received from each of the telepod s sensors using an Ada95 data collection application I will remotely control the telepod by issuing wireless motor command messages to it The advantage of purchasing the kit is that the serial connectors and RS 232 voltage level translations along with the power supply and cables are supplied including one board that directly connects to the USB port on the laptop I chose to purchase the kit instead of making the boards for the wireless sensor controller see Figure 1 CONTROLLER RANGE The 100 mW XBee PRO provides a range of up to 1 mile 1 6 and its RS 232 connectivity makes integration simple The range of this controller exceeds that of a standard Vex con troller because the line of sight range is the same as the one specified in the ZigBee protocol The MaxStream XBee PRO provides the maximum range of 300 line of sight indoors The actual range that the reader gets depends on many fac tors including direct line of sight the antenna length and the walls and windows that can block the low power ZigBee sig nal The standard antenna is built into the board bu
32. a built in display controller frame buffer and touchscreen interface NXP has also rolled out their own home grown ARM9 based LPC3000 line starting with the 90 nm 208 MHz 320 pin vector floating point LPC3180 Per the earlier discussion these parts are really MPUs They don t have the flash needed for single chip operation but they include computer features e g virtual memory MMU cache a high speed external bus and more that can handle operating systems like Windows CE and Linux But never fear NXP is filling the high end MCU gap with their ARM9 based LPC2900 series These strip out the MPU features and replace them with flash memory to deliver a high performance single chip solution Atmel is another powerhouse that Photo 1 Check out this cool gadget using NXP ARM7 based LPC2119 MCU Remember when 32 bits was a big deal It s still a big deal in terms of exploding growth and new applications but this time it s a big deal that comes in a single tiny package like NXP offers a full catalog of MCUs ARM7 and MPUs However unlike NXP Atmel uses a stacked die approach for integrat ing memory on their MCUs The virtue of this multi chip in pack age strategy can be debated but there s no doubt that it s the way to go if you want a lot of memo ry Software bloat getting you down Relief is just an AT91 MCU with up to 2 MB of flash memory and 256 KB of SRAM away
33. a e a a reversa Ara cnanneis wiin sopnisticated cross iriggers me E xy sore gs T ut aC E 1 rHXxER ads E T Tr 2 Channel BitScope Pocket Analyzer BitScope DSO Software for Windows and Linux BitScope DSO is fast and intuitive multi channel test and measurement software for your PC or notebook Whether it s a digital scope spectrum analyzer mixed signal scope logic analyzer waveform generator or data recorder BitScope DSO supports them all Capture deep buffer one shots or display waveforms live just like an analog scope Comprehensive test instrument integration means you can view the same data in different ways simultaneously at the click of a button DSO may even be used stand alone to share data with colleagues students or customers Waveforms may be exported as portable image files or live captures replayed on other PCs as if a BitScope was locally connected BitScope DSO supports all current BitScope models auto configures when it connects and can manage multiple BitScopes concurrently No manual setup is normally required Data export is available for use with third party software tools and BitScope s networked data acquisition capabilities are fully supported with the reflow skillet its profile is nowhere near as steep as what is rec ommended by Kester and the maxi mum temperature is not as high as the recommended 550 F The slope of
34. about 2 5 8 bit control registers are required to control www circuitcellar com the operation of each channel Figure 1 shows a basic block diagram of a channel Although the hardware of the counter is 16 bits wide the actual count limit can be set to any value and the counter wraps around while counting in either direction This is very useful when you need some thing that counts by other than a power of two I ll talk about one example when I get to the Position Sensing section Four sets of compare logic and four 16 bit match registers are connected to the counter Each comparator sig nals a match when the count is identi cal to the value in the match register Each match signal can generate an interrupt and be used to set or reset any of the four channel status bits Each of the four channel status bits can be output on an I O pin The sta tus bits can be set or reset by a count er rollover in either direction or by a sync signal more on that later This enables the creation of PWM or pulse position modulation PPM signals A status bit can also be ANDed with one of the least significant bits of the counter to create a pulse train that can be output on an I O pin While the status bits are the pri mary outputs for the I O pins the I O pins can also be used as simple out puts sequenced outputs simple inputs or counter inputs Each I O pin is individually programmed The sequenced output option e
35. altitude that make sense For exam 0x74 0x5A Attitude ple the hexadecimal num 0x74 0x42 Battery status ber 0x50 is an ASCII char 0x74 0x45 Error report acter P This is the char 0x74 0x50 Preflight packet acter used in the command to change the pitch servo pulse width P for pitch However P is also the 38 Issue212 March 2008 0x74 0x52 Rotor RPM Table 2 This is a listing of the communications protocol used in our system The protocol is flexible and it can expand to up to 65 535 commands which would be broken into 256 groups As an added bonus the code is easily modified to accommodate the extra commands CIRCUIT CELLAR which we use in our heli copter for control calcula tions and because we happened to have a stash available to us at school The firmware which is essentially an onboard packet parser comprises two separate state machines The first state machine checks the packet header and data length copies the data into a buffer verifies that the checksum is correct and checks if the footer is valid If everything is fine it sets a valid data flag This starts up the second state machine which parses the valid data packet It checks the first byte to determine which com mand family the com mand belongs to and www circuitcellar com Abe Oscilloscopes a Spectrum ian E x 11 Em E ru E
36. appli cations that require high power connections to a PCB The High Power Connec tor and Contact series devices are available pre assembled in one or two row configurations reducing assem bly costs and eliminating acci dental connector separation Con nectors and contacts are also available separately allow ing for the customization of connector configurations The connectors offer high durability and are rated for up to 1 500 cycles under no load and 250 hot plug cycles under a 120 V load When used with the APP Powerpole 15 45 finger proof connector housings the High Power Connector and Con tact series provides a reliable and safe wire to PCB connec tion The connectors are RoHS compliant have a UL rating of 45 A per circuit and use contacts that are composed of copper alloy with tin plating The connectors are available in many colors and with multiple accessories that include mounting wings spacers and board mounting staples The devices start at around 1 21 for 1 x 2 vertical connectors in 1 000 piece quantities Anderson Power Products www andersonpower com www circuitcellar com CIRCUIT CELLAR NEW 8 BIT CONTROLLER SERIES The new Rich series controllers W79E217 W79E227 W79E225 use the Winbond 8051 core which is capable of executing a single instruction in four clock cycles The cores are built in with 64 KB 64 KB 16 KB of flash memo ry and have highly integrated peripheral function
37. applications CIRCUIT CELLAR www circuitcellar com Listing 1 Here is an example of communication between your Ada95 application and a remote robot at 115 200 bps 8 data bits and 1 stop bit used the serial port to access wireless telemetry joystick positions from a wireless sensor controller using the XBee PRO wireless UART KKKKKKKKKKKKKKKKKKKKKKKKK KKK KK KKK KK KKKK KKK KK KKK KK KKK KKKKKKKKKKKKKKEK nitialize Joystick Initialize XBEE Pro boards running the Joystick firmware that are connected to the PC or laptop LOLCOkCkCkckck ckck ckck ckckckckck ckck ckckckckckckck KK KKKK KKK KK KK KK KKK KK KKK KK KK KK KKK KK KKKKKKAKKKSK procedure Initialize_Joystick Com_Port Interfaces C Unsigned_Long IS integer 1 Baud_Rate Joystick_ID begin Initialize_Joystick Open the serial ports for SARD EVB wireless UART at 115200 N 8 1 Name Com_Ports Qpen Com Port exception when E others gt Baud Rate N 8 1 ADA TEXT IO Put Line Ada Exceptions Exception Name E amp eU Ada Exceptions Exception Message E ada text io Put Line Initialize Joystick exception end Initialize Joystick and accept statements and its own deter ministic scheduler make it ideal for hard real time systems that require synchro nization In particular the protected record structure enables two or more tasks to communicate via shared global data critical region without having it c
38. bit MCUs are where tomorrow s action is CIRCUIT CELLAR Obviously there are gray areas The dividing line between big ticket and little ticket software can be blurry For example the term RTOS encompasses everything from a tiny scheduler that fits in a few kilobytes to a full featured OS with megs of code supporting a GUI networking stack file system and more uCLinux and Microsoft s NET come to mind as computer in drag software that can run on an MCU Nevertheless you ve got to draw the line in the silicon somewhere At least for now when I refer to an MCU you ll know what I m talking about ARMs RACE ARM MCUs are unique among all of the others by virtue of their open archi tecture with a bandwagon of licensees parts and third party sup porters that s rolling so fast it s hard to keep up Give NXP Semiconductors under their former guise as Philips Semiconductors credit for being first to shatter the myth that 32 bit chips are only for high end designs see Photo 1 A chip like their LPC2101 may have a 32 bit ARM7 core but other wise it is remarkably streamlined with just 8 KB of flash memory 2 KB of RAM and a small 48 pin package Now NXP is making moves at the high end notably via their recent www circuitcellar com acquisition of Sharp s Bluestreak product line Bluestreak parts like the ARM9 based LH7AO00 bring LCD appli cations into the mix with
39. cause the sol der under the pin to melt After the soldering iron is removed and the sol der is allowed to cool your part will be tacked down to the PCB You can solder the remaining pins with aban don This will undoubtedly create sol der bridges chunks of solder spanning consecutive pins Don t worry about this You can clean the bridges up with your solder braid making a top notch connection Unfortunately the success of hand soldering depends heavily on the skill and patience of the user The other soldering process reflow Issue 212 March 2008 45 Photo 2a Here is a pasty PCB waiting to be cooked on the reflow skillet b Five minutes into the process the paste looks baked dry c Eight minutes into the process the pads are looking shiny This is reflow soldering uses a viscous form of solder called solder paste Reflow soldering has the advantage of requiring little skill beyond putting a dab of paste on the PCB pads and dropping parts onto the pasty pads This assembly is then cooked turning the solder paste into solder The cooking proceeds according to a thermal profile that can be broken down into four phases pre heating soaking reflow and cooling During preheating the assembly is gradually brought up to a temperature below the melting point of the solder During the soaking phase the assem bly is held at a constant temperature below the melting point of the solder to ensure that all o
40. cosmos what we take for grant ed is all wrong The celestial or sidereal day is 00 03 56 shorter With the sun back in place things don t really change It s just our perception that changes because we base our lives on the solar day and not the sidereal day With the sun back in the pic ture we see the stars Figure 1 This graphic demonstrates a solar day and a sidereal day A sidereal day is the difference between time 1 and time 2 or 23 56 04 based on the change in the Earth s position to a distant star A solar day is the difference between time 1 and time 3 or 24 00 00 an additional 00 03 56 based on the Earth s change in position to the sun On a prograde planet like the Earth a sidereal day is shorter than a solar day At time 1 the sun and a certain distant star are both overhead At time 2 the planet has rotated 360 and the distant star is overhead again but the sun is not 1 2 one sidereal day It is not until a little later at time 3 that the sun is overhead again 1 3 one solar day Source http en wikipedia org wiki Earth rotation was adopted as the universal prime meridian 0 Imagine the confusion with mapmakers all using their own designation for the prime meridian EARTH AND THE COSMOS We are so enamored with the sun that we sometimes fail to look at the bigger picture Our solar system the sun and all nine planets yes I still consider Pluto a planet are but a spe
41. direct impact on the accuracy of the results obtained during mathematical operations A hardware multiplier is a module that supports multiplication and multiply and accumulate MAC operations via dedicated central pro cessing unit CPU instructions Most low cost microcontrollers do not have a hardware multiplier module They usually require a lot of instruction cycles to perform multiplication using alternate algorithms Several algorithms have been devised for fast multiply and divide using only shift and add instructions for fixed point processors These algorithms are specific to integer inte ger multiplies or divides This does not mean that they are unable to sup port multipliers or divisors that are pure fractions or real numbers The solution is a form of scaling that con verts all real numbers to integers Dif ferent standards such as Q formats have been introduced to accomplish this on fixed point machines There is however a potential loss in accuracy with such formats due to truncation of the real number on registers with fixed widths Horner s algorithm attempts to reduce this error and improve accuracy This method for multiplication is easily extended to division which is a multiplication by the divisor s reciprocal An innovative scaling free method to implement integer real multiplications will be described in this article Horner s algorithm is based on the 0 2468 x 0 1357 0 00111111001
42. easy development and debug of any CapSense design Its modular approach enables both custom and predefined designs to be completed quickly and easily The development kit comes with predefined control circuitry and plug in hard ware along with controller boards for the CY8C20x34 and CY8C21x34 PSoC devices It also includes a breadboard module and a module for implementing up to five buttons and a slider with sample overlays The kit works with both PSoC Designer and PSoC Express and allows for monitoring and tuning of CapSense designs via an P C to USB bridge that is included in the kit Cypress Semiconductor is unique in offering real time monitoring and tuning which can significantly reduce development cycles The kit supports both the CapSense Successive Approximation CSA and Sigma Delta CSD capaci tive sensing methods CSA offers outstanding inter ference immunity and low power consumption making it ideal for portable consumer applications CSD delivers flawless operation in wet conditions and offers superb temperature response ideal for white goods and other moisture sensitive systems The kit costs 158 Cypress Semiconductor Corp www cypress com Cost effective prototypes and production runs Wide range of materials or customization of provided material Automatic price calculation Fabrication in 1 3 or 7 days Semple price 43 75 plus S amp H By choosing ARM core and standard
43. for sophisticated communication and interface peripherals Learn more about RealView MDK RL ARM and ULINK2 Download a free evaluation version from www keil com demo or call 1 800 348 8051 Microcontroller Development Tools Cx51 Keil 5 is the de facto industry standard for all classic and extended 805 device variants C51 Version 8 5 includes the latest devices such as XC800 ADE7169 and C8051 F4xx F6xx More information www keil com c5 C166 Keil C166 is the complete software development environment for Infineon C166 66 XC2000 and ST Microelectronics STIO with debug and programming support via ULINK2 More information www keil com cl 66 ARM RealView MDK combines the best in class ARM C C Compiler the genuine Keil yu Vision IDE Debugger Simulator and the royalty free RTX RTOS Kernel More information www keil com arm Keil MCB evaluation boards come with code size limited tools and extensive example projects that help you get up and running quickly with your own embedded application More information www keil com boards March 2008 Robotics FEATURES 14 Robotics with Ada95 Daniel Ramirez 26 CONTEST WINNERS Microchip 16 Bit Embedded Control 2007 Design Contest 30 Vertical Plotter System Miguel Sanchez 96 Flight Control A Communications System for an RC Helicopter Michael Ghazi Stefan Kaban Scott Morken Carl Philippsen amp Kyle Wong amp
44. large desktop and the other two are large and small laptops All of them are about three years old and use Windows XP Pro For the most part they have been bug free and haven t had any problems installing software for the many programs and devices that like to use However like everything technical these days evolution continues Certainly now that we have dual and quad processors galore could expect to see a remarkable increase in performance in a couple of new top of the line VAIOs with Microsoft s latest and greatest multi processor operating system Vista glad wasn t the first one on my block to try this because it would have been a disaster But in order to get a better handle on reality versus all of the Microsoft bashing bought a dual processor Gateway laptop with Vista Home Premium to see the results of three more years of Moore s Law in action In my opinion Vista is a sexy graphic intensive operating system designed to move us all into the world of flashy video Internet centric living and more Microsoft provided software services and advertising Sounds a lot like Google doesn t it My single processor 2 39 GHz P4 XP seems faster than a 2 6 GHz Core 2 Duo with twice the RAM running Vista And there seems to be very little driver support for the small company peripherals and software packages that am currently using under XP It should have been a clue when did a Google search on Vista sucks and got 150 000 results
45. newer and equivalent dsPIC33F device could be used in place of the dsPIC30F6014 that is even faster 40 MIPS and provides hardware CRC that could be used to process the wireless messages telemetry but I have not tried it for this application THE GLOVE IN ACTION The Vex Power Glove features of a Microchip dsPIC30F6014 based wire less sensor controller that s used to digitize the finger positions flexible resistors and the glove s orientation The XBee PRO wireless UART and receiver Ada95 application are used to receive glove commands to control a prop which can be either a laptop or an animation prop It uses the XBee PRO receiver and a Freescale Semicon ductor MMA1260D Z axis accelerom eter to digitize the glove s current ori entation with three of the dsPIC s ADC pins The glove s orientation is then transmitted back to the laptop see Figure 1 The dsPIC firmware digitizes the glove s finger positions by reading the how the GNAT Ada95 appli cation handles the erroneous sensor readings CIRCUIT CELLAR Photo 4 This is my Vex based Gilbert III robot am upgrading the design so can use the Vex Power Glove as the motion input device Doing so will enable me to collect data remotely by running an Ada95 data collection application on my laptop www circuitcellar com Ultra Small MCUs But That s Only Half The Story pu x m m g F f ig BM e Fully Loaded
46. object oriented programming not just yet he says laughing hysterically But I would put all the call out code in a file named CallOut c The CallOut c file class has two static think of them as private variables and they are listed in the block below the name of the class And the routines or proce dures of the class are listed in the next block I also added a note that you see attached to the class Routines AddCallOutGroupNumb appends a number to the end of the call out group It takes the group number and a pointer to the string of digits to dial It returns no parameters DeleteCallOut Group deletes all of the numbers in a call out group It takes the group number and returns nothing GetNext CallOutNumber takes the current call out number and looks to see if there is a next number to dial If so it returns that next number If not it returns 1 The question to ask ourselves at this point is this can we complete the design with these routines Let s see We need to initialize the CallOut data elements probably at the factory Per haps we ll give the user a means to delete all the numbers Then we need to delete a particular group add num bers to a group and get the numbers in order for a group Looks like we ve got it covered So I sat down at the keyboard and fired up Borland s C BuilderX on a PC I ve discussed this program in ear lier articles I created a new console application I m goi
47. of an entire system is restricted by one component A headphone and microphone system used to com municate over a telephone This type of iron refers to a fast supercomputer The ancient Greek engineer mathematician and astronomer who was killed in Syracuse in 212 BC Fi Issue 212 March 2008 93 INDEX OF ADVERTISERS The Index of Advertisers with links to their web sites is located at www circuitcellar com under the current issue Page Page Page Page 91 AAG Electronica LLC 88 FlexiPanel Ltd 87 MCC Micro Computer Control 88 Saelig Co 56 AP Circuits 88 FlyPCB China Co Ltd 88 MaxBotix Inc 91 Schmartboard 85 10 Front Panel Express LLC 90 92 Micro Digital Inc 11 SEGGER Microcontroller Systems LLC 88 All Electronics Corp 88 Futurlec 55 Microchip 92 Senix 89 Apex Embedded Systems 13 Geist Technology 92 microEngineering Labs Inc 21 Silicon Laboratorie Inc 7 Atmel 68 Grid Connect 95 Mouser Electronics 56 91 Systronix 48 Bitscope Designs 87 Hagstrom Electronics 89 Mylydia Inc 92 TAL Technologies 65 CWAV 90 HI TECH Software LLC C2 C3 Tech Tools 79 CadSoft Computer Inc 74 HobbyLab LLC 3 Noritake Co Inc 91 Technical Solutions Inc 10 Calao Systems 17 COP 67 Nurve Networks LLC 32 33 Technologic Systems 41 Comfile Technology Inc 87 87 Electronics Inc 90 Technological Arts 90 Crossware Products Inc 89 IMAGEcraft 81 PCB Pool 89 Inc 86 Custom Computer
48. of the Microchip 16 Bit Embedded Control 2007 Design Contest are listed on page 26 Congratulations to all of the winners Cac cjQcircuitcellar com Issue 212 March 2008 CIRCUIT CELLAR CIRCUIT CELLAR THE MAGAZINE FOR COMPUTER APPLICATIONS CHIEF FINANCIAL OFFICER Jeannette Ciarcia MEDIA CONSULTANT Dan Rodrigues CUSTOMER SERVICE Debbie Lavoie CONTROLLER Jeff Yanco ART DIRECTOR KC Prescott GRAPHIC DESIGNER Carey Penney STAFF ENGINEER John Gorsky FOUNDER EDITORIAL DIRECTOR Steve Ciarcia MANAGING EDITOR C J Abate WEST COAST EDITOR Tom Cantrell CONTRIBUTING EDITORS Jeff Bachiochi Ingo Cyliax Robert Lacoste George Martin Ed Nisley NEW PRODUCTS EDITOR John Gorsky PROJECT EDITORS Gary Bodley Ken Davidson David Tweed ASSOCIATE EDITOR Jesse Smolin ADVERTISING 860 875 2199 Fax 860 871 0411 www circuitcellar com advertise PUBLISHER Sean Donnelly Direct 860 872 3064 Cell 860 930 4326 E mail sean circuitcellar com ADVERTISING REPRESENTATIVE Shannon Barraclough Direct 860 872 3064 E mail shannon Q circuitcellar com ADVERTISING COORDINATOR Valerie Luster E mail val luster circuitcellar com Cover photography by Chris Rakoczy Rakoczy Photography www rakoczyphoto com PRINTED IN THE UNITED STATES CONTACTS SUBSCRIPTIONS Information www circuitcellar com subscribe E mail subscribe circuitcellar com Subscribe 800 269 6301 www circuitcellar com subscr
49. or charcoal stick The compact portable system consists of a pen holder hanging from pul leys on two stepper motors In this article he describes the entire process from hardware development to programming the system history painters have used whatever technology was available to help them with their art It is believed that Johannes Vermeer like other Dutch masters used a dark chamber to help him lay down the detailed and realistic impressions on his paintings The bot tom line is that the use of technology is not cheating or at least that is what my wife told me when I began toying with the idea of building a painting machine to help her with her paintings after spend ing a weekend serving as her painting machine The goal of this project was to build a system that could use a pencil or charcoal stick to draw the contour of a scene that you want to paint on a canvas see Figure 1 Of course there is still a lot of work for the artist s hand afterwards but it helps to have this first step done quickly Plus it is easily repeatable if you are planning a series of the same image One problem with the sys tem was that the size of the painting area was not always the same and I did not have the room for a large painting sys tem My first idea was to build an XY plotter with a couple of stepper motors but such a sys tem would require a lot of space and would have to be built for the maximum canvas size I w
50. polling the joystick and keyboard for operator input Best of all the GNAT Ada95 tool suite is free It has already been paid for by U S tax payers A new release of Ada 2005 is already going through the ISO approval process and I hope the GNAT 2005 tools will also be available at no cost to the user The tool suite includes a graphical user interface IDE a GNU Ada95 compiler translator and GNU In addition a debugger gvd or gdb is also available and directly executes from the IDE Even non Windows users can take advantage of programming in Ada95 because it also runs in UNIX and LynxOS Libraries for accessing the serial port COM and the graphics display are also available There is even a TCP IP library available that enables Ethernet programming UDP data grams Windows sockets and more Ada95 variable attributes include ranges types and subtypes which provide the basic data types used to increase software safety and reliabili ty Because range checking or limit checking is performed automatically during the execution of an application by the Ada95 runtime if variables exceed their predefined limits or ranges they will generate an Ada95 exception The exception can be han dled by the local package procedure or function or propagated to a higher level or handled by the software designer Other runtime errors that can generate Ada95 exceptions include file I O errors invalid user input math overflow
51. problem If you do as I did your image file s paths are stored in the file in a way that might be far from optimum when using a mechanical system like this one However this is not significant if you are drawing on a computer screen The lack of this optimization means that the pen holder might be moving up and down all the time instead of concentrating on the paths on top of the image before starting to draw those on the bottom This will trans late into a much longer but possibly entertaining drawing time I contacted Professor Michael Trick an expert on Operations Research at Carnegie Mellon University who kindly provided me with a simple and elegant solution A travelling sales 5V 4 12V Pen holder motor bipolar USB Motor controller board L man problem is built using all the endpoints of all the paths on the drawing The cost between the end points of the same path is set to a negative value For any other cost between endpoints the Euclidean dis tance is used The problem can be solved using Concorde software that s freely available from Georgia Tech University A second improvement I have in mind is to monitor the pencil I want the system to warn me when the tip is too dull for drawing Although the hanging belts are mod eled as straight lines they are not In fact for those of you who are curious enough the two belts form segments of a curve called a catenary A cate nary is
52. schemes when we were done PERFORMANCE EVALUATION We tested the communications sys tem and determined the data rate was 517 bps We calculated this with a meas ured time per byte of 17 4 ms which is close to the datasheet s minimum spec ified value of 15 978 ms The latency of the packets varied depending on packet length with an average delay of 46 75 ms We measured this delay as the time from when a set of outgoing data is loaded into the radio s buffer to when an acknowl edgement is received Our latency meas urement does not take into account the unpredictable delay caused by the non real time nature of Windows XP The message throughput can vary depending on which error rate is consid ered acceptable We made two measure ments At 3 03 packets per second we determined the error rate was 2 0596 At 4 08 packets per second the error rate was 2 3396 The two packet rates were used to illustrate the trade off between the packet throughput and the number of errors that occur As packet throughput increases the error rate also increases PROTOCOL The protocol we developed is a set of rules that enables us to maintain Issue 212 March 2008 37 the base station can t know when an onboard error will occur To ensure that all transmissions from the base station Checksum Footer 0x00 OxCE OxCC Sum of data and length Header 0xA5 0x5A 0x45 Command 0x32 Payload
53. see Photo 3 The pen s up down system uses a floppy s bipolar motor But outputs of the controller were not suited for a bipolar motor I kept a small piece of the PCB from the original floppy disk driver circuit see Photo 4 This made the bipolar motor easy to inter face using the unipolar outputs intended for a third motor That was when I realized that full control of each output line as opposed to a real stepper motor controller proved quite useful here The bipolar controller used on the floppy drive was Sanyo s LB1656 which used a couple of logic signals D1 and D2 to control the polarity of each one of the stepper motor coils see Figure 2 A third logic level enabled the selection between Hold and Seek actions Seek sends 12 V to the coils while Hold is only 5 V the higher the voltage the more torque I set the pin to Seek when I want the motor to move I set it to Hold when I CIRCUIT CELLAR want it to stay still MATH If you are familiar with the Pythagorean theorem Gougu s theo rem for Chinese readers you can understand how the system works If you aren t trust me it works The two motors operating the pul leys control the lengths of the two belts the pen holder hangs from see Figure 2 The two motors are located at a particular distance L from each other The left triangle is defined by the left motor the pen holder and the intersection from the horizontal line from the pen holder and
54. since 1993 Freescale 9S12C microcontroller DIP modules freescale Alliance Marnber www nanocore12 com Toll free 1 877 963 8996 8051 COLDFIRE Three quality tool suites a C C a Code Wizards a Debugging a Simulation a Support Embedded C for ARM and ColdFire only Advanced software tools since 1984 www crossware com 360 812 2397 d E a E c Q o gt e Lu pus n Issue 212 March 2008 800 366 2491 SpectraPLUS 5 0 Audio Spectrum Analysis Features Sound Card based I O FFT sizes to 1048576pts 1 96 Octave Up to 24 bit 200kHz sampling rates 3 D Surface and Spectrogram Digital Filtering Signal Generation THD IMD SNR Transfer Functions DDE Macros Data Logging Vibration Analysis Acoustic Tools FREE 30 day trial www spectraplus com Pioneer Hill Software PH S 360 697 3472 voice pioneer telebyte com HI TECH SAVE 0 ANSI C COMPILERS supporting Microchip PiCmicro MCUs and DSCs For more details go to www htsoft com portal CC_50 PICmicro is a registered trademark of Microchip Technology Inc FAT 12 16 32 FILE SYSTEM DOS Windows Compatible USB Flash Disk USB Floppy amp Hard Disk SD MMC CompactFlash ATA IDE DiskOnChip NAND amp NOR Flash 10KB RAM 25KB ROM typical Low Cost No Royalty Full Source Code www smxrtos com Micro Digital Inc RTOS Innovator
55. stage and protect the bearing surfaces from contamination The vertical orientation of the seals easily deflects debris away from the stage Competitive top seal designs can ingest debris in the seal resulting in the eventual failure and replacement of the seal ing mechanism The tabletop can be outfitted with an optional brush assembly to remove any particles that collect on the hard cover The ATS165 has a NEMA 23 motor flange mounting interface and can be ordered with a standard brushless slotless rotary motor installed The stage can also be ordered without a motor so third party DC brush brush less or stepper motors can be used The stage is equipped with a ground 5 mm rev ball screw that provides 0 5 um resolution and can be outfitted with English and metric bolt hole pattern tabletops A stage mounted brake option is available to prevent you from back driving the screw when power is removed from the servomotor when the stage is in a vertical orientation A fold back kit is also available to pel effectively reduce the overall stage length for space constrained appli cations The cost of the ATS165 is dependent on the exact configura tion ordered You may contact Aerotech for a quote Aerotech Inc www aerotech com HIGH POWER PCB CONNECTOR The new High Power Connector and Contact series enables high current connections directly to the PCB The High Power Connector is an ideal solution for
56. t let those tiny SMT devices intimidate you All of my 30 students got their boards to work CIRCUIT CELLAR used as a pointer device The goal was to have students in my class assemble their own DIY Wii controller and build an embedded application and PC applications This would enable them to interact with graphics programs running on a PC using gestures in the same way that gamers use the Wii controller to interact with games run ning on the Wii console REQUIREMENTS While the eventual goal of the project was to have stu dents build a device that could communicate acceleration information to a PC it also needed to be flexible enough to realize a variety of standard embedded systems projects These projects would need to demonstrate concepts such as PWM frequency modulation parallel and serial communica tion and switch debouncing to name a few Given the diverse backgrounds of the students the system needed to be easy to assemble the con struction of the device could not require any sophisticated techniques the system had to be relatively inexpensive the software development tools had to be inexpensive so stu dents could purchase them and work on their home PCs Issue 212 March 2008 43 and finally the system had to be self contained not requiring special power supplies or other non essential support hardware The device that was creat ed to meet the requirements is shown in Photo 1 As you can
57. that needs to run in either direction is with an H bridge An example of an H bridge using MOS FET transistors is shown in Figure 2 Other types of drivers are also possi ble ranging from bipolar transistors to relays But it s the circuit topology that s important for this discussion not the exact characteristics of the drivers used The four signals needed for an H bridge are the main reason that there are four I O pins per chan nel in the device To drive the motor in one direction circuit legs A and D are enabled pro viding a power to ground path in one direction through the motor For motor rotation in the opposite direc tion circuit legs B and C are enabled providing current flow in the opposite direction through the motor The motor will run at full speed while the current is continuous PWM is normally used to vary the speed if required This works because the Figure 2 Driving a motor in both directions is usually done with an H bridge But don t ever turn on both driv ers on the same side Issue 212 March 2008 53 Raw B Sample A Output B Output Figure 3 The pin pair protection guarantees that both drivers on the same side of an H bridge will never be on at the same time It also guarantees a dead time between changing the motor direction motor inherently acts like a low pass filter for the pulse width modulated current There are two issues with an H bridge that complicate its use The
58. that phrase L7 4 Uta steve ciarcia circuitcellar com IEK Issue 212 March 2008 CIRCUIT CELLAR www circuitcellar com m TE zi ay a meme rr m Ir uet i mlt T e 3 1 CEMEGER AERE ES ERE RE HS 9 in E ss all ee ma aD RS mda 15 db XB 1 z anim m am ran m ai n Professional soo ET Hardware Capture iis je Software Analysis js do 35 Automatic Real time Hardware Compression eliminates the neec to reduce resolution Our newest versior makes dead time insignificant Edge and Pattern Triggers on all models cuales ad lode also includes Range gt lt gt lt and Stable Matches with Beata onda flexible cascadable Seque 068 rs with 485 counters Pattern S searches with Match amp Duration Specia lied Sequential Searches Nea Serial and State Mode Signals Display Synchronous 5 1 Asynchronous 5 2302 State Boolean Bus and Analog Data Single or Dual Waveform Views Resolution Zoom in Wave Views Time based Link Groups for all views Specialized Exports from Dati Tables and List Views f que nal Data Tables Drag amp Snap Markers Click to Center function Previous Next function Print or Save Images with commen
59. the Sample profile could be increased by preheat ing the skillet to around 200 F putting the PCB on the skillet and then crank ing up the skillet temperature to 400 F The lack of a peak temperature might be addressed by some adjust ments to the skillet s thermostat Despite these shortcomings the solder paste and SMT components have proved to be up to the task In practice the reflow skillet has produced consis tently excellent results for all of my students My hats off to the folks at SparkFun Electronics for thinking out under the big electrolytic capacitors to from five locations two locations from side of the box and coming up with Thres Thres 3 Strike Figure 4 The sample curve shows the force data from the ADXL330 when worn on a runner s hip reflow and even then I had to go back the surface of the skillet from the solder this simple and low cost technique and touch up two of them with an pad of a 1206 resistor from the solder Aoyue Tongyi Electronic Equipment pad of a brown capacitor and from the THE PEDO SPEEDO 850A hot air rework tool At 10 min solder pad of the audio jack The data To demonstrate the capabilities of utes I shut the skillet off and waited plotted in Figure 3 is compared against the DIY Wii let s examine one of the for the PCB to cool see Photo 2c the recommended profile taken from final projects from my embedded sys While processing the PCB in the photo the K
60. the signals provides rotational velocity information When a separate index pulse is available counting the edges on the quadrature signals enables absolute position to be determined Quadrature encoders are available as off the shelf components with a vari ety of resolutions The most common encoders have either 500 or 512 quad rature cycles per revolution This is where the programmable count limit of the channel counter helps because it allows any quadrature cycle count to be supported The count limit should be set to four times the cycle count minus one because the counter incre ments or decrements on each valid edge of one of the quadrature signals As with the H bridge there are some subtle issues involved in decod ing quadrature signals The first is the handling of invalid transitions As shown in Figure 4 only one quadra ture signal should change at a time Two signals switching at the same time is illegal The second issue has to do with how the signals are created Because they are most often the outputs of photodiodes or other devices that respond to light and that are being interrupted by a mechanical device the signals often have less than ideal switching characteristics In fact if the rotation of the encoder is stopped right where a transition is imminent one output may oscillate The RIO automatically takes care of these two issues The logic ignores all illegal transitions by holding the state of th
61. the vertical line from the left motor The hypotenuse of such a triangle is the square root of the sum of the squares of both legs x and y The other triangle is similar but it is formed with the left motor and with one leg being y the same as the former and the other being L x From the two triangles it is easy to calcu late the respective hypotenuses to locate the pen holder at the desired XY coordinate The stepper motors I am using are Photo 2 This is the USB stepper motor controller that is used in the project Issue 212 March 2008 31 PC 104 Single Board Computers Low Price Low Power High Reliability using Linux development tools 5 7 200 sri mu r ES C irm ppc Options include onboard temperature sensor AD Converter channel 12 bit Extended Temperature Battery Backed Heal Time Chock USS Flash 256 M with ARM Tool Chain USB WiFi Off the Shelf Solutions ready to design into your project using DOS development tools onnoco 5 550 ra thiol Tlash A D R5 4B5 and Renin options include RS 485 Half and Full Duplex A D Converter up ta Channels at 12 bits DAC up to 2 Channels at 12 bits Extended Temperature 200 MHz ARM9 Power as low as 1 4 Watt 2 boards over 2000 configurations Fanless no heat sink SDRAM up to 128MB Flash up to 128MB onboard E yj 10 100 Ethernet up to 2 DIO lines up t
62. to the con ventional binary multiplication routine for integers Because it is the last binary 1 it does not have any ones to the left there fore only its bit position is applied as the weight to the intermediate result to give the final product i e 2 The result is the final product Final product x x 2 8 The procedure can be validated by back substitution to give the same result as the conventional multiply see Figure 2 The bit wise realization of design Equa tions 2 through 7 is shown in Figure 3 It indicates the exact operations at each stage and gives a brighter picture of Horner s method The final product is 0 000010001001001 This results in an absolute error of 0 000012976796875 an error of approx imately 0 42522368 LSB Thus Horner s algorithm is extremely accu rate and does not suffer much from finite word length effects The design equations involve only right shifts and add operations making it an extremely fast algorithm The design equations are unique for this multiplier and a 15 bit register width This also implies that the multiplicand x can be any number inte ger fraction of any sign positive nega tive If the multiplier is a negative num ber 2 s complement for mat should be used for its binary representation and should follow similar steps to obtain the design equations INTEGER MULTIPLIER Horner s method is eas ily extended to integer multipliers using the same
63. took and operating systems CALAO System s customers fully own i FRONT PANEL www frontpanelexpress com their assets and warrant their strategic J EXPRESS 206 768 0602 www calao systems com ii 10 Issue 212 March 2008 CIRCUIT CELLAR www circuitcellar com CAPTIVE HYBRID LINEAR ACTUATOR The 28000 series size 11 double stack captive hybrid linear actuator is the latest addition to a continuously growing line of hybrid motors The compact frame size is only 1 1 28 mm square The various linear actuator options deliver unmatched capabilities opening avenues for equipment designers who require performance and endurance in a compact package Built for long life several million cycles and superior performance the size 11 linear actuator fea tures engineering thermoplastics in the rotor drive nut and a stainless steel Acme lead screw With this patented design quiet and maintenance free operations are ensured This captive hybrid linear actuator is available in a wide variety of resolu tions ranging from 0 000125 003175 mm per step to 0 002 0508 mm per step and delivers thrusts of up to 30 Ib 133 N without compromising its long life The captive linear actuator is designed with a patented integral anti rotation mechanism and is especially well suited for applications in which external anti rotation methods would be difficult or impossible to employ Captive linear travel ranges from 0 5 12 7 mm to 2 5 63
64. travel golf photography Circuit Cellar contests and Vex robotics PROJECT FILE REFERENCE 1 D Ramirez High Performance Motor Controller Circuit Cellar 206 2007 RESOURCES AdaCore GNAT User s Guide Florida State University Department of Computer Science www cs fsu edu baker ada gnat html gnat_ugn_toc html J Barnes Programming in Ada Plus an Overview of Ada 9X Addison Wesley Boston MA 1994 Intermetrics Inc Ada 2005 Ratio nale 1995 www adacore com home ada_answers ada_2005 Special Interest Group on Ada Ada 95 Bindings 2007 www sigada org ada_95 bindings html U S Air Force Academy Ada Utili ties 2007 www usafa af mil df dfcs bios mcc html ada stuff cfm Wikipedia Ada http en wikipedia org wiki Ada_programming language SOURCES XBee PRO wireless UART Digi International Inc www digi com MMA1260D Accelerometer Freescale Semiconductor Inc www treescale com dsPIC30F6014 DSP MCP6S26 PGA and PIC18F4550 USB 2 0 controller Microchip Technology Inc www microchip com AdaGIDE U S Air Force Academy www usafa af mil df dfcs bios mcc ht ml adagide cfm www circuitcellar com Ew R8C Tiny Improves Efficiency and REC Adds Intelligence to Motor Systems Networked Motors 40MHz 16 bit Timers and LIN CAN Modules Tiny No 1 supplier of microcontrollers in the world introduces R8C Tiny Series of microcontro
65. using exactly those words At this point the decision is to forget upgrading a concept that if it catches on should strike panic in every PC manufacturer switch to a Mac or Ubuntu unfortunately not enough driver support here either or buy new hardware and just install XP Pro instead of Vista easier said than done hope PC manufactures get the message but they need to know they have been led down the path by Microsoft Perhaps like many of you vot ing with my wallet I m not buying any new PC hardware until they sell it to me without Vista or in a configuration that can easily install XP alone For example we needed new desktops for everyone at the office this year To the detriment of all the other PC manufacturers who only sell Vista the solu tion was getting them from Dell because Dell would configure them preloaded with XP Unfortunately don t think Dell has the laptops want and solving my personal PC requirements is turning into a whole nother bag of worms Unless order some expensive exotic gaming machine where they already know it has to be XP or a way off brand PC don t see any laptops from the reg ular guys that aren t preloaded with Vista And who s the idiot that thought up four different versions of Vista to further confuse the market Unlike a desktop where we can configure the hardware to accommodate the available drivers and do a clean XP install prepackaged laptops are black boxes with few
66. usually an analog signal converted to digital sam ples using an on chip ADC for example an ADC12 a 12 bit ADC on the MSP430 The digital samples can repre sent analog signals such as temperature captured by a sensor or audio signals that need some sort of digital filtering Horner s algorithm is explained in two parts pure fractional multipliers and pure integer multipliers Steps have been shown to distinguish their proce dures to achieve efficient multiplies A fractional multiplier M falls in the range 1 M 1 Multiplication by such a number can be accomplished on fixed point machines only by scaling M an integer Alternatively the bits of value 1 can be identified and shift and add opera tions on any multiplicand x can be done This approach would lead to a dedicated code for each multiplier Consider the example with x 0 2468 and M 0 1357 with 15 bit resolution x 0 2468 0 001111110010111 M 0 1357 0 001000101011110 1 Figure 1 shows the exact bit wise binary addition for this multiplication The correct result for this multipli cation using floating point math is 0 03349076 and the absolute error 0 001011110110001 0 001111110010111 0 011011101001000 0 000111011001110 0 001111110010111 0 010111001100101 0 00000101011001 1 0 0011111100101 11 0 010001001001010 Ag Figure 3 This is a binary representation and mapping of the implementation steps of Horner
67. viruses worms and other electronic maladies e g controller failures CIRCUIT CELLAR SRAM parity errors bus errors and voltage spikes Antivirus software from Norton and MacAfee act in a similar man ner to medicines and vaccines used to treat and cure diseases Even Unix Linux embedded Windows CE and the Mac operating system are suscepti ble to these problems although not to the same extent because hackers do not target them as often But for Windows this is a major problem Windows is an excellent system for current generation laptops and PCs over 1 billion copies used worldwide in part because of the conveniences it affords including Word Excel Power Point Microsoft Schedule Visual Basic Visual C and many other excellent tools that have been continuously improved over the years follow ing Bill Gates s vision While all of this sounds scary the free version of GNAT Ada95 runs on Windows Unix and Linux A commercial ver sion sold by Aonix runs under LynxOS It is a good platform for non life critical applica tions but don t try to develop a yacht navigation system with it Instead purchase the com mercial versions of Ada95 for that purpose Versions of GNAT Ada95 are also available for LynxOS Linux Unix Red Hat Unix and other operating systems The solution for developing life critical embedded software is to use an embed ded real time runtime operating system e g Rat
68. with C code solutions Refer to the Resources section of this article for Call out group First number to call 0 1 empty Table 1 This is an array of the first numbers to try to call An entry of 1 indicated an empty number Remember the array indexing in C starts at O www circuitcellar com more information We re going to use a single linked list Each node will have a number to dial and a linkage pointing to the next number You will typically see ma loc used in Linked list C examples for claiming memory for the lists Because we re dealing with an embed ded system we re not going to use malloc to allocate memory for our usage We re just going to assign a suf ficiently large amount of memory to hold our data structures If we need more in the future it s just one define to change and recompile And remember that this memory is EEP ROM and it s valuable so we re trying to use it wisely First we ll build an array for each of the call out groups that contain the first number to try to call If no number is entered we ll use a 1 as CIRCUIT CELLAR an indication of that condition Because we have only 10 from the first statement of the problem or 30 from the second request possible numbers to call we can use 8 bit entities for this array Table 1 shows the array contents INT8 CallOutGroup MAX GROUPS Next we ll build a structure con taining the di
69. 0111 2 27 2 2 27 2 2 0 0000011111 10010 0 0000000001 11111 0 0000000000 01111 0 0000000000 00011 0 0000000000 00001 0 0000000000 00000 0 0000000000 00000 n 0 000010001000100 0 03332519 53125 Figure 1 This is the binary equivalent of a 15 x 15 bit fractional multiplication with the multiplier known in advance Dedicated code would replace each of these steps to perform a multiplication on a 16 bit CPU CIRCUIT CELLAR www circuitcellar com Final product x x 27 z x 27 x 2 x 2 x x2 x 2 x x 24 x x 2 x 2 x x27 x 24 x x 2 x 9097 p 3 277 px 20D x 21 x x 21 x x 23 xx 29 27 42 42742774278 2 Figure 2 This is an example of a back substitution in the steps of Horner s method for a fractional multiplier This is done to verify if Horner s method conforms to the conventional binary multiplication routine for fractions position of the bits with a value of 1 and their distance to the neighboring 1 in a multiplier For this method to work the multiplier or divisor should be known in advance This method also relies on dedicated code for any multiplies or divides with a potential increase in code size These are not serious limitations in applications where speed is of prime concern or when the multiplier or divisor does not change run time The can
70. 1 A Virtual Linux Environment on a Windows System May Issue 214 Deadlines Space Close Mar 12 Material Close Mar 21 Theme Measurement amp Sensors Bonus DISTRIBUTION Sensors Expo PCB East THE DARKER SIDE Low Power Techniques Build Better Energy Saving Electronic Systems ABOVE THE GROUND PLANE TRIAC Control Meets An Inductive Load FROM THE BENCH Digital Touch A Potentiometer with No Moving Parts SILICON UPDATE STM32 Call Shannon Barraclough now to reserve your space 860 875 2199 e mail shannon gcircuitcellar com 94 I ssue212 March 2008 CIRCUIT CELLAR www circuitcellar com he Newest Semiconductors fa PERICOM i TEXAS INSTR MENTS NC C ISATALY ST 27 SHARP NOR THE AMERICAS NEC Electronics America RECTRON EPSON BOD OW emt nop an LE gt s CYPRESS RONM TOSHIBA 5 Leading Innovation gt gt gt 2 treescale c ON Semiconductor i 4 R MTRON AN MICROCHIP nll 6 lt oN a AMEL POWER Kiet A 4 F L TAIWAN A mL Solutions j i 4 41 f T S KENET 01 4 ACEI RM smsc SUC CLEZSES GEN a FAIRCHILD SEMICONDUCTOR SILICON LABS The ONLY New Catalog Every 90 Days ia Semiconductor Experience Mouser s time to market advantage with no minimums and same day shipping of t
71. 10K quantity you can get a chip that delivers nearly 50 MIPS while consuming only 50 mW e g 27 mA at 1 8 V We re not talking about a stripped down loss leader either There s 32 KB of flash memory 8 KB of RAM and plenty of upscale I O including 20 channel 12 bit ADC two each SCI PC SPI and up to 54 general purpose I Os Another interesting move is what Freescale calls their controller con tinuum strategy see Figure 3 The idea is to ease upward and downward migration across their entire 8 16 and 32 bit line up The linkage is established with bridge the gap parts that use different cores e g one chip using an S08 the other a Coldfire V1 but otherwise offer exactly the same I O package and pinout PRESCRIPTION FOR CHANGE Did you know that Renesas Technology has shipped a billion flash MCUs Don t apologize if you didn t is boosting aspirations Memory Management Unit 910 LUTs 1 Block RAM 1 100 LUTs 1 Block RAM The fact is much of for their Microblaze core Memory Protection Unit MPU 560 LUTs 1 Block RAM 670 LUTs 1 Block RAM the volume is concen with the addition of a full fledged Windows CE and Linux capable MMU to the architecture For applications that don t www circuitcellar com User Supervisor Privilege 34 LUTs Table 1 With the addition of virtual memory MMU the Xilinx Microblaze soft core joins the ranks of Windows CE an
72. 11 edF 405 I aeter a ahaa Control with your micro Daiphi Cat PuraBasie ate Ba reed tor pasar T ui E Works up io CAN m he L 16 27 g Suprora ATA Frame E 5119 959 j LA 34 Full Speed T p Powertull L3 v Pree US driver TE ag 1 8x 625 25 88 19 55 Scorpion Mini Single H bridge RAC interface o Scorplon HX Dual H bridge 412A Aux RAC Sconmion XL Dual 30A H bridge RA or serial ER EE EPIIT ELI HAGSTROMELECTRONICS COM Produer Developnient as t ancan PTA ee mac Wm Tere Linux in a 40 pin DIP 200 Mhz ARMS CPU Board 0 1 centers easy to prototype Quiciemim PCE use your existing prototype tools Eden cane re erat full Linux with 2 6 kernel Hands on umm E Training xii for Rabbit Developers Lr Aue Perfect for robotics web servers Learn More at remote monitoring amp communications Rabbit U com www TiInCANTOOLS com 1 600 Products ww Outsource Your Next Bus Monitors Protocol Design To Ohio A F Analyzers Product Line Strategy Consulting Zr LU Host Circuit Design and PCB Layout m L 3 Adapters Electromechanical Algorithm Development Ty Muitiplexers Analog Design m Wireless fter Simulation Applications Embedded Software Software Rapid Prototype i We specialize in designing with Microchip pro
73. 31 000 E 022 4 is the Speed over the ground in knots 084 4 is the Track angle in degrees True 230394 is the Date 234 March 1994 003 1 W is the Magnetic Varia tion 6A is the checksum data which always begins with an asterisk You might want to visit the NMEA web site or read one of my a previous columns for more information on using GPS data Where s Waldo Pin pointing Location by Interfacing with a GPS Receiver Circuit Cellar 126 2001 The more satellites a GPS receiver has to work with the more accurately it can calculate its location You can see from the selected sen tence that date and time information is also provided by the GPS The SkyScout uses the GPS to locate the user on the surface of the Earth where and also to define a snapshot in time when This information is used to define a point in time when the user geographic coordinate system is referenced to the celestial coordinate system as if the Earth has stopped rotating in a known position in refer ence to all of the objects in the sky WHICH WAY IS UP At this point all we ve done is stop the Earth We ve taken a snapshot in time We still need to know where to look to find an object or where we are looking to identify an object The SkyScout uses magnetic and accelerometer sensors to determine its orientation based on the Earth s magnetic field and gravity Several months ago I explained how to use an accelerom
74. 4 iis uus rs TIE Barraclough NC 872 3064 Shannon circuitcellar com 7 Micro Digital Inc RTOS Innovators www smxrtos com usb Free 30 dr evals at www taltech com Phone 719 520 5323 Fax 719 520 1867 Box 60039 Colorado Springs CO 80960 Order online at www melabs com mictoinginecring abs Qne Development Tools for PIC Microcontrollers 89 95 LE Compilers for as shown Easy To Use BASIC Commands Windows 9x Me 2K XP Interface E PICBASIC Compiler 99 95 7 BASIC Stamp 1 Compatible Supports most 14 bit Core PICs Built In Serial Comm Commands USB Programmer for PIC MEUS RoHS Compliant Programs PIC MCUs including ERDA E Boards Pre Assembled Boards E Available for 8 14 18 28 i P ri and 40 pin PIC MCUs 2 2 line 20 char LCD Module 9 pin Serial Port Sample Programs Full Schematic Diagram low voltage 3 3V devices Includes Windows 98 Me NT 2K and XP Software With Accessories for 119 95 Includes Programmer Software USB Cable and Programming Adapter for 8 to 40 pin DIP Parallel Port Programmer starting at 59 95 Serial Port Programmer starting at 79 95 Issue 212 March 2008 Pricing from 79 95 to 349 95 nn Double Sided with Plate Thru Holes 4 Circuitry for Power Supply and Clock Large Prototype Area Boards Available for Most PIC MCUs 2 Documentation and Schematic Pricing from 8 95 to 19 95 CIRCUIT CELLAR PICBAS
75. 5 VS OTHER LANGUAGES C and other languages allow great flex ibility when assigning variables of any type including automatic promotion of types i e the char type can be assigned to an int type variable with no errors issued from the C compiler But doing these kinds of operations can lead to run time errors and system crashes usually caused by unhandled exceptions such as divisions by zero overflow underflow and the square root of negative numbers In addition C pointers are even more troublesome when they point to invalid addresses that can cause data to be overwritten boundary problems Other features of Ada that make it an excellent candidate for a robotics lan guage are the multitasking and multipro cessing support that is directly built into it using tasks a rendezvous mechanism interrupts priorities protected records and a deterministic scheduler Ada tasks provide a mechanism for the parallel exe www circuitcellar com cution of applications that map well to robotics hardware e g being able to read and process sensors while simultaneous ly having a servo task update servo posi tions This programming feat can be accomplished in Ada while not having to resort to semaphores or unnecessary sys tem calls In my application I can collect telemetry from the Gilbert III Explorer using a sensor collection task I can then display the collected data on a laptop using a real time display task while also
76. 5 mm Applications requiring pre cise positioning and rapid motion are best suited for this motor Typical applications include medical equip ment semiconductor handling valve control X Y tables handheld instru ments telecommunications and many more Priced aggressively this product is ideal for incorporation into your next project Haydon Switch amp Instrument Inc www hsi inc com ACCURATELY MEASURE TEMPERATURE OVER AN IP NETWORK The new Q series Temperature Module is a distributed data acquisition module that can monitor up to four digital temperature sensors The Temperature Mod ule provides an accurate way to measure temperature over an IP network It can also be used for environmental temperature monitoring and simple control The module features two internal relays that can be used to control alarm signals heaters or coolers Like all of the ControlByWeb products the Temperature Module has a built in web server so temperatures can be viewed and relays can be controlled using a web brows er The module can also be monitored and controlled using simple XML formatted text and Modbus TCP The unit can be configured to trigger relays when a set temperature is reached and it can even control relays in other Con trolByWeb products located somewhere else on the network Configuration of the Tem perature Module is easy because it can be fully configured in minutes using a web browser No configuration so
77. Ada 9X and Ada 2005 Rationale by Intermetrics Like C and Java Ada95 supports object oriented programming OOP and procedural pro gramming if you don t want to get into OOP What makes the Windows GNAT Ada95 good for the embedded systems developer are the tightly typed variables AdaGIDE usb_sensor_controller adb A File Edit Compile Run Tools Window Help Dig a 2 jeg else se R 2188 1 Name wireless sensor controller adb Author Daniel F Ramirez Date 69 16 2667 Description This application contains all the data constants and structures necessary for the GNAT Ada 95 USB portion of the 8 Bit SPI DC Motor Controller Master and Slave functions that are needed to send messages to the DC Motor Controller slave application or to act as a Client to any SPI Slave devices These include devices include my SPI Math Co processor the Microchip s 24XCXX SPI Memory chips SPI based digital potentiometers and A D devices and SPI Client Server networking using the USB and SPI hardware modules contained in the PIC18f4556 DSPIC36F4611 and DSPIC36F6614 micro controllers The application writes data to the Math Co Processor or EEPROM and reads back the data Also included is a diagnostic function that will write a ramp 8 n to the Math Co Processor or EEPROM using SPI and read it back to the Host PC via the UART ee KK KK KOK The SPI networking is handled using a simple data packet messaging p
78. B While this initial ly freaked me out I have since come to the conclusion that this is normal and does not damage the bottom side solder mask After about 8 minutes some of the solder paste in the hotter regions or areas with little thermal mass started to reflow It took 10 minutes for the solder 9 Skillet 1 E Skillet 2 A R7 A Figure 3 Here is the reflow profile suggested by the Kester documentation The profile is generated by the Rival removable plate griddle at a variety of points on the skillet and PCB CIRCUIT CELLAR www circuitcellar com Exclusive Ethernet Highway 29 A E W5300 Fully Hardwired TCP IP Ethernet Controller designed for high end embedded Internet system Over 90Mbps Dynamic Memory Allocation 16 or 8 bit Data Bus Width malty ES eet M he 5 j wv dd S W TCP IP IP Simultanoously Killer Applications thru WiZnet own hybrid way Triple Play Service Broadband Access VoIP TT Channel 0 Des 5 Other Channels Can be a MAC RAW L BEI i Can be used high pass for SW TCP IP 4 channels with Web E mail TCP IP FTP TELNET AV noni ar VOD F and sn ETHERNET MAC PHY PVR Support B independent socket channels WIZnet IL 4 21e Bel OSCIHIOSCOone zm lean porn A E ed Pare VA Capture dispiay up to 4 iogic hearra DES a
79. BGA and more 40 GHz Bandwidth BGA QFN Sockets Heat Sinks available up to 100W Adapters for probing test prototype High Volume Production Adapters BGA QFP and more SMT Package Emulation Interconnect Quick Turn Complex Custom Adapters 1 800 404 0204 CIRCUIT CELLAR Everything you need to build your own gt SONAR UNITS gt VISION SYSTEMS gt MOTOR DRIVERS gt OPTICS gt MICROPROCESSORS gt ARTIFICIAL INTELLIGENCE gt WEB CONTROLS agros Robotics PO Box 460342 St Louis MO 63146 Discount Code ccellar0108 info zagrosrobotics com WWW grosrobotics com our ics ye PW or PEW Prices 1 34 PICTGLFB77A ICD capabilities Electronic Compass Text to Speech Converter with Speaker Infrared Detection e Ball Bearing Servo Motors Cede Roberts reust be tdid a1 rire af purcahie Mor yell TET othe afer 2508 a FIC m a regivtered erademark of Mixeuchip in ihr U S ond oir phone 26 PRE Custom Computer Services Inc 26 35 www circuitcellar com xtreme NV lotor eed Control NE mod Simple H Dual 180A Peak Bridges 5 5V 28V B si 1 Currant Temp limiting 45A Peak H bridqu MODEL 5 6108 E MAE E sugar RAC inputs serial option Curent Termp limiting ee a cae Extruded Aluminum cage J wine inbeefasce E a 425 x32Y 4
80. C Compiler and Linker Product No NNDK MOD5270LC KIT etBurner com Information and Sales sales netburner com Telephone 1 800 695 6828 NOW SHOWING HE S DIGITAL She s analog nted the last m Engineering delivi roagrammability saver ts showtime Get Your Ticket to the Ultimate Embedded Design Starter Kit Fixed function microcontrollers had their share of the spotlight It s time for a revolutionary and simplified approach to embedded application development Get a Cypress PSoC FirstTouch Starter Kit now and discover how much PSoC mixed signal arrays powerful programmable analog and digital blocks embedded memory and a fast MCU shorten your time to market This kit includes the easy to use PSoC Express visual embedded system design tool and gives you embedded designs you can evaluate right out of the box Get yours and step into the spotlight today Includes four ready to use mixed signal applications on a single platform gt A le pies Em Ly PERFORM Cypress the Cypress logo and PSoC are registered trademarks and Programmable System on Chip PSoC Express and Firstlouch are trademarks of Cypress Semiconductor Corporation All other trademarks are properties of their respective owners 2007 Cypress Semiconductor Corporation All rights reserved Does not include any applicable sales tax shipping
81. C Most marketeers still call their chips RISCs although at this point virtually every distinguishing characteristic of the ColdFire original concept has fallen out of favor Take the issue of instruction encod ing with fashion having changed faster than hemlines The original RISC concept insisted on fixed length 32 bit instructions Although sellable at the time I always thought it was a goofy idea Spend 32 bits to increment a register compare to zero do a short branch It wasn t long before folks real ized the ostensible benefit of a 32 bit fixed length instruction slightly simpler Rs Rd 5 Figure 4 Providing an upgrade path for a myriad of legacy MCUs is the challenge for the forthcoming Renesas Technology RX MCU Doing so starts with the basics namely the ability to handle data in big or little Endian format 84 Issue 212 March 2008 Colors indicate pin peripheral compatibility ColdFire General purpose Figure 3 Freescale Semiconductor bridges the gap between 8 bit and 32 bit designs by giving otherwise pin and O compatible parts a brain transplant and faster silicon doesn t nearly justi fy the cost in terms of wasted code space and bus bandwidth So we went from fixed length 32 bit instructions to adding modes e g Thumb and MIPS16 that carved out a subset of leaner 16 bit instructions More recently we see Cortex M3 w
82. C6 RX DT RC PSPO RDO PSP1 RD1 PSPZ RD2 PSPS RD3 PSP4 RD4 PSP5 P1B RD5 PSP6 P1C RD6 PSP7 P1D RD ICSPDAT PGD ICSPCLK PGC Auxiliary MAX232 PICkit 2 LCM S01502DTR M PGOOD SELECT MCP1252 Figure 1 The schematic for the DIY Wii seems very busy but those small SMT devices mean that the design has a small overall footprint 44 Issue 212 March 2008 CIRCUIT CELLAR www circuitcellar com I had never used one Instead of risk ing the entire project on this choice I put redundant programming headers on the board an RJ 45 jack for the ICD2 and a six pin header for the PICkit 2 As it turns out the inexpen sive PICkit 2 worked great and I never installed the RJ 45 jack for the ICD2 I wanted to put a Panasonic edge drive rotary encoder on the board but at 10 I decided that the 1 ITT Indus tries four way tactile switch with select would give the students enough control over user input Looking at Photo 1 you can make out the empty space reserved for the Panasonic EVQWK edge drive jog encoders 2N3904s were used to isolate the microcontroller from the high current requirements of the white LED and piezo speaker An optional output driver was left open for future expan sion The Lumex LCM S01602DTR M LCD is an exceptional value for the money and it s very durable The SMT 10 kO potentiometer was a disappoint ment it proved to be easy to damage mechanically and thermally It would have been a far be
83. CADA building control PP1001 V00 205 SM PCB Adapters OM Adapt SM miniboards have two footprints on each side Now use your ultra fine pitch SMD components with more useful 0 1 inline spaced holes One to one pinouts from 9 52 The channel I O pins can be used as simple inputs and outputs but the counter makes a number of other functions possible For example an input can start the counter operating as a timer with match values used to create a time delayed output pulse or two A delayed interrupt can also be created with this configuration The counter operating as a timer can be used to create synchronized output signals or special phase relationships among output pins The global sync signal enables multiple channels to be synchronized when more than four pins need coordinated timing ALL TOGETHER NOW Figure 7 shows an example of how the RIO might be configured to con trol the operation of a basic robotics platform For this example I ve assumed a track drive with a rotating turret to hold sensors and actuators I ve also assumed a serial bus inter face so the entire channel I O is available Channels 0 and 1 are used to control H bridges for the left and right tracks Channel 0 H bridge driver Channel 1 H bridge driver COOU VOWS Channel 2 Pulse width measurement Channel 3 H bridge driver Channel 4 Quadrature decoder IDX Low battery Servo 1 Servo 2 Servo 3 S
84. EMBEDDED CONTROL DESIGN CONTEST RESULTS 26 MCU MATHEMATICS P 60 TACKLE A TOUGH DESIGN PROJECT 76 CIRCUIT CELLAR THE MAGAZINE FOR COMPUTER APPLICATIONS ROBOTICS A Peripheral Chip for Robotics Apps Robot Software Safety with Ada95 In Flight Communications Made Easy 212 March 2008 A DIY Motion Sensing System Processor Powered Stargazing A Look at New Age MCUs Build a Vertical Plotter pes I 25274 75349 7 9 4 95 U S 5 95 Canada prinrf fz ger H ji M EH ri iprint Zu IEF th DE DERIEFZIB Hir Flo EraplzhurcHpdacze ili a Poena aardr the With Pinks bxAxdyrrss ding targerns MORFIO Tacrcrt TRESS 5 Bost r2 wel ny Featuring NetBurner s Eclipse IDE Completion Integrated Debugger Intelligent The Complete Hardware and Software Solution Includes NetBurner MOD5270 Ethernet Core Module Performance and Memory 32 Bit CPU Freescale ColdFire MCF5270 147Mhz 512K Flash Memory 2MB SDRAM Device Connectivity 10 100 Ethernet UARTs I C SPI 47 Digital I O SD MMC Flash Card Support Communication Software TCP IP Stack HTTP Web Server FTP E Mail PPP Flash File System Development Software NB Eclipse IDE Graphical Debugger Deployment Tools Examples System Software uC OS RTOS ANSI C
85. IC PRO Compiler 249 95 Supports Microchip PIC10 PIC12 PIC 14 PIC16 PIC17 and PIC18 microcontrollers Direct Access to Internal Registers Supports In Line Assembly Language Interrupts in PICBASIC and Assembly Built In USB I2C RS 232 and More Source Level Debugging See our full range of products including books accessories and components at www melabs com www circuitcellar com Across A short description on a web site 8 An instrument used to measure acceleration on a sensor 9 Created the Playfair cipher in 1854 12 A PC s Net connected location 15 Shaped like a spiral or coil 16 A mobile electronic device that fits in your hand 17 Smoke produced by dysfunctional circuits 18 Think General Electric Research Lab ductile tungsten 1927 IEEE Edison Medal 19 Project Genie began at this University of California campus in 1964 The answers are available at www circuitcellar com crossword gt Down ll 2 S 10 ile 13 14 www circuitcellar com CIRCUIT CELLAR Unofficial rules of conduct that regulate interaction and behavior on the Internet The main material used in most semiconductors Legal protection that enables the creator of original material to restrict the use and reproduction of his her work A receiver transmitter that decodes parallel data from CPU into serial bits A datatype that has two values 1 and 0 This occurs when the operation
86. IC programmed 2 36 x 3 86 CLCD420 B Serial Server 49 RS232 422 485 device server for network enabling legacy serial devices 1 2 4 8 16 32 ports 10 100Mbps 230kbps Static IP DHCP PPPoE Portbase 3010 RS232 from 149 1 2 4 8 16 x RS232 Add COMports via your PC s USB Port USB COM S 20 USB 2COM USB 4COM USB 8COM USB 16COM RM rackmount 459 Announcing a new name in high end high reliability value priced test gear RIGOL pronounced regal Formerly the partner of a large scope company we can t name Rigol produces best quality value LCD scopes available on the market today 60 100 120MHz AWG 60 100 120MHz USB 14 bit ARB w USB RS 232 LAN GPIB 10 built in wfms 6 digit 200MHz frequency counter opt 16 ch DG3061A 1895 2795 3995 Pen Scope PS2105 25MHz USB powered Scope in a probe Up to 100MS s 24kS buffer C VB Delphi LabView VEE drivers PS2105 25MHz 100MS s 372 PS2104 10MHz 50MS s 234 Saelig Alan Lowne says started __ Saelig as an _ engineer for engineers Saelig an Olde English word meaning happy prosperous blessed which is what want for my customers my staff and myself See my blog for behind the scenes company details business hints kudos etc Mini Web Server PicoServ Miniature Web Server allows remote I O and servicing Collect analog amp digital data over a web connection Remote sensing control S
87. March 2008 1250 numeric base subtype f Ada95 is now provided by 32 bit micro controller based boards that can be used with Windows Unix Linux and LynxOS as their embedded operating system Virtually any robotics applica tion could benefit from the additional safety features afforded by developing the necessary embedded software using Ada95 and soon Ada 2005 Although other computer languages have similar features the tasking pro tected records deterministic schedul ing and real time constraint checking are unique to Ada95 which make it an ideal candidate for life critical and par allel processing applications I provided some examples of how you can use Ada95 with today s microcontrollers including the dsPIC30F6014 16 bit DSP in the wire less sensor controller board that I used to collect data from the Vex Power Glove Some of my other Ada95 appli cations include a USB high perform ance DC motor controller that enables me to control DC motors from a laptop by sending its messages via the USB interface I plan to continue using Ada95 as I work on the robotics appli cations shown in Photos 2 4 and 6 CIRCUIT CELLAR Daniel Ramirez is a senior software engi neer at Raytheon with over 15 years of experience working on real time embed ded systems He has a B S in Computer Science and an M S in Engineering from Northeastern University His hobbies include watching old movies antiques
88. Modules gt US international frequencies available High Data Rate www circuitcellar com CIRCUIT CELLAR Issue 212 March 2008 13 FEATURE ARTICLE by Daniel Ramirez Robotics with Ada95 Ada95 is a standardized object oriented programming language that was developed in the late 1970s by the U S Department of Defense Today engineers like Daniel use the highly structured language to increase the safety and reliability of their new robotics applications Wire do robots in space the Inter national Space Station the Canadian robot arm the European Arienne rocket the Boeing 767 the Eurobus jet and the French Grand Vitesse bullet train have in common The answer is Ada95 a com puter language used to develop life critical embedded applications Ada was developed during the late 1970s and early 1980s by the U S government for defense applications in an effort to reduce the high life cycle cost of large software applications It was also intended to replace older languages such as COBOL FORTRAN and PL 1 which were used by various government agencies Ada was developed to fill the need for highly reliable fault tolerant soft ware We engineers and robot design ers should also be concerned with our robotic inventions that use embedded software Why Because they are grow ing in size and weight and could possi bly cause harm or injury to innocent bystanders The Robot Wars and Tet sujin exos
89. NTATION ON THE MSP430 Horner s method works most effi ciently on microcontrollers that sup port single cycle add and shift opera tions For example the MSP430 CPU supports this requirement and also performs single cycle register register move operations enabling fast multi ply A section of the MSP430 micro controller s assembly code is shown in Listing 1 Table 1 shows a comparison of the Horner s method Horner s method using CSD existing algo rithms and the floating point C library Performance measures such as code size CPU cycles and the final result have been shown for a standard integer real multiply Results for filter implementation using Horner s method using CSD are implemented An approximate frequency response using a simple square and add opera tion in the filtered signal across vari ous frequencies is shown in Figure 6 and Figure 7 FlashPro430 GangPro430 USB Flash Programmers cc Re Reliable and the fastest programmer on the marke Perfect for production usage for Texas Instruments MSP430 microcontrollers 66 Issue 212 March 2008 LN and Progra rammers for C C series devices ChipCon from Ti ZI us ly Mult E 6 ices 9 nhc o x 8 VO tor PWM TRIAL cee odel 2 qr litem CITATO with Rabbit RIO Versatile Device with 1 0 Options Rabbit RIO Programmable I O Appl
90. PS MAX DIGITS InitCallOutGroup InitCallOutNumbsStruct DeleteCallOutGroup Grp INT8 AddCallOutGroupNumb Grp INT8 TheNumb INT8 GetNextCallOutNumber Numb INT8 INT8 over two sessions to get the code written and debugged struct CALL OUT NUMBERS define the structure D The file TestLinkList c holds INT8 DialNumb MAX 016179 INT8 NextNumb y the main routine and runs the test code I created a file struct CALL OUT NUMBERS CallOutNumbs MAX NUMBERS CalOutReports c to generate Figure 1 This is the UML case diagram for the initial design of the call out code is a classic forward linked list And you can also see that it is efficient in memory usage More callout events linearly increase the size of the Cal OutGroupL array And more num bers to call linearly increase the size of the Cal 1OutNumbs structure DESIGN IMPLEMENTATION So we now have a design Let s look at what we need to implement that design I m going to present the rou tines required using UML diagrams Refer to the Resources section for Cir cuit Cellar articles about UML UML has several diagrams to describe a sys tem class diagrams use case dia grams collaboration diagrams state diagrams activity diagrams and implementation diagrams Let s start with the case diagram of the operations for the call out design see Figure 1 I defined a class named Cal 10ut Don t worry we re not getting into
91. Position range 25091250 4 63 corresponds to 0 to 180 degrees of servo rotation with each step equaling 2 uSec Note Not all servos are exactly alike If your servos appear to Strain when commanded to position 250 you should increase the 250 up to 260 or so to prevent the servo from straining itself subtype Parallax Position is Word range 250 subtype number base is integer range 2 16 susceptible to the errors when the array index exceeds the array limits C and Java support typing and exception han dling try catch and throw Limit checks can be implemented in any lan guage although they add some overhead In Ada95 an exception raised is equiva lent to the C throw keyword raise SENSOR READ ERROR Variable types are easily converted from one type to another by retyping them X float 1 as long as the retyped variable being assigned is large enough to hold the information In this case X is a 32 bit float and I is a 32 bit integer so there is not a prob lem with the assignment Refer to the Circuit Cellar FTP site for an example of an Ada95 exception handler FUTURE APPLICATIONS Ada95 is currently used to develop life critical embedded software used in medical devices aircraft and aerospace applications but it can also be used in the future to increase the safety and reliability of commercial and robotics designs The platform necessary to run 24 Issue 212
92. RB13 and ANI5 RBI5 The calibration data is saved to non volatile memory using Microchip Technology 24LC512 serial EEPROM It can be retrieved later when it s needed for scaling sensor readings and generating motor commands A com plete schematic diagram of the wire less sensor controller is posted on the Circuit Cellar FTP site XBee PRO WIRELESS UART The 2 4 GHz XBee PRO Zig Bee 802 15 4 RS 232 RF modem OEM RF module provides all the benefits of the ZigBee standard in a design that yields three times the range of tradi tional ZigBee solutions All of this hardware is provided in a board that measures only 24 38 mm x 27 61 mm which helps it fit into the enclosure without taking up too much space The XBee PRO wireless UART pro vides telemetry to a nearby client device e g a laptop a robot or another animatronic device It is con figured with the wireless UART appli cation using standard Hayes modem AT commands with the serial port protocol set at 115 200 bps 8 data bits 1 stop bit and no parity It is connected to the dsPIC30F6014 s UART The transmitter located on each robot is an XBee PRO wireless UART Photo 5 Another XBee PRO receiver is connected to the Parallax serial servo con troller PSC mounted on my Hero 2007 robot which uses four Vex motors 4 WD for its motion subsystem CIRCUIT CELLAR connected to the wireless sensor con troller Another XBee PRO receiver is connected to
93. Rational Aonix and Green Hills have been tailored to iens bun cu layer PC board SEND us your design with just a click RECEIVE top quality boards in just days 4 exbresspcb com 22 Issue 212 March 2008 CIRCUIT CELLAR POSIX compliant Ada95 runtimes that work with the Ada95 rendezvous and tasking models to provide robust fault tolerant performance over a wide variety of life critical embedded applications New applications are being devel oped for parallel processors and super computers used by astronomers and physicists as a replacement for the venerable FORTRAN language that has served the scientific community since the mid 1950s Ada95 maps well to these applications including com mon statements global memory and parallelizing expressions Ada95 shares many of the features found in other languages including C and Java data abstraction type checking range checking records C structs object oriented program ming tagged types C classes inheritance generics C templates multithreading tasks multithreading and multitasking interrupt handling error handling exception statements catch throw and try and raise statements Although the free version of GNAT Ada95 is not POSIX compli ant and does not have all the opti mizations that the commercial vari ants provide it may be used for non life critical applications and for learn ing the safety features of the language Ada9
94. Robot Programming with Ada95 p 14 gt ER Alt A ma Vertical Plotter 69 FROM THE BENCH Navigating the Heavens Jeff Bachiochi LESSONS FROM THE TRENCHES Do You Want to Do a Design Linked Lists George Martin SILICON UPDATE More Bits Less Filling Tom Cantrell DEPARTMENTS 4 TASK MANAGER Design Program amp Prosper C J Abate 8 NEW PRODUCT NEWS edited by John Gorsky 13 TEST YOUR EQ 6 Issue 212 March 2008 Design p 30 CIRCUIT CELLAR 43 Do It Yourself Motion Controlled Gaming Part 1 Get Started with a Simple Application Chris Coulston Robotics Made Easy A Peripheral Chip for Low Level Functions Monte Dalrymple Efficient Micro Mathematics Multiplication and Division Techniques for MCUs Kripasagar Venkat a Ws rir AL ervey 93 CROSSWORD 94 INDEX OF ADVERTISERS April Preview 96 PRIORITY INTERRUPT What Happened to Performance Steve Ciarcia www circuitcellar com 1 This time you are energy DUEL WIMP Oh No Not again wv Pv SUPE bipes A When T will the boss of dal My ho duty 3 page HIM hard speak rifle feeds I will show you fear ina S handful of dust Have a taste of pd Even tha i smallest of batteries Don t do are powerful when you know f Loan fo ma fo make the most 4 Learn how to combine the AVR microcontrollers high performance with the lowest possibl
95. Small Form Factor MCUs Silicon Laboratories mixed signal MCUs combine a high speed 8051 32 CPU Flash memory and best in class analog peripherals in ultra small E 16 kB packages allowing designers to reduce component count while improving E system performance These highly integrated feature rich devices are optimized for space constrained low power cost sensitive applications 9 mp 16 mm 25 mr Size Low Cost Professional Tools Complete development kits including in Highest Functional Densi system debug and integrated development y e 8 24 Bit ADC environment make development quick and e 2 32 kB Flash Memory e 25 100 MIPS 8051 CPU easy Low cost evaluation kits and reference designs simplity evaluation and accelerate time to market Product details www silabs com SmallMCU SILICON LABS MCUs TIMING POWER BROADCAST WIRELINE WIRELESS www silabs com voltages across five flexible resistors whose resistances vary with the angle percent each finger is bent or flexed Finger movements are digitized using the dsPIC s 12 bit ADC and the firmware processes and filters them The glove s current orientation rela tive to the gravity vector is read from the attached Freescale Semiconductor MMAOG260Q X Y axis accelerometer and the MMA1260D Z axis accelerometer which are also digitized by the 12 bit ADC to obtain the orientation angles The 12 bit ADC is also used to read the pressure sen
96. a straightforward design and coding task but some issues need to be looked at First the hardware interface does not have call progress monitoring 76 Issue 212 March 2008 That means that we can not detect activities or conditions such as dial tone ringing or call answered I sug gest that we use timers in a state machine design to pace the code through the calling process We can assume certain times for each of the states of the telephone line interface Because we re calling friendly users their numbers have been determined to be available for calling this should be acceptable The detail of interfacing with the PBX hardware is very dependent on the specific interface With your indulgence I would like to skip over this part of the design Your interface will most likely be different than mine and you ll need to match your software design to your calling hardware see Listing 1 Also we need a way to enter the numbers to dial for each of the prob lem types that we can detect And I would add a log file to log the activity I would like to have a record that we tried to call and no one answered or we could not get a free line DATABASE DESIGN The internal database would look like this INT8 DialOutLMAX_GROUPS MAX_NUMB J MAX DIGITS Database design is really straightfor ward It s just one large array of 8 bit entities indexed by groups type of error detected and the digits in the telephone numb
97. addition is now stored as the intermediate result x for the next step 2 x 06 2 The next step is to proceed to the next bit with a value of 1 27 The nearest 1 to its left is at bit position 2 7 The difference in weight 2 is applied to the intermediate result The multiplicand x is again added to the weighted result for the occurrence of the 1 at bit position 27 The result of this addition is now stored as the inter mediate result x for the next step X x2 qd xe 3 The third step is to proceed to the next bit with a value of 1 27 The nearest 1 to its left is at bit position 2 The difference in weight 27 is applied to the intermedi 62 Issue 212 March 2008 10010000101esp 29 27 2 Number of reductions in add is four ate result The multiplicand x is again added to the weighted result for the occurrence of the 1 at bit position 2 The result of this addition is now stored as the intermediate result x for the next step Ko 4 2 x 4 The fourth step is to proceed to the next bit with a value of 1 271 The near est 1 to its left is at bit position 2 The difference in weight 2 is applied to the intermediate result The multiplicand x is again added to the weighted result for the occurrence of the 1 at bit position 2 The result of this addition is stored as the intermediate result x for the next step x K2 xx 5 The fifth step is to proceed to the next bi
98. again I followed what the Hektor mak ers did and used toothed belts like your car s timing belt but open ended and toothed pul leys on the stepper motors I used an MXL sized toothed belt 5 08 mm and 10 teeth pulleys a revolution of the stepper ect by some Swiss students called Hektor a painting 30 Issue 212 March 2008 Figure 1 This is the system model and its associated mathematical model Several simplifying assumptions are made here CIRCUIT CELLAR motor is 50 8 mm in belt length www circuitcellar com Photo 1a Check out the system in action b This is a close up shot of the output of one of the sample files c Here the output is CIRCUIT CELLAR A word of warning you do not want to machine a steel pulley with your home drill trust me If you are buying the hardware try to match the stepper motor axle diameter to the pulley bore A couple of bearings press the belts against the pulleys to keep the teeth inside the pulley slots This ensures system accuracy which is important because you are going to work on an open loop system no position feed back The pen holder mechanism I used involves a third stepper motor I obtained it from an old floppy disk drive in my employer s storage room I noticed it was a bipolar motor only four wires so I sawed out part of the original PCB of the drive so I could keep the controller IC Fortunately it was still in working condition Wir
99. ains its correctness and pleasing layout As a result ideas can be expressed almost instantly with the Trace Modeler Diagrams are stored in a simple and readable text based file format ideal for versioning sys tems and file comparison tools This format makes it easy to generate sequence diagrams with other tools or from running code and visualize them with the Trace Modeler Dia grams can be exported to various popular graphics formats and the clipboard It also offers a batch export feature that can be used from the command line for easy integration into any automated documentation process The Trace Modeler is extremely portable it works on all major platforms requires no installation and has very accommodating license terms A single user license costs 119 and significant academic and volume discounts are available Tracemodeler com www tracemodeler com www circuitcellar com NEW PRODUCT NEWS LINEAR BALL SCREW STAGE The ATS165 is a rugged value driven linear stage that is ideal for applications requiring debris protection medium travel and mid tier positioning performance It is similar in design to the ATS115 series providing additional load carry ing capabilities with larger bearings and a wider cross section The hardcover design provides protection from debris and the robust aluminum cover is hard coated to provide a scratch resistant surface The side seals keep dirt and par ticulates off of the
100. alities e g 10 bit ADC UART PC SPI port interfaces PWM and internal reset Other key features are also integrated into the con trollers including fast execution high resistance to inter ference and industrial specifications They are applicable to common embedded applications that require high per formance and quality features The series design provides a typical solution for applica tions that require small package sizes with sufficient I O and memory capacities The series can be applied in a wide variety of general industrial controls including data loggers transmission systems power controls motor con trols AC controls and treadmills The Rich series provides a full featured hardware soft ware development system such as the JTAG hardware simulator software development system programmer and support files The complete system combination enables the designer to develop products in a short period of time and allows their rapid integration into the market With the Rich series in system program ISP functionality can also be used to directly upgrade the system program online fully realizing the flexi bility and expandability of the products Please contact Winbond for the cost of this new series of controllers Winbond Electronics Corp www winbond com Issue 212 March 2008 9 NEW PRODUCT NEWS UNIVERSAL CAPSENSE CONTROLLER DEVELOPMENT KIT The Universal CapSense Controller Kit is designed for
101. an ASCII character E for engine speed The checksum is used to verify that the data received is the data that the transmitter intended to send It is defined as the two least significant bytes of the sum of all the bytes in the length and data portions of the packet The footer simply indicates the end of a transmission In our master slave system the base station is the master and the helicopter is the slave This has a number of implica tions The base station initiates all com munications and the helicopter doesn t transmit unsolicited data The only exceptions are error messages because Command are received each one is acknowledged by the helicopter in one of two ways Command packets are acknowledged by the helicopter by transmitting the entire packet plus an ACK byte 0x06 which comes after the length byte Information requests are acknowledged by simply sending the information requested If an error is detected in the packet the packet is ignored and no ACK is sent It is the master s responsibility to retransmit any commands or information requests that are not acknowledged Table 2 is an overview of the com plete communications protocol For a detailed description of all packets and payloads refer to the Communications Protocol document posted on the Circuit Cellar FTP site FIRMWARE The data sent via our protocol has to be decoded and used once it is received by the helicopter This task is per fo
102. and handling costs CPFAPOOTE What s the difference Price Click or call today for a FREE Jameco Catalog Visit www Jameco com CCX and start benefiting from Jameco s Awesome Prices Call 1 800 831 4242 cent Dis e G amp vfd 21 Graphic Display Value Approaching Character Display Prices A Display You Can Read From Any Angle Data A E m EF WOOEWPL ata Entry 008 0 of Chem Waves Daley Time Ba Machine Name Milnor Dryell eich Time gum Simulator Y N nig aoe I TA RoHS Compliant ISO 9001 Certified 9001 140001 TS16949 Noritake 7000 Series BUILT IN FEATURES THAN YOU MAY EVER NEED Up to 4 Independent Windows with Individual Control gt 8 Levels of Brightness Control gt Many IntI Font Sets with 16 User Defined Characters gt Built in Screen Savers gt Easily Combine Text amp Graphics One Screen gt Many Filters Available to Match Application gt Horizontal amp Vertical Scrolling gt Development Kit Available gt Proportional Fonts amp Font Magnification DON T COMPROMISE Your application deserves VFD quality Backlit LCD www noritake elec com 51m Noritake Co Inc 2635 Clearbrook Dr Arlington Heights IL 60005 phone 1 800 779 5846 e mail electronics noritake com itron Over 100 Years in Business 4 TASK MANAGER Design Program amp Prosper This
103. around a dsPIC30F2020 DSC The drive communicates via an optoisolated serial port to a PIC16F687 based interface unit Richard Wotiz U S dick601 mystics org My project is a variable speed drive for a 2 HP single phase AC induction motor and includes active power factor correction It has a control port which interfaces with a standard spa control sys tem to control the pump speed The motor drive hardware is built around a Microchip dsPI C30F2020 digital signal controller At first 1 was overwhelmed by the number of DSC part choic OWmA We es EAM es but was able to narrow it down to a part with a OC VR GAS the exact features needed also found the ver E t aU xac a E satility of the peripherals to be very helpful even i r though it made them more challenging to use In a high power design such as this it was hard to know s J LU in advance which settings would give the best per formance or efficiency so the many options of the PWM and ADC modules were very helpful to have for last minute adjustments Richard W otiz SECOND PLACE amp Connected Communications Applications Multifunctional Alarm Clock Unlike old school mechanical alarm clocks that you have to set manually this Internet connected alarm clock provides three primary features automatic time setting on power up streaming MP3 music and remote management The easy to use PIC24FJ64 based clock is connected to an ENC28J60 Ethern
104. as looking for alterna tives when I discovered a proj machine that paints over a vertical wall with a spray can A solenoid was used to press the can s nozzle Although my goal was to use a pencil I liked the simplicity of a system that hangs from two stepper motors on the two upper corners of a drawing area I liked their design so I built my own I call it Viktor it shares the last four let ters with Hektor the project that Pen up down motor inspired me to build this one The system is easy to carry around and you do not need a spare room to install it see Photo 1 It also requires fewer parts than a standard XY plotter MECHANICAL SYSTEM DESIGN The painting machine consists of two stepper motors I had a couple of 1 A 5 V unipolar motors on my desk for several years located on the top left and on the top right of the drawing area see Figure 1 You can change the horizontal distance between them to accommodate a wider canvas The unit holding the pen hangs from the motors pulleys to form a V shape Depending on the length of ribbon each stepper motor is releasing the location of the pen holder changes Gravi ty pulls the pen holder down ward so motors aren t required to pull down the pen holder I was naive enough to think that I could use just some string from the stepper motors to the pen holder but after a quick test it became apparent that any sliding on the pulleys ruined the result So
105. astronomical facts about astronomers man made objects comets and asteroids and a glossary The guide includes a six part audio guide to astron omy and narrations or text descriptions and scientific data of approximately 200 objects The SD card interface per mits expanding its knowledge bank One of the typical improvements to newer embedded designs is the ability to update the operation system with out major surgery The processor s integrated slave USB port supports updates to the SkyScout FRIENDLY SKIES Except for picking out the big dip per most of us must plead ignorance to much of what s out there While loca tion information of celestial objects is well documented it requires a clock and calendar time and date a map of the world location a compass direction of north and a protractor for azimuth to calculate where and when to look This complexity scares off most people who might otherwise enjoy knowing more about the night sky Our success as designers depends on our ability to take Photo 4 The main PCB contains most of the electronics including the Samsung 32 bit processor the magnetic and accelerometer sensors and all of the support circuitry www circuitcellar com CIRCUIT CELLAR sensor technology and provide a simple solution to a complicated problem The SkyScout is a per fect example of how individual advances can be combined to provide a solution that was once unthinkable Whi
106. base includes technical information Such as size and mass in addition to the planets orbital physics can review the identified satellites and their associated strength along with your present calculated position GPS technology is the first step in making this product user friendly It eliminates the need for a user to determine longi tude latitude and time of day and then have to enter them manually The remaining sensor technology physical position of the SkyScout is used to locate or identity objects in the sky The order of the next two pro cedures depends on whether you are locating or identifying When using the locate function the database is used to determine the celestial posi tion of the object Then the position ing function directs the SkyScout toward the object s position relative to the user s position When the identify function is chosen the positioning functions determine the celestial posi tion of the viewing tube and then check the database for an object that matches that celes tial position DATABASE OF OBJECTS Objects outside of our solar system require a minimum of data These objects can be con sidered standing still in refer ence to our lifetime While only RA and DEC are necessary to fix its position on the celes tial sphere other data provides plenty of educational fodder The scientific data displayed for Polaris is shown in Table 1 Objects within the solar system have a life of
107. ce operates off of the clock input this could be a problem To handle this situation there is a global 8 bit prescaler for the clock that is fed to the channels The prescaler decou ples the bus speed from the channel clock rate and is individually enabled for use by each channel so not all channels have to be limited by the slow clock TrackBot shown with optional SunSPOT purchase separately TrackBot is an affordable autonomous robot platform with a real time P2P network of RISC chips which manage all transducers including custom ones you can add Any controller with a standard UART can be added as the high level application brain It s lead free and RoHS compliant TrackBot was developed specifically for university level education and research It s so unique that multiple patents are pending TrackBot is in stock and shipping now SYSTRONIX 939 Edison Street Salt Lake City Utah USA www trackbot systronix com 56 Issue 212 March 2008 CIRCUIT CELLAR Als As low as 9 95 AP CIRCUITS PCB Fabrication Since 1984 Two Boards Two Layers Two Masks One Legend each Unmasked boards ship next day Www apcircuits com www circuitcellar com See how your designs function before you design them The Renesas HEW Target Server make your visions become a reality The HEW Target Server HTS gives you a preview of how your hardware software will function while you re sti
108. ceive a free HTS demo kit You ll also get a chance for fun fame and a shot at 15 000 in cash The HEW Target Server design contest is a great opportunity to show off your design skills while testing out this exciting new addition to the Renesas HEW Development Suite Get all the details from our contest website While supplies last Everywhere you imagine gy E E amp E N ESAS Scopes amp Wfm Gens Ethernet 2540MHz USB 14 bit ARB w USB RS 232 LAN GPIB 10 built in wfms FM AM PM FSK SWEEP and BURST 6 digit 200MHz frequency counter DG2021A DG2041A 995 1495 Owon 25MHz 2 ch trigger standalone USB bench scope with 7 8 color LCD Battery powered optional PDS5022S PDS6062T 6 in 1 USB scope adapter 200kHz 2 ch 10 bit scope 2 ch spectrum analyzer 2 ch chart recorder 16 ch 8MHz logic analyzer 5 ch signal gen 8 ch pattern gen SPI I2C 1 w UART decoding PoScope with probes 199 USB to 12 Devasys Provides a simple drop in solution for connecting your PC to 90kHz I C 20 I O lines Free software Use multiple boards for more I C IO USB I2C IO 79 Serial Ethernet Cable Network your serial product easily without a PC using this 28 cable Provides an instant IP address RS 232 port compatible with most 10 100mpbs Ethernet hubs eCOV 110 P 89 EMC Spectrum Analyzer a Handheld PalmPC based 2 7GHz Spectrum Analyzer Continuous single peak hold avg sweeps
109. ck in a spiral arm of the Milky Way galaxy For a little comparison in scale let s use the speed of light the fastest measure we know From the sun it takes about 8 min for light to reach Earth about 80 min to reach Pluto This makes the diameter of our solar system about 160 light minutes or 2 6 light hours about 1 10 of a light day or 1 3 650 of a light year The size of the Milky Way is about 65 million times larger or more than 18 000 light years It contains hundreds of millions of stars It is enough to know that the Milky Way galaxy is only a speck in the uni verse The number of galaxies in the universe is almost beyond comprehen sion All that is out there is in con stant motion To the average Joe on Earth what he can see from Earth by the unaided eye defines his playing 70 Issue 212 March 2008 CIRCUIT CELLAR only at night and our view of them changes by 00 03 56 each night It takes a full year to see all that the heavens has to offer because we get to see the stars only when we face away from the sun The mapping system of the heavens is similar to our geographical coordi nate system on Earth Imagine a clear sphere surrounding the Earth that is able to stay fixed with the universe so the Earth rotates within it The Earth s axis extends through the sphere effectively giving this new sphere poles The sphere has longitu dinal wedges that are marked by time like time zones
110. com Microblaze soft core FPGA Xilinx Inc www xilinx com CIRCUIT CELLAR eX perience X BOB turn serial data into video text now with bitmap amp vector graphics new XBOB 4 exceptional features great price www decadenet com Ll DECADE ENGINEERING 503 743 3194 Turner OR USA PRESTO The First USB In Circuit Multipurpose Programmer VPP MIV pI uc Pi irit 1 A UO d PS LEOCK Our r L PE LYF Very fast and flexible in system programmer for many devices e Atmel AVR 8051 architecture e Microchip PIC dsPIC rfPIC e Texas Instruments MSP430 e ARM MCUs by Atmel NXP Philips including debugging e FPGAs CPLDs amp SCPs by Xilinx Altera Lattice e Serial Flash EEPROMSs SIGIVIA Unique Logic Analyzer With Extremely Large Memory for more than 14 000 000 events up to 16 inputs up to 200 MHz sampling flexible triggering aand more MU Beta unique PIC emulator USB modules parallel amp serial SPINET Ethernet SPI interface Development boards and kits For developers by developers tools asix net Issue 212 March 2008 85 86 AD FORMAT Advertisers must furnish digital submission sheet and digital files that meet the specifications on the digital submission sheet ALL TEXT AND OTHER ELEMENTS MUST FIT WITHIN A 2 x 3 FORMAT Call for current rate and deadline informati
111. configuration options The only option for most VAIO HP Toshiba etc laptop owners is to try to install XP as a second disk partition The good news is that this indeed gives you back the use of XP but apparently Vista never goes away and doing this has its own unique set of bugs Forget that Still hardware is hardware isn t it Logic suggests that we should be able to simply buy a new HP or Gateway laptop wipe Vista off the machine and then install XP Unfortunately the reality is that most retailers are selling a lot of this new hardware as Vista only machines and internal peripher al XP drivers aren t necessarily available for that specific laptop The result is that it may require numerous calls to the manufacturer how s your Chinese to obtain XP drivers Yes you can install XP but you might find that the DVD player doesn t work because you have the wrong driver So right now sitting here with three computers like to upgrade and about 6 000 I m not spending on any manufacturer until someone sells me a new laptop with XP Pro on it have a list of favorite brands but I m open to suggestions If you ve spent more time researching this problem and have some answers please e mail me and tell me where to look In the meantime PII trust that Vista Service Pack 1 has helped mitigate some of the performance issues but until then guess Google s content scanning will make this editorial 150 001 the next time someone searches
112. cuit Cellar amp makes no warranties and assumes no responsibility or liability of any kind for errors in these programs or schematics or for the consequences of any such errors Furthermore because of possible variation in the quality and condition of materials and workmanship of read er assembled projects Circuit Cellar amp disclaims any responsibility for the safe and proper function of reader assembled projects based upon or from plans descriptions or information published by Circuit Cellar The information provided by Circuit Cellar amp is for educational purposes Circuit Cellar amp makes no claims or warrants that readers have a right to build things based upon these ideas under patent or other relevant intellectual property law in their jurisdiction or that readers have a right to construct or operate any of the devices described herein under the relevant patent or other intellectual property law of the reader s jurisdiction The reader assumes any risk of infringement liability for constructing or operating such devices Entire contents copyright 2008 by Circuit Cellar Incorporated All rights reserved Circuit Cellar is a registered trademark of Circuit Cellar Inc Reproduction of this publication in whole or in part without written consent from Circuit Cellar Inc is prohibited www circuitcellar com An ARM Company ARM Microcontroller Solution T ARM Powered Microcontrollers available from
113. cuit Cellar distributor Use low cost DC PM brush motors Proportional PWM Forward Reverse Controls 2 motors independently Or mixed tank steering algorithm 5 30 V 30A motor 70A starting Adjustable current limiting Dynamic brake and Clutch output CDFR for 8 bit parallel port I O RDFR for R C servo command 800 8826832 Visa MC VANTEC RS232 TCP IP e TCP com v2 0 Circuil Cellar will Entice customers to stay in your store longer Ultrasonic sensors measure target distances from 2 in to 37 feet Motion Control 6 Easy to install Dimensioning inexpensive Positioning e Many options High sensitivity models CALL now 800 677 3649 S NIXe e mail cci senix com www senix com Attract repeat walk in business Serve as a useful product demonstration tool Contact Sean Donnelly seani circuitcellar com USB Host Stack Yestondar LA May 214 Measurement amp Sensors Space Close March 12 USB 2 0 EHCI OHCI UHCI ISP116x ISP1362 ISP176x ARM ColdFire BONUS DISTRIBUTIONS R5232 to TCP IP software Hub Mass Storage Modem Sensors Expo PCB East Plus TCF IP to RS232 Mouse Keyboard Printer tm Serial Converter ESOS WinWedge RS232 or TCP IP how Cost Reval ies T data direct into any Windows Full Source Code June Issue 215 ie Access elc Standalone or RTOS Communications Device and OTG Available Space Close Apr 1
114. d Linux compatible MPUs Of course the raison d etre for an FPGA soft core is the flexibility to jettison baggage if you don t need it So simpler memory management solutions are an option CIRCUIT CELLAR 38 LUTs trated in giant but hidden applications such as automotive Most of their business is figuratively not to Issue 212 March 2008 83 mention literally under the hood It s true that a lot of Renesas MCUs reach the general purpose mass mar ket but the success is spread across a catalog bursting with decades worth of legacy parts hand ed down from Hitachi and Mitsubishi To be fair the line up is pretty coherent at the low end e g entry level H8s and the high end SuperH It s in between where position ing gets tricky with high line H8s and middle of the road M16s and M32s all jostling for the same sockets Enter the new RX family which is said to stand for Renesas Extreme Frankly it s also the Rx for marketing indigestion brought on by architectural overindulgence RX is said to offer big tent compatibility and an upgrade path for all the existing mid range parts For example there s explicit bi Endian support to accommodate the big Endian and little Endian parts in the current line up see Figure 4 Technically what I ve seen of RX so far makes sense to me Notably I give Renesas credit for calling a spade a spade or in this case a CIS
115. d hardware and software Monte introduces a simple peripheral chip that can take care of all of the low level functions these days of chips with almost unlimited transistor budgets it is hard to find a new peripheral chip to use when the main CPU doesn t have exactly the right mix of I O This is because it s hard for chip architects to come up with a balance of functionality transistors versus pin count that makes sense As a result system designers often end up having to add either an FPGA or a small microcontroller to perform specialized I O tasks While this isn t a big deal as far as the hardware is concerned it adds another layer of software complexity The Rabbit Semiconductor I O RIO device was designed specifically with these facts in mind In this article I ll describe the features of this new peripheral chip that should take care of everything you might need for a robot ics or motion control application Then give some examples of how to use the device for everything from driving motors to sensing position TALKING TO THE CPU This device consists of eight identical channels in a small 10 mm x 10 mm 64 pin package To make the RIO as general purpose as possible there are six different options for connecting the device to a CPU The signals for the different bus interface options are shown in Table 1 A traditional parallel interface is available with the usual Chip Select Read Strobe Wri
116. d output data acquisi tion and remote control systems George is a charter member of the Ciarcia Design Works Team He s cur rently working on a mobile communi cations system that announces high way info He is a nationally ranked revolver shooter www circuitcellar com PROJECT FILES Cycle Circuit Cellar Online 123 2000 To download code go to ftp ftp circuit cellar com pub Circuit Cellar 2008 212 Manca Finite Machines and Microthreads Circuit Cellar 193 REFERENCES 2006 1 Wikipedia Linked list 2007 http en wikipedia org wiki Linked list N Parlante Linked List Basics Stanford CS Education Library 2001 http cslibrary stanford edu 103 2 Wikipedia Code review 2007 http en wikipedia org wiki Code_ review Linked List Problems Stan ford CS Education Library 2002 http cslibrary stanford edu 105 V Kosuri UML in a Product s Life LinkedListProblems pdf RESOURCES Fighting against your PCB Design Software Here s something that will spare your time and your budget Boards designed under EAGLE are found in patient monitoring equipment chip cards electric razors hearing aids automobiles and industrial controllers They are as small as a thumbnail or as large as a PC motherboard They are developed in one man businesses or in large industrial companies EAGLE is being used in many of the top companies The cr
117. device and then the data is transferred in a second serial operation The serial bus is still reasonably high performance because the maximum serial clock rate is the system clock divided by four and the system clock frequency can be as high as 40 MHz The final bus interface option uses the serial RabbitNet protocol which is a link layer protocol for connecting a processor to distributed slave devices that is proprietary to Rabbit Semicon ductor I won t go over the details here but you can think of RabbitNet as an inexpensive alternative to USB The serial interface options do not use nearly as many pins as the parallel bus option so there are a number of pins left over Four of the unused pins serve as general purpose inputs in this case The dedicated Interrupt Request pin is independent of the bus interface To make the device as general purpose as possible there is no provision for an interrupt acknowledge signal Instead interrupts are removed by clearing the status bits that signal the type of interrupt that is pending Determining what kind of interrupt is pending is straightforward A global register has an interrupt pending status bit for each channel and a register within each channel indicates exactly what type of interrupt is pending CHANNEL HARDWARE Each of the eight channels in the device is built around a 16 bit up down counter and four I O pins While this might not sound like much hardware per channel
118. ducts Micro C ampitet Contral PC of Philp Corrie O Keefe Electronics Inc www okeefe electronics com 1 800 957 6867 140647503 0 www mcc us com www circuitcellar com CIRCUIT CELLAR Issue 212 March 2008 87 Pa arp eU NEM 7 VB j AMOR En AAT anging is 9 Low power 2 5V 5 5V current 2mA b Tiny size less than 1 cubic inch Low cost Choice of beam patterns Easy Interfacing Serial pulse width amp analog voltage outputs Reliable and stable range measurement No dead zone Detect objects up to the front sensor face For more info please visit us at www maxbotix com Portable benchtop 25Mhz 2 ch color LCD Scope Download waveforms via USB1 1 to PC 7 8 640 x 480 Color LCD 3 5lbs i Sampling Rate 100 MS s Volt Time Automatic Measurement Peak to peak Value Average RMS Frequency and Cycle FREE 1x 10x probes USB cable Compare with expensive LCD scopes PDS5022S 325 PDS5022S BAT Battery Powered 399 1 888 7SAELIG info saeli NOTHING IS IMPOSSIBLE FLYPCB YOU DESIGN WE PRODUCE Start from 40 4 Days for Double Layers 24 Hour Feedback Available Low Price High Quality Fast Service Small or Large Volume Accepted What are you waiting for WWW FLYPCB COM SALES FLYPCB COM WES Willies L ompurer Seltwar
119. e 5 Exiremetly easy to install and use 0istances up to 100 meters 329 feat Aluetooith Sena Por Profile ac Communicates wih Bluetooth enabled PDAs Laptops Smartphones amp Computers o programming or special software needed Professional serial communication libraries amp development tools PCMCIA USB Universal PCI amp ISA multiport R5232 Rs422 amp Rs485 cards Bluetooth USB Dongles t writes your USB Code NEW HiOmaker FS for Full Speed FLASH PIC18F4550 Creates complete PC and Peripheral programs that talk to each other over USB Ready to compile and run Large data Reports 64 000 bytes sec per Interface Easily creates devices with multiple Interfaces even multiple Identities Automatically does MULTITASKING Makes standard or special USB AID devices NEW Developers Guide for USB HID Peripherals shows you how to make devices for special requirements Both PC and Peripheral programs understand your data items even odd sized ones and give you convenient variables to handle them PIC18F Compilers PICBASIC Pro MPASM C18 Hi Tech C PIC16C Compilers PICBASIC Pro MPASM Hi Tech C CCS C PC Compilers Delphi C Builder Visual Basic 6 HIDmakar FS Combo Only 5599 95 DOWNLOAD the HiDmakxer FS Test Drive today Issue 212 March 2008 www TraceSystemsinc com 301 252 0300 CIRCUIT CELLAR f amazing advances in
120. e GPS output string includes a magnetic variation element Now that we know which way is north we can move to any other coor dinate in the celestial coordinate sys tem from the known point directly overhead But how does the SkyScout lead the user toward an object of inter est The sighting tube has eight LEDs located around its interior circumfer ence Real time calculations based on the celestial map and position sensors up and north determine the shortest route and guide your movement toward the object of interest One or more of the LEDs are illuminated to gently direct the Gravitational sensors Magnetic sensors Stereo DAC Audio playback SD MMC Socket Keypad Brightness Keypad LEDs USB cm interface Temperature sensor Figure 5 This block diagram shows what peripherals support the ARM processor s bid to make one of the most user friendly high tech educational instruments to be developed in recent years The SkyScout rivals the iPhone for cool CIRCUIT CELLAR www circuitcellar com user toward the destination see Figure 4 Because the SkyScout senses magnetism and accelera tion in all three axes the proces sor can continue to calculate the correct direction independently of how you are holding the Sky Scout Object identification and location will work night or day and even through the Earth as if the sun and Earth don t exist Although we can t see objects during dayli
121. e com i Low os Ba Kits USB DONGLE The USB DONGLE and Derivative Boards allows quick and easy ICPASP programming of many popular microcontroler families such as the LPCSxx ARM LPC2xxx and 89V52xX2 fron MXP Semiconductors The kit includes a Virtual COM Port Driver that allows hex files to b dowrdoaded and programmed using Flash Magic or other common utilities The unit also provides a low cost platform for testing or prototyping of simple microcontroller based designs blink am LED measure ICG test a Timer o POA output Low cost Derivative Boards are available for many different mictoconirollers from NAP Please consult our website for details Derivative Boards i 10 eee LPC9103 HVSON10 ARM LPC2103 3 LOFP48 XA Development Kits I2C MDIO amp SPI tools in stock visit www teamfdi com for details Future Designs Inc 2702 Triana Blvd Huntsville AL 35805 www teamfdi com 256 883 1240 VISA MCIAmex Fax 256 883 1241 Issue 212 March 2008 USB Add USB to your next project it s easier than you might think e USB FIFO up to 8 mbps e USB UART up to 3 mbps e USB Microcontroller boards pre programmed with firmware e 2 4GHz ZigBee amp 802 15 4 e RFID Reader Writer Absolutely NO driver software development required www dlpdesign com DLP Design HIGH PERFORMANCE SOCKETS amp ADAPTERS Package Converters SOIC DIP BGA QFP BGA
122. e counter unless a valid transition has been detected In addition the quadrature inputs both contain digital Quadrature E Oe dec dec dec dec dec Figure 4 Rotational position and direction is sensed using quadrature signals Tracking the absolute position requires an index pulse CIRCUIT CELLAR www circuitcellar com More Efficient 3 Phase Motor Control Wide Range of Memory Options Simultaneous Sampling for Optimal g Contro 77 Sy 9p Sensor or Sensorless Applications E Separate Time Base for PFC lt Advanced i Algorithms fof Optimal Efficiency AA Sy P uo 29 7 Y aln ae A _ Crystal i _ 2 Explore the New Motor Control Solutions from Microchip Are you considering moving to brushless motors eliminating costly sensors or adding PFC Let Microchip show you how to improve your efficiency lower noise reduce your form factor and explore cost reduction options Visit www microchip com DSCMOTOR and discover Microchip s comprehensive motor control solutions which feature 16 bit digital signal controllers free software development tool discounts technical training and more Looking for Microchip Has the Solution Add Power Factor Correction PWM with 2 Time Bases Energy Savings Incorporate Field Oriented Control Free Software Noise Reduction Incorporate Sinusoidal Control
123. e low battery detect signal or some other bit of status information Channel 5 is used to control four servos perhaps for four degrees of freedom on an arm attached to the turret This channel uses a divided clock for the slow frame rate of the servos Channel 6 controls a pair of servos for tilt and pan for a cam era on the turret while the other two pins connect to two contact sensors for the inevitable case when the plat form bumps into something The two inputs can be either polled or used to generate inter rupts The divided clock is also used for this channel Channel 7 is used for the last two contact sensor inputs so two pins and the timer are available for some other use If the contact sensor inputs are polled they could be assigned to the unused pins on channel 2 CIRCUIT CELLAR freeing up this channel for some other function WRAPPING UP At first glance the RIO seems like a pretty simple peripheral chip but a fair amount of thought went into the features to make the device useful for robotics and motion control applica tions Yes everything that the RIO does can also be done with an FPGA or a small microcontroller but dedi cated hardware will almost always be a better choice Give it a look next time you need to control something that moves sl Author s Note Thanks to Norm Rogers of Rabbit Semiconductor for his vision of a simple multi purpose I O chip I also want to thank Pedram Abol
124. e novel system includes two LCDs LCD 1 is a 4 x 20 character display for transmitting and receiving text data LCD 2 is a 144 x 32 pixel graphics display for showing the FFT generated spec trum of the audio passband George Heron and Milton Cram LES n2apb verizon net Data Acquisition System for Radiation Measurement This innovative data acquisition system measures cosmic rays natural background radiation and emissions from other radioactive objects The compact system features dsPIC30F4012 data acquisition processors running in parallel in a variable time slice manner A dsPIC30F6014A controls the data acquisition processors gathers the collected data and formats the data for display Peter McCollum saipan59 q com Braille Glove The well designed Braille Glove system simulates the 26 Braille codes The system features two gloves that communicate wirelessly The main board includes a dsPIC33FJ256MC510 microcontroller which controls four vibration motors four accelerometers and a 32 KB SPI serial EEPROM 25LC256 This system provides a unique method for someone to both read and speak using Braille Hoa Phan Vincent Dinh Tu Anh Ton and Nghia Tran BS hphoa9 yahoo com To see these projects and more visit www circuitcellar com microchip2007 FEATURE ARTICLE by Miguel Sanchez Vertical Plotter System Miguel explains how to build a vertical plotter system that can draw on canvas with a pencil
125. e power consumption on www atmel com avrman Gorperuticri AP imana d pe ring agian may be cars bo sonia to sna DN Fnning Fatrikknn 5 Mykle Wood NEW PRODUCT NEWS ETHERNET CONTROLLER FOR HIGH END SYSTEMS WIZnet has rolled out its newest chip the W5300 which is twice as fast and offers more channels than the currently available W5100 Like its predecessor the W5300 integrates an Ethernet MAC and PHY as well as a fully hardwired TCP IP core into an easy to use chip However it also enables you to use an external third party PHY rather than the internal one The W5300 offers stable speeds up to 50 Mbps which is enough to watch movies in real time rather than on a buffered basis It also supports eight independent socket channels provides dynamic memory allocation according to channel throughput and offers a 16 or 8 bit data bus The W5300 has the capabilities to meet Triple Play Service Broadband Access VoIP and digital broadcasting needs The estimated cost for the W5300 is 5 99 in 1 000 piece quantities WiZnet Inc www wiznet co kr Edited by John Gorsky Visit www circuitcellar com npn for more New Product News J om Spt Dit bas with Memory fo channel LOBasET LOO BaseTE Ethemast PHY embedded Support Auto MDLMDIE Cmssowr EASY TO WORK WITH UML SEQUENCE DIAGRAMS The Trace Modeler v1 0 is an eas
126. e you are standing around getting the mail out of the mailbox A nice final touch was enabling the speaker to buzz when the strike signal was low This gives the user some auditory feedback in time with his cadence and assures the user that the unit is functioning properly I ve used the pedo speedo on a cou ple of training runs and I am surprised at its accuracy I often make sponta neous decisions about which way to go during my runs making it difficult to determine the distance of a run However this is not a problem when I have the pedo speedo with me MASTER SMDs I hope that this article has made you confident enough to use surface mount devices in your next project With a few tools and a willingness to try Iam sure that you can pick up the necessary skills to master SMDs Learning these skills will turn out to be a wise investment because sooner or later you will run across a device like the ADXL330 which comes only in a surface mount pack age After your first project using SMDs Iam sure that you will find that their space savings enables you to pack a big punch in your tiny embedded project In the next installment I will show you how to take the acceleration val ues from the DIY Wii send them to your PC and use this information to manipulate 3 D graphics Hopefully you will learn how to leverage the power of your PC and the diminutive CIRCUIT CELLAR games Chris Coulston has a PhD in Compu
127. edded Linux 169 16MB FLASH 32MB RAM Qty 1 m 200Mhz Arm9 CPU 16 Digital I O A T EzPL b Watchdog 10 100 Ethernet vy LE i 2 Serial Ports e Battery backed Clock Calendar Professional F CB Supplier R13 Final result of multiplication R13 R12 Value returned to calling function The grouping is done starting from the inv w R13 2 s compliment since the last digit is i add w 1 R13 rightmost bit and proceeding left rra w R13 Figure 5 shows an example with the cia RI steps involved in binary to CSD conver rra w R13 sion and subsequent reduction in add add w R12 R13 operations The ternary element 1 is rra w RIS represented as 1 in Figure Mau c E Y22X1 2 2 X For the fractional multiplier starting rre RAS from the rightmost replace the first rra w R13 group of 1s 274 to 27 by a combination rra w R13 of 1 0 1 The four 1s are combined rra w and 1 is placed at the rightmost bit i position 2 zeros at the remaining RIZ RIG X3 2X2 2 6 Y position 27 to 2 and a 1 in the 1 bit rra w R13 position to the left of this group 27 rra w R13 This procedure is repeated for subsequent rra w groups of ones already present or created M p dn R13 X4 X3 2 4 from previous groupings A similar proce iar BIS Upscale final result by 16 dure is shown for the integer multiplier rla w R13 The reduction in add operations is two in rla w R13
128. equinox While the northern hemisphere heads toward winter with shorter periods of daylight the southern hemisphere looks toward summer and longer periods of CIRCUIT CELLAR daylight At the half year mark anoth er solstice occurs Now the South Pole is closest to the sun and the southern hemisphere experiences summer while the northern hemisphere is mid winter After another equinox at nine months the Earth heads back to its original position and the yearly sea sonal cycle begins again The Earth is geographically mapped using latitude and longitude Latitude is a north south measurement Lines of constant latitude run east west around the Earth s circumference par allel to the equator Longitude is an east west measurement with lines that run pole to pole dividing the Earth into orange wedges The prime meridian is the longitudinal arc between the two poles that passes through Greenwich England It has been assigned 0 with 180 on the opposite side of the Earth Longitudi nal lines to the east of the prime meridian are designated 0 to 180 E To the west of the prime meridian they are designated 0 to 180 W Latitudinal lines are north south measurements based on the equator The equator is designated as 0 From the Earth s cen ter angles measured from the equator 0 to either pole 90 divide each hemisphere into rings parallel with the equator either 0 to 90 N north of the equator or 0
129. er MAX GROUPS is defined as 10 MAX NUMB as 4 and I m going to define MAX DIGITS as 25 That should be large enough to dial numbers like CIRCUIT CELLAR 9 118005551212 123 20 INT8s Where the indicates a pause So in my example we re dialing 9 pausing three units dialing a 1 800 number then pausing two units and then dialing extension 123 I think that should cover just about any dialing issue that might come up This design uses MAX GROUPS x MAX NUMB x MAX_DIGITS 10 4 25 1 000 bytes of memory That data needs to be saved in a nonvolatile memory area so that it s preserved between power outages That non volatile type of memory is usually EEPROM and it is more expensive and smaller than RAM or EPROM So we need to use it wisely I think this design meets those requirements Great I wrote up this design approach and was ready to start Not so fast The customer called and asked if we could also handle 30 events with only one number for each event Well of course we could but how If we extend the present design MAX GROUPS becomes 30 and MAX GROUPS x MAX NUMB x MAX DIGITS 30 x 4 x 25 3 000 bytes of memory In the second design request we would be using one of the four available numbers 2596 and in the original design we would be using 10 of the 30 groups 3396 Neither is using these valuable resources very well and I bet the customer will come up with alternative requests that lead
130. er months of learning C it s time to apply what you ve learned in a real world application George explains how to tackle a real design problem from start to finish For more about C language and writing code visit George Martin s blog CCI C Programming Design Review at http ccidesignreview wordpress com Code and additional files are also available on the Circuit Cellar FTP site bm been learning C for a while now Hopefully you can read and write C code This month I would like to take a real design problem from the beginning to the end Along the way we ll create a design make design trade offs accept changes and code the design This should be interesting DESIGN CHALLENGE A few months ago a customer asked if I would add a feature to their product The customer wanted me to have their product call out using the telephone interface whenever a prob lem was detected The design already had a PBX interface that passed FCC Part 68 The PBX interface was used to permit a user to call the unit and enter commands After a few more discussions the customer thought that there might be 10 events that would cause a call out to be initiated and that there should be four tele phone numbers to dial for each of the 10 events The numbers would be dialed and a message played to the user If the user entered the proper response the error event would be considered reported if not the next number would be called This is
131. errupt just assign an I O pin as the increment or decrement signal and select the appropriate edge or level to generate an interrupt Non contact position sensing is sup ported by the Toggle Output mode In this mode an I O pin can be driven with the logical AND of a status bit and one or more of the least significant bits of the counter This feature is use ful for creating a tone burst to drive an ultrasonic transducer see Figure 5 One channel can handle both the creation of the tone burst and meas urement of the time to detect an echo The sequence can be started under program control by forcing a sync sig nal which can set the status bit and enable both counting and the burst of pulses A second I O pin can output the range gate signal created from another status bit A third I O pin is used to input the echo detect signal The input is programmed as the decre ment signal to latch the count for determining the round trip delay THE LITTLE STUFF There are a number of other bits and pieces that are common in robot ics and motion control The first is servos to move things The most com mon servos use a PWM signal to con trol movement Typical timing for a servo is shown in Figure 6 The 20 ms frame rate of a servo cou pled with the 16 bit counter in a chan nel implies a maximum frequency into the counter of just over 3 MHz Because the RIO is specified to operate at up to 40 MHz and the CPU bus interfa
132. ervo 4 Channel 5 Servo drive slow clock Servo 5 Channel 6 Servo drive slow clock Servo 6 Interrupt inputs Channel 7 Interrupt inputs Figure 7 The RIO has the resources to handle an entire robotics application with room to spare www circuitcellar com Left track drive Right track drive Left track velocity Right track velocity Turret drive Q Turret position Front left contact Front right contact Rear left contact Rear right contact 20 ms frame Center 1ms d bo 0n 0o Full left 0 5 ms Lee Full right 1 5 ms _ je Figure 6 Many servos use a 20 ms frame and a 1 to 2 ms position pulse It s easy to create four such signals per channel No positional feedback is required for the tracks but velocity information is required for closed loop control and fault detection Two inputs and the timer in channel 2 are used for this function The timer can be pro grammed to measure either the width of the velocity pulses or the time between successive velocity pulses depending on how the signals are cre ated The two remaining pins of chan nel 2 are available for use as simple inputs or outputs Channel 3 is used to control an H bridge that drives the motor for the turret Controlling the turret requires positional feedback so channel 4 is used as a quadrature decoder for this function The remaining I O pin in channel 4 feeds back th
133. es were soldered to connect the controller board to the pen holder It isn t very elegant but it s effective CONTROLLER BOARD At first I planned to use a PC to control this device after all a user would draw designs on a computer but I did not have any suitable hard ware to use for this project Fortunate ly after searching the Internet I dis covered a USB based stepper motor controller from an Australian compa ny It features a Cypress Semiconduc tor microcontroller and a couple of ULN2803 line drivers see Photo 2 The board controls three unipolar stepper motors up to 1 A 30 V and includes some sample software While working with the board I realized that the board had 12 open collector outputs which wasn t WWW circuitcellar com exactly what I would call a stepper motor controller but it worked well with my two unipolar motors The software included an ActiveX compo nent that I could include in a Visual Basic project Sample code was provid ed I hadn t used Microsoft Visual Basic for quite a while but after downloading the free Express Edition I was up and running in no time I tried to use a solenoid to lift the pen up and down but given my lack of mechanical skills the system wasn t operating properly So I switched to a more elaborate mechanism where the rotation of the motor translates into a longitudinal motion that moves a metal lever so the pen touches or does n t the canvas s surface
134. escale banner But Coldfire is the core that Freescale expects to do the heavy lifting when it comes to general purpose MCU applications While the chip name may have changed the fam ily resemblance of Coldfire to the ven erable Motorola 68K is no coincidence Designers have made it clear that when Virtex 5 Resources Spartan 3 Resources STM32F103CB STM32F103RB STM32F103VB 20 KB RAM 20 KB RAM 20 KB RAM STM32F101CB STM32F101RB STM32F101VB 16 KB RAM 16 KB RAM 16 KB RAM STM32F103T8 STM32F103C8 f STM32F103R8 gj STM32F103V8 20 KB RAM 20 KB RAM 20 KB RAM 20 KB RAM STM32F101T8 STM32F101C8 STM32F101R8 STM32F101V8 10 KB RAM 10 KB RAM 10 KB RAM 10 KB RAM STM32F103T6 STM32F103C6 STM32F103R6 10 KB RAM 10 KB RAM 10 KB RAM STM32F101T6 STM32F101C6 STM32F101R6 6 KB RAM 6 KB RAM 6 KB RAM 100 pins LQFP BGA 48 pins LQFP 64 pins LQFP Figure 2 Right out of the gate STMicroelectronics offers more than a dozen Cortex M3 based STM32 MCUs divided into the Access i e 36 MHz low cost and Performance 72 MHz with USB and CAN lines But that s not all Parts with more flash memory e g 512 KB and more pins e g 144 are already in the works it comes to embedded the old ways are usually the good enough ways The latest V1 version of Coldfire cuts the fat to compete in the low end buck and change segment which is where growth is really exploding For less than 2
135. ester R276 technical documents tems class the pedo speedo The goal sequence temperature data was gathered There are two shortcomings associated of the pedo speedo was to use the Tibbo Build your next automation project around our recHNoLocv EM1000 BASIC programmable Embedded Module 50 MIPS CPU High speed parallel slave port e 1O0BaseT Ethernet port Real time clock with backup power e 512K flash disk 49x general purpose 1 0 lines 4x high speed UARTs Development kit available EM1000 SK Code and debug your Tibbo BASIC application using Tibbo Integrated Development Environment TIDE software Write in familiar BASIC language zs Inspect objects procedures Programmable in BASIC 3 E md and variables Optimized for real time rm ee i NE auto applications gu Espere code hints Rich object set i e Set breakpoints execute Built in webserver a So Event driven operation La j cia Me sophisticated development iix aud environment supports a ER cross debugging ICE needed web www tibbo com email sales tibbo com www circuitcellar com CIRCUIT CELLAR Issue 212 March 2008 49 time varying acceleration data from a DIY Wii mounted on a runner s hip to infer his speed and distance The starting point for this project was to configure the DIY Wii as a data logger to collect data over a fixed length course to determine the rela tionshi
136. et chip an MP3 decoder chip for streaming music an organic LED graphical display and a 24LC512 EEPROM for storing alarm data fonts and images DJ Delorie U S dj delorie com My project is a streaming nternet alarm clock It has no self contained music ability but instead streams MP3s off my office computer It has the potential to be connected to streaming radio sta tions My old alarm clock which also built was dying and needed a replacement that let me set the alarm from my office so wouldnt wake up my wif e at night This project was also an excuse to try out some new technology like OLED displays and M P3 decoder chips as well as learn about the PI C24 microcontroller The C24 was easy to prototype with because it came in standard package had the entire design working on a solderless bread board before committing it to the PCB and adding Support for CP was trivial The pin select feature really came in handy as needed a lot of peripher als for this project Without it would be forced to use a package with more physical pins DJ Delorie THIRD PLACE Full Feature Portable LCR Meter LCR meters used to be relegated only to professional design labs Not any more This portable LCR meter makes it easy for you to analyze the analog performance of virtually any device under test whether in your lab or on the job The dsPIC30F401 2 based meter uses DDS techniques and DSP methods t
137. eter to determine slope What s the Slope Use an Accelerometer to Measure Slope Circuit Cellar 202 2007 The Earth s gravity looks like a 1 G acceleration toward the center of the planet Once the GPS has stopped and the Earth and the sky are in a fixed position the accelerometer will provide a refer ence vector from the center of the Earth through your position and extend directly overhead into the universe This vector enables the www circuitcellar com LUMINARYM Connected Versatile Cost effective RDK ACIM RDK BLDC RDK Stepper AC Induction Motor Brushless DC Motor Stepper Motor 379 00 219 00 199 00 D MICRC STELLARIS T powe Cortex ane AC SERVO SYSTEM Including 250 watts AC servo motor 14 bits absolute sensor 250 walts AC driver As low as 399 99 www dmm tech com DMM Technology Corp USB Oscilloscope for 169 50 CELLAR back issues available as Searchable Archives on CD ROM CD ROM 12 2007 Issues 198 209 CD ROM 11 2006 Issues 186 197 CD ROM 10 2005 Issues 174 185 CD ROM 9 2004 Issues 162 173 CIRCUIT Order Online www circuitcellar com or call 860 875 2199 74 Issue 212 March 2008 by miles a year It is inter esting to note that charged particles from the sun cause it to wander in a daily ellip tical perturbance Mapmak ers note the difference between true north and magnetic north for a given map by declari
138. f the parts are at a uniform temperature The tempera ture is rapidly increased during the reflow phase causing the now dry sol der paste to liquefy attaching the parts to the PCB During the cooling phase the assembly is allowed to gradually cool to avoid thermal stress on the parts The temperatures and times for each of the zones characterize a ther mal profile The technical documents for a popular solder paste like Kester s R276 suggest a thermal profile If you are planning on building a million cell phones you will need a reliable high yield process that will justify the expense of a sophisticated reflow oven However a careful look at the Kester technical documents reveals a caveat The profile shown is simply a start ing point recommendation A wide variety of profiles would work effec tively with R276 paste The folks at SparkFun Electronics took the chal lenge to see just how tolerant solder paste is to changes in its profile They came up with a low cost effective and innovative technique called the 46 Issue 212 March 2008 reflow skillet The reflow skillet is nothing more than an electric griddle commonly used to cook on I bought a Rival removable plate griddle for 30 from my local big box store It has a 10 x 20 cooking area large enough for even the largest PCBs and an easy to access temperature knob I don t need to tell you that once you use the grid dle to reflow a PCB with its ass
139. fear of CPU overhead on the real time imple mentation of digital filters The num ber of CPU cycles and code size depend entirely on the resolution cho sen for the filter coefficients There cannot be a compromise on the inte ger part but fewer resolutions for the fractional part can significantly reduce the CPU cycles with a compromise to performance This method is certainly not limited to processors without a hardware multiplier Instead it paves the way for integer real multiply on fixed point machines With memory getting cheaper by the day code size can never pose a limitation for such a powerful scheme Kripasagar Venkat kripa ti com is an applications engineer for MSP430 microcontrollers at Texas Instruments He holds a Master s degree from the University of Texas at Dallas with an n s 3605 1x s 92000 29 EMAC inc 2007 LLETTLLTTLLLELLLETLTELLT LET LETLETLLETLLLTT 2 6 Kernel he SoM 9260 uses the same small SODIMM form factor utilized by other EMAC SoM modules and is the ideal processor engine for your next design emphasis on digital signal processing His current interests include signal processing and filter design for low power applications To download code go to ftp ftp circuit cellar com pub Circuit_Cellar 2008 212 1 S K Mitra Digital Signal Process ing A Computer Based Approach McGraw Hill New York NY 2001 2 C Hamacher Z Vranesic and S Zaky Co
140. ftware is required Standard models of the Temperature Mod ule start at 107 16 in 100 piece quantities Xytronix Research amp Design Inc www controlbyweb com CIRCUIT CELLAR www circuitcellar com Customer Sample Aviation Device GUI emWin 6 16 32 bits 20 Graphic Library eWindow Mana er Widgets Complete ANSI C Source Code a RTOS Independent Font Converter Image Converter Develop your Fully functional application on a PC Simulating j 3E E 2 cos from hardbuttons to a touchscreen interface emWin PC Simulation Environment a Detailed User s Manual Extensive Sam pe Code PC Simulation Included emWin is designed to provide an efficient processor independent LCD controller independent graphical user interface for use in any embedded application with or without a commercial RTOS L1 Customer Medical Device www emwWin info www segger com Issue 212 March 2008 11 NEW PRODUCT NEWS NEW RABBITCORE FEATURES MEGABYTE CODE SUPPORT The RCM4300 series enables a new generation of applications that use more memory for data and code The onboard mass storage provides even more performance and easier design than any other alternative in its price range Software design is supported by a new release of the Dynamic C tools Dynamic C version 10 21 includes the new Megabyte Code Support MCS enabling designers to u
141. fully blends its unique circuitry and specialized processing software to precisely match the radically different worlds of high voltage analog and low voltage microcontrollers George Anderson U S tech tubelab com EV Inverter Project The Electric Vehicle EV Inverter project is a starting point for engineers trying to convert a vehicle with a gas engine to one with an electric motor The innovative inverter was built using a control board and software based on Microchip Technology s MC 1 devel opment board It features a dsPIC30F6010A and three dual IGBT modules with gate driver boards The finished system can power a wide range of AC induction motors Rh rai Dena Ponech Doug Krahn Adam McIntyre Tristan Kasmer and Dan Hall Canada ponech ddGforces gc ca Electronic Mini Badge The Electronic Mini Badge is a PIC16F64GA004 based electronic badge that displays color slideshows Many elec tronic badges display scrolling text using a matrix of dis crete LEDs This low power system features a graphical OLED display and can be easily upgraded to handle ani mation video or RF communication Jan Szymanski Australia janek bigpond net au To see these projects and more visit www circuitcellar com microchip2007 NUE PSK Digital Modem The dsPIC33F128MC706 based NUE PSK Digital Modem is a portable PSK31 interface The stand alone battery operated system enables PSK31 field operation without the use of a PC Th
142. gasem Lynn Wood and Steve Hardy for help ing to bring it to fruition Monte Dalrymple has been designing integrated circuits for 29 years After tiring of the corporate world he has been designing on a contract basis for the past 12 years Monte is the design er of all four generations of Rabbit microprocessors as well as the Rabbit I O chip You may reach him at monted systemyde com RESOURCES Rabbit Semiconductor RIO Datasheet www rabbitsemiconductor com products rio Rabbit RIO pdf RIO User s Manual 019 0158 070718 C www rabbitsemiconductor com documentation docs manuals RabbitRIO RabbitRIO pdf SOURCE RIO Programmable I O chip Rabbit Semiconductor www rabbitsemiconductor com Issue 212 March 2008 59 FEATURE ARTICLE Venkat Efficient Micro Mathematics Multiplication and Division Techniques for MCUs Most inexpensive microcontrollers don t have a hardware multiplier module and typically require numerous instruction cycles to perform multiplication and division operations Kripasagar describes techniques based on Horner s method for performing efficient multiplication and division in the absence of a hardware multiplier Loos microcontrollers are typi cally targeted at applications with low levels of complexity and are optimized for cost and performance The devices should offer low power consumption and be simple to design They should also provide ea
143. ght or on the opposite side of the Earth the fact that the SkyScout points there reinforces the fact that just because we can t see it doesn t mean it s not there To provide the SkyScout with the nec essary computational power the design was built around Samsung s S3C24310 an ARM9 series 32 bit processor The device supports plenty of goodies includ ing USB LCD and SD interfacing see Figure 5 The total design is based on three PCBs GPS an LED directional ring and the main processor board Photo 3 shows the LED directional ring removed from its slot in the sight tube and the GPS board with the GPS patch antenna showing The main board holds most of the other components with the opposite side saved for the LCD and membrane push buttons see Photo 4 A USB and headphone jack can be seen on the left and an SD card slot to the right EMBEDDED EDUCATIONAL The SkyScout s ARM processor puts its power to good use in providing real time calculations as its sensor arrays indicate a continually changing position But its expertise doesn t stop there Inte grated SD card slot and stereo DAC interfaces add to the design features The SkyScout s internal field guide provides Photo 3 The LED direction ring has been removed from the sighting tube slot on the left The GPS module is mounted beneath the right PCB The GPS patch antenna can be seen on the topside of the PCB along with the membrane Target button text of
144. gits to dial and a linkage to the next possible number in this structure to try to dial And again a will indicate we ve come to the end of the numbers to try see Table 2 Struct CALL OUT NUMBERS define the structure INT8 DialNumbLMAX_DIGITS INT8 NextNumb F struct CallOutNumbs MAX NUMBERS reserve memory Look at Tables 1 and 2 And remem ber C arrays start at O The first entry DialNumber 0 is empty 1 The second number 1 800 555 1212 is located at DialNumber 1 If that number is dialed and we get no response we should try the number DialNumber 2 If that number 1 800 555 1111 is dialed and we get no response we should dial the number DialNumber 3 If that number 1 800 555 2222 is dialed and we get no response that is the end of the sequence of numbers and we should start the calling out from the first number Hopefully you can see that an event starts the process by looking up the first number using the Cal l0utGroup array From then on the CallOutNumbs structure defines the number and the next number if there is one This NextNumb 1 empty DialNumb MAX_DIGITS 1 empty 1 8005551212 1 8005551111 1 8005552222 1 empty 1 empty Table 2 This is the linked list for our call out sequences 1 indicates an empty entry Issue 212 March 2008 77 CallOut INT8 CallOutGroup MAX GROUPS struct CallOutNumbs MAX GROU
145. h the pen holder has to be at the initial dot location Next the pen is set down and tracing starts From the first dot towards the second dot of the path the process repeats until the last dot of the path is reached and the pen is set up The aforementioned sequence is repeated for each path of the drawing There is something counterintu itive about the dynamics of drawing a line in this system Sometimes a motor rotates clockwise and then changes to counterclockwise while drawing the same straight line This happens because the relationship between the XY coordinates and the corresponding belt lengths is not lin ear From this observation it is apparent that a stepper motor con troller that you instruct with the final location and the desired acceler ation shape will not help you here To get a straight line both motors have to move little by little and not directly to the final location A great and pleasant surprise was that Visual Basic includes support for regular expressions which is a bless ing when you are parsing text lines To see how this is done refer to the code files posted on the Circuit Cellar FTP site POSSIBLE IMPROVEMENTS Getting the system working at an acceptable level took a lot of energy so I left out some details One www circuitcellar com involves trying to reduce the total distance covered by the pen holder for a given drawing This problem is also known as the travelling salesman
146. he newest products from more than 335 leading suppliers TECT Corporation MATHSTAR LUMINARYM ICRO P Yan SO chic NJR CORPORATION ZD en DEVICES INC B ZE TEX power electronics in motion RUTTONSHA SEMICONDUCTORS www mouser com _ 800 346 6873 Over 920 000 Products Online 96 PRIORITY INTERRUPT by Steve Ciarcia Founder and Editorial Director What Happened to Performance seems like I ve been spending a lot more editorial space ranting these days think the reason is that feel more at the mercy of ridiculous engineer ing than used to There was a time when if didn t like how something worked I d just go re design or customize it but with today s complex proces sors and million line operating systems re engineering commercial items is pretty much impossible Basically we re at the mercy of whatever corporate profit inspired crap they want to shove our way Do sound bitter Whether your embedded expertise involves software or hardware our professional lives these days mandate the use of a PC and there aren t a whole lot of options Choices regarding system configuration and processor speeds are still ruled by our wallet as they should be in a capitalistic econ omy but the sad choice of operating systems is a terrible statement of monopoly politics have three computers two Sony VAIOs and a Toshiba that use on a regular basis One is a
147. he seri al port s events are on a separate thread from the GUI Because the PC software initiates most communications with the helicopter it is essential to receive the helicopter s acknowledge packet to verify that the desired data has gone out For this reason each time a packet is sent a timer is started If the timer expires before the expected response is received a timeout event is sent to the GUI The indicators library is used to show the user telemetry data from the helicop ter It is highly customizable we use it to create the indicators from a real air craft control panel i e a compass an artificial horizon and indicator lights All user controls are scalable in size enabling them to be resized on a form CIRCUIT CELLAR size change or other events Dial indica tors can be customized easily for many different applications The numeric range labels number of ticks color ranges and other aspects can be modified to suit any application The left most dial in Photo 1 is an example of a tem perature dial that has been set up with a 40 to 100 C range and warning bands for under and over temperature We drew all of the indicators using the graphics device interface GDI We start ed by making the gauge class which inherits the basic Windows user control and implements all features that are com mon to center dial artificial horizon and compass classes In turn each of the classes inhe
148. ial sighting device uses an exterior LCD to give instructions and information The device has two basic modes of use Identify and Locate Press ing the Target button automatically www circuitcellar com identifies any celestial object that is centered in the sighting tube Alter nately you can flip through a database of objects on the LCD choose one and the SkyScout will steer you toward it via unique pointers in the sight tube To enjoy the SkyScout you don t need to know anything about celestial coor dinates just turn it on and follow the clear instructions However to under stand how this device works you ll need to know a little about the sky EARTH AND SUN The Earth rotates about its North South Pole axis once a day 24 hours It also orbits around the sun once in a year while it spins 365 1 4 rotations or days The Earth s axis is not perpendicular to its orbit but tilted about 23 5 As with the mechanics of most objects the tilt isn t constant But in an effort to make things less confus ing we ll ignore long term effects The Earth s tilt is responsible for the change in seasons At one point during the orbital year the Earth s North Pole will be closest to the sun the solstice The northern hemi sphere is midsummer with its longest period of daylight The southern hemisphere is mid winter with its shortest period of daylight Three months later each pole will be equi distant from the sun the
149. ibe Circuit Cellar Subscriptions P O Box 5650 Hanover NH 03755 5650 Address Changes Problems E mail subscribe Q circuitcellar com GENERAL INFORMATION 860 875 2199 Fax 860 871 0411 E mail info circuitcellar com Editorial Office Editor Circuit Cellar 4 Park St Vernon CT 06066 E mail editor 9 circuitcellar com New Products New Products Circuit Cellar 4 Park St Vernon CT 06066 E mail newproducts circuitcellar com AUTHORIZED REPRINTS INFORMATION 860 875 2199 E mail reprints Gcircuitcellar com AUTHORS Authors e mail addresses when available are included at the end of each article CIRCUIT CELLARG THE MAGAZINE FOR COMPUTER APPLICATIONS ISSN 1528 0608 is published monthly by Circuit Cellar Incorporated 4 Park Street Vernon CT 06066 Periodical rates paid at Vernon CT and additional offices One year 12 issues subscription rate USA and possessions 23 95 Canada Mexico 34 95 all other countries 49 95 Two year 24 issues sub scription rate USA and possessions 43 95 Canada Mexico 59 95 all other countries 85 All subscription orders payable in U S funds only via Visa MasterCard international postal money order or check drawn on U S bank Direct subscription orders and subscription related questions to Circuit Cellar Subscriptions P O Box 5650 Hanover NH 03755 5650 or call 800 269 6301 Postmaster Send address changes to Circuit Cellar Circulation Dept Box 5650 Hanover NH 03755 5650 Cir
150. ication Kit for 2299 Order Online At RABBITS rsappkits com CIRCUIT CELLAR www circuitcellar com Table 1 shows the comparison of Horner s method and its variation to alternate methods for an integer real multiply of the number 711 and the real multiplier 14 98789 The number 14 98789 is first scaled down by 16 right shift by four to get 0 936743125 The result is then scaled up by the same number 16 left shift by four The result of Horner s method is the closest to the floating point library implementation losing only the frac tional part of the final result This result is as good as it can get consider ing its implementation is on a fixed point processor The existing method although generic in implementation loses precision due to finite word length effects at the start of the multi ply To be fair to the integer integer multiply algorithm both cases of rounding up to 15 and rounding down to 14 are shown The multiplier even if rounded up has significant error see Table 1 Although Horner s method requires dedicated code for each multiplier the accuracy it provides is too tempting to use it The CSD format is just an addi tional option to further reduce the execution cycles and code size For real time filtering operations Horner s method is certainly preferred over the other method because it is at T E N T E
151. ice that Ada95 is more readable This is due to the extra effort the language designers took to make Ada95 easy to maintain It is self documenting and bears some resemblance to Pascal If you remember the Pascal language you will see some similarities in the keywords Listing 1 shows an example of how to communicate between an Ada95 applica tion and a remote robot at 115 200 bps 8 data bits and 1 stop bit The SCI interface on the robot s microcontroller is usually labeled UARTO UARTI SCIO or SCII The exception handler in Listing 1 provides error handling for any runtime exceptions that occur in the routine while using the serial port WIRELESS SENSOR CONTROLLER I used my wireless sensor controller board as a testbed for demonstrating some of Ada95 s features including range checking tasking and exception han dling using a laptop As you can see in Figure 1 the controller features a Digi International MaxStream XBee PRO wireless UART The UART transmits the telemetry to a laptop running an Ada95 data collection application for my 18 Issue 212 March 2008 Vex Robotics Power Glove design which is shown in Photos 2 and 3 The heart of the Vex Power Glove is a 16 bit Microchip Technology dsPIC30F6014 sensor controller see Photo 2 The controller provides sen sor data to any laptop using the XBee PRO wireless UART It can be used to read sensors voltage temperature pressure and humidity potentiome ters f
152. ight Version you also gel the reference manual and license for commercial TEE LESTIE The Standard Version s fultatle for Boards ii Eurocard format with up to 4 signal layers max 99 schermati The Professional Version has no such limitations CIRCUIT CELLAR Issue 212 March 2008 79 SILICON UPDATE by Tom Cantrell More Bits Less Filling Tom is a proponent of the 32 bit MCU revolution This month he covers several respectable 32 bit chips that deliver performance at a reasonable price Exciting new applications are on your horizon m readers have heard me tell the story of the IC company exec utive who tried to convince me that the 8 bit market was dead The kicker is that he made that statement 25 years and many billions of 8 bit MCUs ago Indeed as far as I m concerned the 8 bit market will still be going strong in another 25 years True it may not be as much about new applications anymore But don t underestimate the fact there are billions of folks around the globe who have a lot of catching up to do gadget wise There are plenty of unfilled sockets for 8 bitters That being said I ve also been a cheerleader for the 32 bit MCU revo lution These are the chips that deliv er performance at a price that enables exciting new applications Increasingly software is what makes or breaks a product and 32 bit chips can tote the code Whether high end or low the market for MCUs isn
153. ignal acquisition problems positioning amp control environmental LU acceleration transients pressure vibration GPS Linux Driver Guaranteed in stock Customization available 16 bit analog inputs and outputs Million sample FIFO eliminates interrupts Wide analog input and output ranges 40 C to 85 C Standard Pr v uy y stx1 508 256 0767 x24 softwa development tools for hardware kits Elektronikladen Hcos amp HCS12 12 ref design amp starter kits Global Optimizer Full featured 45 day demos on our website Add a color touch interface ta your embedded product uy Loadstar Load Sensing Mado Easy introducing ORC Pro PFlugged low profils digital laariforoa mansos with LESH or analog output He reed fec signal conditioning or dots SOUS sys iJ ust Plug and High level 5252 Low cost Interface in stock Easy to program Add color graphics to amy ATE hit embedded system Easy tasi and Flexible Up and runmaing in hours IR 14 TEEHHELOGY INL wiww reachtech com 510 770 1417 www loadstarsensors com 650 938 4282 sales loadstarsensors com B42 Bapgs Averue Fremeni B4528 Hundreds of complete Cypress PSoC embedded projects Atmel AVR Haps 11 12 16 x fri MSP430 Pod d ARM i ad
154. ing serial linear programming would require a finite state machine FSM 16 Issue 212 March 2008 Ada s deterministic scheduler makes it easy to schedule tasks and assign them priorities Passing data between tasks is as easy as a procedure or func tion call Simply use accept and select constructs with Ada tasks Using Ada tasks can make it easier for you to integrate and test the software drivers because it maps well with hardware Ada95 protected records provide an easy way for tasks to share data without a the need for semaphores and Ada95 tagged types to provide object oriented functionality similar to C and Java Now you can map Ada tasks and pack ages to robotic hardware so adding new hardware and software drivers does not require a complete redesign of your cur rent system In addition you also get most of the C C features including inheritance function overloading classes C templates and tasks The key to using Ada95 as a new robot language is to take advantage of its abili ty to use Win232 libraries via Ada95 bind ings and to use its interface to other lan guages including C and C via the pragma interface function Now hard ware drivers written in C or assembly can be called from Ada95 applications and give them the ability to transmit and receive data via the serial port COM3 or via Ethernet TCP IP or via the USB interface USB HID bindings
155. ional LynxOS Wind River VxWorks and Aonix or use a software development language that includes a runtime as part of the language e g Rational APEX Ada95 Today s option is to use Ada95 with one of the POSIX compliant runtimes mentioned above The runtime is tailored to the language and hardware platform e g Intel Pen tium PowerPC MIPS SPARK ARM or any popular computer architecture A problem that could arise with a Java or C medical application is if the Windows kernel decides that it is time Issue 212 March 2008 21 to schedule a high priority internal Windows task In order to do so it has to preempt the user s application which could be a life critical applica tion used to read a patient s heart rate or EKG during a critical operation That would make the application miss a scheduled system call inside a real time task or thread while reading the transducers The scenario is less likely to occur with a dedicated real time operating system such as Rational APEX LynxOS and VxWorks The operating systems will also work for other languages such as C and Java Real time operating systems and run time kernels have been around for many years and have been continu ously improved and optimized to the highest commercial standards for use in embedded enterprise military space and medical applications using a set of standard POSIX compliant system calls Commercial variants of Ada95 from IBM
156. is Laboratory NASA Johnson Space Center clear sphere to be variable and just smaller than any object of interest This way any parallax error the difference in viewing angle between the center of the Earth the center of the sphere and a viewer on the Earth s surface will be insignificant The path the stars seem to take while you spin on the Earth beneath them will change based on where you view them from If you lie down at the equa tor and view the movement of the sky over the period of the night the stars will rise move overhead and set If you fly to one of the poles and spend the night watching the stars they will rotate in a circular pattern about the pole SkyScout The small lightweight SkyScout can be used at length without fatigue Any product s success will depend on many factors but the user interface is the most important If the product is intuitive it is more likely to be suc cessful The SkyScout has a friendly appearance with all controls except for one mounted on one face with a backlit red to preserve night vision LCD see Photo 2 Each of the nine large rubber buttons with a construc tion similar to a remote control is clearly marked with its function i e Locate A Target button is positioned for easy access beneath the forefinger while viewing an object through the sighting tube Unlike a telescope or binoculars there is no magnification through the sighting tube When you lo
157. isn t your average Robotics issue When we began planning this edition of Circuit Cellar several months ago we set out to put together an issue that would feature a diverse set of articles that would touch on the topics of both hardware design and software development We could have easily packed the issue with six or seven feature articles about projects like simple motor control applications and line following robots but what good would that have done for engineers who are hungry for information about designing and programming interesting real world applications This month we deliver articles about useful projects that you can easily design and program at your workbench If you start now you can have one or two of them up and running by early April Want your next robotics project to run smoothly First check out why Daniel Ramirez uses the Ada95 programming language for many of his robotics applications p 14 Next jump to page 52 where Monte Dalrymple describes a peripheral chip for low level functions He makes a strong case for using the Rabbit Semiconductor I O RIO device in robotics and motion control projects first introduced you to Miguel Sanchez s innovative vertical plotting system back in September 2007 Issue 206 Remember the video posted at www youtube com watch v VmB14M78CWU Not long after Miguel showed me the video we began planning an article about the design This month you can learn how it was built and progra
158. istress than a single full scale heli copter Also the smaller scale autonomous helicopter would come with a smaller price tag than the full scale version But the applications for this communica tions system are not limited to search and rescue This system could be used to help remove human involvement with virtually any vehi cle s operation You can use the system to control vehicles for cinematogra phy aerial map ping law enforce ment surveillance CIRCUIT CELLAR inspection and more SYSTEM OVERVIEW The communications system is designed to transfer data between the base station and the target device Our target device is an electric RC helicop ter The communications system con sists of PC software at the base sta tion hardware on the base station hardware and firmware on the heli copter and a communications proto col to tie everything together The PC software consists of three subsections the communications class library the indicator user control library and the Google Maps user con trol see Photo 1 The communications library links the GUI to the helicopter It is built around a serial port connection and it provides a simple interface for LIE I ee o mdi eee tert E L Photo 1 This is the graphical user interface for our system The customizable indicators enable us to keep track of any data received by the base station www circuitcellar com
159. ith native 16 and 32 bit instructions RX goes even further with a byte variable instruction length that encodes the most frequently used instructions in the least amount of bits That s a great idea just like it always was MIPS FOR THE MASSES The icing on the 32 bit MCU cake comes from Microchip Technology Say hello to the MIPS based PIC32 see Figure 5 This is an interesting announcement on a number of levels From Microchip s perspective a MIPS deal gives them a credible and expedient alternative to a me too ARM or hard sell propri etary core strategy Meanwhile MIPS gets to expand their presence beyond the ASIC business into the merchant MCU market That s not just an upside for their bottom line but a must to boost their long term prospects for architec tural staying power I haven t followed the MIPS archi tecture closely because it s pretty much been positioned as an ASIC only option Skimming the datasheet I can see that from high altitude PIC32 cer tainly resembles the MIPS chips of yore e g R3000 and R4000 But look a little more closely and you ll find evi dence of the changing times There are clearly some RISC CIRCUIT CELLAR versus Reality face offs where traditional RISC theology blinks first For instance in their quest for brutal simplici ty old timey RISCs were known for Relegating Impossible Stuff to the Compiler Indeed the MIPS moniker is
160. ive signals No power supply needed simple USB 2 0 connection PS3206 Bundle 1574 34220314 Scope Analyzer 100MHz 2 ch 16 logic scope and logic analyzer 2000 wfm s refresh rate See waveforms and logic data simultaneously Trigger on data or signal edge DS1102CD 1499 2 4ch 12 bit USB Scope ew Pico New 2 4 ch 12 bit 20MS s USB2 0 connected powered scope adapters Scope FFT and meter displayed at once with included software PS3424 PS3224 1398 793 Mixed Signal PC Oscilloscope 100 MHz Scope and Logic Analyzer _ lets you do complex triggering to find hard to get at glitches spikes etc Huge 4 or 8 MS buffer for deep data drilling and zooming Optional built in Fiveco TCP IP server with I2C 19 x digital I O 5 x 10 bit A D inputs and UART serial interface Connect 12C devices sensors to an Ethernet network FMod TCP from 250 Ethernet IO Ether IO UDP IP controlled 24 digital I O board 3 x 8 bit TTL ports each independently programmable Connects to any TCP IP Ethernet network Ether IO 24 119 USB Bus Analyzers USB1 1 2 0 WiMedia analyzers and now EX260 can test USB3 0 5Gbps too Emulate host device verify compliance TR110 EX200 EX260 999 2999 CALL swept signal generator 2 Analog channels x 10 12 14 bit with more than 60 dB dynamic range 8 digital inputs for mixed signal display trigger CS328A 4 4MS Buffer 1149 CS328A 8 8MS Buffer 1642
161. keleton competitions where teams design robotic exoskeletons capable of lifting heavy weights are dangerous events Just imagine an out of control fire breathing autonomous battle bot Sounds like a Stephen King movie doesn t it Now you can take advantage of the highly structured Ada95 language for your own purposes because it is freely available on the Internet via GNU GNAT user sup ported sites An LRM a complete user manual and other reference manuals are available at www adahome com Resources Compilers GNAT html It is easy to get started with Ada95 especially 14 Issue 212 March 2008 tasking and other structural and safety features They include Ada95 packages generic functions that are similar to C templates types tagged types and pro tected records that are similar to C classes ranges schedulers tasks that are similar to C and Java threads and Ada exceptions that are similar to the C try catch and throw keywords Real time multitasking multipro cessing and parallel processing are areas that Ada95 handles well They are also the reason it is used for the development of life critical software The Ada95 task instruction with its related delay select if you already know similar program ming languages such as Java Pascal Visual Basic and Visual C There are also many references and textbooks on Ada95 I highly recommend J G P Barnes s Programming in Ada Plus an Overview of
162. le combining the proper electronic components in the right packaging provides a solu tion a convoluted user interface can ruin an otherwise great product The ultimate interface requires no user s manual As designers we need to pay as much attention to the basic con cepts of the design as we do to coding the algorithms within Can you say iPhone Author s note Special thanks to Mike Lemp the architect and father of the SkyScout Jeff Bachiochi pronounced BAH Key AH key has been writing for Circuit Cellar since 1988 His background includes product design and manufac turing He may be reached through the magazine jeff bachiochi circuitcellar com or his web site www imaginethat now com RESOURCES J Bachiochi Car 54 Where Exactly Are You Adding E Mail Capabilities to Your Project Circuit Cellar 127 2001 Magneto Inductive Direction Finding Circuit Cellar 80 1997 What s the Slope Use an Accelerometer to Measure Slope Circuit Cellar 202 2007 Where s Waldo Pinpointing Location by Interfacing with a GPS Receiver Circuit Cellar 126 2001 National Marine Electronics Associa tion NMEA www nmea org SOURCES SkyScout Celestron www celestron com 3C24310 Evaluation board Samsung Wwww Samsung com Issue 212 March 2008 75 LESSONS FROM THE TRENCHES Do You Want to Do a Design Linked Lists by George Martin Aft
163. le system 44 Digital lines w CPLO Congole Debug Serial Port NFF 7 34V DC or 5V DC power 2 Serial Ports e CE Accepts DiskOnChip 2 16 bit Timers a 5128 DAAM 512K Flash Watchdog Timer Expansion options with Peripheral Boards kit Flaahlite 126 controller Borland C C yer 4 52 FREE Email Tech Support Serial Driver library AC Adapter and cable Call 530 287 6073 Email salese kmlicro com UIT T8 Wen aL New TPC 43 with WiFi and ZigBee www medallionsystem com QUALITY PRODUCT FAST DELIVERY COMPETITIVE PRICING Aluminum Backed Single amp Double sided SMOBC RoHS mask 1 10 PCS 3days 1 or 2 layers 249 10 PCS Sdays 4 layers 695 up to 30sq in ea includes tooling artwork L P l mask amp legend PULSAR INC 9901 W Pacific Ave Franklin Park IL 60131 Phone 847 233 0012 Fax 847 233 0013 www pulsar inc com sales pulsar inc com Through hole or SMT Nickel amp Gold Plating Routing or scoring Electrical Testing Artwork or CAD data Fast Quotes Flex Circuits CIRCUIT CELLAR Issue 212 March 2008 91 Non Contact Distance Measurement Machinery amp Industrial Automation Give the Customer More Control Your Motor If your company has a physical storefront you may qualify to become a Cir
164. leading 250 gt on both analogue and digital circuits The entry level PicoScope 2104 is also available for use in less demanding applications ec bandwidth 1 GS s sampling rate memory depth and an array of Ergonomically designed to fit in the hand o advanced high end features including Up to 100 MS s real time sample rate advanced triggers a 250MHz Spectrum Up to 2 GS s repetitive signal sample rate LA Analyzer High Speed USB 2 0 Connection Up to 25 MHz bandwidth Automatic Measurements an Arbitrary Waveform Generator and Waveform Up to 24 000 sample buffer memory Playback Took the PicoScope 5000 PC Oscilloscopes give you the features and performance you need without any compromise PicoScope 2104 250 O0 PicoScope 2105 3 98 00 z www picotech com pco4 4 gt to check out our full line of pc based instruments or call 1 800 591 2796 for information d IPololu hes amp Bleetronles Robot Kits Line followers Motion Control Servo controllers Motor controllers vollage dual H bridge trimmer pat on ADCT red user LED an PD AT meaga4 168 w microcontroller programming connector 20 MHz dock Solder Paste Stencils Use our low cost From 29 solder paste stencils to quickly assemble B a ERS designe irs p URSI f zu uw Clim BE LL ces conem s frenis and imi ore m culyatre 40 Issue 212 Ma
165. lexible resistors and XYZ accelerometers using a sensor task It also displays them in real time on the laptop s display using a display task Errors are handled with Ada95 excep tion handlers The Ada95 application runs under Windows XP I use the Vex Power Glove as a wire less motion input device to teleoper ate some of my Vex based robots such as the Gilbert III Explorer Robot shown in Photo 4 I took the photo just after a snowstorm last year The glove transmits finger position and orientation information so it can be processed remotely on a laptop using an Ada95 control application The application generates motion com mands and sends them to the Gilbert III Explorer Robot Although I designed the glove for carrying out my own tele presence and tele robotics experiments it can also be used for a total virtual reality experi ence such as a control for a PC or laptop based game that supports standard IBMPC Vex power gloves It is based on the original Mattel Power Glove a controller accessory for the Nintendo Entertain ment System that was sold during the early 1990s WIRELESS MESSAGES The Ada95 Vex Power Glove application provides robust wireless message pro cessing with CRC Check sum The reader can even use the glove s flexible resistors to generate simulated sensor readings that are out of their specified ranges and watch Five push button switches provide five digital inputs to the sensor con troller A
166. ll in the design process providing valuable real time feedback In fact with HTS you can create your own Windows based applications that can communicate with and control Renesas MCUs MPUs and our integrated development environment HEW High performance Embedded Workshop The HTS interface allows you to easily open and close a workspace control builds and sessions automate processes and program target MCUs MPUs You can send and receive variables set breakpomts and be notified of HTS events all through the existing debug interface No additional USB or serial channels are required Your application possibilities are endless with HTS Use it to quickly automate testing create virtual hardware create user interfaces view messages trom your target micro etc Do whatever the situation requires and your imagination inspires For more information on the HEW Target Server visit America Renesas com H T 5 To experiment with HEW Target Server right now visit Renesasinteractive com and sign up for a hands on VirtuaLab session 2005 Hacer Tochenizgy ler Aeneas bime memes inc is a meni purserd subisriary ol Fera Techniaioqy Com Al tradersarks are the property af heir respectye www Renesasinteractive com HTScontest2008 Enter Today Visit us at Booth 728 amp 3028 ALLEY April 15 17 2008 ER Design Contest 2008 15 000 5 in cash prizes Se Enter today and you can re
167. llers for low end motor control applications Advanced motor tuned timers coupled with R8C Tiny s powerful 16 bit CPU provide the performance demanded by applications ranging from electronic toothbrushes to networked motor arrays in industrial automation R8C Tiny Product Lineup Expanded Smaller Motor Expanded Communication Timers Line up Interfaces Comparators LIN CAN D A ASSP s 48KB 128KB M SYSTEM R8C 2L ADC lt Motor Current 40MHz On chip Power Module Oscillator BLDC 125kHz On chip Oscillator Program Flash i watch h Data Flash LVD RA 16 bit Timer RC 1 wire I F Comparator Network 52 bi 32KB 128KB 48pin c 22 23 J 8KB 16KB 8KB 32KB 4 at Advanced Motor Tuned Timers 26740 47 16KB 32KB 193 2KB AKB Outstanding Development Support Multiple motor control algorithms Demonstration and reference design platforms 8KB 16KB High Performance High Component Integration 16 bit CPU core with hardware multiplier Up to three 16 bit timers with 40MHz clock 3 3us ADC conversion with timer trigger start option Up to 6 ch complementary PWM signals with independent compare registers Programmable Dead Time Control 16 bit Selectable buffer operation for fast timer reload PWM signal shut off using external trigger
168. many silicon vendors offer high computing performance along with rich peripherals Turn ARM Microcontrollers into your solution for cost sensitive powerful applications with Keil Development Tools C C Development Kit The RealView Microcontroller Development Kit MDK is the complete software development environment for ARM7 9 and Cortex MI M3 MDK is easy to learn and use yet powerful enough for the most demanding embedded ARM application The integrated Device Database simplifies tool configuration and includes more JTAG Debugger ULINK2 connects to the JTAG or 2 wire debug interface and supports on the fly debugging and Flash programming CES cum S than 250 ARM Powered Microcontroller variants for your embedded project RealView Microcontroller Development Kit RealView C C Compiler RTX RTOS Kernel Library py Vision Device Database amp IDE py Vision Debugger amp Analysis Tools Examples and Templates Complete Device Simulation S1 AT Real Time Library RTX RTOS Source Code TCPnet Networking Suite Flash File System USB Device Interface 8 a 5 E a a E S x CAN Interface RTOS and Middleware The RealView Real Time Library RL ARM solves the real time and communication challenges of your ARM project and expands MDK with essential components
169. math underflow and more Each of the conditions can be addressed with its own error handler An example of an Ada95 exception handler is shown in Listing 1 When the handler traps a runtime error it www circuitcellar com can either process it or propagate it to the calling routine It will also display the actual error message and line number where it occurred By thoughtfully specifying the mini mum maximum and nominal values for each variable and giving them their own type or subtype and range values the soft ware designer adds a level of confidence and increases the reliability of the embed ded Ada95 application The techniques are not limited just to Ada95 because Jovial and Visual Basic have similar Electrical engineers agree with a Protomat S Series features although they are not as conven ient to code because variable attributes may not be available in some of these lan guages Refer to Listing 2 for examples of Ada95 types subtypes and ranges As a BASIC and C programmer I love being able to assign one variable to another regardless of their types and whether it makes any sense I am guilty of this and it can lead to severe run time errors that can cause applications to crash when one variable overwrites another s space Arrays are particularly 4 i el a aA X ProtoMat S Series PCB Milling Machines prototyping machine at your side yo
170. mda m BmhfM nuum onl i PicoScope 2000 Series PicoScope handheld oscilloscopes convert your laptop or desktop PC into a powerful oscilloscope spectrum analyzer and 2000 SERIES meter without the need for additional probes or power supplies Power and Performance in your hand The 3000 Series of oscilloscopes from Pico Technology include general purpose and high resolution models With 12 bit resolution and 196 Handheld oscilloscopes from Pico have been ergonomically designed to fit perfectly in your hand Whether you re left handed right handed have big or small hands PicoScope handheld scopes are lightweight and comfortable to use accuracy the 10MHz PicoScope 3424 is able to detect changes as small as 0 024 244ppm making it the ideal 4 channel oscilloscope for analog design and analysis The higher speed 8 bit models in the PicoScope 3000 series feature GS The PicoScope 2105 has a 100 megasample per second sampling rates up to 200MS s and up to nin c real time sampling rate For repetitive signals the sampling rate 1 MS record lengths for general purpose f be increased to 2 gigasamples per second using digital equivalent T time sampling These high sampling rates combined with a 24 000 sample buffer memory and 25 MHz analogue bandwidth make the PicoScope 2105 suitable for a wide range of trouble shooting tasks 3000 SERIES and portable applications With class
171. mmed p 30 You can build a similar plotter to work in private or industrial settings On page 36 a team of designers from Camosun College describes its recent contribution to a flight control system for an RC helicopter In this article the team explains how it designed a functional communica tions system that can be tweaked to work efficiently in a variety of aircraft systems The team covers the hardware software and firmware On page 43 Chris Coulston describes the exciting new motion con trol design that he calls the Do It Yourself Wii The system enables him to interact with graphics programs on a PC in the same way that gam ing enthusiasts use a Wii controller to play video games In this series of articles Chris describes how he developed the hardware and soft ware for the system In the issue s last feature article Kripasagar Venkat describes effi cient multiplication and division techniques for microcontrollers with no hardware multiplier p 60 Although the article is aptly titled Efficient Micro Mathematics it could have been called MCU Math Made Easy Our columnists Jeff Bachiochi George Martin and Tom Cantrell round off the issue with interesting articles about using ARM processor power to monitor the heavens p 69 working with C language when troubleshooting a real design problem p 76 and finding the right 32 bit chips for next generation applications p 80 Finally note that the winners
172. mount This way the maxima discharges down from its peak val ues and is able to quickly conform to any decrease in the amplitude of the runner The thres thresh curves in Figure 4 are set to 7596 2596 of the difference between maxima and mini ma The strike signal goes high when sample is greater than thres The strike signal goes low when sample is less than thres Otherwise the strike remains unchanged All of the analysis in Figure 4 was performed to determine how the peri od of the footfalls related to the speed and stride length of a runner A bunch of trials and a little massaging of the data produced Figure 5 The nonlinear relationship between the variables in Figure 5 means that it makes sense to have the pedometer application use a look up table This is accomplished by comparing the incoming period against the periods of the data points in Figure 5 The inter polated value is formed from the clos est pair of periods To further increase the efficiency of the computations the decimal numbers were stored using a fixed point representation The finishing touches on the pedo speedo were to have the LCD show the instantaneous speed distance cov ered run time and number of foot falls The actual run time was main tained by enabling the run time clock when the difference between thresh www circuitcellar com and thresh exceeded some threshold This way the pedo speedo does not measure the tim
173. mputer Organization McGraw Hill New York NY 1990 3 R M Hewlitt amp E S Swart zlantler Canonical Signed Digit Rep resentation for FIR Digital Filters 2000 IEEE Workshop on Signal Pro cessing Systems Oct 11 to 13 2000 MSP430 Family of microcontrollers Texas Instruments Inc www ti com Got Serial Need Network All of the ARM9 processor core is included on this tiny board including Flash Memory Serial Ports Ethernet 125 Audio Interface PWMs Timer Counters A D digital I O lines Clock Calendar and more Like other modules in EMAC s SoM product line the SoM 9260 is designed to plug into a custom or off the shelf Carrier board containing all the connectors and any additional 1 0 components that may be required The SoM approach provides the flexibility of a fully customized IS AE ey TOQUORG cost Single unit pricing starts at 150 gt ENA inc EQUIPMENT MONITOR AND CONTROL SING LE BOARD Phone 618 529 4525 Fax 618 457 0110 Web www emacinc com Volume Discounts gridconnect www gridconnect com 1 800 975 4743 SOLUTIONS 68 Issue 212 March 2008 CIRCUIT CELLAR www circuitcellar com FROM THE BENCH by Jeff Bachiochi Navigating the Heavens With Celestron s SkyScout you can explore outer space without leaving your backyard The handheld device gives you point and click convenience to identify thousands of stars planet
174. n m Porn a 126M0 LUR Unitari Vega86 6247 6247 PC104 Module a Low Power 45V 2 2A Onboard 256MB SDRAM a 2D 3D Graphics with MPEG Accelerato Supports amp S 3USB VGA LCD AUDIO LANICF p p VF Technology Inc BENE Email info icoptect com Los Angeles Office East Coast Otice Buffalo Office NY www icoptech com Tal 1 626 444 6666 m Tel 856 546 6555 mw 716 650 4018 Py indo Bo Embedded which is handy for testing applications inside the IDE The GNAT gdb com mand or gvd visual debugger is also conveniently accessible from the IDE One nice thing about the GNAT Ada95 tool suite is that it is absolutely free Commercial versions of Ada can cost thousands of dollars If you already have the GNU shareware tools such as GNU C C and the gdb debugger then you will find the GNAT Ada95 tool suite a welcome edition DEBUGGING Ada95 APPLICATIONS Ada95 provides extensive I O support using the Ada Text_IO package similar in functionality to C s stdio library With the package you can add trace statements and print data values The Ada95 IDE also provides support for using either the GNU gdb debugger or the visual version VDI that is invoked from the GNAT Ada95 IDE With it you can examine code single step step into watch variables and set breakpoints Ada95 CODING STYLE If you look at C C code and the cor responding Ada95 code you may not
175. n how to solve your engineering issues register today at www embedded com esc sv Luminary their backers appear to have the means and will to make a go of it They shot out of the starting gate with a complete line up of gener al purpose MCUs ranging from the such a deal 1 LM3S101 8 KB of flash memory 2 KB of SRAM 28 pin to the LM3S1968 256 KB of flash memory 64 KB of SRAM 100 pin Now they ve virtually doubled the size of their portfolio with a second wave of parts tailored for Ethernet CAN and motor control applications Another notch in ARM s Cortex M3 belt comes from STMicroelectronics who have added the core to their exten sive line up of MCUs Make no mistake that ST is a major player with a lot of weight to throw around and it shows in the initial strength of their product offering and third party bandwagon see Figure 2 Chips on the table range from 32 KB of flash memory and 36 pins to 128 KB of flash memory and 100 pins with 512 KB and 144 pins in the works Support comes from a who s who of tool suppliers including Keil now owned by Hitex Development Tools Raisonance and IAR Systems just to name a few SOFT PARADE Designers have an abundance of standard MCUs to choose from for middle of the road applications At the other extreme ultra high volume products may call for a custom ASIC Filling the gap are soft core processors running on FPGAs i e a roll your own SoC
176. nables rudi mentary waveform creation by step ping through one of four programmed values on each counter rollover The counter obviously needs incre ment and decrement signals There are a number of options available for each The increment and decrement signals can come from any channel I O pin and can be either level or edge trig gered There is a special quadrature decoding option for increment decre ment and these signals can also be forced under program control The counter can be used for timer applications in a variety of modes In this case the increment and decre ment signals function as begin and end signals either starting and stopping the CIRCUIT CELLAR counter or latching the current count when it is free running Of course the current count and both of the latched counts can be read by the CPU In addition to the increment and decrement signals each channel also has a sync signal which is used to reset the counter to all zeros Like the increment and decrement signals the sync signal has a range of options avail able and is very useful for synchroniz ing counters in different channels or synchronizing the counter to an exter nal event Note that the sync signal can be forced under CPU control That s the basic functionality of each channel Now let s look at how to put the RIO to work in motion con trol and robotics applications MOTORS AND H BRIDGES The most common way to power a DC motor
177. ncoc ersa 4 decoders visit our website and discover for yourself Fre T Lae Tamari ma pe wi High Sacivity Ernai y 158 Ort Lana Marlin OR 57532 E PECHN L GIES YY nxtechnologies con Mulli C hannes De ar contact aur ON master distribuilo F Pilg unique electronica ma WWW cleverscope com Re Ane a emere o a WANT eM if ang ii anit ma rg E u E B F 50 Issue 212 March 2008 www circuitcellar com CIRCUIT CELLAR Listing 1 To get the MCC18 compiler to recognize an array larger than 256 bytes you have to modify the linker file top and use pragma directives in your source file bottom size of microcontrollers to build your own video Modified 18f4520 lkr file ACCESSBANK NAME accessram DATABANK NAME gpr0 DATABANK NAME gprl DATABANK NAME big DATABANK NAME gpr4 DATABANK NAME gpr5 ACCESSBANK NAME accesssfr SECTION NAME xaxis_scn SIZE 0x100 START 0x0 START 0x80 START 0x100 START 0x140 START 0x480 START 0x500 START OxF80 RAM big RAM gprb END Ox F END OxFF END Ox13F END 0x47F END 0x4FF END 0x5FF END 0xFFF PROTECTED PROTECTED Directive in C file pragma udata xaxis_scn Static char xaxis buffer 0x340 pragma udata current sample If the sample is larger than the maxima the maxima is assigned the value of the sample Oth erwise the maxima is decreased by a fixed a
178. nd pass filter specifically intended to limit the fre quencies to the voice band ideal for speech applications The passband is set from 300 to 3 400 Hz with a sam pling frequency set at 8 000 Hz The total instruction cycles in this case is just 677 CPU cycles with a code size of 1 110 bytes Both these filters are very close to their respective floating point implementations ACHIEVE EFFICIENCY This article focused on efficient multiplication and division of micro controllers without a hardware multi plier module The design steps to implement Horner s algorithm were System on Module Internet Appliance Engine cS L 0 9260 S 6 Up to 60 Digital GPIOs 10 100 BaseT Ethernet SODIMM Bus Expansion 55 125 Audio Interface Real Time Clock Calendar SD MMC Flash Card Interface Up to 64 MB Flash amp 128 MB RAM Linux with Eclipse IDE or WinCE 6 0 2 USB 2 0 Host Ports amp 1 Device Port 410 Bit A Ds amp 6 16 Bit Timer Counters ue f E teniente iie NY Ld 1 tiuu Ww 5 wr uty 8 Wind E CE Small 144 pin SODIMM form factor 2 66 x 1 5 Optional Carrier Socket Board amp Power Supply Available shown with examples The CSD for mat was introduced and its effects on reduction of steps was portrayed This method not only showed superior per formance but also removed the
179. ness your PC or laptop s giga hertz power for your robot applications For designers like me who use Unix Linux and LynxOS there are real time bindings to POSIX and commer cial bindings to WindRiver s VxWorks that can also use GNAT Ada95 for Unix to develop similar applications XBee PRO Wireless UART Electronics 115 200 bps PING Sonar Sensors Flexible resistors IN OUT Com Ports Handle Type UART 1 115 200 bps a Name IN STRING Unix and Linux users don t need to be left out from embedded robotics devel opment because of a lack of Windows specific software tools WHY USE Ada95 FOR ROBOTICS Designing a robust fault tolerant robot requires detailed up front design work including modeling simulation integration and testing This is true of NASA s robots including the robot arm and interplanetary spacecraft such as Viking Explorer Galileo and more which bring us fantastic photos The Mars exploration rovers Spirit and Opportuni ty provided scientists with evidence Microchip 30 MIPS dsPIC30F6014 sensor controller board UART 1 16 bit timers 16 channels 12 bit ADC Switches Freescale XY axis accelerometer Freescale Z axis accelerometer Figure 1 This diagram of the wireless sensor controller shows the main components and interfaces used for the Vex Power Glove CIRCUIT CELLAR Issue 212 March 2008 15 Photo 2 This shows the complete Vex P
180. ng the mag netic declination for the Figure 4 Red directional LEDs prompt you to move the sighting tube in the direction necessary to bring the object of interest into view All LEDs on means you are there Source www celestron com c2 images files downloads 1 157656360_skyscoutmanualw pdf SkyScout to point directly toward the point in the celestial sphere that the GPS s data has been able to calculate Remember that the geographical coor dinate and celestial coordinate systems have the N S pole axis in common To move to other locations on the celestial sphere we need to know which direction is north The SkyScout uses sensitive magnetic sensors to accomplish this The SkyScout is so sensitive to magnet ic fields that it provides mu metal shields to block any magnetic field inter ference from the AA batteries Most can tell you that a compass needle will point north Some know that this is not really north Few know where on Earth it actu ally points because it is constantly in motion Presently it is located in north ern Canada and it is moving northwest SDRAM Brightness Power supply 2 Battery level AA detect area As you pass from the East to the West Coast in the U S this declination changes from about 20 to 20 see Figure 3 You can see that the declination is important to accuracy and its value is determined by where on Earth you are located You may have noticed that th
181. ng to use a DOS window to create and run a test pro gram to exercise the routines we ve just designed Nothing fancy here It took me about four hours spread out Changes printout type routines These routines report the data in our internal elements out the DOS window for your viewing And remember that you can pipe the output into a file for hard copy documentation purposes I have a copy of that file report txt in the files area I also created a CCILinkedlist h header file to hold system constants So the meat of the solution is con tained in the files CalOut c and CalOut h Note that a better name for these files would be CallOut c and h That s part of a review process and more on that later If we look into CalOut c we ll see the routines contained in the UML class diagram see Table 3 Most of our original design had no change One is deleted and some are added What s the story The real world As I was implementing the code I saw problems with the design easier ways to perform a task or miss ing elements Look at FindFreeNumber I need to look through the struct Ca 110utNumbs to find a free spot to save a new number to Well of course you might say but it escaped us at the initial design point That one is not a big deal Next look at the missing GetNext CallOutNumber which is replaced with the two routines INT8 GetFirstCallOutNumberIndex INT 8 Grp and INT8 GetNextCallOut NumberIndex INT8 Idx
182. nse is depicted as a gain versus frequency plot and it is shown to conform to the design www circuitcellar com CIRCUIT CELLAR PIC SERYO MOTION CONTROLLERS FOR controller chips controller boards www picservo co JEFFREY KERR LLC THE SERIAL PORT LIVES Everything you need to know about COM ports USB virtual COM ports amp asynchronous E serial ports for E embedded systems Hardware amp software for RS 232 amp RS 485 Wireless options and more Serial Port Complete Second Edition Jan Axelson ISBN 978 1 931448 06 2 39 95 Lakeview Research LLC www Lvr com From the author of USB Complete ANDRE LAM DTHE 5 XGAMES TATION DO IT YOURSELF WIDEO GAME SYSTEM inspired by the Atari 2600 Apple 11 amp Commodore 64 INCLUDES a Assembled XGS Micra Edition Unit Complete Development Kit Tools Demos amp Utilities eBook on Designing the XGS Console Cables and Power Supphy Included TIN Tm Hs T www XGAMESTATION COM 5124 266 2399 SUPPORTIZNURVE MET Issue 212 March 2008 67 multiplies and 30 memory memory moves at each stage and occupying a code size of 1 696 bytes The MSP430 microcontroller supports a real time operation for this case If a floating point library was used instead the cycle count would be a minimum of 14 000 cycles preventing any real time filtering Figure 7 shows an implementation of a twentieth order ba
183. o 55 2 USB ports a 50 c card option 08 Programmable FPGAs B deo COM ports up to 10 Linux Real Time extension NetBSD ji 133 MHz 586 5 boards in series 1 Power as low as 800mA Fanless no heat sink SDRAM up to 64MB COM Ports up to 4 ports Ethernet Ports DIO Channels up to 40 PCMCIA Ill adaptor Compact Flash adaptor USB Ports except on Ts s00 Over 20 years In business 3 Custom configurations and designs w Open Source Vision excellent pricing and turn around time Never discontinued a product A Most products stocked and available Engineers on Tech Support for next day shipping Design your solution with one of our engineers 480 837 5200 New Products and PC 104 Peripherals es High End Performance TS 7800 V with Embedded Huggedness 500 MHz ARM9 Unbrickable Lowpower awesv 229 design 128MB DDR RAM 512MB high speed 269 17MB sec onboard Flash qty 1 12 000 LUT user programmable FPGA Internal PCI Bus PC 104 connector 2 USB 2 0 480 Mbps 2 e Gigabit ethernet 2 SD sockets a V 10 serial ports 110 GPIO compatible with TS 72xx Sleep mode uses 200 microamps Boots Linux in lt 2 seconds Linux 2 6 and Debian by default TS POE100 a TS PLC Programmable Power Over Ethernet Logic Controller 2 4 Amp 5V isolated power 12W Use standalone or cluster via wireless or HS 485
184. o condition the resulting voltage and current signals Its handy user interface and graphic LCD make it easy to operate and read Miguel Rusch Australia miguel migdevelopments com built a prototype for a portable LCR meter This tool measures the AC impedance of passive devices at a range of frequencies 100 Hz 1 kHz and 10 kHz displaying the measured parameters on an LCD screen alongside a schematic representation of the circuit It is a tool that s useful for identifying unmarked SMD parts and characterizing hand wound inductors The dsPI C processor has a rich set of periph erals to compliment the DSP core My project obviously required DSP filtering because of the frequency domain measurements however without the supporting peripherals would have never integrated so much circuitry with a 28 pin device made heavy use of the SPI module which communicates with five separate Cs Additionally the ADC module enabled extensive conf iguration allowing the device to efficiently and simultaneously read the test wavef orms and also detect user input from the resistor ladder keypad Miguel Rusch MiniTron Amplifier The MiniTron is a high end vacuum tube stereo amplifier with efficiency distortion and power output controlled by a dsPIC30F2023 The innovative system features three main subsystems a vacuum tube amplifier a DSP controller and a high voltage switching power supply The fully functional amplifier success
185. ociated heavy metals it should never again be used to cook food right PERFORMANCE The biggest question before using the reflow skillet was whether it would really work I also wondered about how the skillet s thermal profile would compare to the recommended profile for the solder paste The answer to the first question could only be answered by reflowing a DIY Wii board The answer to the second ques tion required a trip to my local tool store for an infrared thermometer with a laser sight With everything at hand I applied EE ate Sect Nt LIN Temperature pt tt AN EHE TNO a i N BN 8 a TA cu d Time minutes solder paste to all of the SMT pads on the DIY Wii PCB and populated the board by gently laying the parts onto the pasty pads My nerves were on edge when I popped my first pasty PCB onto the reflow skillet and cranked the tem perature knob all the way to 400 Photo 2a shows a PCB not the DIY Wii at the start of the reflow process If you look carefully you can see that the solder paste is still a little bumpy After 3 minutes the PCB was start ing to warm nicely and the solder paste at this point was evened out across the pads as if the heat were somehow melt ing it After 5 minutes the solder paste was dried to a baked consistency see Photo 2b At about the same time lit tle whiffs of smoke started curling out from under the PC
186. ok at an object through the Sky Scout s sighting tube the Target button www circuitcellar com provides a snapshot of the device s posi tion This is used for identifying objects In Locate mode a database of objects is displayed via the LCD Once an object is selected eight LEDs around the inside of the sighting tube direct you to move toward the object until it is directly in the center of the sighting tube The sim plicity of coaxing you to move using a ring of directional LEDs disguises the complicated sensors and math computa tions associated with the action This is the basis of good product design Cell phones navigation aids the LoJack and other products take advantage of the system of satellites in geosynchronous orbit to gather positional information The SkyScout uses an internal GPS module to calcu late the precise position of its user It Photo 2 An LCD and controls are conveniently locat ed on the side of the SkyScout Two AA batteries sup ply power for hours of nighttime viewing Source www myskyscout com skyscout tour index html requires sufficient signal from three satellites to triangulate the user s posi tion on Earth longitude latitude and elevation It may attempt to receive signals from up to 12 satellites Once the SkyScout has acquired a fix you Polaris The North Star Ursa Minor Name Common name Constellation Bayer 1 Alpha Ursae Minoris Distance 431 42 LY SAO 308
187. on Send your disk and digital submission sheet to IDEA BOX Circuit Cellar 4 Park Street Vernon CT 06066 or e mail adcopy circuitcellar com For more information call Shannon Barraclough at 860 875 2199 EE EG phyC 0 RE OEMable Single Board Computers mm NH XScale PxA270 PXA255 ARM LPC3180 ARM9 LPC22xx LPC229x AT91 ARM7 PowerPC MPC5554 MPC5200B MPC565 MPC555 ColdFire MCF5485 X8 6 Elan 5 520 C166 XC16x ST10 8051 CAN Blackfin 5 7 F Faster to Market Save time by P integrating a PHYTEC Single Fj Board Computer Module into 5 your target circuitry Make or Buy Why make j your own when you can buy PHYTEC off shelf solutions cost effective to 1000s units year Integrated Support Services Let PHYTEC assist you in the design of your end product from tools and RTOSes to production Our hardware is bundled with leading compilers Keil IAR CodeWarrior RTOSes WinCE Linux and debuggers Immediate Support Talk to PHYTEC technical staff with every call No waiting for answers Your OEM solution With 20 years design production and integration experience PHYTEC is your OEM partner m PHYTEC America LLC 203 Parfitt Way SW G100 B Bainbridge Island WA 98110 USA www phytec com m 800 278 9913 m www phycor
188. onical signed digit CSD format is introduced to further reduce the CPU overhead FILTERING Filtering forms the crux of many digi tal processing algorithms Filtering can be viewed as a weighted multiply and accumulate MAC process Digital filters come in two flavors finite impulse response FIR and infinite impulse response IIR A mathematician s view of a FIR is a transfer function with only a numerator polynomial An IIR filter is a transfer function with both numerator and denominator polynomials FIR filters use only present and past samples of the input signal whereas IIR filters in addi tion use previous samples of the out put Stability of these filters is extreme ly important to preserve the sanity of the signal being filtered at the output A FIR filter is inherently stable with no restric tion on the roots also known as zeros of its polynomial It can also exhibit linear phase to reduce the phase distortion of any input signal The IIR filter performs much better and requires a significantly smaller order compared to a FIR filter for the same set of filtering specifications An IIR filter is stable only if the roots of its denominator polynomial also www circuitcellar com known as poles has a magnitude of less than one Special care must be taken when scaling the IIR filter coefficients as it could easily render a stable IIR fil ter unstable Digital filter coefficients almost always are real numbe
189. ope of the force data Clearly this will not work with the data in Figure 4 The data con tains local minima and maxi ma The solution to this prob lem was to employ hysteresis When the sample is greater than an upper threshold strike goes high When the sample is less than a lower threshold strike goes low Otherwise strike retains its value From the data in Figure 4 the upper thresh old should be set to 100 and the lower threshold should be set to 40 However when the pace of the runner changes so do acceptable values for thresholds The solution was to constantly look for the minima and maxima of the sam ples and set the upper and lower thresholds 25 over the minima and 2596 below the maxima The minima and maxima were maintained using a leaky capacitor model In this model the current maxima are compared to the plug amp play Scope instruments WIRELESS ERING YOUR QUIGELY AND LEGALLY MARKET I RE Modules TX Modules uui why is everyone talking about cleverscope Ada DICEN n Sapay io pour product ET ee mra i ar ER TE ll i m m Li eae Long Range Madulas OEM Products Handh id TAs PRE CEATIFIED ready fa Sire iin Bst FOL BI pi arent Funcion Madules Eeytab Integrated Circuits HIGHEST SECURITY e
190. orrupted by either task and without the need for semaphores Ada95 packages and tagged types encapsulate both data and functions in a similar manner to C classes Pack ages also control the visibility of objects so some implementation details can be hidden from other pack ages for information hiding Another wonderful feature of Ada95 is bindings A binding is an interface to another language such as C or assembly using the Ada pragma interface to C This is great because it gives your Ada95 applications access to most of the hardware on a PC or laptop The serial bindings give you access to the serial port Bindings to the Ethernet are provided via the Winsock bindings that enable you to develop client and server applications In addition you can access the mouse via the mouse bind ings and a joystick via the joystick bindings for those telepresense and tele robotic applications that you are work ing on All of the Win32 bindings and the DirectX graphics bindings necessary for real time displays and Windows panels are also available The language features will help you www circuitcellar com others build more robust safer and fault tolerant robotic applications with my examples as a starting point using AdaCore GNAT Ada95 The Ada features combined with embedded microcontrollers that support the serial communication interface SCI the USB interface and the Ether net TCP IP interface MAC will help you har
191. ot referenced win32 winuser adb 211 26 warning formal parameter uReturnCode is not referenced gcc c Id gnat serial2 gnatwu 02 gnatn funroll loops gnatp gnatX ID GNAT serial2 I C GNAT Bindings Win32Ada stdarg adb stdarg adb 387 19 warning formal parameter s is not referenced lstdarg adb 387 31 warning formal parameter a is not referenced gcc c Id gnat serial2 gnatuu 02 gnatn funroll loops gnatp gnatX ID GNAT serial2 I C GNAT Bindings Win32Ada stdarg impl adb gcc c Id gnat serial2 gnatuu 02 gnatn funroll loops gnatp gnatX ID GNAT serial2 I C GNAT Bindings Win32Ada win32 utils adb gcc c Id gnat serial2 gnatuu 02 gnatn funroll loops gnatp gnatX ID GNAT serial2 I C GNAT Bindings Win32Ada win32 windef adb gcc c Id gnat serial2 gnatwu 02 gnatn funroll loops gnatp gnatX ID GNAT serial2 I C GNAT Bindings Win32Ada win32 wingdi adb gcc c Id gnat serial2 gnatuu 02 gnatn funroll loops gnatp gnatX ID GNAT serial2 I C GNAT Bindings Win32Ada stdarg machine ads End of compilation ignatbind a0 a0D GNAT serial2 I x usb sensor controller ali ignatlink s usb sensor controller ali Completed successfully Exceed Daniel Ramir Michael Moriat Ada 95 PATRIOT DTU 12 06 PM is start AdaGIDE us Photo 1 The GNAT IDE is easy to learn and use It provides menus for editing compiling linking and running your Ada
192. ou ble Buffer The Code Project 2007 www codeproject com csharp DoubleBuffering asp 2 Microsoft Developer Network HtmlDocument InvokeScript Method String http msdn2 microsoft com en us library be9zzz62 VS 80 aspx RESOURCE R Scammell Power Map http hob biton thisside net advmap html SOURCES ER900 TRS 900 MHz Transceiver modules Low Power Radio Solutions www lprs co uk dsPIC30F3011 Microcontroller Microchip Technology Inc www microchip com Visual Studio 2005 IDE Microsoft Corp www microsoft com ui z ows CE based Touch Controller 599 F wide coar TFT display FP 800 x 480 resalutions 2604 cafors Touch panel 8D card amp Ethemat supports 95232 x 2 4 x T ar 5232 x 3 Speaker with Audio output Real fime clock Battery backup Visual Basic EVC supports USB VF active sync Keyboard ar Mouse supports ARMS 32hit 266MHz processor www comfiletech com TECHNOLOGY CIRCUIT CELLAR Toll Free 1 888 928 2562 Issue 212 March 2008 41 Monitoring Applications Just Got Easier FO n d CM Chee Huey estes Tech Wee Heg T D 9 Aa E D ai ee pe Qi me oo i 3 1 Timi ok m T Eb breues arma e z DEEE meo Smarter Embedded Design The RCM4300 RabbitCore module gives
193. ound RESETO HESET oe bani Oo co GND BOARD ID DLP USB232M Figure 1 This is a schematic of the base station and remote unit hardware We used a pair of Low Power Radio Solutions ER900 TRS 900 MHz trans ceiver modules to send data between the base station and the helicopter see Figure 1 We chose the modules for their simple serial interface their operation in an unlicensed band and their ability to take care of error handling The transceiv er modules are mounted to PCBs which we designed and manufactured at Camosun College see Photo 2 The base station board which holds one of the transceiv er modules also holds a USB to serial converter The USB to serial convert er is the link between the transceiver module and the software on the PC The helicopter radio module is coupled to a 4 omni directional whip antenna and interfaced to the USART of the onboard microcontroller This antenna works well on the helicopter because it is small and fairly lightweight For a base station antenna we started with a second 4 omni directional whip antenna The signal was somewhat limited using this antenna so we chose to upgrade to a 12 dBm 4 long nine element Yagi Uda antenna This gave us CIRCUIT CELLAR increased range and better signal quali ty Plus we got it for free because one of our instructors purchased it on the con dition that we give it to him for one of his evil
194. out adjustable soft start to control the output voltage ramp put voltages of up to 30 V for applications including step time and a good power signal for each output per motors industrial controls automotive distributed The LT3742 is offered in a 4 mm x 4 mm QFN 24 pack power and telecom systems The LT3742 can also be con age One thousand piece quantities begin at 2 30 each figured with one side as a step down voltage regulator and the other as a Super Capacitor charger current source for Linear Technology Corp capacitor values of up to several farads This is a useful fea www linear com ture in robotic applications when longer hold up times are needed or where high peak currents are required The LT3742 s 100 duty cycle enables the output voltage to be very close to the input volt age ideal for battery powered systems The 4 to 30 V input voltage range enables operation from a number of intermediate bus voltages A sim ple step up DC DC converter is incorporated to generate its own gate drive voltage and also eliminates the extra parts required to drive the high side MOSFETs The onboard gate driver powers a single external N Channel MOSFET for each output enabling output currents up to 5 A A constant 500 kHz operating frequency with current mode control provides fast tran sient response and easy compensation Output current sensing is precisely measured by moni toring the voltage drop across a sense resistor and pro
195. outube com watch v Vm B14M 8CWU PROJECT FILES To download code go to ftp ftp circuit cellar com pub Circuit Cellar 2008 212 RESOURCE Hektor project http hektor ch SOURCES Visual Basic 2008 Express edition Microsoft Corp http msdn microsoft com vstudio express vb LB1656 Stepper motor controller Sanyo Electric WWNw Sanyo com USB Stepper motor controller Softmark www ar com au softmark Issue 212 March 2008 35 FEATURE ARTICLE by Michael Ghazi Stefan Kaban Scott Morken Carl Philippsen amp Kyle Wong Flight Control A Communications System for an RC Helicopter Whether you are looking to control an RC helicopter or a full sized car this system will work for you By facilitating communication between a base station and a vehicle the system enables an operator to process commands and receive data son who lives near a model air plane club can attest to two things the annoying buzzing of nitro engines and the amazing abilities of some of the scale models Along with planes model helicopters are sometimes encountered at these clubs They are more maneu verable than their larger brethren capa ble of performing aerobatic maneuvers and inverted flight A characteristic that scale model and full sized helicopters share is their difficulty to pilot especial ly for inexperienced technology stu dents So when it came time to develop our final project in our technology p
196. ower Glove system including the Microchip Technology dsPIC30F6014 based wireless sensor controller and the glove with three flexible resistors and Freescale X Y and Z accelerome ters virtual SARD of water on Mars In fact the Internation al Space Station s robot arm software was written in Ada The electronic equivalent of an Ada package is the IC Each IC has specific inputs outputs and more Features that make Ada95 ideal for robotics include object oriented method ology Ada95 packages type checking range checking representation clauses generic functions protected records tasking deterministic scheduling and exception handling Although Java and C have similar features Ada95 enforces type checking constraint check ing and exceptions It also has tasking built into the language so it doesn t have to make external system calls or POSIX function calls to schedule threads similar to tasks Ada tasks make developing robotic applications such as collecting sen sor data checking for objects obstacle detection and generating motor com mands easier than using a finite state machine FSM or a linear control loop For example a sensor collection task and motor control task may run in parallel with a sensor collection task reading the latest motor positions encoder counts while the motor con trol task sends new PWM motor com mands to the motors Your navigation task determines the next move Us
197. p between a runner s cadence and his speed Getting the Microchip Technology MCC18 compiler to free up sev eral blocks of its 1 5 KB of RAM proved to be unexpectedly diffi cult The solution involved edit ing the linker file and telling the com piler to alias several contiguous blocks of RAM with a variable name which is referenced from within your C source file see Listing 1 With 640 bytes of RAM there were about 13 s of logging capability The logged data was then downloaded and analyzed in Excel An example of the ADC samples from the ADXL along with a lot of other information is plot ted in Figure 4 The sample curve in Figure 4 represents the force at the E S pum Stride m 8 Speed m s Period s Figure 5 Here is the relationship between a runner s cadence and his stride length runner s hip over two footfalls Each footfall event is punctuated by two peaks one generated by the heel strike and the other by the toe launch The change in amplitude between the two footfall events reflects the fact that the DIY Wii was mounted asymmetrically over one hip The period of the foot falls was extracted from the sample data by converting it into a binary sig nal the strike curve in Figure 4 which represented if the force was high or low To extract the signal from the sampled data you would normally write an algorithm which looked for a change in sl
198. pper motor driver circuit 34 Issue 212 March 2008 set the pen holder to the home loca tion however you will need input lines to detect that the pen holder has reached a certain location Unfortu nately my stepper motor controller does not have any input so I manually locate the pen holder at a known loca tion before starting any drawing The second problem is obtaining the sequence of commands to draw the lines you want the system to paint I am familiar with vector drawing pro grams and the scalable vector graphics SVG file format It happens to be an XML based format so you can easily look at it with any text editor pro gram It is also easy to parse I opened a new file on Inkscape soft ware I used a tablet to draw several lines as a test file I then looked at the resulting lines and realized that most of them were Bezier lines I mean curves While I could write some code to turn that into a sequence of XY coordinates I thought there had to be a better way Fortunately I discovered that Inkscape software has an effect called Flatten Bezier which turns these curves into a sequence of straight lines Drawing a straight line in software is quite easy Just use Bresenham s algorithm DRAWING AN IMAGE FILE Your machine s readable SVG file format stores each path processed as above as a sequence of dots connected by CIRCUIT CELLAR line segments also called multi line Before drawing a pat
199. pplication and the maximum tolerable noise In the case of the DIY Wii we were primarily focused on measuring human movement For this reason we chose a conservative 50 Hz bandwidth and tolerated the resulting noise SMD SOLDERING If you are like me then you have CIRCUIT CELLAR Figure 2 This is the ADXL330 with its axes of accel eration sensitivity avoided SMD parts because you believe that you lack soldering skills you don t know how to or don t want to build a custom PCB or you are put off by the cost of expensive adapters for breadboards Unfortunately more and more cool devices such as the ADXL330 are available only in sur face mount packaging I figured that if we were going to get our toes wet then we might as well jump in the deep end and go with surface mount packaging whenever possible With the decision made to go with surface mount packaging I now faced the prospect of students without sol dering experience assembling the DIY Wii There are two general ways to solder parts to a PCB hand soldering and reflow soldering Hand soldering is very versatile With a good soldering iron the right solder and a bunch of solder wick virtually any surface mount device SMD can successfully be attached to a PCB One technique is to melt a little solder on one of the PCB pads and let it cool Next align the device on its PCB pads hold it down and heat up the pin over the soldered pad This will
200. r the helicopter After completing his studies at Camosun College he will be relocating to the greater Toronto area to find work in his field Stefan Kaban s snkaban gmail com interest in helicopters was piqued during a co op job with the B C Min istry of Forests where he was regular ly exposed to helicopter operations He plans to complete his degree in Electrical Engineering at the Universi ty of Victoria Scott Morken scottm361 gmail com is a graduate of the Computer Engineering Technology program at Camosun www circuitcellar com College He discovered his new favorite programming language while working for two co op terms as a C developer Scott has also worked on many other hobby software projects Updated versions of some of the proj ect software are available on his web site www red79 net Projects html Carl Philippsen carlphilippsen amp hotmail com is a graduate of the Electronics Technician Common Core program at North Island College and the Elec tronics Engineering Technology pro gram at Camosun College He is interested in a career in biomedical engineering and plans to further his education at the University of Victoria Kyle Wong kindawong gmail com worked as an electronics technologist for several years He plans to attend the University of Victoria and enroll in the Electronics Engineering degree program PROJECT FILE REFERENCES 1 G Schmidt Don t Flicker D
201. rch 2008 checks the actual command It then determines which action is appropri ate to take based on the command Table 1 shows a complete example of an engine speed packet SOFTWARE The PC software is designed to keep you in control of the helicopter and informed of its status It has three main components the communications class library the indicators user control library and the Google Maps user con trol All parts of this software are coded in C using the NET framework and the Microsoft Visual Studio 2005 IDE The communications library is used to link the GUI to the helicopter It is built around a serial port connection The library provides a simple interface for a GUI coder to use the communications protocol It enables all packets to be sent by a simple function call and each received packet raises an event for the GUI to handle All other functionality such as error checking and packet pars ing is dealt with internally by the com munications class library The library is centered on a NET serial port object and a high speed timer Each time the timer event is raised the library checks the serial port buffer to see if its contents are a valid packet or if there is a transmis sion error The serial port object raises an event when bytes are received but we found the event was not raised reliably on every byte Additionally using the event forced us to pass the event data across threads This is because t
202. rits the gauge class An important thing we learned was the value of using double buffering to prevent flick ering of the things drawn using The Google Maps user control shows the position of the helicopter with GPS coordinates received via the communi cations protocol It is also used to define way points for the helicopter The user control requires an Internet connection It is based on a NET web browser con trol that loads Power Map a JavaScript page containing interface functions to use with Google Maps The JavaScript on this page forms a wrapper around the Google Maps API It is what the map control interfaces to Each time a GPS packet is received from the helicopter we convert the packet s contents from the standard NMEA string format www geoaps com NMEA htm to floating point degrees The map can be easily centered on the coordinates or a marker can be placed at this point At startup the Google Maps user control loads the Power Maps JavaScript If an Internet connection is present the Google Maps interface will load and a map will be shown Each JavaScript function in Power Map is called by the method HtmlDocument InvokeScript method IMPROVEMENTS If you have the time and money we would recommend adding error parity and redundancy checking to the com munications protocol We were limited on time so we skipped this aspect of the project because our radio modules had error checking built in Adding
203. rmed by our firmware program The firmware handling our communications is loaded onto a dsPIC30F3011 on the helicopter We chose this microcon troller because it has pow erful processing abilities Group description Group byte Command description the receiving station either Testing tuning 0x54 0x45 Engine speed adjust the helicopter or the base sta 0x54 0x50 Pitch servo adjust tion what type of command 0x54 0x52 Roll servo adjust is being sent For example it 0x54 0x43 Collective servo adjust might be a testing tuning 0x54 0x51 Anti torque servo adjust command in which case the 0x54 0x66 Set operations mode command group byte would 0x54 OxDD General purpose data dump be 0x54 We included a Flight operations 0x46 0x45 Engage engine command group to make 0x46 0x48 Hover decoding simpler and better 0x46 0x43 GPS Correction factor documented Another pro 0x46 0x47 Go to GPS coordinates grammer looking at the 0x46 0x52 Return to base state machine can easily go 0x46 0x50 Request pre flight packet to the group in question and 0x46 0x4D Discreet movement have fewer commands to 0x46 0x49 Request for information sift through Telemetry data 0x74 0x4C Location We use command bytes 0x74 0x48 Heading speed
204. ro gram at Camosun College we chose to work on an autonomous self balancing model helicopter An important part of this project involved developing a communications system for sending commands to the hel icopter and receiving status information in return Using simple readily available hardware and extensive software we suc cessfully implemented the communica tions system to keep the base station connected to the helicopter In this article we ll describe our communications system It comprises firmware and a communications protocol APPLICATIONS Our communications system was originally designed to control an RC helicopter The system uses software firmware and a communications pro tocol to send commands to the helicop ter and receive information from it The command packets and data packets are 36 Issue 212 March 2008 transmitted between a base station connected to a laptop computer and a receiving module on the helicopter Sensor data and user commands con trol an array of servo motors With the right modification of servos and sen sors this concept for control could easily be implemented to aid in the control of other types of RC or full scale vehicles including boats planes or cars Who can use a system like ours A search and rescue team could send out multiple autonomous helicopters equipped with cameras The smaller scale autonomous helicopters would have a better chance of finding people in d
205. rotocol Each message includes an SPI source address field Master an SPIx destination address field the actual data and a CRC or checksum field Data packets that are determined to be corrupted vill be retransmitted up to a specified number of times SPI Slave responds by reading these messages into local buffers and proceeds to process them Results are sent back to the Master SPI processor via the SPI Bus These SPI networking functions are also available to other applications that require the SPI interface Message definitions are defined in the file spimsg h which are common to the spimast c and spislave c applications SPI transmit and receive buffers are available to process messages to from the Master controller The following are simple code examples illustrating the SSP module communicating with a Microchip 246888 SPI EE Memory Device In all th examples provided no error checking utilizing the value returned from function is implemented ck X X KK Thie nantuntinw nan ha ced sith NA hart ie nudan n minn ane NAO Hha lt Ls gcc c Id gnat serial2 gnatuu 02 gnatn funroll loops gnatp gnatX ID GNAT serial2 I C GNAT Bindings Win32Ada win32 winnt adb gcc c Id gnat serial2 gnatuu 02 gnatn funroll loops gnatp gnatX ID GNAT serial2 I C GNAT Bindings Win32Ada win32 winuser adb win32 winuser adb 288 26 warning formal parameter duReserued is n
206. rs Their implementation on fixed point proces sors must support scaling to integers and additional software to track any sort of overflow associated with them An alternative to all of this is to use high level languages such as C along with a floating point library to support integer real number multiplies A C floating point library would produce accurate results but with increased CPU overhead rendering real time pro cessing would be at times impossible Texas Instruments s ultra low power MSP430 microcontrollers are an exam ple of modern 16 bit microcontrollers that support single cycle shift and add instructions Although some of the devices offer a hardware multiplier module this method can still be used to accomplish an integer real mul tiply Comparisons of Horner s method and Horner s method using CSD are made with existing integer integer multiply algorithms and a C floating point library Results are shown to exhibit good accuracy under low power CPU cycle count to imply reduced CPU CIRCUIT CELLAR 0 00011111100101 I 0 001111110010111 x 0 010111101100010 0 001101110100100 0 001111110010111 0 01110110011101 I 0 000101110011001 0 001111110010111 0 0101011001 10000 bandwidth and lower power consump tion Performance of digital FIR digital filters on the MSP430 has also been shown to have excellent frequency responses FRACTIONAL MULTIPLIER The data to be processed is
207. rting bits see Figure 6 THAT S NOT ALL FOLKS I ve touched on half a dozen eminent ly respectable 32 bit architectures com prising hundreds of parts supplied by a top tier list of global IC powerhouses Could you ask for anything more Of course when it comes to silicon it www circuitcellar com Stage E Stage M Stage A Stage W Stage M to E Bypass Reg File Instruction gt Multiplexers A to E Bypass Load data HI LO data or CPO data Figure 5 At the heart of the PIC32 is a powerful MIPS core with performance oriented features including pre fetch cache virtual memory MMU and a high speed math coprocessor The sophisticated for an MCU five stage pipeline reduces stalls by forwarding results directly to waiting stages doesn t matter if you ask because you re getting it anyway There s a whole parallel universe of DSPs that are a must for the most signal centric applications However all the DSP suppliers e g Analog Devices Freescale and TI have been working hard to offer chips that are more MCU like both in terms of hardware features e g flash and I O and development environment C RTOS and debug If you re up for an ASIC there are custom cores from the likes of MIPS ARC and Tensilica Then there s multicore where you ve got everything from a 10 Propeller chip to sci fi parts with hundreds of cores today thousands tomorrow What a wonderful time to be an
208. s constellations and deep space objects You don t even need instructions Just turn it on and follow the directions on the LCD ARM processor power brings the heavens to you 1 exterior lighting to streets parking lots buildings and signage makes our nights safer but it unknowingly adds to the growing light pollution problem that may threaten some life on our planet see Photo 1 Light pollution isn t obvious unless you like to stargaze If you do you quickly realize its effect of washing out the nighttime sky Civil engineers are now required to design with direc tional lighting to help minimize this effect Light pollution interferes with the way many plants and animals function Although we cannot elimi nate light pollution we can reduce its effects and save energy by using illu mination wisely as we should every resource Although light pollution interferes with this month s topic it s not the focus here However you are encouraged to learn more about light pollution and its effects on our planet by visiting your local library or using your favorite search engine This month I want to discuss the design of a device that makes it sim ple for anyone to enjoy stargazing Celestron has been making telescopes since 1960 and it recently released the SkyScout a handheld device that gives its users a point and click way to identify thousands of stars planets constellations and deep space objects The celest
209. s sales smxrtos com CIRCUIT CELLAR CAN 4 USB FX USB Interface USB 2 0 Hi Speed 480Mbps 2008 marks our 12th year of selling CAN interfaces in over 30 countries Zelle Technologies Ine 403 878 2202 www zanthic com ex 159 Versatile Programmable Module a Sarlahi EUSA Parallel Interface AVR IBASIC Stamp VB Compatible Onboard Flash Bitmap Memory Downloadable Fonts AT or 5 0 TOUCH Calor TFT LCD a ZirT or 320x240 resolutions w LED Frortlight 2 77 Transmissive ww 350 nit backlight 5 5 512 colors or 65 535 colors We Make Ls york CUSTOM MEMBRANE KEYBOARDS SWITCHES TO 2 WEEKS TURNAROUND e VERY COMPETITIVE PRICING e Ex 5 4 switch keyboards for 395 00 e PCB backed switches e Custom metal backplates assemblies e Electronic assemblies graphic overlays e Electronic file transfer capabilities Picofab Inc 47808 Blvd Henri Bourassa Charlesbourg Quebec Canada G1H 3A7 Tel 418 622 5298 Fax 418 622 9996 Email sales picofab net www circuitcellar com ENS te bal up tet ye TAT A A j P TStk is a ruggedized TINI400 chipset in the familiar SIMM72 form factor Upgrade most 5 1 TINI390 systems or use our new TILT socket boards TILT Pro is shown above TStik is about 100 and sockets start at under 60 SYSTRONIX full details at www TStik com MM M
210. s method for Equation 1 The result of the intermediate steps x to X shows its progression to the final result Issue 212 March 2008 61 using the conventional method is 0 0001655646875 an error of approxi mately 5 4 LSB This error is due to finite word length effects on the mul tiplier Horner s algorithm attempts to reduce this error Horner s algorithm identifies the posi tions of bits with a value of 1 in the mul tiplier and their distance to the nearest 1 to the left This is done starting from the rightmost 1 and moving left to the last 1 before the binary point For Equation 1 with M 0 1357 the position of the bits with a value of 1 in the multiplier are 2 4 9 138 9 12 9 11 9 9 9 7 9 3 The dis tance of the closest binary 1 to the left for each of the bits is 1 1 1 1 2 2 2 4 Once this has been established Horner s algorithm generates a set of design equa tions using only shift and add operations The design equations are written in terms of the multiplicand x It is assumed that the reader is aware that 27 is a right shift by 1 and 2 is a left shift by 1 The first step is to initialize the inter mediate result to x and proceed to the rightmost bit 27 The nearest 1 to its left is at bit position 2 The difference in weight 2 is applied to the intermedi ate result The multiplicand x is then added to the weighted result for the occurrence of the 1 at bit position 27 The result of this
211. said to have stood for Microprocessor without Interlocking Pipeline Stages Instead of hard ware interlocks the idea was to have the compiler schedule around hazards by moving instructions inserting NOPs and so on So I have to smile now that I see in the PIC32 datasheet that Pipeline interruptions are handled entirely in hardware Another example is interrupts or rather in the case of the original MIPS design lack of same As I recall soft ware was expected to handle nearly every aspect of interrupt processing with the chip doing little more than stacking the PC and status word in a single deep backup register Want to know where the interrupt came from Use software Want to handle nested interrupts Use software Want to imple ment priority Use software By con trast the Rev 2 variant of the archi tecture used in PIC32 has an altogether modern vectored interrupt capability and even a spare register set dedicated to the cause of exception processing There are plenty of other tweaks For instance just toggling a bit on the early RISCs required a 32 bit load mask store sequence Not only is this wasteful in many ways it s also slow and subject to glitches due to the fact it takes multiple cycles i e updates are non atomic PIC32 brute forces the traditional RISC bit I O problem away by supplementing each peripheral register with three other registers dedicated to setting clearing and inve
212. se over 1 MB of SRAM for shared code and data Pin compatible with the complete family of Rabbit 4000 based core modules the RCM4300 supports twice as much code space compared to any other Rab bit core module enabling complex embedded applications such as data encryption and security enabled web servers The RCM4300 series also provides the capability to implement up to 1 GB of storage using an industry standard miniSD memory card To ease design effort and reduce development time the RCM4300 development kit is available The development kit has all of the essentials needed to design a microprocessor based embedded system with mass storage The kit includes an RCM4300 with a 512 MB miniSD card a prototyping board accessories and development tools to get design engineers up and running quickly Along with the industry proven Dynamic C integrated development software incor porating an editor compiler and in circuit debugger there is also the FAT file system familiar to many pro grammers RabbitWeb for creating HTML web pages and Rabbit s Secure Socket Layer utility The RCM4300 costs 80 for 1 000 units The RCM4310 costs 69 for 1 000 units The RCM4300 development kit is 299 Rabbit Semiconductor Inc www rabbit com HIGH OUTPUT VOLTAGE DC DC CONTROLLER The LT3742 is a 100 duty cycle dual output step down short circuit conditions In addition the LT3742 has switching regulator DC DC controller that produces
213. see the board comes equipped with lots of I O devices to demonstrate embedded concepts A com bination of good silk screening on the PCB detailed construction instructions and a novel soldering technique resulted in a system that was straightforward to assemble The system was reasonably inexpensive The unit cost of the parts and PCB was 43 To keep costs down I jettisoned the optical sensor foregoing the ability to use the DIY Wii as a point er Students who wanted to work at home had to purchase their own 35 PICkit 2 a USB device that programs the microcontroller through a six pin header Software development took place in Microchip s free MPLab IDE using the free student edition of its C compiler AAA batteries and some onboard boost converters were a perfect match for the DIY Wii s diminutive power require ments Before discussing its capabili ties let s take a brief look at the hard ware that makes up the DIY Wii and the motivation for these choices HARDWARE DESIGN During the previous year in my embedded systems class we used the PIC18F452 which in the interim year had evolved into the PIC18F4520 A quick check of the technical docu ments revealed some small differences in the CCP subsystem otherwise the parts were nearly identical Thus using the 18 4520 meant that I could keep a large portion of my lec ture notes unchanged that made the microcontroller choice obvious The rest of the DIY
214. sign is coded and tested The test cases and results are in the file LinkListReport txt The next step is for a code review What s a code review Well Wikipedia says Code review is systematic examination often as peer review of computer source code intended to find and fix mistakes overlooked in the initial development phase improving both the overall quality of software and the developers skills Let s have a code review I ll start it What happens if a string longer than the permissible size is some how entered for the number to dial Should we protect against that event How What happens if a group number less than O or greater than the maxi mum is entered Should we protect against that event How You get the picture Do a code review and post your comments on the blog I ve created for this design review CCI C Programming Design Review http ccidesignreview word press com Then we ll keep that active and see where it takes us Let s go Don t put it off any longer Next time let s look deeper into compiler output We ll take apart the C compiler generated code Sounds like fun See you next time l amp George Martin gmartin circuitcellar com began his career in the aero space industry in 1969 After five years at a real job he set out on his own and co founded a design and manufacturing firm www embedded designer com His designs typically include servo motion control graphi cal input an
215. solution Leaving no socket unturned ARM is making their own soft core moves by working with Actel to deliver ARM 7 capability in flash based FPGAs Just recently the duo announced a new more streamlined Cortex M1 core that cuts the gate count and power consumption factors that are always a consideration with FPGAs For their part Xilinx need the full MMU baggage but still want some protec tion synthesis alternatives include basic USER SUPERVI SOR protection and a limited hardware i e no virtual memory memory protection unit see Table 1 The ability to pon trade off price power and per formance is key to the soft core con cept For example the Altera Nios II core comes in three flavors fast standard and econo my giving designers the flexibility to optimize for a wide range of different applications Flexibility also extends to implementation options with Altera and Synopsys collaborating to offer NIOS II for real ASIC designs I guess that makes it a hard core soft core Flash size yy The name is different and the iconic batwing logo is gone but Freescale Semiconductor carries forward the historic embedded leadership of Motorola Over the years Motorola seemingly never met a 32 bit architec ture they didn t love There was 68K Coldfire PowerPC ARM M Core and 88K not to mention DSPs Except for the 88K lived fast died young these all soldier on under the Fre
216. sor attached to the index fin ger The 12 bit reading from the ADC for any of the sensors is a value between 0 and 4 095 which can be scaled to PWM motor commands needed for animation XYZ ACCELEROMETERS The MMA6260Q X Y axis and 12600 Z axis accelerometers which are used to obtain the glove s relative orientation enable you to move associated motors or servos by turning your wrist and adding three degrees of freedom pitch yaw and roll that can be mapped to servo or motor commands The accelerometers are read with the 12 bit ADC With this technology you can use the Vex Power Glove for video games input and telerobotics and virtual reality experiments similar to those carried out in research labs An XYZ accelerometer provides the glove orientation tilt by measuring the XYZ angles relative to the Earth s gravity vector to 1 5 which points to the center of the Earth Although the dsPIC can run with a 3 3 V power supply I also included a Microchip Technology MCP6S26 six channel pro grammable gain amplifier PGA for signal condition ing in the design The MCP6826 scales the 3 3 V X Y accelerometer readings to the 5 V required for the dsPIC s ADC because everything else is 5 V based and the voltage reference for the ADC is 5 V The Z accelerometer is fine 20 Issue 212 March 2008 because it already uses a 5 V supply The ADC channels used for the accelerometers AN12 RB12 AN13
217. sy interfaces to external peripherals As technology advances the demand for processing capabilities and efficiency increases This demand calls for an upgrade of existing micro controllers with introduction of newer peripherals The design tools to sup port enhanced hardware and software must also go through a process of con siderable development Manufacturers continuously strive to provide on chip solutions for complex algorithms thus increasing cost Some microcontrollers choose to go through limited enhance ments and adhere to low cost and low power consumption Complex algo rithms and functions such as digital filtering at times become impossible on these devices This forces design ers to search for efficient methods and make do with what is available This article focuses on one such effi cient method for microcontrollers ALGORITHMS Processors are broadly classified as fixed point or floating point Fixed point processors support only integers whereas floating point processors have additional circuitry to support integers and fractions Various standards for floating point formats have been established to maintain uniformity 60 Issue 212 March 2008 across processors and their associated tools All microcontrollers fall under fixed point processors and are mostly 8 bit or 16 bit devices Fixed point processors suffer from the effects of finite word length round off and truncation These issues have a
218. t Digi sells other options Additional XBee PRO mod ules can provide greater range and animation con trol options The Digi wireless UART which can be easily config ured using standard AT modem commands includes a utility to con figure the modem channel and data rate as required www circuitcellar com by the application USB 2 0 INTERFACE A Microchip Technology PIC18F4550 USB 2 0 controller provides a convenient method to directly connect embedded controllers to Ada95 based applications running on a laptop or PC by using the USB inter face with USB 2 0 This is accomplished by taking advan tage of a virtual COM port VCP as described in Microchip s USB application notes It communicates with the dsPIC30F6014 Vex Power Glove controller via the 8 bit SPI bus You can also purchase a complete USB 2 0 develop ment kit a PIC18F4550 USB 2 0 controller PICDEM full speed USB demonstration board DM163025 that includes a board and all the necessary firmware I used this board for some of my other USB applica tions including a USB high per formance DC motor controller The Vex Power Glove can also be directly connected to a PC or laptop as a motion input device Of course this requires the glove to be tethered to a PC or laptop with a USB cable Doing so provides a convenient way to calibrate evaluate and test the glove with resources such as MATLAB and Excel for visual izing the data and analyzing it
219. t is accelerated along an axis the associated output voltage will increase The output is ratiomet ric to the input acceleration and depends on the supply voltage With a supply voltage of 3 3 V the 0 output is 1 7 V and each axis has a sensitivity of 330 mV G Thus the ADXL shown in Figure 2 would have outputs of V 1 7 Vy 1 7 and V 2 08 There is only one configuration detail that must be addressed when incorpo rating the ADXL330 into a design the selection of the bypass capacitors The bypass capacitors determine the trade off between bandwidth and noise The bandwidth determines the highest fre quency accelerations that can be report ed by the device Clearly having high bandwidth would be desirable You could let the unused bandwidth go to waste However bandwidth is pur chased at the expense of noise Noise manifests itself in spurious variations at the voltage outputs The ADXL330 technical documentation explains that the ADXL330 noise has the character istics of white Gaussian noise which contributes equally at all frequencies and is described in terms of ug VHz Thus it makes sense to ask questions about the probability of the noise exceeding some threshold Clearly low noise would be desirable because everyone likes precise measurements Unfortunately the device does not enable you to have both high band width and low noise Hence you need to determine the minimum bandwidth in your a
220. t with a value of 1 2 The nearest 1 to its left is at bit position 2 The differ ence in weight 2 is applied to the inter mediate result The multiplicand x is again added to the weighted result for the occurrence of the 1 at bit position 27 The result of the addition is stored as the intermediate result x for the next step X Xl ee x 6 At step six proceed to the next bit with a value of 1 277 The nearest 1 to its left is at bit position 27 The difference in weight 2 is applied to the intermediate result The multiplicand x is again added to the weighted result for the occurrence of the 1 at bit position 25 The result of this addition is now stored as the inter mediate result x for the next step x X2 7 The seventh step is to proceed to the last bit with a value of 1 2 M 0 1357 0 001000101011110 group 0 00100010 11 00010 0 001000 11 0100010 group group 0 001001010100010 2 2 2 7 27 Number of reducations in add is two M 891 1101111011 1101111101 111 0000101 group group group CIRCUIT CELLAR 2 1 024 128 4 1 891 Final product x x 2 ES x X d x dx X2 x x2 x x x 2 x x 2 x x2 xx 2 2 2 2 77 Figure 4 Here you see back substitution in the steps of Horner s method for an integer multiplier This is done to verify if Horner s method conforms
221. te Strobe Address Bus and 8 bit Data Bus The interface 52 Issue 212 March 2008 is completely asynchronous but because all of the internal logic is syn chronous there is a cycle time restric tion on the bus A Wait output is automatically generated by the device to enforce the cycle time restriction so no extra external logic is required Each of the eight channels is indi vidually addressed but the registers within a channel are accessed indirect ly using a two step process that first writes the register address followed by a read or write of the data Global registers are accessed directly Using the parallel bus interface is not without its drawbacks because six pins that are normally available for Parallel interface Parallel function channel I O are used for part of the data bus This is why using the device with a serial bus interface makes the most sense Five different options are available for the serial bus interface Fither sep arate serial input data and serial out put data can be selected or a bidirec tional serial I O bus can be used With each of these options the data can be sent either MSB first or LSB first The clock polarity is not programmable though output data always changes on the falling edge of the clock and input data is always sampled on the rising edge of the clock As in the case of the parallel bus Serial interface Serial function SER PAR Low select parallel SER
222. tects the converter during overload and 12 Issue 212 March 2008 CIRCUIT CELLAR www circuitcellar com CELLAR Your PI 1 The master clock on a GPS satellite Problem 2 What is the relationship if any is set to 10 229 999 99545 Hz Why such an between the GPS master clock and the GPS odd value microwave carrier frequencies L1 and 12 Why are two different frequencies used Problem 3 Both Verilog and VHDL support roblem 4 For the data structure commonly the concept of compile time adjustments to sg as a hash associative array in the design of a particular module in addition some scripting languages what is the differ to the real time signals that pass into and out ence in overall performance in order of magni of it What is the specific syntax in each case tude terms between storing items into the array and reading them out again Contributed by David Tweed What s your EG The answers are posted at www circuitcellar com eq You may contact the quizmasters at eq circuitcellar com Fourier Data Loggers New ZigBee Wireless Data Logging Intelligent Dete Loss Transmission Portable Long Range Units USB ZigBee Stick Wireless Mesh Networking To eleg New ZigBee Pro Technlogy ie Low Gost esis Industrial Bluetooth RS232 Replacement Long Range wWeb Enable Rene Anything Nothin Multi Channel 900 MHz Wireless p s RF
223. ter Science and Engi neering from Penn State University He is an associ ate professor and program chair of Electrical Comput er and Software Engineering at Penn State Erie Chris also runs ATAN consulting an electronics development and manufacturing firm that provides instrumentation solutions for local industry In his spare time he likes to ride his bicycle around Erie county and race on the weekends You can e mail Chris at coulston psu edu PROJECT FILES To download code go to ftp ftp circuit cellar com pub Circuit_Cellar 2008 212 REFERENCES 1 R Lacoste Easy Reflow Build an SMT Reflow Oven Controller Circuit Cellar 168 2004 2 J Scarlett Enhancing the Perfor mance of Pedometers Using a Single Accelerometer Analog Devices Inc www analog com library analogDia logue archives 41 03 pedometer html RESOURCE SparkFun Electronics www sparkfun com SOURCES ADXL330 Analog Devices Inc www analog com R276 No clean solder paste Kester Inc www kester com LCM S01602DTR M LCD Lumex Inc www lumex com MCC18 Compiler MCP1252 DC to DC converter PICkit 2 development programmer debugger and PIC18F4520 microcontroller Microchip Technology Inc www microchip com Issue 212 March 2008 51 FEATURE ARTICLE by Monte Dalrymple Robotics Made Easy A Peripheral Chip for Low Level Functions Robotics and motion control applications typically require specialize
224. the dis coveries with students To give my students a chance to apply what they have learned they choose their own final projects Last year one final proj ect team used a Microchip Technology PIC18F452 to read acceleration data from an Analog Devices ADXL220 and send it to a PC They created an OpenGL application on the PC to use the ADXL values to change the tilt of a rendered 3 D maze containing a ball The user guided the ball through the maze towards a goal The stu dents voted this the top project of the year Not one to shut the door on opportunity I wondered how I could incorpo rate the project into class assignments Not long after that Nintendo came out with the Wii a gaming system based around a motion sensing controller Hence the Do It Yourself Wii was born The Nintendo Wii consists of a console that is plugged into a TV a controller and a sensor bar The user controls the on screen action with a controller containing a variety of buttons a three axis accelerometer and an optical sensor The acceleration infor www circuitcellar com mation provided by the accelerometer enables the user to interact with con sole games using physical gestures like punching in a boxing game or rolling a bowling ball in a bowling game The sensor bar s pair of IR LEDs are detected by the controller s optical sensor enabling the controller to be I n 2 e Photo 1 This is the completed DIY Wii Don
225. the shape a chain forms when it is hanging from two supports under its own weight While the error of my simplified mathematical model is acceptable for artistic renderings it Figure 2 This is the wiring schematic diagram Both unipolar stepper motors are shown also used a recycled bipolar stepper motor with a small hack www circuitcellar com CIRCUIT CELLAR may be a bit of a problem for users who require better accuracy DESIGN AND DRAW Despite the challenge my vertical plotting machine was fun to build In addition to its entertainment value it is also pretty useful Please note that although your math might tell you that you can reach the top of the drawing area you should keep a safe distance from the top left and right margins This will ensure good accuracy when drawing If you need to draw a wider picture simply increase the distance between the two motors or position your canvas in Portrait mode and rotate your image 90 Miguel Sanchez misanQdisca upv es holds a B S an M S and a PhD in Computer Science He has taught com puter networks courses at the Techni cal University of Valencia Spain since 1989 Miguel s interest in electronics and microprocessors sparked his career in computer science but his solder is always at hand His research is cur rently focused on vehicle energy effi ciency Miguel also works as a consult ant A video of this project is posted at www y
226. their own Because they are rela tively close by and have peri odic orbits like that of Earth their positions relative to the Earth are always changing 72 Issue 212 March 2008 mation from the GPS enables the SkyScout to calculate orbit positions based on a TLE The two calculated orbital positions in this case Earth and Jupiter can be used to determine an RA and DEC for locating Jupiter The scientific data displayed for Jupiter is shown in Table 2 GPS The Global Positioning System GPS is a network of satellites set in geostationary orbit around the Earth which transmits a time synchronized signal The National Marine Electron ics Association NMEA developed the specification that defines the data issued by GPS receivers One such sentence ASCII data is shown below GPRMC 123519 A 4807 038 N 01 131 000 E 022 4 084 4 230394 003 1 W 6A RMC is the recommended minimum sentence C data 123519 is the time of the Fix 12 35 19 UTC A is Figure 3 This map shows the declination offsets for the world as of the year 2000 It is interesting to note that the magnetic poles are not 180 opposite one another as are the true North and South poles the Earth s axis of rotation Source http geomag usgs gov charts IGRF2000 dec na pdf CIRCUIT CELLAR the Status A active or V void 4807 038 N is the latitude 48 07 038 N 01131 000 E is the lon gitude 11
227. tipliers are chosen and the result for each multiply is shown Cycle count directly relates to the overhead on the CPU and absolute error indicates the accuracy of each method tailor made for algorithms that rely on bits with a value of 1 for their design The CSD format for its representation the rightmost bit before the binary point The multiplier M in this case is any inte ger Additional care must be taken to ensure that the result of the multiply does not exceed the range for represen tation in the microcontroller The sec ond example shows a similar scheme when the multiplier is an integer type Only design equations have been pro vided for this multiplier with x taking any form integer fraction Consider the multiplier M 77 1001101 The fol lowing are design equations Add a color touch interface to your embedded product Yes it s really cx qx 9 dd this simple icrocontroller x X2 x x 10 Jl Mere with any x x2 11 Serial Up and running in hours Commands r SD card slot for images Final product x x 2 12 our SLCDS The weights in design Equations 9 v Easy fast flexible through 11 are all positive powers of two rather than negative as the direction is now from left to right as opposed to right to left for fractional multipliers The result of back substitution for the integer multiplier is shown in Figure 4 REAL MULTIPLIER Procedures for pure fraction and pure
228. to ever more inefficient EEPROM usage This is a perfect opportunity to try linked lists USE A LINKED LIST Wikipedia describes a linked list as one of the fundamental data structures www circuitcellar com Listing 1 This is pseudocode of the problem of dialing out Detect a problem If the problem has not been reported and acknowledged Try to get Outgoing Line If Successful Dial lst Number Wait for connection Send Message Wait for Acknowledge If Acknowledge is received Mark problem as reported and acknowledged Else Dial 2nd number Wait for connection Send Message Wait for Acknowledge If Acknowledge is received Mark problem as reported and acknowledged Else Dial Wait Send Message Wait 3rd number for connection for Acknowledge If Acknowledge is received Mark problem as reported and acknowledged Else Dial 4th number Wait for connection Send Message Wait for Acknowledge If Acknowledge is received Mark problem as reported and acknowledged If not acknowledged Repeat the above process N times Once problem is acknowledged mark it as reported When Problem goes away clear the reported flag and can be used to implement other data structures It consists of a sequence of nodes each containing arbitrary data fields and one or two references links pointing to the next and or previous nodes Stanford University has a great tutorial on the subject and a good set of problems
229. ts USB 2 0 480 Mbps USB 1 1 compatible 12 Mbps See our Memory from 179 20 Uitechiools Wwww tech tools corr 972 272 9392 sales tech tools com 2007 TechTools DigiView FlexROM EconoROM and QuickWriter af ech lool A miero is registered tranemark of Microchip Technolooy inc Ready to build in quantity We stock our PBASIC interpreter chips SX microcontrollers and the Propeller chip in rails trays with production volume pricing Visit www parallax com for information on package types and stock availability BASIC Propeller stamp E Chi D Give your product a BASIC Stamp brain Build Simplify your embedded a BASIC Stamp microcontroller on your PCB designs with the Parallax with our PBASIC Interpreter Chip We also Propeller This high speed parallel processing stock compatible resonators and microcontroller has eight 32 bit processors EEPROM Eleven PBASIC e that can perform truly simultaneous tasks interpreter chip program types independently or cooperatively with are available from the BASIC deterministic timing Programming is Stamp 1 to the powerful BASIC surprisingly straightforward with native high otamp 2p family level Spin and assembly Free resources include our community forums and full source code examples in our online object library http obex parallax com Super fun for lots of stuff Available in 40 pin DIP and 44 pin LQFP and QFN packages ei
230. tter idea to fix the con trast of the LCD by putting a 100 O resistor between the V input on the LCD and Two separate power sup plies were installed because the LCD required 5 V and the ADXL330 required 2 to 3 6 V The MCP1252 was a great part and it performed well The 3 3 V boost converter could have been eliminated by noting that the anode of the green power on indication LED sits at 5 V and its for ward bias voltage drop is 2 1 V Hence the LED s cathode sits at 2 9 V which is good enough for the ADXL330 Further more the ADXL is an electron miser consuming a scant 320 of current hardly enough to affect the brightness of the LED A standard MAX232 level con verter and a female DB9 connector were used to communicate between the PC and the DIY Wii My only real mistake in the PCB design was reversing the TX and RX lines between the DB9 and the level converter This mistake provided me with the opportunity of introduc ing my students to green wire fixes ADXL330 The ADXL330 is a three axis accelerometer capable of measuring www circuitcellar com forces up to 3 G It is available only in a 16 pin leadless chip carrier Figure 2 shows the ADXL330 superimposed on top of its three acceleration sensing axes The white dot indicates the posi tion of pin 1 on the physical package The acceleration along each of the sensing axes is converted into a volt age proportional to the acceleration When the par
231. u ll arrive at the best solutions fast These highly accurate benchtop PCB milling machines eliminate bread boarding and allow you to create real repeatable test circuits including plated vias in minutes not days e Declare your independence from board houses e Affordable entry level price tag e The best milling speed resolution and accuracy in the industry e Single sided double sided and multilayered machining without hazardous chemicals e Optional vacuum table and autosearch camera for layer alignment CIRCUIT CELLAR Laser amp Electronics For complete details visit wwWww lpkfusa com or call 1 800 345 L PKF Issue 212 March 2008 23 Listing 2 A range has a lower bound L and an upper bound R for a range L R is shown in the following examples which are used to define RC servo commands for a Parallax servo controller PSC If the application assigns servo commands outside the specified range it will rase a Constraint_Error This isa unique Ada capability that can be simulated in other computer languages using additional limit checks type WORD TYPE is record Data 1 Data 2 end record Byte Byte for WORD TYPE SIZE use 16 Declare RC Servo subtypes with ranges here Use Channels 0 15 with only one PSC board otherwise you can use Channels 0 31 subtype Channel Type is Byte range 0 15 RC Servo Ramp subtype Ramp_Type is byte range 0 he Servo
232. ucial reason for selecting EAGLE is not usually the very favorable price but rather the ease of use On top of that comes the outstanding level of support which at CadSoft is always free of charge and is available without restriction lo avery E A G L E 4 1 customer These are the real cost killers Schematic Capture Board Layout Autorouter Windows Linux Macs Version 4 1 Highlights Powerful library management e g move devices between libranes base library for packages generate package variants from other libraries gt Dynamic ratsnest during routing process Copy function in schematic gt components in D 1 degree Slaps E Fratton r cm d gt Blind amp buried vias and pads E with off center drill ES Liser delined background cotor Miter function for rounded racks Smash for groups Measure disiances between arbitrary points Choose alternative raster on the fly wath Ali key PETE ta fo WEHT EFTE fou use EAGLE L ghi testing and far n n commercial applications without charge The Freewart Vergion Es restricted ta boards up te hall Eurocard ormai 4th gmaxmnurm of two signal avers and one schema sheet All other features correspond to those of the Professional Version Dewnload A fram our niernet 51e ar order our trae CL f you decide in favor of the Commercial L
233. urn on both drivers is guaranteed never to be driven 54 Issue 212 March 2008 on that pair of pins The circuitry that does this is actually the last bit of logic before the pad cells for the pair of I O pins If the channel somehow tries to output this illegal value the pin pair protection circuit substitutes the stored all off value instead There is more to the story because the protection circuitry runs off of an independent timer that guarantees a dead time for the H bridge drive sig nals The timer is used solely for the pin pair protection An example of how it works is shown in Figure 3 The timer samples the channel out puts and transfers legal values to the I O pins while substituting the all off value for an illegal value All of the features from the four I O pins with independent PWM signals to the pin pair protec tion circuitry make driving a motor with an H bridge painless and safe POSITION SENSING Trying to control any kind of motion without some type of feedback about position or velocity is a recipe for disaster One of the most common ways of sensing the position of any thing that rotates is with a pair of sig nals generated by a quadrature encoder Figure 4 shows the operation of quadrature signals Inphase Index Count rst inc linc inc linc linc linc linc linc linc The phase relationship between two quadrature signals provides direction information while the frequency of
234. y to use and smart UML sequence diagram editor that runs on any platform It saves developers a tremendous amount of time by combin ing the immediate and automatic layout of UML sequence diagrams with a simple drag and drop interface The Trace Modeler distinguishes itself by instantly adapting the diagram itil emnes 1 de im iiai Fi Edt Wha Tout Wiedow Hep bB ggd BEE ine i neia i ni i SDtegren shin spacing Faut rai lengh HE Manage 2D wert Larga scm Lan Cal sigman Sandia Fatum digmaan Comia fura Stra Camia few calo Empty rerums Sha Lami diedi Leki right amre 1 Garment fori 3ansBerd 11 Target font Samen 11 8 Issue 212 March 2008 CIRCUIT CELLAR layout to any changes and guaranteeing attractive and structurally correct diagrams The Trace Modeler is designed to optimize developer productivity It can be used by any development team for brainstorming and prototyping the design of new comput er systems or for the documentation of existing ones At the heart of its technology lies an under standing of the flow of control in sequence dia grams This domain knowledge is used not only to determine the proper diagram layout but also to interpret user actions This enables the user to quickly change a diagram with simple drag and drop gestures while the Trace Modeler maint
235. you more processing power and memory for your demanding embedded applications that require web interfaces graphics or encryption Data logging applications will also take advantage of the miniSD memory cards with up to 1GB of storage It s easy to add the RCM4300 or any RabbitCore module to qty 1000 your pin compatible design Superior Performance and Mass Storage for RCM4300 RabbitCore e Web interfaces and graphics Rabbit 4000 58 98 MHz Data logging e 10 100Base T Ethernet Security and encryption e Up to 1GB of miniSD e 8 channel analog input 12 bit Get Your Development Kit Today for 299 Development kits include everything to start your development RA BBI Dynamic C software RCM4300 RabbitCore module 512MB miniSD lt card development board programming cables and accessories www rabbitkits com 2900 Spafford Street Davis CA 95618 Tel 530 757 8400 08019 FEATURE ARTICLE by Chris Coulston Do It Yourself Motion Controlled Gaming Part 1 Get Started With a Simple Application The Nintendo Wii gaming system features a motion sensing remote that translates hand movements and gestures into actual moves in its games In this series of articles Chris describes how you can build your own motion sensing controller that can interact with a variety of graphics programs running on a PC O of the joys of teaching an embedded systems class is exploring new technologies and sharing

Download Pdf Manuals

image

Related Search

Related Contents

ACRES 3 User Guide  TAG770 Users Manual.qxp - TAG  

Copyright © All rights reserved.
Failed to retrieve file