kamesh rajYou JieIsaacxriffAn Zhi
Published © GPL3+

Q-Bot

We aim to build a robot that is effective in sanitizing surfaces without putting cleaners in harm's way.

AdvancedFull instructions providedOver 2 days499
Q-Bot

Things used in this project

Hardware components

M5Stack FIRE IoT Development Kit (PSRAM 2.0)
M5Stack FIRE IoT Development Kit (PSRAM 2.0)
×2
M5Stack I2C Hub 1 to 6 Expansion Unit- PA HUB
×1
M5Stack 1 to 3 HUB Expansion Unit - GROOVE Hub
×1
M5Stack Time-of-Flight Distance Ranging Sensor Unit - TOF
×1
M5Stack RGB LED Unit
×1
M5Stack Unbuckled Grove Cable 1m/2m/50cm/20cm/10cm
×1
M5Stack Servo Kit 360° LEGO-compatible
×1
M5Stack Grove - Servo
×1

Software apps and online services

M5Stack Ui Flow
Fritzing
Fusion 360
Autodesk Fusion 360
M5Stack M5 Burner
M5Stack Library
M5Stack CP2104 Driver
Creately
Google App Maker

Hand tools and fabrication machines

Hot glue gun (generic)
Hot glue gun (generic)
Multitool, Screwdriver
Multitool, Screwdriver
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Tape, Electrical
Tape, Electrical
Scissor, Electrician
Scissor, Electrician
Tape, Duct
Tape, Duct
Foam board
Spray bottle

Story

Read more

Custom parts and enclosures

CAD Diagram

This is the CAD File of the Q-bot. This file can be used for 3d printing the enclosure of the bot or it can be used for reference for your own product. (M5 stack cad is not included)

Use Fusion 360 to view the CAD

Schematics

Q-Bot Main Flow chart

Main Flowchart for the servo of the Q-bot

Q-Bot Secondary M5(For TOF M5Stack)

To allow the Q-bot to sense if a person is in front and alarm the person that the bot is in cleaning mode

Block Diagram

Block Diagram for the Q-Bot

Circuit Diagram

The link to open it in fritzing

Circuit Image

This is the image of how the circuit looks like in fritzing

Circuit Diagram (legend)

This is the legend for the Circuit diagram

Qr Code (APP)

This is the QR Code for the app that can be used for the robot (Note: only for android users)

Code

Project Q-Bot for servo (1).m5f

MicroPython
M5Stack for it to allow the thing to move around
from m5stack import *
from m5ui import *
from uiflow import *
import machine
import time
import unit
import machine
remoteInit()
setScreenColor(0x222222)
servo0 = unit.get(unit.SERVO, unit.PORTA)
rgb0 = unit.get(unit.RGB, unit.PORTB)


i = None




def upRange(start, stop, step):
  while start <= stop:
    yield start
    start += abs(step)


def _remote_GO():
  global i, servo0, rgb0 
  rgb.setColorAll(0x009900)
  rgb0.setColorAll(0x006600)
  rgb.setBrightness(100)
  for i in upRange(1, 13.5, 3):
    PWM0.duty(i)
    wait(1)
  PWM0.duty(3)

def _remote_STOP():
  global i, servo0, rgb0 
  rgb.setColorAll(0xff0000)
  rgb0.setColorAll(0xff0000)
  rgb.setBrightness(100)
  PWM0.duty(2)
  wait(1)

lcd.qrcode('http://flow-remote.m5stack.com/?remote=undefined', 72, 32, 176)
PWM0 = machine.PWM(22, freq=50, duty=3, timer=0)
rgb.setColorAll(0xffff00)
rgb0.setColorAll(0xffcc00)
rgb.setBrightness(100)
speaker.sing(831, 1)
wait_ms(50)
speaker.sing(831, 1)

Project Q-Bot for TOF (2)

MicroPython
A code for the TOF sensor to identify is someone is in front of them and sound the alarm if there is someone
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unit

setScreenColor(0xffffff)
tof0 = unit.get(unit.TOF, unit.PAHUB5)





label0 = M5TextBox(74, 15, "ToF Example", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label1 = M5TextBox(14, 90, "Distance: ", lcd.FONT_DejaVu24, 0xFFFFFF, rotate=0)
label2 = M5TextBox(164, 95, "0", lcd.FONT_DejaVu18, 0xFFFFFF, rotate=0)
image0 = M5Img(27, 20, "res/download.jpg", True)
label3 = M5TextBox(236, 95, "mm", lcd.FONT_DejaVu18, 0xFFFFFF, rotate=0)
label = M5TextBox(87, 224, ".", lcd.FONT_Default, 0x1a1919, rotate=0)
image1 = M5Img(34, 20, "res/angryff.jpg", True)


while True:
  label2.setText(str(tof0.distance))
  wait(0.1)
  if (tof0.distance) < 200:
    speaker.tone(600, 200)
    rgb.setColorAll(0xff0000)
    image0.hide()
    image1.show()
  else:
    rgb.setColorAll(0x33ff33)
    image0.show()
  wait_ms(2)

Credits

kamesh raj

kamesh raj

1 project • 0 followers
You Jie

You Jie

1 project • 0 followers
Isaac

Isaac

1 project • 0 followers
xriff

xriff

1 project • 0 followers
An Zhi

An Zhi

10 projects • 5 followers

Comments