e-puck2: Difference between revisions
Line 208: | Line 208: | ||
The drivers are automatically installed with Windows 10, Linux and Mac OS. | The drivers are automatically installed with Windows 10, Linux and Mac OS. | ||
Anyway in Linux | Anyway in Linux in order to access the serial ports, a little configuration is needed. Type the following command in a terminal session. Once done, you need to log off to let the change take effect: <code>sudo adduser $USER dialout</code>. | ||
==Finding the USB serial ports used== | ==Finding the USB serial ports used== |
Revision as of 12:38, 25 July 2018
Hardware
Overview
The following figures show the main components offered by the e-puck2 robot and where they are physically placed:
Specifications
The e-puck2 robot maintains full compatibility with its predecessor e-puck (e-puck HWRev 1.3 is considered in the following table):
Feature | e-puck1.3 | e-puck2 | Compatibility | Additional |
Size, weight | 70 mm diameter, 55 mm height, 150 g | Same form factor: 70 mm diameter, 45 mm, 130 g | No e-jumper required | |
Battery, autonomy | LiIPo rechargeable battery (external charger), 1800 mAh. About 3 hours autonomy. Recharging time about 2-3h. |
Same battery; USB charging, recharging time about 2.5h. | USB charging | |
Processor | 16-bit dsPIC30F6014A @ 60MHz (15 MIPS), DSP core for signal processing | 32-bit STM32F407 @ 168 MHz (210 DMIPS), DSP and FPU, DMA | ~10 times faster | |
Memory | RAM: 8 KB; Flash: 144 KB | RAM: 192 KB; Flash: 1024 KB | RAM: 24x more capable Flash:~7x more capable | |
Motors | 2 stepper motors with a 50:1 reduction gear; 20 steps per revolution; about 0.13 mm resolution | Same motors | ||
Wheels | Wheels diamater = 41 mm Distance between wheels = 53 mm |
Same wheels | ||
Speed | Max: 1000 steps/s (about 12.9 cm/s) | Max: 1200 steps/s (about 15.4 cm/s) | 20% faster | |
Mechanical structure | Transparent plastic body supporting PCBs, battery and motors | Same mechanics | ||
Distance sensor | 8 infra-red sensors measuring ambient light and proximity of objects up to 6 cm | Same infra-red sensors Front real distance sensor, Time of fight (ToF), up to 2 meter. |
ToF sensor | |
IMU | 3D accelerometer and 3D gyro | 3D accelerometer, 3D gyro, 3D magnetometer | 3D magnetometer | |
Camera | VGA color camera; typical use: 52x39 or 480x1 | Same camera; typical use: 160x120 | Bigger images handling | |
Audio | 3 omni-directional microphones for sound localization speaker capable of playing WAV or tone sounds |
4 omni-directional microhpones (digital) for sound localization speaker capable of playing WAV or tone sounds |
+1 front microphone | |
LEDs | 8 red LEDs around the robot, green body light, 1 strong red LED in front | 4 red LEDs and 4 RGB LEDs around the robot, green light, 1 strong red LED in front | 4x RGB LEDs | |
Communication | RS232 and Bluetooth 2.0 for connection and programming | USB Full-speed, Bluetooth 2.0, BLE, WiFi | WiFi, BLE | |
Storage | Not available | Micro SD slot | Micro SD | |
Remote Control | Infra-red receiver for standard remote control commands | Same receiver | ||
Switch / selector | 16 position rotating switch | Same selector | ||
Extensions | Ground sensors, range and bearing, RGB panel, Gumstix extension, omnivision, your own | All extension supported | ||
Programming | Free C compiler and IDE, Webots simulator, external debugger | Free C compiler and IDE, Webots simulator, onboard debugger (GDB) | Onboard debugger |
This is the overall communication schema:
Documentation
- Main microcontroller: STM32F407, datasheet, reference-manual
- Programmer/debugger: STM32F413, datasheet, reference-manual
- Radio module: Espressif ESP32, datasheet, reference-manual
- Camera: PixelPlus PO8030D CMOS image sensor, datasheet, no IR cut filter
- Microphones: STM-MP45DT02, datasheet
- Optical sensors: Vishay Semiconductors Reflective Optical Sensor, datasheet
- ToF distance sensor: STM-VL53L0X, datasheet, user-manual
- IMU: InvenSense MPU-9250, product-specification, register-map
- Motors: details
- Speaker: Diameter 13mm, power 500mW, 8 Ohm, DS-1389 or PSR12N08AK or similar
- IR receiver: TSOP36230
Migrating from e-puck1.x to e-puck2
The e-puck2 robot maintains full compatibility with its predecessor e-puck, but there are some improvements that you should be aware of.
First of all the e-jumper, that is the small board that is attached on top of the e-puck1.x, isn't anymore needed in the e-puck2. The components available on the e-jumper are integrated directly in the robot board. On top of the e-puck2 you'll see a quite big free connector, this is used to attach the extensions board designed for the e-puck1.x that are fully compatible with the e-puck2; you must not connect the e-jumper in this connector.
Secondly you don't need anymore to unplug and plugin the battery for charging, but instead you can charge the battery directly by connecting the USB cable. If you want you can still charge the battery with the e-puck1.x external charger, in case you have more than one battery.
Moreover you don't need anymore a special serial cable (with probably an RS232 to USB adapter) to be able to communicate with the robot, but you can use the USB cable. Once connected to the computer a serial port will be available that you can use to easily exchange data with the robot.
Extensions
All the extensions (ground sensors, range and bearing, RGB panel, gumstix and omnvision) are supported by the e-puck2 robot, this means that if you have some extensions for the e-puck1.x you can still use them also with e-puck2.
For more information about using the gumstix extension with e-puck2 robot refer to http://www.gctronic.com/doc/index.php?title=Overo_Extension#e-puck2.
Getting Started
The e-puck2 robot features 3 chips onboard:
- the main microcontroller, that is responsible for handling the sensors and actuators and which runs also the demos/algorithms
- the programmer, that provides programming/debugging capabilties and moreover it configures the USB hub and is responsible for the power management (on/off of the robot and battery measure)
- radio module, that is responsible for handling the wireless communication (WiFi, BLE, BT), the RGB LEDs and the user button (the RGB LEDs and button are connected to the radio module due to the pin number limitation on the main microcontroller)
The following sections explain the basic usage of the robot, more detailed information can be found following the links provided.
Turn on/off the robot
To turn on the robot you need to press the power button (blue button) placed on the bottom side of the board, near the speaker, as shown in the following figures:
To turn off the robot you need to press the power button for 1 second.
Meaning of the LEDs
The e-puck2 has three groups of LEDs that are not controllable by the user.
- Charger: RED if charging, GREEN if charge complete and RED and GREEN if an error occurs
- USB: Turned ON if the e-puck2 detects a USB connection with a computer
- STATUS: Turned ON if the robot is ON and OFF if the robot is OFF. When ON, gives an indication of the level of the battery. Also blinks GREEN if the program is running during a debug session.
Battery level indications (STATUS RGB LED):
- GREEN if the system's tension is greater than 3.5V
- ORANGE if the system's tension is between 3.5V and 3.4V
- RED if the system's tension is between 3.4V and 3.3V
- RED blinking if the system's tension is below 3.3V
The robot is automatically turned OFF if the system's tension gets below 3.2V during 10 seconds.
Connecting the USB cable
A micro USB cable (included with the robot in the package) is needed to connect the robot to the computer. There are two connectors, one placed on top of the robot facing upwards and the other placed on the side of the robot, as shown in the following figures. Both can be used to charge the robot or to communicate with it (do not connect two cables at the same time), choose the one that is more comfortable to you.
Installing the USB drivers
The USB drivers must be installed only for the users of a Windows version older than Windows 10:
- Open
zadig-2.3.exe
located in theEclipse_e-puck2\Tools\
folder you installed before. - Connect the e-puck2 with the USB cable and turn it on. Three unknown devices appear in the device list of the program, namely e-puck2 STM32F407, e-puck2 GDB Server (Interface 0) and e-puck2 Serial Monitor (Interface 2).
- For each of the three devices mentioned above, select the
USB Serial (CDC)
driver and click on theInstall Driver
button to install it. Accept the different prompts which may appear during the process. After that you can simply quit the program and the drivers are installed. These steps are illustrated on Figure 3 below.
- Note : The drivers installed are located in
C:\Users\"your_user_name"\usb_driver
- Note : The drivers installed are located in
The drivers are automatically installed with Windows 10, Linux and Mac OS.
Anyway in Linux in order to access the serial ports, a little configuration is needed. Type the following command in a terminal session. Once done, you need to log off to let the change take effect: sudo adduser $USER dialout
.
Finding the USB serial ports used
Two ports are created by the e-puck2's programmer when the USB cable is connected to the robot (even if the robot is turned off):
- e-puck2 GDB Server. The port used to program and debug the e-puck2.
- e-puck2 Serial Monitor. A serial monitor. #see dedicated chapter(not yet ready)
A third port could be available depending on the code inside the e-puck2's microcontroller. With the standard firmware a port named e-puck2 STM32F407 is created.
Windows
- Open the Device Manager
- Under Ports (COM & LPT) you can see the virtual ports connected to your computer.
- Do a Right-click -> properties on the COM port you want to identify.
- Go under the details tab and select Bus reported device description in the properties list.
- The name of the port should be written in the text box below.
- Once you found the desired device, you can simply look at its port number (COMX).
Linux
- 1. Open a terminal window (ctrl+alt+t) and enter the following command.
ls /dev/ttyACM*
- 2. Look for ttyACM0 and ttyACM1 in the generated list, which are respectively e-puck2 GDB Server and e-puck2 Serial Monitor.
Note : Virtual serial port numbering on Linux is made by the connections order, thus it can be different if another device using virtual serial ports is already connected to your computer.
Mac
- 1. Open a terminal window and enter the following command.
ls /dev/cu.usbmodem*
- 2. Look for two cu.usbmodemXXXX, where XXXX is the number attributed by your computer. You should find two names, more or less following in the numbering, which are respectively e-puck2 GDB Server and e-puck2 Serial Monitor.
Note : Virtual serial port numbering on Mac depends on the physical USB port used and the device. If you want to keep the same names, you must connect to the same USB port each time.
PC interface
An interface running on a computer and connecting to the e-puck2 either through Bluetooth (selector position 3) or via USB (selector position 8) based on the advanced sercom protocol was developed; from this interface it's possible to have information about all the sensors, receive camera images and control the leds and motors. The source code is available from the repository https://github.com/e-puck2/monitor.
Available executables:
- Windows executable: tested on Windows 7 and Windows 10
- Max OS X executable
On Linux remember to apply the configuration explained in the chapter Installation for Linux - Serial Port in order to access the serial port.
WiFi support
A dedicated WiFi version of the monitor application was developed to communicate with the robot through TCP protocol.
For more information about the communication protocol, refer to section WiFi communication protocol.
The source code can be downloaded with the command git clone -b wifi --recursive https://github.com/e-puck2/monitor.git
A Windows executable is available here Monitor WiFi for Windows.
High level programming
...
Main microcontroller
main microcontroller programming
Radio module
Programmer
...