Back to Course Work
ENGINEER 1P13 • Design Project 1 December 2025

Automated Warehouse
Ordering System

A comprehensive Python-based system combining secure user authentication, robotic arm automation for product picking and packing, barcode scanning integration, and intelligent order processing with dynamic discounts.

Python Q-Arm Robotics bcrypt Security CSV Data Management Barcode Scanner
550+ Lines of Code
5 Team Members
6 Product Types

Project Overview

For Design Project 1, our team was challenged to build a working warehouse ordering system that could run the full order process using both software and robotics.

Working as part of Team Tues-52, we developed a Python program that handles everything from user sign-up/login and barcode scanning to triggering the Q-Arm to pick and pack items, and then generating a receipt and saving the order.

The main challenge was making all the parts work together reliably, since we had to connect authentication, scanning, robotic motion, and data tracking into one smooth, user-friendly system.

🎯

Project Objective

Design and implement an automated warehouse system that demonstrates real integration between programming, robotics, basic security, and user experience.

Key Features

🔐

Secure Authentication

Industry-standard password security using bcrypt hashing. The system enforces strong password requirements: uppercase, lowercase, digits, special characters, and minimum length.

bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt())
🦾

Q-Arm Robotic Automation

Physical product handling using the Q-Arm robotic system. Custom movement functions for each product type enable precise picking and packing operations.

arm.rotate_gripper() → arm.set_arm_position() → pack()
📊

Smart Order Processing

Dynamic pricing with random discounts (5-50%), automatic tax calculation (13%), and professional receipt generation with colored terminal output.

discount = random.randint(5, 50) # Dynamic savings!
📦

Barcode Integration

Real-time product scanning with validation against the product database. Handles errors gracefully and filters invalid products automatically.

scanned = scan_barcode() # Hardware integration

System Architecture

👤 User Login
📷 Scan Products
🔍 Validate Items
🤖 Robot Packing
🧾 Generate Receipt

My Contribution

Administrator & Design Lead

As the team Administrator, I took on a leadership role managing project deliverables and ensuring our team stayed on track. My contributions included:

  • Project Management & Administration: Submitted all team deliverables, maintained deadline awareness, and ensured seamless coordination across all project phases
  • GANTT Chart Development: Created and managed comprehensive project GANTT chart to coordinate team activities and track milestones
  • CAD Design & Prototyping: Developed multiple CAD design iterations of possible prototypes, helped with 3D printing, and refined physical prototypes through multiple design cycles
  • Software Development: Developed the complete_order() function, implementing dynamic discount generation (5-50%), tax calculations (13% HST), professional receipt formatting with ANSI color codes, and transaction logging to a CSV database
  • Technical Documentation: Authored significant portions of the final design report, including result of combined solution, refinements for future iterations, and technical specifications
  • Team Leadership: Kept the team in sync across coding, prototyping, and the report, and helped solve issues when things didn’t fit together.

As the Administrator, I handled deadlines and submissions, but I also stayed hands-on with the technical work. I helped with the design, prototyping, and coding while keeping the team organized and on track.

Team Tues-52

SS

Shayan Siddiqui

Administrator

Led project administration by managing all team deliverables, creating the GANTT chart, and coordinating deadlines. Designed multiple CAD prototypes and led 3D printing iterations. Developed the complete_order() function handling transaction processing, dynamic discounts, tax calculations, and receipt generation. Contributed significantly to final report documentation and technical writing.

SW

Shuja Wazir

Subject Matter Expert

Built source materials database and ensured reliable research documentation. Developed sign_up() function with password validation and bcrypt hashing.

JD

Jennifer Desbarats

Coordinator

Coordinated team meetings, maintained logbook of discussions, and completed all TEAM worksheets during Design Studio. Implemented authenticate() function for secure login verification.

KD

Kian Diggle

Manager

Facilitated team discourse, managed conflict resolution, and served as Lead Facilitator with instructional team. Created Preliminary GANTT Chart. Developed lookup_products() function for scanning validation and filtering.

HA

Habibah Aboueleinin

Subject Matter Expert

Built source materials database and ensured reliable research documentation. Created customer_summary() function for order history reporting.

Personal Reflection

"This project was my first real experience combining software with physical hardware, and it completely changed how I think about building systems that interact with the real world."

🎓 What I Learned

Working on this warehouse system taught me way more than just Python. It showed me that the software only works if the hardware is actually feasible and consistent. Our code could be “right,” but if the gripper angle was slightly off, the material was too slippery, or the timing didn’t match the Q-Arm’s movement, the pickup would still fail. So troubleshooting meant looking at the whole setup: approach angle, object position, friction on the pads, servo strength, and speed. A lot of the fixes weren’t just in the code either. They came from testing small changes, adjusting the mechanism, and retuning movements until it worked reliably. The biggest lesson though was time management. With tight deadlines and limited studio time, we had to plan tests, split tasks properly, and make decisions fast, because even a good design doesn’t matter if you don’t have enough time to build, test, and refine it.

