This is a fun project for me. I had this tank chassis from a old rover project and figured I could repurpose it for the Jetson Nano. I'm really trying to get into machine learning and this was a good start. I sadly can't take any credit for the programing. I used the premade JetBot software from Nvidia but that a little difficult too working out the bugs. It's fun teaching the robot what to avoid and when it's clear to proceed. The more data you give it the better it does!
PS. This guide is still being edited. Will be completed by 8/1. Thanks for your patience!
For the hardware setup you need the following items (also listed in BOM):
- Jetson Nano Dev Kit (obviously)
- Tank chassis
- Adafruit Feather DC Motor/Stepper driver
- A 7.4v 2S battery ( >2500mAh)
- A good(I can't stress this enough) 5v power supply for setup. I use a 8A thru the power plug, not the micro USB. When monitoring the draw from the Nano, I have seen it spike to 6500mA.
- Wifi Card
- A Camera either raspberry pi style or USB, I recommend the Pi style for the MIPI port connection.
- and a couple random parts like a 5v 5A linear regulator, small 5v fan to cool regulator, little piece of PCB to mount said regulator
First I started by designing and 3D printed base for the jetson Nano, motor driver, and camera to be mounted on. Then printed two antenna mounts and the battery mounts and clips. The STL files are uploaded to be reprinted. I had to make several iteration of the design before I finally got one the worked perfect.
Next with the final printed base, I inserted screw nuts into the mounting holes on the base. Basically I headed up the little nuts and then inserted them into the hole. I heated it just enough so that the plastic would melt around it, holding it in.
As you can see in the above pic that it took a couple tries to get the right amount of heat. That one burned the mount hole a little and was hard to hold in place while the plastic cooled around it. Because I heated this first one too much it completely melted the plastic. The below pic I got them all in and got pretty good at it. Very little heat needed from a torch. The other open holes are for mounting the base to the tank. Its 4x M3 bolts at least 10mm long. The inserts are M2.5 for the nano.
Next I attached my printed base to the tank using 4x M3x10mm screws and nuts. They just go thru the holes on the base, and thru the premade tank mounting holes to put a nut on the bottom to hold it in place. The tank had many premader holes for mounting so it was easy to make it work. Sorry I don't' have a pic with just the base mounted. As you can see the battery base and clips are attached already, also using 8x M3X10mm screws thru the tank chassis. The two antenna mounts are also mounted with a M3X10 screws thru the tank chassis.
This below picture shows the jetson Nano mounted using 4x M2.5x6mm screws. You can run the wires for the antennas thru the center of the antenna mounts so it doesn't bent them too much.
Next I mounted the Adafruit Feather DC motor driver to the base I printed. Again it is 4x M2.5 x 6mm screws.
You can also see in the pic that I soldered wires to the motor board. The board does not share the same power for the motors and the chip. They are separate. The Main power for the motors comes from the modified USB cable that plugs into the USB port on the Jetson Nano. I purchased a heavy gauge short usb cable from Digikey.com, I believe it was 22awg so it can power the motors properly. I cut off the microUSB side and screwed the wires into the screw header for the motor power. The actual power for the board comes from the 3.3V header on the Jetson Nano pins. The blue and yellow wires are going to the SDA/SCL for communication with the Nano. Here is a picture of the wiring:
They just use jumpers in the Nvidia guide but I wanted it more solid so I soldered all the jumpers on the DC Driver. Then I attached female jumper ends on the SDA/SCL and the board power wires. The motor leads connect to the two "M" ports. Don't worry if your not sure which wire goes to + or -, we can switch them later.
Here is the pinout for the Jetson Nano. It is labeled on the board itself but this is easier I think.
This was the harder part. I didn't use the USB power connection like the Nvidia guide does because I think you can supply more power thru the DC barrel on the board. You need to change the power jumper behind the DC barrel plug to allow it to be powered this way.
When your doing your software setup initially you want to use a wall DC adapter but for nbormal operation its going to be battery. We need to get the battery voltage down to a steady 5v DC. For that I used a 5v @ 5A linear regulator. I made a small board with screw terminals for in and out and a 3d printed base for it so a fan can be mounted to cool the regulator. I initially used a 3S 11.1v battery but that proved to make the regulator too hot dropping the voltage that much even with the fan/heatsink. So I switch to a 2S 7.4v battery with works good.
Here is a view of the bottom of the board. I used thick gauge wires so power can flow better & not create too much resistance. I use liquid electrical "tape" and puit 3 coats on the bottom to avoid random shorting if it touched something on the tank. I later made a 3d printed mount for it with the fan so this step prob isn't needed.
Here is the final product for powering it from the battery. The fan wires go into the battery in ports with the battery wires. So then when you plug in the battery the fan immediately runs. It's a 12v fan so don't expect it to be running at full speed since the battery supplies 8.2-7.4v. There is also a 470uf capacitor on the output. The output is a male DC barrel connector that I cut off a old power supply I had laying around.
Here is a pic of the camera mounted which just slides in and the ribben connected to the MIPI camera0 port. This is the default location the software looks for the camera.
Here is a pic of the final hookup minus the fan on the power regulator. Now we should be able to power it up and move to the software setup!
SoftwareFirst I downloaded the JetBot software to a microSD card using balenaEtcher to burn it correctly. It's a 21.5gb file so takes a little bit to download and burn. Insert the microSD card into the Jetson Nano and connect you monitor to the display port or the HDMI port. Also attach a usb keyboard/mouse and power it on.
Once you get to the desktop, you wanna do a couple things first before we get going. First in the upper right hand part of the screen you wanna click on the network icon and connect to your wifi network. 5ghz or 2.4ghz networks work as long as its a strong signal. After your connected to your wifi, you wanna get the IP address so we can connect to the Nano without a monitor or keyboard. Open up terminal and run this command:
ifconfig
It will spit out a bunch of info. Look for the wifi adapter and then your ip address within that. Its a good idea to log into your router and setup a address reservation for the Nano so it gets the same IP every time which you need.
Next I switch to full power mode or MAXN since we are using the wall adapter and need speed now rather than power savings. You can either:
- The top right hand corner of the screen, next to the wifi symbol, select the 5w and under power mode, select 0, MAXN.
or
- open terminal and run this:
sudo nvpmodel -m0
sudo jetson_clocks
password is 'jetbot'
This turn on all 4 cores of the processor and locks the max frequencies for that mode! Speed baby! Now lets update our software.
- PS if your curious about the Nano's current processor settings, run this command in a different terminal:
sudo jtop
This shows the processor usage and current power draw.
Now let's do some house keeping. Were going to remove LibreOffice, Thunderbird, and RythmBox. Don't need these. When it asks Y/N, type Y.
sudo apt purge libreoffice*
sudo apt purge thunderbird*
sudo apt purge rhythmbox*
Time to update the system!
sudo apt update && sudo apt upgrade -y
This will take 10-20 min depending on the amount it needs to update. If you see the "Software Updater" program load just hit remind later as we are doing the updates thru command line.
**If you get any errors saying resource locked, wait a min, dismiss the Software Updater and try again in a min.***
Once you are back to a command prompt we are done with the Nano being hooked up to the monitor. Run this command to switch it back to 5w mode & to shut it down and move to the next step:
sudo nvpmodel -m1
sudo shutdown now
Unhook the monitor and keyboard. Now power on the jetson nano using the battery. What fun! Now we want to log into Jupyter Notebooks that is automatically running on the Nano once it boots up. Remember the IP address for the Nano? You need it now.
Open you browser and go to http://x.x.x.x:8888. X being your ip address. See why setting a reservation on your router helps? you Should see this screen now once it loads:
To be continued by 8/1... Thanks for your patience.
Resources:
- JetBot Wiki - https://github.com/NVIDIA-AI-IOT/jetbot/wiki
Comments
Please log in or sign up to comment.