The wireless communication via Xbee between a moving 6 wheel robot controlled by an Arduino and a desktop computer with Labview will become very slow as soon as a wireless network with an IP camera is added. This becomes an issue when steering the robot in real time. Therefore Labview & Arduino communication via ethernet is desired.
As many posts in several forums already stated the LabVIEW Interface for Arduino Toolkit is not setup to support communication via ethernet. It only supports serial communication via Xbee or USB.
The problem can be solved by using a wireless USB sharing station as part of an existing wireless network.
The setup and configuration I used are described below.
Windows 7, Netgear WNA3100 N300 Wireless USB Adapter, Labview student edition 2011 installed, Arduino software incl. driver installed.
Wireless Network: Router Linksys WRT54GL, IOGEAR Wirless 4-Port USB Sharing Station GUWIP204
1. Upload the LIFA to the Arduino while it is connected via USB cable to one of the computers USB ports. I am using an Arduino UNO.
2. Setup your wireless network, if not already done.
3. Install the USB Sharing station as described in the manufacturer’s setup instructions.
Use the Arduino as USB device and connect the Arduino’s USB port to one of the USB
ports of the USB Sharing Station.
4. Open the IOGEAR Wireless USB Sharing Station software.
The IOGEAR software will recognize the Arduino.
5. After installation, the Arduino has to be connected manually, using the IOGEAR software.
6. Check in the Windows device manager which port has been assigned to the Arduino.
in this example COM Port 6 is used for the Arduino Uno.
7. Update the Labiew vi and set to the correct USB port and speed.
Run your vi, application,….
The I/O expander described in this post provides a total of 24 digital I/O ports as well as 16 analog ports. Each MCP23017 provides 16-bit, general purpose parallel I/O expansion for I2C bus or SPI applications. The 74HC4051 is a 8-channel analog multiplexer/ demultiplexer. The PCB shown below includes 2x MCP23017 and 2x 74HC4051.
The Arduino sketch is based on the wire library and the MCP23017 library from Adafruit. In this application the Analog In pins A0 and A1 of the Arduino board are used as inputs for the data from the analog mux/demux. The addresses for the 4051 and the ports are selected by utilizing the GPA port of one of the digital IO expanders MCP23017 and the I2C bus.
MUXREV1: PCB assembled
MUXREV1: PCB Layout
Resistors at ports X0 – X7 of the 74HC4051: The assembly and the values of these resistors at the individual ports depend on the application. For example, if used to read voltages in combination with an Arduino UNO, the voltage at the port should not exceed 5V, unless the settings for the AREF pin have been changed. The values in the schematic are only examples. The values of the resistors that have been assembled have to be entered into the sketch to enable the calculation of the actual voltage at the terminal.
The VEE pin of the 74HC4051 is connected to GND via resistor R9: 0 Ohm, since only voltages >0V will be measured.
IC5, IC6: MCP23017 The addresses for IC5 and IC6 are hardwired on the PCB, they are also shown on the silkscreen of the PCB. Interrupts A and B for each MCP23017 (IC5, IC6) are available at terminals, if needed. The RESET pins of IC5 and IC6 are connected to VCC.
An Arduino with L293D dual h-bridge and a TV IR remote control are driving a pan tilt head with video camera.
The schematic of this PCB is based on the Arduino Duemilanove PCB with 5V voltage regulator, serial interface and ISP interface to program the bootloader.
In addition it includes the circuitry needed to control a video camera via LANC, as well as two motor controller L293D and an IR receiver. The first L293D is configured to drive two DC motors, in this case the pan and tilt motors of the DAIWA pan tilt head that has been described in a previous post. The second motor controller is configured to drive a stepper motor. There is also a breadboard area on the PCB for modifications and extensions.
Setup & Operation:
After the controller is turned on the pan tilt head moves during boot up into a horizontal position. The LEDS will light up to indicate when the setup is completed. They will also show if the 25 pin cable is connected correctly or not, in this case the setup will stop and only continue once the error has been corrected.
Two analog input pins of the Arduino are reading the voltages from two potentiometers in the DAIWA head. This allows to control the actual position of the head, avoiding damage to the motors and gears by stopping the movement before the end positions are reached.
One LED will also start blinking if the battery voltage drops below 8.2 Volt.
Running the motor controller for the pan tilt head via IR without the program part/code for the LANC works fine. The LANC commands are also executed without problems as long as the serial connection is used and the IR library is not implemented, but integrating the code for both applications and driving the head and the camera together via IR does currently not work.
Here is the code for the IR remote control of the pan tilt head: L293D-IR
This is the description of a simple window pass through panel for antenna cables.
Two coax cables and a ground wire are fed into the house without drilling any holes.
2 sections PVC board cut to length from 8ft white PVC board.
2x UHF 12 Female To UHF Female Bulk Head Adapter
2x UHF 15 Right Angle UHF Male To UHF Female Adapter
Nail plates for additional stability
Outdoor load center with grounding bar
Ground rod 4 ft
Stranded bare copper wire
Most of these materials can be found in the next home improvement store.
PVC board, load center, nail plate with holes for the UHF 12 adapters, ground bar, cut in two pieces for assembly on the outside and inside.
The PVC boards are glued together with PVC Cement, the nail plates provide additional stability.
Load center and UHF adapter mounted
Ground bar installed
UHF adapter, nail plate and ground bar assembled on PVC board facing inside, in the radio shack
Ground rod with bare copper wire
Small PVC board to cover gap between the window and the Pass-through, to avoid rain and snow inside the house
A piece of PVC pipe hides the copper wire.
Load center with ground bar, the copper wire is connected to the ground rod, the UHF 15 adapters have been mounted
This is the description of an USB to TTL converter for the ICOM CI-V Interface of ICOM ham radios.
The complete adapter consists of the CP2102, USB to TTL serial converter from MICRO SATA Cables and a 1/8″ mono plug for connection to the CI-V interface in the radio.
This converter ships with cable and driver CD for less than $6, the total cost for converter, cable and connector were less than $10.
Datasheet of the CP2102 from MICRO SATA Cables: USB 2.0 to TTL UART 6PIN Module Serial Converter CP2102
– USB to TTL Serial Converter
– USB to TTL Adapter.
-Use this device to connect your PC to a serial (TTL level) device.
– Uses CP2102 chipset and has a standard 0.1″ pitch terminal strip to connect directly to
UART or I/O pins for easy access to your MCU
– USB specification 2.0 compliant with full-speed 12Mbps.
– Standard USB type A male and TTL 6pin connector.
– 6 pins for 3.3V, RST, TXD, RXD, GND & 5V.
– All handshaking and modem interface signals.
– Baud rates: 300 bps to 1.5 Mbps.
– Byte receive buffer; 640 byte transmit buffer.
– Hardware or X-On/X-Off handshaking supported.
– Event character support Line break transmission.
– USB suspend states supported via SUSPEND pins.
– Supports Windows 98SE, 2000, XP, Vista, Window7, Mac OS 9, Mac OS X & Linux 2.40.
– Size: 42mm X 15mm (approx) .
– Weight: 4g (approx).
– The USB side must be connected to PC or Mac.
– Other USB devices like a digital camera, scanner and printer is not allowed.
Package Includes :
1 X USB to TTL Converter.
1 X Standard 4 pin 0.1″ pitch female to female cable.
1 X Driver CD
As described by Guy Dickinson (Icom CI-V USB/TTL Rig Cable Design Using the FTDI Chipset) the RX and TX pins of the converter are soldered together. The only additional wire needed is GND.
The program for installation of the drivers from the CD ran without problems.
This configuration has been tested successfully with an ICOM 706MKIIG and the Transceiver Control software from DXLab (COMMANDER).
For more information regarding the CI-V interface, data formats, command structure, converters, etc please visit the web page of DF4OR.
More detailed information about this pan tilt head can be found at: ESI Inc.
Pan Rotation: 260 degrees
Tilt Angle: + or – 45 degrees
Torque-Tilt: 8.66 lb/inch
Capacity: 6.0 lbs.
Voltage: 12 V DC
Amperes: Pan & Tilt = max. 270 mA.
Potentiometer: Pan & Tilt = 10 KΩ,
Pan Speed: 15 degrees per second,
Tilt Speed: 15 degrees per second
The head is specified for operation at 12VDC, but it also works just fine at 9VDC.
The low current consumption and the low DC voltage allow mobile/portable applications.
The dual H Bridge L293D, in combination with an Arduino Uno, can drive the DAIWA APT-3DCP2-B Pan Tilt head, which is also described in this blog.
The PCB includes a 5V regulator to create the required logic voltage for the L293D.
In the photos below you can also see the 25 pin connector for the DAIWA pan tilt head.
PCB with L293D, Voltage regulator and 25 pin Sub D connector
In this application both enable pins of the L293D are connected to +5V.
This PCB/Circuit is a modified version of the schematics and code shown in Tom Igoe’s blog. Instead of one stepper motor, the two DC motors of the Pan-Tilt head are driven by this chip. For more information regarding H bridges, stepper motors, the L293D & Arduino visit the blog of Tom Igoe
6 Wheel Robot Experiment
(This is more a wordpress experiment than a robotic experiement)
6 wheel robot
Main components of the robot:
Micro Controller Board: Arduino Duemilanove,
Motor Controller: TReX Jr,
Prototype Shield for Arduino
Blinking LED Panels,
3 Double Gearboxes, 2 Batteries: 9.6V
Motors with capacitors
For noise reduction a 0.1uF capacitor has been soldered across the terminals of each motor.
Two ferrites are also inserted in the power line to the motor controller to reduce the interference of the micro controller by noise coming from the motors.
Arduino & stand offs
Microcontroller Board Arduino Duemilanove:
The micro controller board is mounted to a prototype PCB for easier handling, assembly/dis-assembly or moving to another project without interfering with the controller. Mounting the micro controller as well as the motor controller on prototype PCBs also allows the stacking of multiple PCBs with different dimensions on top of each other.
Motor Controller: TReX Jr:
Similar to the micro controller board, the motor controller is mounted to a prototype PCB. The TreXX Jr. from Pololu is a DC motor controller that can control two bidirectional motors and one unidirectional motor. For this robot the controller is configured to drive the three gearboxes on the left and right side of the robot independently via the asynchronous serial control interface.
Components of the breakout board:
C1: 10μF electrolyt. capacitor
C2: 10μF electrolyt. capacitor
C3: 0.1μF ceramic cap.
IC1: 5V Voltage regulator, used as power supply for servos.
Q1, Q2 2N7000 transistor,driver transistors for terminals
(J12,J13), in this application used to switch the LED
D1, D2: 2N4001 or 2N4007
S1: Main switch
J1-J13: Terminals (as available)
R1: 1KΩ resistor
R2, R3: 220Ω resistor
LED1: LED (color as available)
J1-J6: Terminals for up to 6 servos.
J8-J11: Terminals to connect other loads to the battery .
J7: Main terminals to connect the power supply/battery.
The Arduino software has been installed on a desktop computer as well as on a net book for mobile application. Computer and robot are communicating via two Xbee modules and the Serial Monitor of the arduino software.
Blinking of the LED Panels is realized by calling a function at the beginning and at the end of the main program loop. The LEDs toggle between ON and OFF each time this function is called. The program is about 80ms long, this creates the blinking effect.
The wireless camera is mounted on two servos. The camera can switch between pan mode or fixed mode, pointing forward, when driving. Switching between modes is done by pressing “p” key on the keyboard.
Forward/backward driving and turning of the robot is also handled via the keyboard of the connected computer.