🤝 Teamwork Experience

Coordinating with four other team members meant we had to communicate clearly and stay organized, especially since we were balancing the robot, the mechanism, testing, and the final report all at the same time. Having clear responsibilities and keeping everyone updated made a big difference, because one delay in one area could slow down everything else.

Regular check-ins helped us catch issues early and adjust our plan before they became last-minute problems. It also helped us manage time better during the week, so we could use Design Studio time for testing and refining instead of scrambling to figure out what was missing.

💡 Challenges & Solutions

One of the biggest challenges was making the mechanism work reliably with real objects, not just in theory. Our first rack-and-pinion design had strong gripping potential, but we ran into a feasibility issue because of how the Q-Arm approaches the objects. It could not move in perfectly flat, so we redesigned the gripper arms to sit at a downward angle and measured the angle using a protractor so the arms stayed perpendicular to the floor during pickup. We also found that the 3D-printed parts were too smooth, so objects slipped. To fix that, we added sponge pads so the gripper could form around different shapes and grip with more friction. This made pickups more consistent and reduced damage to the objects.

On the system side, we had to make sure everything still worked under time pressure and real-world constraints. The Q-Arm code took trial and error because we had to tune joint angles so the gripper landed in the right spot consistently, and we even had to adjust our program during demo prep when we were assigned a different Q-Arm and the servo behaved differently. For the ordering process, we also added basic checks so the system did not break during use, like ignoring invalid scans, handling empty orders, and making sure totals and receipts still made sense. Overall, the main solution was staying realistic, testing early, and managing time properly so we always had something reliable to demonstrate.

🚀 Future Applications

The skills I developed in this project will be useful in future courses and co-op roles because they go beyond just coding. I got experience working with hardware constraints, adding basic security features, and making sure different parts of a system can work together reliably.

I also got a lot better at working in a team, especially with splitting responsibilities, communicating progress, and combining work under tight deadlines. Overall, I’m more confident handling projects that involve integrated systems, and this project made it clear that planning and documentation are just as important as the build itself when multiple people depend on each other’s work.

Media & Gallery

Visual documentation of our design process and prototype iterations

Q-Arm Demonstration Video

Q-Arm robotic system picking and packing products (1.5X speed recommended)

Prototype Iterations

CAD Drawings & Engineering Documentation

CAD Model

Exploded View Drawing

Dimensioned Engineering Drawings

Design Process Timeline

1

Problem Definition

Week 1

Analyzed project requirements and identified key system components: authentication, product management, robotics integration, and order processing.

2

System Architecture

Week 2

Designed system flow and divided responsibilities. Established data formats and function interfaces for seamless integration.

3

Individual Development

Week 3-4

Each team member developed their assigned functions. I focused on the complete_order() function for transaction processing and receipt generation.

4

Integration & Testing

Week 5

Combined all modules and tested end-to-end functionality with Q-Arm hardware. Resolved data format mismatches and timing issues.

5

Refinement

Week 6

Added error handling, improved UI with ANSI colors, and completed documentation with comprehensive docstrings.

Final Submission

December 3, 2025

Successfully delivered a fully functional warehouse system with all features working as designed.

Code Highlights

def complete_order(userid, product_list):
    """
    Shayan Siddiqui
    
    Totals an order, applies a random discount, calculates tax,
    prints a professional receipt, and writes the order to orders.csv.
    """

    # Subtotal
    subtotal = 0
    for i in range(len(product_list)):
        price = product_list[i][1]  # product_list[i][1] is the product price
        subtotal += price
    
    # Random discount tax and final total
    discount_percent = random.randint(5, 50)  # random discount between 5 and 50%
    discount_amount = subtotal * (discount_percent / 100)
    subtotal_after_discount = subtotal - discount_amount
    
    # calculates the tax
    tax_rate = 0.13
    final_total = subtotal_after_discount * (1 + tax_rate)
    
    # Count how many orders already exist
    file = open("orders.csv", "r")
    number_of_orders = 0
    for line in file:
        parts = line.split(",")
        if parts[0] == userid:
            number_of_orders += 1
    file.close()

    # Writting the new order to orders.csv
    file = open("orders.csv", "a")
    
    # build the CSV line
    csv_line = userid + "," + f"{final_total:.2f}"
    
    for i in range(len(product_list)):
        product_name = product_list[i][0]
        csv_line = csv_line + "," + product_name

    file.write(csv_line + "\n")
    file.close()

    # Professional recipt
    print("\033[1;36m\n============== YOUR ORDER RECEIPT ================\033[0m")
    print(f"Customer: {userid}")
    print("--------------------------------------------------")
    print("Items Purchased:")

    for i in range(len(product_list)):
        name = product_list[i][0]
        price = product_list[i][1]
        print(f"  - {name:20}                   ${price:6.2f}")

    print("--------------------------------------------------")
    print(f"Subtotal:                                  ${subtotal:6.2f}")
    print(f"Discount ({discount_percent}%):            -${discount_amount:6.2f}")
    print(f"Subtotal After Discount:                   ${subtotal_after_discount:6.2f}")
    print(f"Tax (13%):                                 ${tax_rate*subtotal_after_discount:6.2f}")
    print("==================================================")
    print(f"\033[1mFINAL TOTAL:                               ${final_total:6.2f}\033[0m")
    print("==================================================")

    # Order message
    print(f"\nYou have now made {number_of_orders + 1} orders so far.\n")

    return
