Electronic Design and Simulation of Low Cost Ocean Tides Monitoring Instrument Using Labcenter Proteus

Sea level is one of ocean properties that needed to be observed. Sea level observation will give information about osean tides and tides datum. As technology became more reliable, people can develop new instrument easily. Recently, open source microcontroller “Arduino” became popular and lot of people using it to develop what we call “low-cost” instrument. But, there are several disadvantages if we build instrument directly. Simulation phase must be done before manufacture instrument. This phase will help to decrease cost and time. In this paper, we will describe the concept, algorithm, and simulation phase in manufacturing Low Cost Ocean Tides Monitoring Instrument.


Introduction
Observations of water conditions in the coastal marine environment are critical for a range of management applications as well as improving the understanding many estuarine and nearshore processes. In situ sensors and instrument for measuring basic ocean properties have grown considerably more sophisticated over the past few decades. This increasing sophistication is also evident in the ways by which modern sensors and instruments handle, transform, and store these measurements and how they communicate with each other or with peripheral devices, such as modems (Lockridge et al., 2016;Laney, 2017).
One of basic ocean properties is sea level. Sea level observation in time series will give the information about ocean tides and tidal datum. Tidal datum can be used for surveying and engineering purposes and to establish a system of tidal bench marks, datum control of remote sensing surveys, representation of the shoreline, datum control for dredging projects and coastal engineering projects, data for production of tide and tidal current prediction, and other applications (Gill and Schultz, 2001).
There are several methods to measure sea level such as stilling well and float, pressure systems, acoustic systems, and radar systems (IOC, 2006). Recent advances in technologies, automatic measurement using microcontroller became popular because it is easy and help user to get sea level data regularly. The use of open source microcontrollers for data collection is a trend that has been increasing in popularity in the past few years. One of open source microcontroller is Arduino. Arduino is an open source computing platform based on a simple input/output (I/O) board and a development environment that implements the Processing language. Arduino combining hardware and software as one environment called Arduino Integrated Development Environment (IDE). The utility of the Arduino based microcontroller is clearly evident and viable. Advantages such as low cost and the ability to manufacture and customize multiple units take precedence over higher precision data collection (Margolis, 2012;Lockridge et al., 2016). Some research on sea level measurement instrument focus on using ultrasonic sound as sensor to measure sea level and obtain ocean tides data (Wijaya et al., 2015;Bulaka and Hendro, 2016). This measurement give error because ocean Open Access waves and air temperature (IOC, 2006). So, in this study we want to try using pressure sensor to produce depth.
Simulation process is important phase in instrument design and implementation. Simulation is used to decrease cost and time before manufacture an instrument. Circuit simulation is performed prior to hardware implementation (Mohammed and Devaraj, 2013;Kusuma et al., 2016). One kind of electronic simulation software is LabCenter Proteus. This software used for electronic circuit simulation, schematic capture and Printed Circuit Board (PCB) design. By using this software, we can see output provided by instrument and predicting impact on overall system performance metrics (Bogdan, 2016). This paper describes the simulation of ocean tides monitoring instrument based on the Arduino platform.

Materials and Methods
Low cost ocean tides monitoring instrument used Arduino Uno, micro SD Card module, Real Time Clock (RTC) DS1307, Lyquid Crystal Display (LCD) 16x2 I2C package, GPS module, pressure sensor MPX4250, and digital temperature sensor DS18B20. All component listed were combined, configurated and simulated in Proteus Electronics 8 (Fig 1). Arduino firmware written used Arduino IDE 1.8.3. Data stored inside Virtual SD Card opened in WinImage. This instrument record pressure and temperature regularly based on file inserted in Virtual SD Card.
This instrument designed to record sea level and water temperature regularly every time as specified by user. In this simulation, recording interval set in 10 seconds. These data displayed on LCD and stored inside micro SD Card. Latitude and longitude data was acuired from GPS module, which was used to calculate water depth. Pressure to depth conversion using formulation based on Fofonoff & Millard (1983) is given by where: Kusuma and Oktaviani / JAGI Vol 1 No 2/2017 DS18B20 provides 9 to 12 bit temperature reading which indicate the temperature of the device. This sensor measure temperature and send data through One-Wire Communication. Digital value from DS18B20 converted to temperature value in degree Celsius or Fahrenheit (Kusuma, 2016).

