BV4531U. I2C or Serial 6 Way Relay

Similar documents
BV4542. I2C or Serial 16x2 with Keypad interface

ICN12. I2C to UART Bridge, ADC,DAC and I/O

Dual Interface LCD Display Controller

BV4626 General Purpose I/O. Product specification. Mar 2010 V0.a. ByVac Page 1 of 13

BV4601. Serial & I2C Twin Relay. Product specification. Sep V0.a. ByVac Page 1 of 10

BV4109. Serial LCD Controller. Product specification November ByVac 2006 ByVac Page 1 of 12

BV4218. I2C-LCD & Keypad. Product specification. December 2008 V0.a. ByVac 2006 ByVac Page 1 of 9

BV4212. I2C Front Panel with rotary input. Product specification. March of 8

BV4615. Dual Interface Zero Keypad. Product specification. Dec 2009 V0.a. ByVac Page 1 of 11

BV4505. IASI-Keypad Controller. Product specification. January 2009 V0.a. ByVac Page 1 of 13

BV4205. I2C-10 Channel A to D. Product specification. January 2008 V0.a. ByVac Page 1 of 10

BV4501 IASI Twin Relay. Product specification. December 2008 V0.a. ByVac Page 1 of 12

LCD Module with I2C / Serial Interface and Keypad Control «LCD I2C/Serial» User s Guide. Copyright 2008 IMS

BV x64 Serial + I2C Graphic Controller. Product specification. Apr 2013 V0.a. ByVac Page 1 of 12

BV4603 BV4604 BV4603/4. Serial Micro stepping Motor Driver. Product specification August 2013 V0.a. October of 15

BV4627 User Guide. Binary Interface

LCD03 - I2C/Serial LCD Technical Documentation

LCD03 - I2C/Serial LCD Technical Documentation

1602 SMART LCD DISPLAY MODULE HCMODU0122

LCD05 datasheet 1.0

GIGAVAC Contactors I 2 C Communication

USB-I2C USB to I2C Communications Module Technical Specification

Microcontroller. BV523 32bit Microcontroller. Product specification. Jun 2011 V0.a. ByVac Page 1 of 8

Series 370 Stabil-Ion Gauge Controller with RS-485 Interface Option

Installation and Programming Manual. Niobrara Research & Development Corporation P.O. Box 3418 Joplin, MO USA

Basics of UART Communication

ec-test-mate Hardware Reference Manual

KNJN I2C bus development boards

CAN / RS485. Product Description. Technical Reference Note. Interface Adapter. Special Features

I2C and SPI Foundation

PK2200 Series. Features. C-Programmable Controller. Specifications Board Size Enclosure Size Operating Temp.

DT-SENSE. UltraSonic and InfraRed Ranger (USIRR)

KNJN I2C bus development boards

USB-to-I2C Basic. Hardware User s Manual.

AK-DS2482S-100. Reference manual. Copyright 2016 Artekit Italy All rights reserved

NHD 0216K3Z FL GBW. Serial Liquid Crystal Display Module

Getting Started with your D3000M Series Module

Doug Fleenor Design, Inc. RS-232 to DMX512 Interface, 2 Generation. March 8, 2010 (Software V1.2)

Laboratory 5 Communication Interfaces

XS S ERIES TM PMB US TM O PTION C ARD

User Manual for TeraRanger Evo with: USB and I2C/UART backboard

ARDUINO YÚN Code: A000008

180 Series Keypad. Handbook. Revision 2.1

User Manual. AS-Interface Programmer

ARDUINO MEGA 2560 REV3 Code: A000067

LCD2041 Technical Manual. Revision: 2.1

Logosol Joystick Node LS-731

S125 Multi-Purpose 125 KHz RFID Reader USER MANUAL. 9V/24V DC Operating Voltage, AC (optional) KHz RFID EM4100/2 Cards & Tags

User Manual for TeraRanger Evo single point distance sensors and backboards

Lesson I2C. I²C (Inter-Integrated Circuit) Lab Assignment: I2C Slave Driver

Thermo 6 click PID: MIKROE-2769

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

Manual 601: : USB/RS232. Specifications. Contents. Options

um-fpu Application Note 8 Developing an I 2 C Interface for um-fpu V2

Theory of Operation STOP CONDITION

User Manual for. TeraRanger Evo with: USB and I2C/UART backboard

User Manual & Reference

RL78 Serial interfaces

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

ARDUINO UNO REV3 Code: A000066

VPGate Manual PROFIBUS to serial

SIOX-RS232C Converter

ARDUINO MEGA ADK REV3 Code: A000069

What is SmartUPS. Connections. Button and LED Indicator. SmartUPS User Guide

