Carlos Campos
Created October 4, 2021 © GPL3+

V-AIye. Lets go shopping!

Virtual and electronic assistant with AI to help visually impaired or blind persons to do their groceries

IntermediateWork in progress24 hours33
V-AIye. Lets go shopping!

Things used in this project

Hardware components

Kria KV260 Vision AI Starter Kit
AMD Kria KV260 Vision AI Starter Kit
×1
Arduino Nano R3
Arduino Nano R3
×1
Grove Shield for Arduino Nano
Seeed Studio Grove Shield for Arduino Nano
×1
Dual H-Bridge motor drivers L298
SparkFun Dual H-Bridge motor drivers L298
×1
USB Interface, USB-to-UART BRIDGE
USB Interface, USB-to-UART BRIDGE
×1
DC motor (generic)
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
Li-Polymer Battery, 150mAh
Li-Polymer Battery, 150mAh
×1

Software apps and online services

Vivado Design Suite
AMD Vivado Design Suite
Vitis Unified Software Platform
AMD Vitis Unified Software Platform
Arduino IDE
Arduino IDE
Microsoft Visual Studio 2022

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Custom parts and enclosures

Shopping Cart Blend

3D model created in blender, it includes all the separate parts to print.

Schematics

Shopping Cart Arduino Schematic

Schematic of the Shopping Cart circuit. In the schematic the UART RF Bridge Transceiver is replaced with a ESP32 WiFi Module

Shopping Cart Arduino Schematic Image

Schematic Image of the Shopping Cart circuit. In the schematic the UART RF Bridge Transceiver is replaced with a ESP32 WiFi Module

Code

Shopping Cart Arduino Control

Arduino
Simple control to move the shopping cart using an arduino nano, this code was created to allow a wireless control of the cart without the need to put the KV260 board in the cart for demostration purposes and due size limitations.
It listen the UART for basic character commands to move Front, Back, Steering Left/Rigth, and Stop.

The main idea for the V-AIye project is that the cart will be pushed forward/backward by the user and only the steering will be controlled by the application, but the user is replaced here for a motor for demostration purposes.
/*
 Controlling the Shopping Cart for Hackster.IO project.
 
 by Carlos Campos on 24 Mar 2022

*/

#include <Servo.h>

Servo myservo;
int command = 0;

void setup() 
{
  Serial.begin(9600);

  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  
  myservo.attach(2, 700, 2500);
  myservo.write(75);
  delay(250);
  myservo.write(112);
  delay(250);
  myservo.write(95);
  delay(250);
}

void loop() 
{
  if(Serial.available() > 0)
  {
    command = Serial.read();
    delay(5);

    if(command == 'F' || command == 'f')
    {
      Serial.println("Cart Forward");
      digitalWrite(5,LOW);
      digitalWrite(4,HIGH);
    }
    if(command == 'B' || command == 'b')
    {
      Serial.println("Cart Back");
      digitalWrite(4,LOW);
      digitalWrite(5,HIGH);
    }
    if(command == 'S' || command == 's')
    {
      Serial.println("Cart Stop");
      digitalWrite(4,LOW);
      digitalWrite(5,LOW);
      myservo.write(95);
    }
    if(command == 'L' || command == 'l')
    {
      Serial.println("Cart Left");
      myservo.write(75);
    }
    if(command == 'R' || command == 'r')
    {
      Serial.println("Cart Right");
      myservo.write(110);
    }
    if(command == 'C' || command == 'c')
    {
      myservo.write(95);
    }
  }
}

Shopping Cart PC Tester

C#
Simple Windows Form Application to test the commands for shopping cart movement. It uses a UART RF Bridge connected to the PC to send the commands.
In the final application the bridge will be connected to a USB port on the KV260.
using System;
using System.IO.Ports;
using System.Windows.Forms;

namespace shopping_cart_pc_tester
{
    public partial class pc_tester : Form
    {
        SerialPort serial;

        public pc_tester()
        {
            InitializeComponent();

            serial = new SerialPort();
            serial.PortName = "COM4";
            serial.BaudRate = 9600;
            serial.DataReceived += Serial_DataReceived;
        }

        private void Serial_DataReceived(object sender, SerialDataReceivedEventArgs e)
        {
            this.Invoke(new Action(() => { txtResponse.AppendText(serial.ReadLine() + Environment.NewLine); }));
        }

        private void btnOpen_Click(object sender, System.EventArgs e)
        {
            if(btnOpen.Text=="Open")
            {
                btnOpen.Text = "Close";
                serial.Open();
            }
            else
            {
                btnOpen.Text = "Open";
                serial.Close();
            }
        }

        private void btnForward_Click(object sender, System.EventArgs e)
        {
            serial.WriteLine("F");
        }

        private void btnBack_Click(object sender, System.EventArgs e)
        {
            serial.WriteLine("B");
        }

        private void btnLeft_Click(object sender, System.EventArgs e)
        {
            serial.WriteLine("L");
        }

        private void btnRigth_Click(object sender, System.EventArgs e)
        {
            serial.WriteLine("R");
        }

        private void btnStop_Click(object sender, System.EventArgs e)
        {
            serial.WriteLine("S");
        }

        private void btnCenter_Click(object sender, EventArgs e)
        {
            serial.WriteLine("C");
        }
    }
}

V-AIye Main Repository

Repository is divided in: - Shopping Cart Development Folder. Images, videos, 3D models, and PC tester application of the 3D printed shopping cart used to test the application. - KV260 Folder. All the code developed for the KV260 divided in: shopping cart control and camera application.

Credits

Carlos Campos

Carlos Campos

4 projects • 5 followers
Computer Electronics Engineer 5 years in Electronics Manufacturing Industry 20 years Embedded & SW Eng. Founder of Custom Robotics GDL

Comments