Home

fenrir edited this page Jan 22, 2017 · 16 revisions

日本語がよいですか?

Introduction

NinjaScan-Light is an ultra-small (1.0 x 1.4 inch, approximately 26 x 36 mm) motion logger, which obtains 3-axis acceleration, 3-axis angular speed, 3-axis magnetic force, position, velocity, pressure, and temperature.

It consists of

  1. Silicon Laboratories C8051F381 MCU providing USB connectability,
  2. u-blox NEO-6 series GPS receiver,
  3. 6 DOF inertial sensor, Invensense MPU-6000 (ver.1), or Invensense MPU-9250 (ver.2),
  4. 3-axis magnetic sensor, Freescale MAG3110 (ver.1), or Invensense MPU-9250 (ver2),
  5. Pressure and temperature sensor, Measurement specialties MS5611,
  6. Power management including Li-Ion battery charger, Linear Technology LTC3550, and
  7. MicroSD supporting SDHC/FAT32.

NinjaScan-Light records motion data obtained with the above sensors into a log file named log.dat, whose format is defined in LogFile.

Current status

  • 18/Dec/2015 You can buy NinjaScan-Light from Switch science, kit and stand-alone versions (unofficial distribution).
  • 27/Mar/2015 Project home has been moved to github due to shutdowning of google code.
  • 10/Jan/2015 NinjaScan-Light2 (NinjaScan-Light ver.2) has been released. NinjaScan-Light2 is changed with a MPU-9250 inertial and magnetic combination sensor instead of MPU-6000 and MAG3110 of original NinjaScan-Light (ver.1). NinjaScan-Light2 usage is completely the same as NinjaScan-Light.
  • 26/Aug/2014 Unofficial distribution of NinjaScan-Slim started by @ina111. (18/Dec/2015 update) currently suspended.
  • 20/Jul/2014 Add a cute icon drawn by @otokasey.
  • 29/Apr/2014 Release tools for Raspberry Pi.
  • 19/Apr/2014 Add NinjaScan-Slim, a little brother. Please see NinjaScanSlim.
  • 03/Apr/2014 Add telemetry generator. Please see No.8 of the below user guide.
  • 26/Mar/2014 You can buy NinjaScan-Light from @ina111 (unofficial distribution). (18/Dec/2015 update) currently suspended.
  • 07/Mar/2014 Also published in github. The HEAD of the master branch in github corresponds to r135 (on Google Code) is automatically updated to the latest.
  • 03/Mar/2014 Schematics and board layout are also published in upverter.
  • 01/Nov/2013 Everything is completed.
  • 25/Oct/2013 USB PID is officially allocated by Silicon Laboratories. The corresponding revision is r106 (on Google Code).
  • 22/Oct/2013 Board and Firmware are almost completed. Now under tuning and improving usability.

Ultra quick user guide

  1. Insert a MicroSD(HC) card formatted with FAT16/32 into NinjaScan-Light MicroSD socket.
  2. Turn on NinjaScan-Light. Two kinds of power sources are available: 1-cell Li-Ion battery or USB power connected with JST-ZH (CON1) or USB micro-B (CON2) connectors, respectively. The USB power is just power, which means you cannot use combination of an USB data cable and a PC. Combination of an USB battery and an USB cable is available.
  3. Wait to log. You can check running status with LED3. If everything is normal, LED3 blinks three times repeatedly.
  4. Turn off NinjaScan-Light. In the MicroSD(HC), you can find the log, whose file name is log.dat.
  5. No MicroSD reader? Don't worry. If you keep the MicroSD(HC) inserted and connect NinjaScan-Light with a PC via an USB data cable, you can access log.dat. This is called as USB MSC Mode.
  6. No Li-Ion charger? Don't worry. If you keep the Li-Ion battery connected and connect NinjaScan-Light with a PC via an USB cable, the battery will be charged. When the battery is fully charged, LED2 is turned off.
  7. Do you want to use NinjaScan-Light as a sensor unit for a PC? Yes, you can get the sensor data immediately by connecting NinjaScan-Light to the PC without MicroSD. NinjaScan-Light is recognized as serial port, which will be installed with CDC inf file, and its data format is defined in USBSerialDumpFormat. This is called as USB CDC Mode.
  8. Do you want to monitor NinjaScan-Light via a wireless device such as XBee? Yes, data for telemetry is transmitted via MCU UART1 TX routed to CON3 9th pin. The data format also follows USBSerialDumpFormat, and the data content is decimated A, M, P pages and G page only consisting of NAV-SOL. The UART1 specification is; 9600 bps (you can change it, see Firmware 1.0 release note), 8-bit, no parity, 1 stop bit, and Hi / Low levels are 3.3 / 0 volts, respectively. CON3 2nd and 4th pins can be used as GND paired with the UART1 TX, while CON3 3rd pin can be used as VCC (+3.3V).

Please also see operation modes.

Board

Hardware

Ver.1 Rev.B layout

Ver.1 Rev.A (with Rev.B modification) photo

EagleCAD files are available (ver.1 schematics and layout, ver.2 schematics and layout). Its components are listed in here. The board design is published under Creative Commons 3.0 BY-SA.

Firmware

To build the firmware, install sdcc (testing with ver 3.3.0 #8604 and patch; sdcc build_script), and just "make" at "firmware/ver1", or "firmware/ver2" when ver.2, directory of the downloaded code. The generated firmware name is NinjaScanLight.hex. The firmware code is published under New BSD License except for Chan's Fatfs FAT file system. The official build binary is published in github release page.

How to download firmware into hardware

Connect a NinjaScan-Light board and a PC via USB debug adapter (UDA) or compatible one. The minimum required programming connections are summarized in the following table. Then, use Flash Programming Utilities. Note: the board may not be recognized by a PC when an UDA is connected via USB hubs. UDA is recommended to connect a PC directly.

Signal UDA side NinjaScan-Light board side
C2D 4th pin CON3 5th pin
C2CK 7th pin CON3 6th pin
GND 3rd pin CON3 4th pin

Tools

Build status Download

This project provides two tools to analyze log.dat logged with NinjaScan-Light. One is log_CSV, which parses log file and generate a CSV format text file, and the other is log2ubx, which also parses log file and divide GPS part into a UBX format binary file. The tool code is also published under New BSD License.

(17/Jun/2015 Update: Additional tool INS_GPS is currently experimental. For expert, quick guide is in INS_GPS.cpp. Part of INS_GPS code is published under GPL ver.3.)

The binaries for Windows is windows.master.zip. How to use is seeing below.

# Generate A page information CSV from log.dat to the console
> log_CSV.exe log.dat --page=A 

# Generate A page information CSV in realtime from NinjaScan-Light connected via USB and recognized as COMx
> log_CSV.exe COMx --in_sylphide=on --page=A

> log2ubx.exe log.dat # Generate log.ubx file

# Transfer ubx information to COMy in realtime from NinjaScan-Light connected via USB and recognized as COMx
> log2ubx.exe COMx --in_sylphide=on --out=COMy

The last example is useful for combination use with software null-modems such as com0com.

The binaries for RaspberryPi is raspi.master.tar.gz. Its usage is almost same as the Windows one; the differences are 1) extensions are .out, not .exe, 2) /dev/ttyACM0 instead of COMx, and 3) require sudo execution when the source is /dev/ttyACM0.