
PC I/O Card
|
I've moved away from the Maplin I/O card as I could not find easy drivers for it that allowed control via Java. I'm now using the Mirrorbow USB 25IO Digital/ADC/PWM - V1.1 . This sits on top of the processor in an aluminium case, along with the relay board.
|
.
The i/o board has three ports:
Port 1
The 'DIR1 00' command sets all 8 bits of port 1 as outputs.
This the upper four bits of this port are connected to a separate 12V relay board with opto-isolation as the I/O board cannot sink enough current. The relay board has three 12V 1A relays and one 12V 10A relay.
- = heartbeat
- = turret stepper motor direction
- = turret stepper motor movement
- = n/c
- = amplifier power
- = serial radio link
- = siren
- = lights
Port 2
The 'DIR2 00' command sets all 8 bits of port 3 as outputs and this is followed by the 'S+' command to set up the servo mode. The default duration send to each servo is '00', which equates to off. Sending a value of 'C0' places a 2mS pulse on the port and a value of '05' places a 1mS pulse on the port pin. Each increment represents an increase of 5.3uS.
- = left motor control
- = right motor control
- = test servo
- = n/c
- = n/c
- = n/c
- = n/c
- = n/c
Port 3
The 'DIR3 FF' command sets all 8 bits of port 3 as inputs. The 'AD+' command then turns on the two ADC channels.
- = front collision switches
- = AD1 - temperature sensor
- = ADC2 - ultrasonic distance sensor
- = rear collision switches
- = turret homed
- = n/c
- = n/c
- = n/c
Relay Board
|
The IO board can't sink enough current to drive devices directly so, I've built an interface board with four relays on it to provide up to 2A at 12V to on-board devices. This is an early picture showing the mounting of the board only.
|
.
Old I/O Card
|
I originally used a Maplin USB IO board (part no. N67BH ) which has quite a few inputs and outputs as well as two PWM output channels. There are also some LINUX drivers available for it now.
|
.
It is a Velleman K8055 from Maplin. It comes with a DLL to allow it to be driven from Windows applications but nothing to drive it from Java applications. Using Java Native Interface (JNI) it is possible to call functions in Windows DLL libraries. The downloads for the K8055 include full documentation on the functions in the supplied DLL.
This chap: http://www.wenzlaff.de/twusb.html has created a Java class library and DLL to allow Java applications to control the K8055 board functions.