Real Time Clock with Temperature Sensor and RS485/Modbus Comunications

Device: FDRV-04S. This document version: v1. Matches module version: v2 [2 Oct 2015] Document revision date: 9 November 2015

Arduino Uno R3 INTRODUCTION

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

RPC Interface Specification November 2001 Introduction

Device: MOD This document Version: 1.0. Matches module version: v3 [29 June 2016] Date: 23 October 2017

GT24C02. 2-Wire. 2Kb Serial EEPROM (Smart Card application)

CONFIGURATION GUIDE A-B REMOTE I/O LINK ADAPTOR FOR DL-KFR PC CARDS

DUCM Hardware. Niobrara Research & Development Corporation P.O. Box 3418 Joplin, MO USA

SY021 Portable Load/Force Meter User instructions

Ocean Controls KTA-224 Modbus IO Module

SmartFan Fusion-4. Speed Control and Alarm for DC Fans CONTROL RESOURCES INCORPORATED. The driving force of motor control & electronics cooling.

Specification. Current Consumption Range 8m * Rotational Angle +/- 50 degrees * Shear Angle +/- 40 degrees *

Figure 1. LCD & Keypad - RS232 Terminal

or between microcontrollers)

PACSystems* RX3i IC695CMM002 and IC695CMM004

Manual. Specifications. Contents. Options

Lumio Release Note Lumio Multi-Touch Communication Protocol

i-7550 PROFIBUS to RS-232/422/485 Converter User's Manual High Quality, Industrial Data Acquisition, and Control Products

User Manual for TeraRanger Evo single point distance sensors and backboards

GP1 LCD RS232 Terminal Kit 2003 by AWC

RS 232 Interface. RS 232 is the Serial interface on the PC. Three major wires for the Serial interface: Transmit Pin 2 Receive Pin 3

ESPino - Specifications

LK Technical Manual. Revision: 2.0

Manual iaq-engine Indoor Air Quality sensor

ADR7700. RS232 / Data Acquisition Interface USER MANUAL V 1.0

NHD-0220D3Z-FL-GBW-V3

General. Copyright 2013 EXSEN Company. All Rights Reserved. Rev /5/2013 Page 1 of 6

INSTALLATION MANUAL. Gateway EKBMSMBA EKBMSBNA

PCI Host Controller 14a Hardware Reference Release 1.2 (October 16, 2017)

Industrial Serial Device Server

Sierra Radio Systems. Mesh Data Network. Reference Manual. Version 1.0

LCD Micro Serial/I 2 C Interface Module for R.G.B backlights. Technical Data

DS1676 Total Elapsed Time Recorder, Erasable

NHD-0216K3Z-NS(RGB)-FBW-V3

I2C Interface for QL Emulators Part 1 Originally Published in QL Today, Vol 15, Issue 4, May-June 2011

Transcription:

BV4533 Date February 2018 11 Feb. 2018 Firmware Revision 1.0.4 Preliminary 1.1.0 Serial Updated I2C or Serial 6 Way Relay 3 Sep. 2018 1.1.0 I2C corrections, trigger is not used Introduction This is an I2C or Serial relay for use with microcontrollers, for example the Arduino, Raspberry Pi etc.. There is also a USB option. Description The device is access either by I2C OR Serial depending on the device supplied. BV4531 BV4531U BV4532 Serial Serial with USB I2C Relays can be switched on, off, timed with commands. Features User Selectable I2C address (BV4532)

Multiple serial devices 5V supply Relay action (on or off) can be timed 1 second to 18 Hours Requires only 2 control wires (TX/RX) ro (SDA/SCL) Fitted with 10A relays Size 60mm x 85mm (height approximately 20mm) Physical Description The PCB has 3 connection options, all the connector pads are in place but not all of them may be active for the particular device. I2C Serial USB EEPROM Locations Applicable only to the BV4532 (see I2C section) Applicable only to the BV4531 (see serial section) Applicable only to the BV4531U (see serial section) The values in the EERPOM effect the operation of the device and

are read on start up, some values are stored in RAM and so can be temporarily changed and some commands change the EEPROM values. Adr Default Description 0 0x55 System Use 1 70 I2C address (only relevant for I2C) 2 17 Not used 3 4 Baud rate code (only relevant for serial) 4 1 Prompt (only relevant for serial) 5 0 Addressing (applies to serial only) 14 70 I2C address copy (only relevant for I2C) 240 70 I2C address copy (only relevant for I2C) EEPROM Locations and default values The user is free to use any locations that are not occupied by the system but for future use it is best to avoid locations below 32. Most EEPROM values are only read on start up so when changing values they may not take effect until the device is reset. I2C Address This is only applicable to I2C devices, it is stored in 3 places for security, should one location become corrupt then it will be reset to the other two values. There is a command to change the I2C address but it can also be done by directly writing to the EEPROM, if so than at least two locations need changing. Baud Rate Applies only to serial devices. This is a code between 1 and 8 as follows: 1 1200 Baud 2 2400 Baud 3 4800 Baud 4 9600 Baud (Default) 5 19200 Baud 6 38400 Baud 7 57500 Baud 8 115200 Baud Prompt To help with serial communication the device when waiting for a command will output > if this value is set to 1.

