================================================================================
Project: Serial communication protocol to read out sensor Values and Display them (LINUX)
URL: https://www.freelancer.com/projects/PHP-Software-Architecture/Serial-communication-protocol-read-out.html
Date: 2013/12/02
Employer: Markus1981
Freelancer: suriyant
================================================================================

Project Description
====================
Platform : Native LINUX (must run on Raspberry Pie ARM )
Programming Language : Up to you

Source code must be provided as this should continue as open source project

Write a communication protocol based on the attached Excel VB script that runs
in Linux. It needs to read out the 20 provided sensor values and output them in Decimal
values. The frontend does not need to be sophisticated as i will do this portion myself.
The programmer needs to provide a sophisticated backend that is well documented with
comments. (to enable further development by the open source community)
The front end can be just a proof of concept that shows the name of the sensor and
the value next to it . The programm should feature a config text file where the COm port
and Baud rate can be set

Skills required:
PHP, Software Architecture

Additional Files: FCLoggerFD3S.xls 

HISTORY
=======
2013/12/06 r1
- Initial release

PREREQUISITE
============
Rasberry Pi (Raspbian with Python 2.7.3)
---------------------------------------

    sudo apt-get install python-serial

Linux Environment (Unbuntu 12.04.2 LTS Python 2.7.3)
---------------------------------------------------- 

    sudo apt-get install python-serial

CONFIGURATION
=============
The script configuration in "fclogger.cfg" contains two section name "default" uses
for fclogger.py and "emulator" uses for "fcinfo_emu.py"

[default]
port = <serial port>
baud = <baud rate>
interval = <update interval>

[emulator]
port = <serial port>
baud = <baud rate>
interval = <update interval>

HOW TO RUN
==========

On Raspberry PI
---------------
Run FC Logger

    python fclogger.py

    fclogger - r1 (2013/12/05)
    Config port = COM6, baud = 19200, interval = 2000
    Info length = 32
    ------------------------------------------------------------
    Time                                     2013-12-06 13:59:21
    Engine Speed(rpm)                        256
    Absolute Intake Pressure(Kg/cm^2)        0.077
    Pressure Sensor Voltage(mV)              1284
    Throttle Voltage(mV)                     1798
    Primary Injector Pulse Width(mSec)       9.03125
    Fuel Correction                          11.0390625
    Leading Ignition Angle(deg)              -13
    Trailing Ignition Angle(deg)             -12
    Fuel Temperature(deg.C)                  -66
    Metalling Oil PumpDuty(%)                12.421875
    Boost Duty(Tp, %)                        6.4
    Boost Duty(Wg, %)                        6.8
    Water Temperature(deg.C)                 -62
    Intake Air Temperature(deg.C)            -61
    Knocking Level                           20
    Battery Voltage(V)                       2.1
    Vehicle Speed(Km/h)                      5910
    ISCV duty(%)                             642.4
    O2 Sensor Voltage(mV)                    0.52
    Secondary Injector Pulse Width(mSec)     29.109375
    
On Windows or Linux Host
------------------------
Run simple FC info message emulator

    python fcinfo_emu.py
    
    Simple FC Info message emulator (Ctrl-C to exit)
    Waiting for request...
    0xF0 0x02 0x0D
    Sending reply FC info...
    Waiting for request...
    0xF0 0x02 0x0D
    Sending reply FC info...
    Waiting for request...
    0xF0 0x02 0x0D
    Sending reply FC info...
    Waiting for request...
    0xF0 0x02 0x0D
    Sending reply FC info...
    Waiting for request...
    0xF0 0x02 0x0D
    Sending reply FC info...
    Waiting for request...
    0xF0 0x02 0x0D
    Sending reply FC info...
    Waiting for request...

Please also look at screenshot1.png and screenshot2.png for more detail

THANK YOU VERY MUCH!
suriyant
