Code Monkey home page Code Monkey logo

inclinometer-display's Introduction

inclinometer-display

Device to display output from measurement specialties inclinometer

This device provides a graphical display of inclinometer output for leveling truck mounted RADAR systems (and anything else one might desire)

Hardware requirements: Arduino DUE or similar. I used a sainsmart clone

 MAX3232 on tx1/rx1 and tx2/rx2 for RS-232 level shifting. 
 one option: sparkfun transceiver breakout - MAX3232.  P/N BOB-11189
 https://www.sparkfun.com/products/11189
 
 DB9 connecters (male on tx2/rx2, female for tx1/rx1 passthru)
 
 measurement specialties NS-5/DMG2-S inclinometer
 
 sainsmart LCD driver and LCD panel SKU: 20-011-D20  
 https://www.sainsmart.com/products/sainsmart-due-5-lcd-touch-panel-sd-card-slot-tft-lcd-shield-kit-for-arduino
 
 12VDC, 500mA power supply with barrel connector -or- 5VDC, 1A with micro USB connector

Software requirements: GroteskBold32x64.c was downloaded from http://www.rinkydinkelectronics.com/r_fonts.php The excellent UTFT library from http://www.rinkydinkelectronics.com/library.php?id=51

 Note for UTFT installation/configuration, usage with CTE DUE shield:
     1.uncomment "#define CTE_DUE_SHIELD 1" in the HW_ARM_defines.h in the \hardware\arm folder of the UTFT library
     2.Change the pinout to : UTFT myGLCD(CTE50,25,26,27,28);

System description:

The Arudino DUE is connected to the MAX3232 to provide two RS-232 serial ports. One port is connected to the inclinometer device, the other port provides a transparent passthru for an attached PC (for configuration of the inclinometer and/or monitoring with the PC software)

On boot, the Arudino code attempts to order the inclinometer to begin sending measurements continuously. It is assumed that the inclinometer has been previously set to provide 2 Hz updates, appropriate filtering settings, and a 9600 baud rate. Without the correct baud rate, the PC passthru port will not work. The PC must also be set to 9600 baud. The inclinometer also has programmable level offsets, so it will report X=0 and Y=0 when the truck is in the desired orientation (i.e. level)

The software then eavesdrops on the incoming "X=+8.888" and "Y=+8.888" format messages and displays them in a digital display, as well as a graphical dot on a ring/crosshair display. The dot position is not linear, the graph is scaled with a sigmoid function so the center of the graph is more sensitive than the outside edges. After I install in the truck, i need to tweak LEVEL_SIGMOID so the system is easy to use, and maybe plot a degree scale on the concentric rings.

If the software doesn't hear a new message within so many milliseconds (INCLINOMETER_TIMEOUT), the possibly misleading dot is removed from the display, the X/Y angles are set to a MISSING_VALUE (9.999) and a flashing message is presented (NOT UPDATING). This would usually be caused by the inclinometer data cable being unplugged, or the power is not on to the inclinometer.

Just FYI version 1.0 had a 2x20 dot matrix LCD display, and vastly inferior in many other ways :)

CHANGELOG

3/9/2018: inclinometer3.ino has a landscape display instead of portrait

inclinometer-display's People

Contributors

dwkennedy avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.