trichl / TickTagOpenSource

MIT License
146 stars 17 forks source link

I Repository Introduction

This repository contains the entire production-ready design (hardware, software, user interface, 3D-printable housing, assembly instructions) of the open-source TickTag GPS logger.

II Hardware Production

Image

Image Image

III Programming and Assembly

IDE for Software Development (Windows)

Android App

Using an Arduino Nano for Flashing

Flashing the Firmware

Flashing should be done before soldering a battery to the tag.

Image

  1. Check if the yellow jumper (E) connects "1" and "2" ("ldo")
  2. Gently click the tag on the user interface board (without battery attached to it) (A), mind the correct orientation of the tag
  3. Connect D6 of the Arduino Nano to the UPDI pin of the user interface board (or use an Atmel-ICE instead of an Arduino Nano)
  4. Connect the user interface board to a computer (red LED turns on) (G), connect the Arduino Nano to the same computer
  5. Slide the UPDI button on the user interface board (H) to ON
  6. Go to TickTagProgramming/avrdude, open ScriptWriteFuses_ATTINY1626.bat (or ScriptWriteFuses_ATTINY1616.bat, if you use the 1616) with a text editor and enter the COM port of the Arduino Nano on your computer
  7. Execute ScriptWriteFuses_ATTINY1626.bat to write the configuration fuses of the ATTINY. ( It may be possible that executing the script raises an error ie. missing dll file. In this case, try to download and install WinAVR here )
  8. Open Atmel Studio 7.0 and load the project TickTagSoftwareBurst (you might need to setup the project first, and set the current device to ATtiny1626)
    1. Configure the ATTINY programming via Arduino Nano under Tools -> External Tools
    2. To choose the command, select the three dots and find the location of the TickTagOpenSource repository. Then navigate to TickTagProgramming\avrdude\bin and select avrdude.exe
    3. For the Arguments: "-P COM7 -c jtag2updi -p t1626 -U flash:w:$(ProjectDir)Debug\$(TargetName).hex:i", COM7 needs to be replaced with the COM port of the Arduino Nano:

Image

  1. Press F7 to compile the firmware
  2. Press Tools -> jtag2updi ATtiny1626 to flash the firmware

Tag Assembly

Image

IV Tag Manual

Charging the Battery

WARNING: never connect the TickTag to the user interface board when the 3-pin jumper is set to "ldo", otherwise the LiPo will be damaged permanently. The battery can be recharged directly on the breakout board:

Image Image

  1. Check if the yellow jumper connects (E) "3" and "2" ("lipo")
  2. Gently click the tag on the user interface board (with battery attached to it) (A), mind the correct orientation of the tag
  3. Connect the USB connector to a computer or powerbank (red LED turns on) (G)
  4. Slide the charge button on the user interface board (F) to the left (ON)
  5. A green LED on the user interface board turns on and indicates that the battery is being charged
  6. In case the tag was previously activated, it first needs to be deactivated:
    • Wait some minutes until battery is charged a bit
    • Press the white button (D) for 5 seconds to restart the tag and enter menue
    • Green LED on the tag will blink 5 times to indicate download mode and system restart
  7. Wait until the green LED on the user interface board turns off (battery charged)
    • This can take hours (default charge current: 15 mA)
    • For example: an empty 30 mAh lipo battery needs 2 hours to be fully charged
    • For example an empty 120 mAh lipo battery needs 8 hours to be fully charged
  8. The tag can be activated again (see chapter "Activation")
    • Warning: If the memory is full the tag can not be reactivated (data download necessary, see chapter "Data Download, Configuration and Memory Reset")

Activation

Image

Activation option 1: by a wire

Image Image

  1. Gently touch with one end of a conducting wire the ground connection where the battery minus is soldered to
  2. Gently touch with the other end of the wire the hole marked with "A" (or "ST")
  3. Once the tag starts blinking green, remove the wire immediately (should not take longer than 2 seconds)
  4. The tag blinks 7 times to indicate that it’s activated, then waits for 700 ms and is blinking again to indicate battery status (1 time = battery low, 7 times = battery is full)
  5. The green LED is located on the back side of the tag, so it's best to hold the breakout board sideways to see the blinking LED under the tag
  6. If it doesn't blink at all: battery voltage might be low or the tag is already activated
  7. If the tag blinks 5 times it entered download mode (was already activated), please wait a minute and start again from the beginning
  8. The tag is activated and will start sampling GPS data after 10 seconds (default configuration, can be changed, see chapter "Data Download, Configuration and Memory Reset")

