Using the USB ESC and Emeter interface

Transcription

Using the USB ESC and Emeter interface
Using the USB ESC and Emeter interface
Function
• Provides a ‘Virtual ComPort’ on Windows PC’s
• Creates a direct link to an Emeter without using the Emeter power
• Allows control of a connected ESC from the PC
Requirements
• Windows 98SE, ME 2000 or XP
• Display resolution of 800x600 or higher
• 10 MB free hard disk space
• Pentium II or higher PC with a free USB port
Functionality
The board integrates a top class FTDI (UK) USB chipset with a miniature microcontroller to provide an interface that is powered by the host PC. The interface is seen
as a serial port in Windows, and allows any other software to access the Emeter
without modification.
There are two jumpers on the board that allow the functionality to be altered:
1. JP3: A 2-pin jumper will place a 5V signal on the ESC output. By default no
jumper is fitted as most ESC’s have an in-built BEC or powering circuit and
DAMAGE CAN OCCUR if this link is placed on for an ESC that generates
its own 5V. It is only provided for the few ESC that do not (some optoisolated ESC).
2. JP4: A 3-pin jumper that switches the RS232 output from the PC to the
Emeter or the ESC controller. Bridging pins 2 and 3 (default) allows the ESC
to be controlled from the PC whilst reading the Emeter. Bridging pins 1 & 2
allow bi-directional communication to the Emeter – this is required only when
carrying out a firmware update of the Emeter.
In addition there are two three-pin connectors, labelled ‘EM’ and ‘SC’, that the
interface leads plug into. The Emeter should be connected to ‘EM’ and the ESC to
‘SC’ observing polarity at both the Emeter and ESC.
For clarity the connectors are shown below:
There are four LED’s fitted that show the device is operating correctly;
1. LED1: RS232 transmission from the PC. Flashes on data transfer.
2. LED2: RS232 data transmission from Emeter. Flashes on data transfer.
3. LED3: Command sent to ESC. Flashes on data transfer.
4. LED4: Micro-controller functioning. LED lit.when functional.
Using the speed control commands in your own software. The speed controller can be
set independently of the Emeter software using your own routines for sending serial
data, or by a terminal program. The micro-controller is programmed to accept a
binary 8-bit value representing the output pulse width from 1 to 2 milliseconds. For
standard speed controllers the pulse width and values to send are:
1. Off: 1 millisecond pulse – value 100
2. Mid-throttle: 1.5 millisecond pulse – value 150
3. WOT: 2 millisecond pulse – value 200
4. Any throttle setting: x milliseconds – value x times 100
With your own software you must set the correct RS232 communication protocol of
19200,8,N,1 – or 19200 Baud, 8 data bits, No parity, 1 stop bit.
The software
The software has two components:
• A USB driver to provide a ‘Virtual ComPort’ for the hardware in Windows.
• The Emeter software that supports this interface.
Installing the driver
The driver for the USB interface is provided, or an updated driver can be downloaded
from http://www.ftdichip.com/Drivers/FT232-FT245Drivers.htm . If downloading
then the ‘VCP Driver’ for your operating system should be selected. Place the
supplied disk in the drive and plug the USB connection into the board. Windows
should now detect the new hardware.
Then show the following screen:
Click ‘Next’
Click ‘Next’
Ensuring the driver disk is inserted, select the option to search ‘CD-Rom drives’
Click ‘Next’
The driver is now installed! Click ‘Finish’ to continue
The same process will now be repeated in order to add the ‘Virtual ComPort’ to the
system. The Serial port is now active!
Installing the software
The software is supplied as a Windows installation package on the CD. In order to
install browse to the CD and ‘double-click’ the ‘setup.exe’ file.
Click ‘Next’
Select the drive the software is to be installed on and click ‘Next’
Click ‘Next’
Once complete the above screen will be shown, and you should select ‘Close’ to
complete
The ESC controller version is installed in a different directory to the ‘plain vanilla’
Emeter software under ‘Start’ >> ‘Programs’ >> ‘Hyperion’ >> ‘Emeter Beta’. Only
this version supports the control of the ESC.
In operation the software is similar to the Emeter Interface Software V 1.2.8. with a
few enhancements.
Running the software
Go to the ‘Start’ menu button and select ‘Start’ >> ‘Programs’ >> ‘Hyperion’ >>
‘Emeter Beta’ and select the listed ‘Emeter Beta’. This will bring up the program
front-panel as shown below. The graph will be displayed whenever recording is in
progress, a data file opened or the graph-type changed (see below).
There are two major changes with this software:
1. When recording files the software will send ESC throttle settings to ramp
between 1 millisecond (off) and 2 milliseconds (WOT), in 20 steps and
pausing for 3 seconds, before stopping the recording.
2. The graph axis-scaling can be changed by clicking on any axis scale value.
Main interface
Graph window
Scale adjustment after clicking any scale value.
And finally ……
I developed this interface and software for my own purposes – it may not do exatly
what you want! The design is flexible and allows for some changes to be made to the
(removable) micro-controller code and the software test-method. If you need help
then let me know!
Rod