Gizmo

PC Interface for my Uwatec Dive Computer. Cost AU$10.00

GIZMO. This is a memo-mouse replacement. Cost AU$75.00

Circuit Diagram of Gizmo 

gizmo_cct.gif (36132 bytes)

Photos of Gizmo

Parts List. For Gizmo.

MEGA16 S/W .rom .hex .eep files (used with Codevision AVR)


Gizmo Theory of operation Revised 1st January 2004

I have built this device to work with WLog. This software unlike Datatrak from Uwatec allows Windows to interact with the dive computer via a home made interface. I use version 2.03d of WLog, as it doesn't have the user time limit of 60 days. (I will register it one day)

The software is written in C, and could do with a good optimise as I am at 99% of the ATMEGA 16 flash.

Based on a Atmel ATMEGA16 microcontroller, with a MAX232 for the RS232 interface a DS1307 real time clock and a 24LS256 I2C eeprom for storage of 16 Uwatec Aladin Sports downloads. 0 through to F. Each download consists of 2kb of data. It would be very simple to add another 6 x 24LC256 expanding the memory to 16 x 7 = 112 downloads. (1 eeprom address is used for the Real Time Clock) Each download has the last 200 mins of dive profile data (3-4 Dives). Basically Gizmo can store 4 x 16 = 64 dive profiles (4 being the last 200 minutes 4 x 50 min dives) (16 eeprom banks) or if the other 6 x 24LC256 are added 64 x 112 = 7168 dive profiles.

The Gizmo has a 16 x 2 LCD to display current operation and statistics, 3 DPST momentary on buttons for control and runs on an external 7.5-12v DC adapter and an internal 9v Battery. Has 2 serial ports port-1 for connection the the dive computer and port-2 for connection the the PC. port-2 also doubles as a diagnostic port and enhanced function port.

The internal eeprom of the Mega16 processor stores the last bank of I2C eeprom used as well as the time adjustment factor. The time adjustment factor is set using port-2 and adjusts the difference between GMT and the dive computer. (Uwatec dive computers are renowned for their time to be out, mine is currently 31 minutes after GMT)

To switch the unit on, simultaneously press the 3 buttons, this extends a +ve voltage to the gate of a SCR supplying battery to the components. If no activity is recorded within 3 minutes the unit powers itself off by applying a earth to the gate of the SCR.

The circuit diagram is basically designed around the SIMM100 PCB from Dontronics. I have made a number of modifications to the circuit board (will try and detail these in the near future) and added a second board (vero) with all the ancillary components and relays. It is all mounted inside a plastic project box 90mm x 130mm x 40mm. Its a tight squeeze but it all fits. (Even the 9v battery) See Photos.

After power is applied all ports are initialised on the Mega16 processor.

Port A output for LCD operation PA0-2 & PA4-7. PA3 used to control the RX relay (relay 2).
Port C PC0-1 I2C bus SCL, SDA pins. PC2 controls the off relay (relay 1) 1 = off  
Port B PB2-4 the control buttons, 
Port D PD0-1 USART TX RX

The LCD is initialised as 16 columns in 4 bit mode.
The I2C bus is intialised for I2C eeprom and Real time Clock (RTC)
The RTC is initialised normal operation no square wave output.
The USART is initialised as 19.2K async, 8 bits 1 stop, no parity.

Basic Operation

The initial display shows the S/W version and the Last bank of eeprom used. Current S/W is 4.2 I can make this available to anyone just email me. wayne . heming @ hemnet . com . au

GIZMO          V4.2
LastB 0F        Enter

Press the corresponding button "Enter" and the next menu is shown the Get Log Put Log functions

"Status/display       "
GetL  PutL    Next

Cycling through the Next displays, Time and Checksum functions, Next, Current Time, Off functions.

1.    GetL
2.    PutL
3.    Time
4.    Csum
5.    CTime
6.    Off

1.    GetL

This selection switches a relay transferring the RX lead from port-2 to port-1, enabling the receiving of a dive log dump from the Dive Computer. A 248 byte buffer is used to receive the data and is written directly to the I2C eeprom. The I2C eeprom selection bank 0-F is selected when the GetL button is pressed.

The data is stored raw, no bit manipulation is done on the data. Please note the data is transmitted by the dive computer in reverse bit order, that is bit 0 is bit 7 etc.

To display and calculate any data it must be reversed before any actions are taken. When the PutL function is used the data is also transmitted raw.

The data format I also found on the web 