Addressing It is possible to address more then one serial device using addressing, see serial section. This has the I2C interface. I2C Interface BV4532 (I2C) Pin SCL (*2) GND (*2) SDA (*2) Description Clock Ground Data V+ (*2) Supply voltage for device * I2C Electrical Connection The I2C connector has duplicate pins, this is to allow for daisy chaining of I2C devices. Please remember that unless buffered the length of the cable should be limited. *Voltage: The device works with 5V mainly because of the relay specification, there are NO pull up resistors on the device as these are normally provided by the master device. The device can be supplied with 5V and still work with 3.3V without and detrimental effect as the pull up resistors (on the 3v3 host) take care of the high value of the voltage. The device has a standard I2C interface and will act as a slave. 0x46 (0x23 7 bit) Keypad & LCD address Commands are realised by using the first byte written as the command byte. There is one exception to this which is a general call (address 0) followed by 0x55. This will reset the EEPROM contents back to the factory defaults. The command is useful if the i2c address becomes corrupt due to inadvertently writing the wrong values to the location where the i2c address is held. Address (0x46 or 0x23 7 bit) Device I2C address is stored in EEPROM in three places (see eeprom locations). This address should be set to between 10 and 250 using EVEN numbers ONLY. It is the 8 bit address value so an address of 68 will be on some systems the read and write address 34. There is a command however that will change all 3 addresses at once.

Commands The first byte is the command byte that initiates all transactions, as an example to turn on relay 1 requires the command byte followed by the relay number followed by the action (on or off) 8 bit i2c_start() i2c_write(0x46) // write address i2c_putc(2) // command i2c_putc(1) // relay i2c_putc(1) // action 1=on i2c_stop() Where a read is needed say to get current timer values a restart can be used or start stop 8 bit i2c_start() i2c_write(0x46) // write address i2c_putc(3) // command to get timer value i2c_putc(1) // relay to get value from i2c_stop() i2c_start() i2c_putc(0x47) // address with read bit set value = i2c_get(1) // ** i2c_stop() ** When reading I2C that last read should send NACK to indicate it is the last byte to receive. Adruino and other controllers use 7 bit addressing where most of this is taken care of with the read and write commands. Command Range Notes 1 th+tl: 1 Set Relay 0 to 5 c,r,a,th,tl to 65535 c: is the command 1 a: 0 or 1 r: is the relay number from 0 to 5 a: is the action for the relay to perform, 0 is turn off an 1 is turn on. th and tl: from a 16 bit number from 1 to 65535 which is a counter to set the action. This time is approximately seconds. Turn on relay 2 in 15 seconds i2c.write(2,1,0,15) Turn off relay 3 in 5 minutes (300 seconds) i2c.write(3,0,1,44) (300 = 0x12c) 2 Turn on or off relay now 0 to 5 c,r,a c: is the command 2 r: is the relay number from 0 to 5 a: is the action 0=off, 1=on

3 c,r 0 to 65535 Turn on relay 4 i2c.write(2,4,1) Gets Relay current timer value for relay 0 to 5 c: is the command 3 r: is the relay number from 0 to 5 Reads the relay timer value and returns TWO bytes high and low. Read timer value of relay 5 i2c.write(3,5) i2c.read() // high byte i2c.read() // low byte 4 0-0x3f Get state of all relays as a byte value Each relay is represented by 1 bit either 0 or 1 Relay Bit A 0000 000x B 0000 00x0 C 0000 0x00 etc. 00AB CDEF i2c.write(4) i2c.read() 5 All relays off 6 All relays on System 60 Adr 6-61 Adr 0- EEPROM reset to defaults This will restore the default EEPROM settings which has the I2C address. No effect will take place until the device is reset. This can take a few ms and so some master I2C devices will need to take this into account if a timeout is to be avoided. This is a special command in that it can be called regardless of the state of the EEPROM, in other words it does not rely on the I2C address value, so if the EEPROM values are random then this will restore as factory defaults. i2c.write(0,0x55) Change I2C address The address must be an even value, this is the 8 bit or full address where an even address is write and an odd address is read. It will not take effect until reset. The same effect can be achieved by writing to the EEPROM i2c.write(60,adr) Read EEPROM This will read a single value from an address in

