bharath5673 / OAK-D_Rover

Rover built with the powerful, OAK-D. a smart ai camera.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SPY-D

i turned my old toy car into a POWERFUL Robot.

Alt text

robot specs:

speed control upto 10 modes
live streaming
object detetction
object's distance estimation
obstical avoidance
sound notification
LED headlamps
object tracking
face tracking
face detetcion and recognition
slam
disparity mapping
autonomus driving
RunTime around 5+ hrs

and this car, my codes will work on all the devices such as jetson nano, pis, pandas, and os like windows, ubuntu, ros etc.. with the same code..
python makes it easy, with the help of pyserial lib.

simply just need to build the car, wireup as shown below, pip install pyserial and some libs and plug in device usb to arduino .. and game is on.


components im using

1. MDF board really mdf sheets were far better than acrylic sheet
2. 24 1"L camps
3. male, female header pins
4. prototype PCB
5. 4007 diodes
6. ceramic capacitors for motors
7. screw terminal wire connectors
8. 1k resistors
9. OAK-D stereo AI cam
10. jumper wires
11. DC-DC buck converter
12. some zip ties
13. slide switch
14. LEDs
15. L298N motor driver
16. 24 sets , screws and bolts
17. RC car (scale 1:10)
18. 5v buzzer
19. white leds
20. batteries 6x 18650
21. raspberry pi im using raspy 3b+ because i had one
22. arduino nano
23. usb mini-B for arduino
24. usb connector for raspberry pi for power
25. usb type-C for OAK-D
26. BT keyboard
27. color wrapper beacuse i found its better than a paint job..
28. wires
29. slide switch for power
30. patiences.


1. Keyboard Controlled Car

setting up everything to the aspects was highly challenging... bcoz of power // power was the limitation , and had to be played with in the limitations.. and to take control of a Car using simple Python code to bring the Car to life! with this connection setup had to face lot for power incompatibility.

POWER CONSUMPTION TABLE :

*components*          *consumption*

arduino                 0.40mA
raspberry pi 4          600mA  (screen size 800x720)
oak-d                   800mA  (300hX300w running mobile net infernece)
L298n(logic)            0.36mA

all this power had to delivered through the raspberry pi // but the RPi power source was the small power bank // may b around 1000mA 5v which was enough only to a RPi // without any usb loads such as OAKs

while the other way , OAK-D has an another power chord. now thought of drawing power from L298Ns 5volts to OAK-d still had to face the same power incompatibility... RPi was unable to boot. had to use a DC-DC buck converter drawing power directly from the 12v batteries step down to 5v. this LM2596S module was capable upto 3A which was easy enough..


WIRING:

a. l298N motor driver

IN1             >       D4
IN2             >       D5
ENA             >       D5
ENB             >       D6
IN3             >       D6
IN4             >       D7 th pin of arduino.
+pin            >       battery + (12v)
GND             >       battery -
GND             >       arduino's GND

buzzer (+)ve  	> 	D3
buzzer (-)ve  	> 	GND of arduino

whiteLed (+)ve  > 	D10
whiteLed (-)ve  > 	GND of arduino




b. buck converter

LM2596S (+)ve  	>  	battery (+) (12v)
LM2596S (-)ve  	>  	battery (-) 
steping down LM2596S module volts to 5.

oak-D (+)ve  	> 	5v
oak-D (-)ve  	> 	GND of  LM2596S module

RPi (+)ve	> 	5v
RPi (-)ve  	> 	GND of  LM2596S module



c. RPi to arduino connection with USB cable
d. OAK-D to RPi connection with a USB cable

ENV SETUP:

  python3 -m pip install -U pip
  python3 -m pip install opencv-python
  python3 -m pip install -U --force-reinstall depthai
  
  pip3 install pygame
  pip3 install pyserial

now its all set to run the car by running SPY-D_yolov4.py :

demo


2. yolov4 api

About

Rover built with the powerful, OAK-D. a smart ai camera.


Languages

Language:Python 76.4%Language:C++ 23.6%