Microsoft Word - B_32_R.doc HUNGARIAN JOURNAL OF INDUSTRIAL CHEMISTRY VESZPRÉM Vol. 38(2). pp. 215-218 (2010) HIGH-TECH BOAT J. LÉNÁRT Robert Bosch Department of Mechatronics, University of Miskolc, Miskolc-Egyetemváros, HUNGARY E-mail: lenart.jozsef@uni-miskolc.hu As an apropos of a program held in Leuven, Belgium, has been suggested to build a watercraft that can be controlled from the riverbank. The show was a big belgian program, the celebration of the canonization of Father Damien. Father Damien was a roman catholic priest at the 19th century. He won recognition for his ministry to people with leprosy (also known as Hansen's disease), who had been placed under a government-sanctioned medical quarantine on the island of Molokai in the Kingdom of Hawaii. Keywords: boat, embedded control, remote control, GPS, linux, multithreaded control Objectives, motivation As an apropos of a program held in Leuven, Belgium, has been suggested to build a watercraft that can be controlled from the riverbank, suitable to carry some spectacular decoration and has high-tech features like cameras, displays, etc. The wishlist was: the boat should be - reliably controlled on a river, - able to carry a 2*1 m sized decoration, - controlled from a computer (or laptop, PDA) from the riverbank through wireless. - The controller interface (software) should display the picture of the boats onboard camera and - switchable electric units (lights, LEDs, motors,etc) can be switched from the controller interface. The show was a big belgian program, the celebration of the canonization of Father Damien. Father Damien was a roman catholic priest at the 19th century. He won recognition for his ministry to people with leprosy (also known as Hansen's disease), who had been placed under a government-sanctioned medical quarantine on the island of Molokai in the Kingdom of Hawaii. The decorations of the 25 small boats shows moments of his life from Tremelo through Leuven to Molokai. The location of the river show is the Dijle river from Leuven to Tremelo (the birth town of Father Damien). Remote controlling the boats down the river requires sophisticated control system. Designing the structure and the electronics The first step was to design a reliable driving scheme. To achieve good manoeuvrability on river requires two independent motors. The rear mounted motor gives the throttle and break power, the crosswise mounted motor in the front of the boat gives the steering by switching he motor to rotate CW or CCW. We choose the Yamaha M-12 electric boat motor because it has enough power to move the boat and operates from 12V DC supply that can be a high capacity battery, and easy to switch with relays. On full throttle these motors consumes 30A current, so we need large batteries and energy-efficient control method to reach two to three hours of operation. Fig. 1 shows the 3D boat model i made. On the model I placed the two 100 Ah batteries to test the weight balance of the body. Figure 1: 3D model of the boat 216 Figure 2: Arrangement of the motors under the boat The design criteria of the electronic system was as follows: - the controller should be absolutely reliable, it is unadmittable to leave the boat without control, - to switch the high power of the motors requires robust, high power electronics, - modular design, in case of failure needs the ability to change or repair only the failed module, easy to improve and more stable. Each component does only one function and does that perfectly. The first step was the development of the switching electronics. This PCB is responsible for switching the motors (throttle with three speeds, break, steering) and the decoration’s lights, which are 24 pieces of 12 V DC output. A conventional PC or laptop has only few controllable output, so we need a suitable PCB for this role. After extensive research I’ve found the solution: the PCA9555N IC made by Philips Semiconductor. This clever circuit communicates over I2C bus and has 16 I/O general purpose pins. Each pin can be configured to act as input or output independently. The boatcontroller PCB has 32 outputs (2*4 for the motors and 24 for the decoration), so can be implemented with 2 pieces of PCA9555N. Because of the outputs of the IC are connected with devices outside the boat (the “outer world”), it is crucial to provide sufficient protection for the sensitive circuit against overvoltage and transients. This protection consists of an optocoupler and a small relay on each ouptut pin. This means full galvanical detachment between the low current, low voltage circuit and the high current, high voltage (12 V DC) devices. The LEDs on the decoration are switched by those small relays, but the motors are attached through additional large, 40 amp relays. Fig. 3 shows the first version of this PCB. However the switch circuit is only a small piece of the whole system. The project needs an onboard computer that serves the user interface by a java servlet and a controller computer able to communicate with buch of devices, an audio amplifier, wireless network appliances, camera for the remote control function, DC/AC inverter to power the displays. Fig. 4 shows the plan of the whole on-board system. Figure 3: First version of the switch circuit The next step is the selection of the onboard computer. To do this, let’s summarize it’s tasks: - serves the user interface (java servlet), - handles the camera over USB or WLAN, - plays videos, presentations, shows the cameras picture on the displays mounted on the front and back of the boat. The controller computers tasks: - control the switching electronics according to the commands given by the user interface, - handling the GPS receiver, determining the coordinates and speed of the boat. Based on those task lists, the chosen device for the role of the onboard computer is the Zotac IONITX-A-E miniITX, intel Atom N330 dualcore CPU based mainboard with integrated video, audio and network (wireless and wired) interface. This satisfy the our needs and the power consumption on full load is under 40 W. The controller computer also has to be energy efficient and has to be able to communicate over RS-232, I2C and ethernet. For this role the Verdex Pro XL6P embedded COM (Computer On Module, shown on Fig. 5) made by the Gumstix Co. (California, USA) is an adequate choice. This is a small device (only 80*20mm) with lower than 2W power consumption, 600 MHz Marvell PXA270 CPU, 128 MB of RAM and runs linux operatng system. The Verdex Pro XL6P has USB, I2C, SPI, GPIO and ethernet interfaces. 217 Figure 4: System plan Figure 5: Gumstix Verdex Pro XL6P COM Figure 6: Software components and hierarchy on the BoatController 218 Software development, implementation My primary task was the development of the software that runs on the controller computer hence I will explain this work hereafter. The scope of this software is to control the boat, handle the GPS module, collect the informations (coordinates, speed) and switch the motors and the decorations lights according to the commands given by the user interface. I’ve decided to design a multithreaded software in which the functions are running in separate threads independently. In this way the separate functions will not block each other e.g. if the GPS interpreter function can’t get any correct data other functions can work nevertheless they don’t have to wait for it. The separate threads are joined in the shared memory. This stores the informations from the UI and the GPS module respectively. The most important part is the one that communicates with the switching board. This piece of software is responsible for setting the outputs according to the information stored int he shared memory. If this function fails the boat gets uncontrollable. The data link between the control computer and the switching board is I2C with 400 kHz clock speed. The I2C is a simple communication protocol, consists of three wires: data (SDA), clock (SCL) and ground (GND). Each data packet contains a 7 bit I2C address, 1 R/W bit and 16 output status bits. The ‘SET/GET’ type commands from the user interface comes over ethernet. The Process1 interprets this commands, in case of a ‘GET’ command it returns the desired data from the shared memory. In case of a ‘SET’ command writes the given data to the appropriate cell of the shared memory. The Process3 sends commands to the switching circuit over I2C based on the changed shared memory cells. The function of the Process2 is to handle the GPS receiver connected to the serial port, interpret the datas and put them to the shared memory. Testing, observations The first tests of the boat were made on a lake, there the functions and the control systems reliability were examined under unperturbed conditions. On this first tests we encountered with some strange behaviours. At the moments when the relays switched and the motors started the control circuit locked up in 3 cases from 10. We have determined that the heavy voltage drop and transients affects the communication on the I2C bus that freezes hence the boat gets out of control. After correcting this problem the system worked reliable and robust under tough circumstances on rivers and waits to accomplish the demonstration. << /ASCII85EncodePages false /AllowTransparency false /AutoPositionEPSFiles true /AutoRotatePages /None /Binding /Left /CalGrayProfile (Dot Gain 20%) /CalRGBProfile (sRGB IEC61966-2.1) /CalCMYKProfile (U.S. Web Coated \050SWOP\051 v2) /sRGBProfile (sRGB IEC61966-2.1) /CannotEmbedFontPolicy /Error /CompatibilityLevel 1.4 /CompressObjects /Tags /CompressPages true /ConvertImagesToIndexed true /PassThroughJPEGImages true /CreateJobTicket false /DefaultRenderingIntent /Default /DetectBlends true /DetectCurves 0.0000 /ColorConversionStrategy /CMYK /DoThumbnails false /EmbedAllFonts true /EmbedOpenType false /ParseICCProfilesInComments true /EmbedJobOptions true /DSCReportingLevel 0 /EmitDSCWarnings false /EndPage -1 /ImageMemory 1048576 /LockDistillerParams false /MaxSubsetPct 100 /Optimize true /OPM 1 /ParseDSCComments true /ParseDSCCommentsForDocInfo true /PreserveCopyPage true /PreserveDICMYKValues true /PreserveEPSInfo true /PreserveFlatness true /PreserveHalftoneInfo false /PreserveOPIComments true /PreserveOverprintSettings true /StartPage 1 /SubsetFonts true /TransferFunctionInfo /Apply /UCRandBGInfo /Preserve /UsePrologue false /ColorSettingsFile () /AlwaysEmbed [ true ] /NeverEmbed [ true ] /AntiAliasColorImages false /CropColorImages true /ColorImageMinResolution 300 /ColorImageMinResolutionPolicy /OK /DownsampleColorImages true /ColorImageDownsampleType /Bicubic /ColorImageResolution 300 /ColorImageDepth -1 /ColorImageMinDownsampleDepth 1 /ColorImageDownsampleThreshold 1.50000 /EncodeColorImages true /ColorImageFilter /DCTEncode /AutoFilterColorImages true /ColorImageAutoFilterStrategy /JPEG /ColorACSImageDict << /QFactor 0.15 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> /ColorImageDict << /QFactor 0.15 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> /JPEG2000ColorACSImageDict << /TileWidth 256 /TileHeight 256 /Quality 30 >> /JPEG2000ColorImageDict << /TileWidth 256 /TileHeight 256 /Quality 30 >> /AntiAliasGrayImages false /CropGrayImages true /GrayImageMinResolution 300 /GrayImageMinResolutionPolicy /OK /DownsampleGrayImages true /GrayImageDownsampleType /Bicubic /GrayImageResolution 300 /GrayImageDepth -1 /GrayImageMinDownsampleDepth 2 /GrayImageDownsampleThreshold 1.50000 /EncodeGrayImages true /GrayImageFilter /DCTEncode /AutoFilterGrayImages true /GrayImageAutoFilterStrategy /JPEG /GrayACSImageDict << /QFactor 0.15 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> /GrayImageDict << /QFactor 0.15 /HSamples [1 1 1 1] /VSamples [1 1 1 1] >> /JPEG2000GrayACSImageDict << /TileWidth 256 /TileHeight 256 /Quality 30 >> /JPEG2000GrayImageDict << /TileWidth 256 /TileHeight 256 /Quality 30 >> /AntiAliasMonoImages false /CropMonoImages true /MonoImageMinResolution 1200 /MonoImageMinResolutionPolicy /OK /DownsampleMonoImages true /MonoImageDownsampleType /Bicubic /MonoImageResolution 1200 /MonoImageDepth -1 /MonoImageDownsampleThreshold 1.50000 /EncodeMonoImages true /MonoImageFilter /CCITTFaxEncode /MonoImageDict << /K -1 >> /AllowPSXObjects false /CheckCompliance [ /None ] /PDFX1aCheck false /PDFX3Check false /PDFXCompliantPDFOnly false /PDFXNoTrimBoxError true /PDFXTrimBoxToMediaBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXSetBleedBoxToMediaBox true /PDFXBleedBoxToTrimBoxOffset [ 0.00000 0.00000 0.00000 0.00000 ] /PDFXOutputIntentProfile () /PDFXOutputConditionIdentifier () /PDFXOutputCondition () /PDFXRegistryName () /PDFXTrapped /False /CreateJDFFile false /Description << /ARA /BGR /CHS /CHT /CZE /DAN /DEU /ESP /ETI /FRA /GRE /HEB /HRV (Za stvaranje Adobe PDF dokumenata najpogodnijih za visokokvalitetni ispis prije tiskanja koristite ove postavke. Stvoreni PDF dokumenti mogu se otvoriti Acrobat i Adobe Reader 5.0 i kasnijim verzijama.) /HUN /ITA /JPN /KOR /LTH /LVI /NLD (Gebruik deze instellingen om Adobe PDF-documenten te maken die zijn geoptimaliseerd voor prepress-afdrukken van hoge kwaliteit. De gemaakte PDF-documenten kunnen worden geopend met Acrobat en Adobe Reader 5.0 en hoger.) /NOR /POL /PTB /RUM /RUS /SKY /SLV /SUO /SVE /TUR /UKR /ENU (Use these settings to create Adobe PDF documents best suited for high-quality prepress printing. Created PDF documents can be opened with Acrobat and Adobe Reader 5.0 and later.) >> /Namespace [ (Adobe) (Common) (1.0) ] /OtherNamespaces [ << /AsReaderSpreads false /CropImagesToFrames true /ErrorControl /WarnAndContinue /FlattenerIgnoreSpreadOverrides false /IncludeGuidesGrids false /IncludeNonPrinting false /IncludeSlug false /Namespace [ (Adobe) (InDesign) (4.0) ] /OmitPlacedBitmaps false /OmitPlacedEPS false /OmitPlacedPDF false /SimulateOverprint /Legacy >> << /AddBleedMarks false /AddColorBars false /AddCropMarks false /AddPageInfo false /AddRegMarks false /ConvertColors /ConvertToCMYK /DestinationProfileName () /DestinationProfileSelector /DocumentCMYK /Downsample16BitImages true /FlattenerPreset << /PresetSelector /MediumResolution >> /FormElements false /GenerateStructure false /IncludeBookmarks false /IncludeHyperlinks false /IncludeInteractive false /IncludeLayers false /IncludeProfiles false /MultimediaHandling /UseObjectSettings /Namespace [ (Adobe) (CreativeSuite) (2.0) ] /PDFXOutputIntentProfileSelector /DocumentCMYK /PreserveEditing true /UntaggedCMYKHandling /LeaveUntagged /UntaggedRGBHandling /UseDocumentProfile /UseDocumentBleed false >> ] >> setdistillerparams << /HWResolution [2400 2400] /PageSize [612.000 792.000] >> setpagedevice