Some parts already arrived. Decided to proceed with some steps in advance and test the HW.
Repository
- balena-io-playground/balena-nanny-bot
- commit related to this comment
HW setup & wiring
I did follow the Hardware Setup guide:
- Step 3 - Solder motor driver
- Step 4 - Strip motor driver power cable
- Step 10 - Solder header onto PiOLED display
- Step 11 - Wire motor driver to PiOLED display
- Step 13 - Attach wide angle sensor
Some steps skipped as I still don’t have all the HW I need.
Tests
PiOLED
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
Forward
Backward
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