Protocol and Data Structure of Uwatec Aladin Dive Computers

DataTalk Protocol between Aladin and PC/MemoMouse

Protocol and Data Structure of Uwatec MemoMouse (Windows Version) for Aladin Dive Computers

Note on Uwatec MemoMouse (DOS Version) for Aladin Dive Computers

 

2. PutL

This selection sends the data to a PC, before sending, the current date and time must be written into the bank and the checksum recalculated to emulate the dive computer. The dive computer has a real time clock always running and Wlog uses this time to calculate the actual dive time.

 

3. Time

This displays the time and date stored in each bank of the I2C eeprom as Sydney local time, ie the time of either the last  get log (GetL), or put log (PutL) function.

 

4. Csum

This displays the checksum of each bank of the I2C eeprom. It displays the current checksum read direct from the I2C eeprom and also calculates the checksum for comparison.

 

5. CTime

This displays the current date and time in Sydney local time.

 

6. Off

This applies a 0v via the off relay to the gate of the SCR removing all voltage to the unit.

 

PORT-2 (Diag operation)

Setting a PC to 19.2kbps 8,n,1 and connecting to a terminal emulation program and pressing enter, a menu will be displayed. All functions as above are available, with some extras.

Gizmo      V4.2

Enter Command
1 Get Dive Log
2 Put Dive Log
3 Bank Checksum
4 Bank Time
5 Time adjustment, 1 minute intervals
6 Current Time Set
7 Current Time Display
8 Last Bank used
9 Set Last Bank
0 Dump log to screen
command:

I will only explain the differences here, 1,2,3,4,8, are all  explained above.

5. This is a time adjustment in plus 1 minute intervals, its a adjustment added to the time for the displays only. It adjusts for the dive computer time being incorrect. Entry is +/- 00-99 minutes.

6. To set the current date, time and Sydney Time Zone Summer/Winter in Gizmo.

9. To set the last bank used. Each time a download occurs the LastB variable is incremented until it reaches F then the next time it rolls around to 0.

0. This dumps out the basic dive log information of the stored 37 dives in each bank eg.

Number     Date              Time      Depth      Duration      Temp
______________________________________________________
01 01/01/1994 09:28 000.0m 000m 00.0
02 01/01/1994 09:28 000.0m 000m 00.0
03 25/01/2001 16:46 010.0m 004m 21.7
04 25/01/2001 16:57 020.0m 005m 21.5
05 25/01/2001 17:09 030.0m 006m 21.5
06 25/01/2001 17:22 040.0m 007m 21.5
07 25/01/2001 17:36 050.0m 007m 21.5
08 25/01/2001 17:50 059.9m 018m 21.5
09 02/12/2001 08:13 029.1m 031m 18.2
10 02/12/2001 09:57 024.4m 033m 18.7
11 04/12/2001 09:49 016.6m 034m 19.0
12 09/12/2001 11:43 016.2m 020m 24.5
13 09/12/2001 12:53 023.2m 031m 24.5
14 11/12/2001 08:48 012.6m 036m 22.0
15 11/12/2001 10:30 011.0m 043m 22.2
16 13/12/2001 08:05 016.3m 028m 20.5
17 13/12/2001 09:35 015.8m 041m 20.7
18 24/03/2002 08:19 014.7m 018m 20.2
19 24/03/2002 09:47 004.1m 025m 21.0
20 02/04/2002 10:14 024.1m 024m 20.0
21 16/07/2002 13:08 031.3m 030m 27.0
22 16/07/2002 15:11 022.6m 041m 27.0
23 19/07/2002 11:52 016.4m 035m 24.7
24 19/07/2002 13:51 017.1m 039m 24.7
25 16/02/2003 07:37 017.5m 031m 18.7
26 07/03/2003 08:48 009.9m 043m 18.0
27 07/03/2003 10:50 015.0m 040m 15.0
28 07/03/2003 13:40 009.4m 041m 15.0
29 08/03/2003 07:26 028.7m 029m 14.7
30 08/03/2003 10:52 026.0m 031m 14.7
31 08/03/2003 14:33 014.4m 043m 15.2
32 10/04/2003 07:01 011.5m 059m 20.7
33 21/04/2003 10:08 022.7m 048m 19.7
34 21/04/2003 12:38 019.1m 048m 20.0
35 05/06/2003 07:57 008.3m 039m 17.7
36 14/06/2003 10:19 011.4m 060m 17.2
37 20/08/2003 10:10 027.5m 019m 22.2