Add 2DOF camera PTZ on Jetbot 2GB AI Robot Car

Posted on 26/09/2023 by Riley224
Press to mark as completed

The original Jetbotmini car camera angle can only be adjusted manually, which limits the using ofr users. The expansion board provides two servo ports, which can be effectively used. Make the camera PTZ that can be programmed.

Do it.

Preparation list

Yahboom Jetbot mini AI Robot Car *1

2DOF camera PTZ package *1



1) Assemble the servo PTZ, initialize the servo to 90° before installation.

2) Fix the assembled servo PTZ on the chassis of the trolley by screwing the copper column.

3)Fix the Jetson NANO camera on the PTZ. (only one screw is needed, looks a bit odd, but barely usable.



Here, I am using SDG90 servo, which needs to be controlled by PWM.

Since the pins of Jetson NANO cannot directly generate PWM, the stm8 MCU is integrated on the Jetbot-mini expansion board as a co-processor to output PWM and then control the servo.

Send data to IIC according to the communication protocol. The parameters in the write_i2c_block_data function are (coprocessor address, servo register address, [steering gear number, servo angle]), of which the coprocessor address and servo register address are fixed value.

Number 1 corresponds to the servo connected to the S1 port on the expansion board.

Number 2 corresponds to the servo connected to the S2 port on the expansion board.

Servo angle is set between 0-180.

Next, we can start to use the write_i2c_block_data function to control the rotation of the servo PTZ on Jupyter lab.



LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!

Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post