Home ] Up ]
 
  IASI - BV4113 Stepper Motor Controler  
  The Intelligent Asynchronous Serial Interface (IASI) is a common standard that makes it much easier to control and use hardware from either a standard communication interface (terminal) or a microcontroller. It is based on a very simple text command set and a flexible hardware interface. The ‘Intelligent’ aspect is derived from the fact that each particular IASI knows about the connected hardware so a simple command can make the hardware perform a reasonably complex function. Scroll text on an LCD display for example.

Contained within this html page are scripts that will work in conjunction with the IASI devices, the big advantage of using IASI is that they can be connected directly to the RS232 COM port if there is one on the PC and more than one device can be connected to the same port because the devices can be configured with their own address.

Because VBScript is used then an IE (Microsoft) compatible browser is required. VBscript can also be made to run stand alone and within Microsoft applications such as Excel and Word. The script in this file should run with little modification.

 
     
  Open COM Port  
  When the 'OpenPort' button is pressed, it will open the port and send 3 CR to establish a Baud rate on success "IASI Connected" is displayed in the text box. Should any errors occur look at the bottom left of the browser for this and double click on it, this will indicate what the error is and where it occurred.
Open COM Port
Com Port Number 1-5:      Port Settings:

   
Status
NOTE: If the status is inverted only a limited number of commands will work. It is better to configure the device for normal un-inverted operation, the status for this will read 'Okay'
 
     
  IASI System (Z) Commands  
  The next section is common to all I2C BV devices and can be used to interrogate the EEPROM and change the address etc. You will see that address 0 of the EEPROM is the device address. The blue form below contains most of the Z commands that are applicable to all IASI devices. On the left hand side are the configuration slots, 5 and 6 can be modified and set with the set button but be warned that if the invert flag is set to N then communication will cease unless a converter is used.

To create a macro simply put in the commands and separate with a comma. The script will take care of presenting them to the IASI device and checking that there is enough space.

IASI System Command

This form sets the Z commands for IASI

Address
Baud Rate 0-4
Debug 0-2
Ack Chr
Line End Character
Version



Z Configuration
The configuration values are set to either Yes (Y) or No (N) and are in the following order
[Send ACK], [Run Macro at start], [Auto-Baud detect], [Invert Output], [Listen], [Send L Prompt], [Echo Output]

Configuration Slot 1   
Configuration Slot 2   
Configuration Slot 3   
Configuration Slot 4   
Configuration Slot 5    <<
Configuration Slot 6    <<

Set configuration to (slot Number): <<

Create macro commands in text box, separate with commas, for example BT'fred",zw100,bt"bob"

<< Note if delays are used in macro this may cause time out

 
     

  BV4113 Stepper Motor Controler  
  The DC motor controller is a dual purpose device capable of controlling both DC motors and Stepper motors.
In addition to this there are two general propose digital input / output lines and 10 bit one analogue input.
As this is an IASI device all control is affected by simple two character text commands. Software is built in for Pulse Width Modulation (PWM) when controlling DC motors and also step rates and ramp up etc. when controlling stepper motors.
The BV4113 uses the L293D bridge driver which is capable of controlling 2 DC motors in forward and reverse or 4 DC motors in one direction. When used for a stepper motor the BV4113 can control either a bi-polar (4 wire) or a uni-polar (5 & 6 wire) type stepper motor.
 

The pin connections and wiring diagram are shown in the table below. NOTE that an IASI module can operate in two modes. 1) When connected directly to the RS232 as shown in the table below and 2) when connected to a microcontroller or to a PC through a converter. The scripts in this file will work with whatever the IASI module is configured to but the connections must reflect the mode. This is because there is only one output pin from the IASI device and this pin can sent inverted signals for RS232 or non-inverted signals for use with a microcontroller or PC with a converter. The scripts look for the '>' in the prompt, if the signal is inverted when it shouldn't be or vice versa then the '>' will not be visible and the scripts will fail.

RS232 9 Pin  LCD
Pin 2 Pin 2
Pin 3 Pin 4
Pin 5 Pin 5
Short pins 1,6,4  
Short pins 7 and 8  
 
     
  BV4113 Analogue Input  
 
Analogue Input
  

 
     
  BV4113 Digital I/O  
 
Digital I/O

Channel A

Input

 

Channel B

Input  
Output

High Lo

Output High Lo

Click on the image to enlarge it. The two digital I/O and one analogue input are on this connector and can be controlled or observed by the above form and the one immediately below.

At reset the digital I/O is set to input, the value of the individual inputs can be read using the 'Val>' buttons. If they are not connected to anything they will return random results. These inputs are useful for limit switched etc. Below is a test set up that has two LED's connected to the digital lines and an LDR (Light Dependant Resistor) connected to the analogue input. Because of the internal 100k pull up resistor on the analogue input the LDR acts as the lower half of a voltage divider, darkens should produce a higher reading.

 

Circuit diagram and practical layout on breadboard.

 
     
  BV4113 Motor Controller  
 
Basic Control

Channel A
(Power save)

Enable Disable

YA High Lo

Channel B

Enable Disable YCHigh Lo

YB High Lo

YDHigh Lo

 
     
  BV4113 Analogue Input  
 
DC Differential Motor Control
Off        Brake Pulse Width Modulation On Off
Forward Reverse  

The test set up here uses a reasonably heavy duty motor supplied by 12V from the BV1102 voltage regulator and a fairly standard 'wall wart' supply. The motor is connected to the Y1-Y2 output.

The motor is set going by the forward or reverse radio button, the break button stops the motor much quicker then stop. Appling and activating the PWM slows the motor down.

Watch Video

 
     
  BV4113 Analogue Input  
 
Stepper Control Half Step
Step Continuous On Off     
Direction Forward Reverse         Step Mode Full Step Half Step
Step Pattern [0-F](hex)     Ramp Up Value [0-7] Step Speed [0-255]