Odometry Module, in Partnership With JLCPCB

44701

Intro: Odometry Module, in Partnership With JLCPCB

Story

Robotech Nancy is a French project located in Polytech Nancy, an engineering school in eastern France. It consists of 16 students, aiming to compete at the 2020 French Cup of Robotic. Unfortunately, the future of the competition is uncertain due to the still ongoing Covid-19 worldwide pandemic. Still, the project continues towards its second goal : show what Polytech Nancy is capable of producing as an engineering school, event during such a crisis. Each student is now remotely working from home, far from the technical installations of the school, which makes JLCPCB’s help even more appreciable.

STEP 1: The Robot

The 2020 French Cup of Robotic is a timed competition where two teams compete on a set that changes each year. 2020’s set is pirate themed and the robots are leaved on a beach-like scenery, where they have to sort and channel different pawn to specifics areas of the map.

The module we realized is used to help the robot understand where it is on the set.

Those measurements are called “odometry”.

STEP 2: The Circuit :

Amongst other components, to achieve sufficient odometry, we have:

- A STM32

- A I2C bus to connect time of flight sensors to avoid colisions

- A MPU6050 (3 axis gyroscope and 3 axis accelerometer) also connected to the STM32 via a I2C bus.

- A PMW3901 optical sensor, much like ones you find below computer mouses.

STEP 3: Working Code :

The code for a whole odometry module is quite big, and is specific to each competitor, which means whoever has the best gets an enormous advantage during the competition. Because of these two reasons, we will show portions of the code.

First image is the initialization of the MPU6050 ( the gyroscope and accelerometer). As it is critical to a good start, the STM32 performs 500 measurements on each axis of the gyroscope to determine the 0 coordinates. As such, we are more precise.

The second is the
initialization of the optical scanner. It is made using the manufacturer documentation.

On our “secret code” we integrate the value returned by the gyroscope to get the exact position.

STEP 4: Making the Board :

Once
the parts were defined and the code was written, our electronic department handed over their work to our manufacturing department. They designed a board using Gerber. Once everything was put up together, we just had to upload it on JLCPCB's website to have it made custom.

After
four days of shipping, the package arrived.

To conclude, we want to give a huge thanks to JLCPCB which helps us a lot during theses challenging times. They made the discussion very easy and helped us make this PCB in no time.

Comments