Building a nanny bot

Some parts already arrived. Decided to proceed with some steps in advance and test the HW.

Repository

HW setup & wiring

I did follow the Hardware Setup guide:

Some steps skipped as I still don’t have all the HW I need.

Tests

PiOLED

  • Check the oled folder
  • It’s a modified stats.py from the JetBot repository

IMG_1606

Camera

  • Check the camera folder
  • I tried to setup MJPEG stream, but didn’t succeed yet
  • Seems there’re some issues with the ffmpeg & 10-bit Bayer RGRG/GBGB format

I know that the camera is connected, sensor is recognised, …

root@407feda65a8a:/# v4l2-ctl --list-devices
vi-output, imx219 6-0010 (platform:54080000.vi:0):
	/dev/video0
root@407feda65a8a:/# v4l2-ctl -d /dev/video0 --list-formats
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'RG10'
	Name        : 10-bit Bayer RGRG/GBGB
root@407feda65a8a:/#

… but not sure if the JetPack supports it. If not, first mistake and I’ll have to buy another sensor. We’ll see.

Motor driver

  • Check the motor folder
  • It’s basically a copy of the motor.py & robot.py from the JetBot repository
  • It simply tells the driver to go forward, backward, left, right and stop. Each command lasts for 10s.
  • I was just measuring if the driver was giving the right voltage (no motors yet)

Stop

IMG_1604

Forward

IMG_1603

Backward

IMG_1602

Battery life

Jetson Nano was up for almost 4hours …

root@1273841:~# uptime
 15:42:07  up   3:55,  1 user,  load average: 1.63, 1.68, 1.58
root@1273841:~#

… in the 10W mode …

root@1273841:~# nvpmodel -q
NV Power Mode: MAXN
0
root@1273841:~#

… and if you didn’t notice it on the first photo, power bank is at 77% capacity. Which is nice, because it was running balenaOS, I was building everything on the Jetson Nano, running on battery only, etc. I know, no motors, no camera stream, no AI for detection, … but it gives a promise that it can last for some reasonable time with all these features enabled.

Jetson Nano can also be switched to the 5W mode (recommended when running on battery) …

root@1273841:~# nvpmodel -m 1
root@1273841:~# nvpmodel -q
NV Power Mode: 5W
1
root@1273841:~#

… and you can switch it back with the nvpmodel -m 0 command.

Some fun today! Still waiting for other parts :frowning:

1 Like