62 Adr 0- data 0- EEPROM i2c.write(61,adr) adr is the new I2C address. Write EEPROM Writes a single byte to the given address i2c.write(62,adr,data) adr is the address of the EEPROM 0 to, data is what to store there. 63 Gets device ID as 2 bytes The first byte is the high byte of a 16 bit number and the second byte is the low byte i2c.write(63) i2c.read(2) Returns 2 bytes, to resolve the is (first byte * 256 + second byte) 64 Gets firmware version as 3 bytes x.x.x i2c.write(64) i2c.read(3) Returns 3 individual bytes e.g. 1,1,0 for v1.1.0 66 N/a Reset Resets the device as at first switch on. Depending on the I2C master this will likely cause a time out as there will be no reply from the device and so this may cause an I2C error from the master i2c.write(66) BV4531 (Serial) This section refers to the serial and USB interfaces Pin TX RX Description Transmit, output Receive, input V+ 5V supply for controller and relays Rst Gn Serial connector, single 5 way Reset, leave disconnected or high, pulling low will reset the controller Ground

USB This is an option of the serial interface and by default the USB will supply power to the relays. However the USB cannot supply sufficient guaranteed power to all of the relays if they are all on at the same time. There is a jumper pad marked USB that is closed which supplies power to the board. If power is supplied externally then this jumper should be open. Serial Signals The serial expects (TTL logic either 3.3V or 5V) NOT + and -12V RS232. If you have the old 9 pin connector then a conversion device will be required to transform the 12V levels to 5V or 3.3V levels. The serial interface uses 1 start bit, 8 data bits,1 or 2 stop bits, no parity and no handshake, the default Baud rate is 9600 but this can be changed via an EEPROM setting. Or temporarily by the B command. Handshake There is no hardware handshaking. This is provided in the way the software works. When the device is free to accept a command it will output a prompt character (default > ). The host will enter a command sequence followed by CR (13, \r). The device will not interpret the command until this is received. When received the command will be carried out and when finished send a prompt. The host must wait until the prompt is received as the device will ignore any incoming characters whilst it is doing the command. Addressing (TX only) This is switched off by default and so a command will have immediate effect, for example to set relay 3 to on the command is r3,1. If more than one device is connected to the serial bus then all devices will respond, to enable more than one device to take action it is possible to address the device individually and so it is possible to turn relay 3 on on one board and without turning it on another board. The address will be the same as that used for I2C, in this case 0x46 which is the ASCII code for F. When using addressing therefore the command would now be: Fr3,1 Turn on addressing: W5,1 Turn off addressing FW5,0 Reception. Serial devices are not bus devices and strictly

speaking only one device is allowed per bus. The TX line is normally held low thus preventing any other device from responding. This is not the case with receiving though and so many devices can is suitably addressed receive instructions. Commands General Rules CaSe is important. Values returned are in decimal Command act as soon as \r is received. Numbers are separated by a, unless it is a number after the command in which case no comma is needed Command Range Notes t<r>,<a>,<y> t: 1 to Timed action 65535 a: is the action for the relay to perform, 0 is turn r: 0 to 5off an 1 is turn on. a: 0 or 1t: is the time the action should take in seconds, this is approximate. : turn relay 3 on in8 seconds t3,1,8\r r<r>,<a> Turn on or off not timed a: is 0 for off 1 for on : turn off relay 4 r4,0\r g<r> R: 0 to 5Gets Relay current timer value A to F Reads the relay timer value. When using timed values this will return the remaining time left to the action. s 0-0x3f Get state of all relays as a byte value Each relay is represented by 1 bit either 0 or 1 Relay Bit A 0000 000x B 0000 00x0 C 0000 0x00 etc. 00AB CDEF o All relays off f All relays on System E N/a EEPROM reset This will restore the default EEPROM settings No effect will take place until the device is reset. B 1 to 8 Set Baud Rate This is a temporary setting, for a permanent change the EEPROM values must be set. The value is a choice of Baud rates from 1 to 8, see the table in the EEPROM settings section. R<a>,<n> a: 0 to Read EEPROM

W<a>,<b> I F X n: 0 to a: 0 to b: 0 to Read the eeprom starting at address <a> for the number of bytes <n> : Read 5 bytes from eeprom starting at 8 R8,5\r Write EEPROM Writes byte <b> to address <a> Only one byte can be written at once : Write 27 to location 75 W75,27\r Gets device ID As a decimal number Gets firmware version As a string Reset Resets the device as at first switch on