Attention IoTiny Owners
The IoTiny and EZ-B v4 share the same communication protocol and connection method. The IoTiny is, essentially, a compact version of the EZ-B v4. All connection and uses described in these tutorial steps apply to both the IoTiny and EZ-B v4 users. Of course, the IoTiny has less I/O and no UART. Other than that, they operate the same. IoTiny users may follow lessons in this tutorial section for connecting and using their IoTiny.
The EZ-B v4, EZ-Robot Developer Kit and IoTiny are amazing tools for building custom DIY robots, or teaching old toys new tricks. Watch Overlord DJ Sures and Professor E introduce a few robots that he has built using the IoTiny and EZ-B v4 in this The Robot Program episode. Let's begin by showing what's in the box. The Robot Overlord DJ Sures and Professor E will be your guides throughout these tutorials. Have fun!
Inside the EZ-B v4
With the electronics protected by a stylish plastic shell, the EZ-B v4 brain fits in your Revolution EZ-Robot. This controller is easily programmed over Wi-Fi from our EZ-Builder Software.
The EZ-B v4 boasts two 32-bit CPUs at 200mhz (ARM Cortex M3 & Microchip PIC32), Energy Efficient Digital Switching Power Supply, Wi-Fi Connectivity with security, Embedded Web Server, Amplified Digital Audio with Speaker, 3 x i2c ports, 3 x UARTs, 24 x Multi-Function I/O, 73 x Servos (Dynamixel & PWM), 8 Analog ports, and Integrated Video... In a compact 2.1" x 2.2" size!
EZ-B v4 Port Summary
The EZ-B v4 has 24 Digital Ports and 8 Analog Ports. The Digital Ports are labelled D0 through D23. The ADC Analog Ports are labelled A0 through A7.
IoTiny Port Summary
The IoTiny has 8 Digital Ports and 2 Analog Ports. The Digital Ports are labelled D0 through D7. The ADC Analog Ports are labelled A0 through A1.
3 PIN (GVS) Connectors
Each port has 3 pins, which are GND (Ground), VCC and Signal. The GND and VCC are for powering the device connected to the port. The Signal pin is connected to the EZ-B Microchip for reading or writing data from Digital or ADC. The GND and VCC pins are not connected to the Microchip, they are used only for powering the peripheral connected to the IoTiny.
For example, a servo has a 3 wire plug that connects to one of the EZ-B Digital Ports. The wires of a servo connector are GND, VCC and Signal. The GND and VCC provide power to the servo's motor and circuit. The Signal wire carries the information to tell the servo what position to move.
The EZ-Robot Camera connects to the EZ-B v4 with a 6 pin cable. Notches on the male connector match the EZ-B's female connector. This prevents the plug from connecting incorrectly. The camera connection is unique, making it easy to identify where to connect. It is impossible to connect the camera cable to the wrong connector, as it only fits in the matching plug.
Connecting Servos & I/O
Much like your home theater speakers, the cables of the EZ-B and peripherals are color coded. The BLACK cable on the peripheral (i.e. servo) will connect to match the BLACK side of the EZ-B connector.
EZ-B v4 Ports Overview
Unregulated Power I/O
As a EZ-B v4 Developer, it is important that you know how the power pins work. This is because you will be building a custom robot with custom power requirements.
The EZ-B v4 does not regulate the power on the I/O pins. This means that if you provide 12v to the EZ-B v4, the I/O pins will output 12v. Of course, this will damage any +5v peripherals that you connect to the EZ-B v4 when using 12v. You must be aware of how much power is being provided to the EZ-B v4 and what you are connecting to the I/O pins. For example, the EZ-Robot Servos do not like power above 7.4 volts - which is why we recommend using Rechargeable AA batteries in the provided holder. If you are wishing to use an alternate power source, please be aware of this message and select a voltage rating that works with your application.
*Note: The only ports that have regulated power are for the Camera, i2c and UART #0 Expansion.
Learn Your Port Types
Working with digital means True (On) or False (Off). True means any voltage above 1 volt, and False means GND. There are 24 digital ports on the EZ-B v4 (D0 to D23)
Output is writing to a port: When a port has its digital value set to True, then a +3.3 voltage will be outputted on that port. If the port has its digital value set to False, then the port will be GND.
Input, is reading from a port: You can read the value of a specific port. This is how you can check for voltage, On or Off. Any voltage above GND (and below +5 volts) will be returned as True, a short to GND will be returned as False.
Example peripherals for digital ports are Switches, Servos, Ultrasonic Distant Sensors and Buttons.
ADC is short for Analog Digital Converter, and is read only (input only). This method reads voltages into the EZ-B Robot Controller. There are 8 analog input port on the EZ-B (A0 to A7).
Reading Relative Voltage: The returned value will be between 0-255 in 8 bit mode and 0-4095 in 12 bit mode. These values represent the input voltage on the specified port. The value will be relative to the input voltage that will between 0 and 5 volts. Example in 8 bit mode: Value 0 = 0 Volts, Value 127 = 2.5 Volts, Value 255 = 5 Volts.
Reading Absolute Voltage: Returns the value in actual volts on the specified port.
Example peripherals for analog input are Sharp GP2 Analog Distance Sensors, Pressure Sensors, Light Sensors, Sound Sensors, Color Sensors and reading voltages.
Serial (tx only)
Every digital port of the EZ-B Robot Controller can transmit serial data. Also, on the V4's, there are 3 UART ports for bi-directional buffered serial communication. Serial Communication is the process of sending data one bit at a time in a sequence. Serial communication is common with many peripherals because it allows commands to be transmitted over one wire. The transmission works similar to Morse code.
The Sender and Receiver need to be configured for the baud rate (speed) in which the data will be transmitted. Common baud rate speeds are 300bps, 4800bps, 9600bps, 19200bps, 38400bps, 57600bps and 115200.
There are also 3 high speed UART ports on the EZ-B v4 which allow transmit and receive abilities. The buffer size for input on each of the 3 high speed UART ports is 5,000 Bytes.
Example peripherals for serial communication are LCD Screens, Motor Controllers, Servo Controllers, Computer Communication, Arduino Communication, iRobot Roomba and more.
UART Serial (bi-directional)
The V4 UARTx ports are used connect to Serial TTL devices for both input and output. Contrary to the digital port Serial Output, these peripherals will also receive data into an input buffer as well. The input buffer of each UART is 5,000 Bytes. There are 3 UARTs, the first is the hardware labelled port, second and third are digital pins. These UARTs are controlled using the UARTInit(), UARTWrite(), UARTRead() and UARTAvailable() commands. The speed of these UARTs can be any integer between 1 and 3750000 bps.
UART0 TX: Expansion Connector
UART0 RX: Expansion Connector
UART1 TX: D5
UART1 RX: D6
UART2 TX: D18
UART2 RX: D19
The I2C is also referred to as the "Two Wire Interface". There are three I2C connectors on the EZ-B v4. I2C is a communication method invented by Philips that is used to communicate with peripherals. The I2C uses two wires for communication, Serial Data Line (SDL) and Serial Clock Line (SCL).
Continue to Next lesson
I2C devices can be chained together in a network formation. Each device is given a unique address. The EZ-B v4 has three I2C headers which provides both signal wires and +3.3v power.
Example peripherals for I2C communication are LCD Screens, I2C enabled Servos, BlinkM Multicolor LEDs, and more.
Click here for more information on understanding i2c addressing.