Activation option 2: on breakout board

Image Image

  1. Locate the click connector on the tag (see picture above)
  2. Take a look at the breakout board, do not connect the USB power connector (G) to the computer or phone (no external power needed for activation)
  3. Gently click the tag on the user interface board (with battery attached to it) (A), mind the correct orientation of the tag
    • Take care of the correct orientation of the tag as shown in the photo, otherwise a short circuit might permanently damage the tag
  4. Now press the white button (D) for two seconds until the tag starts to blink
    • Do not press the button longer than some seconds
    • The tag blinks 7 times to indicate that it’s activated, then waits for 700 ms and is blinking again to indicate battery status (1 time = battery low, 7 times = battery is full)
    • The green LED is located on the back side of the tag, so it's best to hold the breakout board sideways to see the blinking LED under the tag
    • If it doesn't blink at all: battery voltage might be low or the tag is already activated
    • If the tag blinks 5 times it entered download mode (was already activated), please wait a minute and start again from the beginning
  5. The tag is activated and will start sampling GPS data after 10 seconds (default configuration, can be changed, see chapter "Data Download, Configuration and Memory Reset")

After the Activation (Data Sampling)

On-Animal Mounting

Image

Image

Data Download, Configuration and Memory Reset

Image Image Image Image Image

  1. Choose a serial software
  2. The battery needs to be connected (soldered) to the tag
  3. Check if the yellow jumper connects (E) "3" and "2" ("lipo")
  4. Gently click the tag on the user interface board (with battery attached to it) (A), mind the correct orientation of the tag
  5. Connect the USB connector to a computer or Android phone (red LED turns on) (G)
  6. Slide the charge button on the user interface board (F) to the left (ON) to charge the battery while downloading data (not mandatory, but recommended)
  7. For option 1: Open the serial program on your computer with following settings:
    • COM port: select the CP2104N COM port from the list
    • Baud rate: 9600
    • Default serial settings (8 data bits, 1 stop bit, no parity)
  8. Click on CONNECT in your serial program or the Android app
  9. Press the download button (D) for 5 seconds (not longer) until the green LED on the tag blinks for 5 times
  10. Data download is shown in your serial program (in CSV format)
  11. After the download the tag shows a little menu for configuration
    • Data download might take some minutes (if memory is full)
    • Data download can be interrupted by pressing the download button once (short), data will not be deleted
  12. In the command line of your serial program enter "1" and press return to reset the memory (when using the Android app: press the "Reset memory" button)
  13. The tag will confirm that the memory is now empty
  14. The tag will restart into the activation state after some time (waiting on tag activation, see chapter "Activation")

Example data output of the serial program (or Android app):

---TICK-TAG---
*START MEMORY*
UVs: 0, TOs: 0/0, ErrorsOrGF: 0, TTFF: 68
Fixes: 10, Avg. TTF: 11 s, Avg. HDOP (x10): 16
count,timestamp,lat,lon
1,1635235981,47.74340,8.99910
2,1635236130,47.74346,8.99922
3,1635236352,47.74340,8.99889
4,1635236506,47.74327,8.99894
5,1635236682,47.74336,8.99879
6,1635238092,47.74340,8.99824
7,1635238313,47.74304,8.99896
8,1635238411,47.74329,8.99883
9,1635238511,47.74332,8.99878
10,1635238610,47.74325,8.99881
*END MEMORY*
V201, ID: 30-2509, 3533mV, 01b
SETTINGS:
- Min voltage: 3300 mV
- Frequency: 90 s
- Min HDOP (x10): 30
- Activation delay: 60 s
- Geofencing: 0
- Burst duration: 0 s
- Time: 8:00 - 14:00 UTC

0 Read memory
1 Reset memory
2 Set min. voltage
3 Set frequency
4 Set accuracy
5 Set activation delay
6 Set times
7 Toggle geofencing ON/OFF
8 Set burst duration
9 Exit

Configuration Parameters

Default Configuration

State Machine

Image

V Data Compression Algorithm

GPS data is stored on the 128 kByte EEPROM with a lossless compression algorithm. GPS positions are stored with 5 decimal places (accuracy: 1.11 m).

VI 3D-printed Housings

VII Data