System Programming Design
This instrument developed for pressure and temperature detection, display, and storage. Microcontroller obtain data from sensors, calculate data, produce water depth and temperature, displays it on LCD and store in the micro SD Card. Fig 2 shows the flowcharts of this system. Arduino Uno, RTC and LCD were communicated through I2C protocol. I2C protocol needs 2 pin (SDA and SCL) to be able to communicate with other device. Arduino Uno uses UART protocol to get coordinate data from GPS module. Data received from MPX4250 converted from analog to digital value using internal 10 bit Analog to Digital Converter (ADC) provided by Arduino Uno. DS18B20 gives temperature information to Arduino Uno using One Wire protocol. One Wire protocol only needs one pin to communicate with other device.
After we know the pin configuration and communication type of each component, we will describe how the firmware"s, as shown in Fig 2, makes this instrument work. (1) User switch instrument on; (2) Arduino uno initialize LCD. Arduino read the LCD specification and pin configuration. All pin must configurated correctly to make LCD functional. In this instrument we using LCD I2C library provided by Malpartida (2015). This library make user easier to connect LCD via I2C communication; (3) Initialize DS1820 pin and library. User set the pin so Arduino uno can communicate with DS18B20 using One Wire communication. The library we used from Burton et.al. (2017); (4) Initialize RTC D1307 pin and library. RTC Library used in this simulation based on Margolis (2012). If Arduino Uno cannot detect RTC, it will give error result and user cannot go to the next step; (5) Arduino Uno initialize micro SD Card using internal library. If micro SD card not inserted or there is an error in wire connection Arduino will not go through the next step. User must insert micro SD Card or repair the instrument; (6) GPS initialized using tinygps++ library provided by Hart (2014). Arduino will loop forever if instrument cannot detect GPS satellites. User must ensure there are no obstacles above the instrument; (7) Arduino Uno check config.txt inside micro SD Card to retrieve interval sampling time defined by user. (8) Arduino Uno requests time from RTC and stored as variable time; (8) Arduino Uno get latitude data from GPS; (9) Pressure measured and convert to depth; (10) Temperature measured by Arduino Uno; (11) Arduino Uno display depth in meter and temperature in Celsius on LCD; (12) Delay measure time based on configuration file; (13) Instrument back to step 8. All of this instrument sketch can be viewed at https://github.com/hollandacocobear/lowcost-tides-instrument.

Proteus Simulation
Before beginning the simulation, we must compile Arduino program codes that we built in Arduino IDE. This process needed to produce hex file that will be simulated in Proteus. First, We must checklist "Show verbose output during compilation" in Preferences Window (Fig 4). After compile finished, the file path containing the hex file copied to Proteus Simulation Properties (Fig 5).
Simulation in proteus used to see the measurement result displayed on LCD and stored in virtual micro SD Card. In this simulation we need to make configuration file text and stored inside virtual micro SD Card. Configuration file contain time interval in seconds (Fig 3). In simulation we set time interval in 10 seconds.
Simulation running after we paste hex file path to Arduino Uno edit properties ( Through actual simulation, we can see if something wrong happen with the firmware that we have made. So we can change it immediately and do the simulation again. From this study, we can see that simulation in Proteus is excellent and easy to implement although sometimes we met a condition that time from Proteus Simulation delayed few seconds from computer time. This condition occur because Proteus used big memory to do simulation. As we know that simulation is phase before implementing system in reality. With simulation, we can decrease cost and time before manufacture the instrument. We also can reduce error especially in pin connection between sensors and Arduino Uno (Su and Wang, 2010).
Virtual experiment using Proteus, not only can solve the problems of shortage of funds and equipments in traditional microcomputer laboratory and the difficulties of maintaining equipments, but also can enable to make full use of spare time for single-chip microcomputer system hardware and software design. We can undoubtedly improve development efficiency and enhance the development speed, so it has very high application value (Cika and Grundler, 2010;Xinhuan et al, 2010).

Conclusion
From this study, we have succeeded programming low cost ocean tides monitoring instrument firmware using Arduino IDE. We also able to simulate it using Proteus. This simulation software give advantages specially in time efficiency and capability to build the real firmware program before manufacture the instrument. With this study, we will manufacture this instrument physically in the future. We hope we can provide a low cost system that people can use it as a part of Open Source implementation.