def pack():
    """
    This function closes the gripper and grabs the object, 
    it then moves the object to the packaging station 
    and returns home
    """
    arm.rotate_gripper(-90)
    sleep(1)
    arm.rotate_gripper(30)
    arm.rotate_gripper(-90)
    sleep(1)
    arm.rotate_gripper(30)
    arm.rotate_gripper(-90)
    sleep(1)
    arm.rotate_gripper(30)
    arm.rotate_gripper(-90)
    sleep(1)
    arm.rotate_shoulder(-30)
    arm.home()
    arm.set_arm_position(DEPOSIT_POSITION)
    arm.rotate_gripper(360)  # Release object
    arm.home()
# Hash password securely during sign-up
hash = bcrypt.hashpw(
    password.encode('utf-8'),
    bcrypt.gensalt()
).decode('utf8')

# Write to users.csv
file = open("users.csv", mode='a')
file.write("\n" + userid + "," + hash)
file.close()

# Verify password on login (Jennifer Desbarats)
if bcrypt.checkpw(
    password.encode('utf-8'), 
    stored_hash.encode('utf-8')
):
    print("\033[1;32mLogin successful!\033[0m")
    logged_in = True
else:
    print("\033[1;31mIncorrect password. Try again.\033[0m\n")
def lookup_products(products):
    """
    Kian Diggle
    Look up products filters the scanned list of items. 
    It catches errors like duplicate items and compares 
    scanned products with accepted items.
    """
    file = open("products.csv")
    csv_contents = []  # list of accepted items
    total_contents = []  # list of filtered contents
    
    for line in file:
        line_list = line.strip().split(",")
        line_list[1] = float(line_list[1])  # convert price to float
        csv_contents.append(line_list)
    file.close()
    
    for i in range(len(products)):
        found_product = False
        for j in range(len(csv_contents) - 1):
            if products[i] == csv_contents[j][0]:
                total_contents.append(csv_contents[j])
                found_product = True
        if found_product == False:
            print("Warning: Product not found")
    
    return total_contents
def customer_summary(userid):
    """
    Habibah Aboueleinin
    Customer summary summarises all orders completed by the customer.
    It prints a professional receipt and keeps track of total orders.
    """
    filename = 'orders.csv'
    total_orders = 0
    total_spent = 0
    product_counts = {}
    
    # Read each order from CSV
    with open(filename, 'r') as file:
        reader = csv.reader(file)
        for row in reader:
            if len(row) >= 2 and row[0] == userid:
                total_orders += 1
                total_spent += float(row[1])
                for product in row[2:]:
                    if product not in product_counts:
                        product_counts[product] = 0
                    product_counts[product] += 1
    
    # Print formatted summary with ANSI colors
    print(f"\033[1;36m{'=' * 50}\033[0m")
    print(f"\033[1;36m{'CUSTOMER ORDER SUMMARY':^50}\033[0m")
    print(f"\033[1;36m{'=' * 50}\033[0m")
    print(f"\033[1m{'User ID:':<20}\033[0m {userid:>29}")
    print(f"\033[1m{'Total Orders:':<20}\033[0m {total_orders:>29}")
    print(f"\033[1m{'Total Spent:':<20}\033[0m{f'${total_spent:,.2f}':>30}")

Skills Developed

💻 Technical Skills

Python Programming Advanced

Strengthened proficiency in Python including file I/O, functions, loops, string formatting, and working with external libraries like bcrypt.

Robotics & Hardware Integration Intermediate

Learned to control Q-Arm movements, understand coordinate systems, and synchronize software timing with physical operations.

Security Implementation Foundational

Implemented industry-standard password hashing with bcrypt and learned principles of secure authentication systems.

Data Management Intermediate

Worked with CSV files for persistent storage, implementing proper read/write operations and data validation.

🧠 Professional Skills

Team Collaboration Strong

Coordinated with 5 team members, divided tasks effectively, and integrated individual components into a cohesive system.

Problem Solving Strong

Developed debugging skills and learned to break complex problems into smaller, testable components.

Project Management Improved

Balanced project deadlines with coursework while ensuring quality deliverables and thorough testing.