n^3 (group 7) – Toy Car

Project Brief

To design and assemble a prototype of a toy that aims to teach programming. Osmo, Lego boost robotics, code & go robot mouse activity set, and the code-a-pillar are just some of a vast range of such toys that already exist in the market.

Project Goals

Purpose

To provide an engaging way to teach children basic coding principles without having to go through the hassle of learning a foreign coding language and installing a bunch of software. The 5 main elements of coding are Input, Output, Looping and Conditionals, Mathematical Operations and Variables and Data Structure. Our product teaches children most of these core elements in a fun and straightforward way that maintains their attention. It will also act as an efficient segue for them into more complex programming interfaces in the future.

Objectives

  • Ensure that it is easy to use for children
  • Maximize each child’s potential and creativity through an interactive playing experience.
  • Make the product as functional as possible
  • Ensure physical components (such as Arduino Uno) do not hinder the purpose of the product
  • A product that receives inputs and produces an output.

Target Audience

The target demographic is children aged 3 to 6, an age group that has little fine motor skills allowing them to hold objects, press buttons and utilize tools. At this age children begin to become more curious about the world around them and how certain things work. This curiosity will make them want to play with our product which will in turn develop their computational thinking skills and problem solving skills.

Market Research

1. Osmo

Coding Starter Kit

Ages: 5-12

Osmo consists of a base unit that you slot the iPad or Fire tablet in portrait mode on, and a little plastic mirror cap that fits over the camera so the iPad can ‘see’ what’s happening on the table below. This “Reflective AI technology” allows kids to play with physical items in the real world while still benefiting from the power of iPad technology.

2. Sphero Bolt – A Programmable Robot Ball

Coding Robot

Ages: 8+

Sphero Bolt is a translucent version of the robot ball (about the size of a tennis ball) that packs loads of sensors and a programmable LED matrix, but any of the Sphero models will work with the iOS or Android app – including the much cheaper Sphero Mini, or, if you can get your hands on them, the Star Wars droids including BB-8, BB-9E, and R2-D2.

3. Let’s Start Coding Code Rocket

Rocket Setup

Ages: 8+

Using a Windows, Mac or Chromebook computer, child coders can control the rocket booster LEDs and deep space headlights, have fun with the laser blasters with sound effects, Morse code light and sound messages, and start the countdown to lift-off sequence.

Conclusion

There are many products on the market that try to tackle the challenges of teaching kids the theory of code/programming in an entertaining and efficient way. However, none of them depict runtime errors. We plan to take the basic idea of a physical based programming interface and add upon it, by having the sequence stop when a collision has occurred. (This is done through sensors detecting if a wall is within range). We will also utilize blinking LEDs to provide visual feedback if an obstacle is identified.

Design Decisions

1. (3) navigation buttons [right, forward, left]

As opposed to the stereotypical 4 ones [right, forward, backward, left]. This is because the car will not be required to move backward for play, especially during the early stages of familiarizing a child with coding. Backwards is a command reserved for more complex sequences.

2. (1) RGB LED

Due to time constraints, instead of providing 2 LEDs to act as the pupils of the car, one LED will protrude from the hood of the car and act as a siren light.

3. Removal of sensors

Due to time and space constraints, the Arduino UNO does not have enough pins for all the components. Using a shift register would have required that we change the design of the car and make it abnormally large; something that the child would not be able to manage.

4. Car trunk

We decided to make a cover for the batteries to imitate the back trunk of a car: an intuitive and fun design to help the child relate the toy to real life and feel included with adult activities.

Prototypes

Low Fidelity – Detailed Sketches

Conceptual design of the car – emulates “Cars” movie toy
Top view – Level (1)
Top view – Level (2)
Side view – Both levels

High Fidelity – Technical Drawings

Isometric view (1)
Isometric view (2)
Side view
2D production diagrams

Task List & Group Member Roles

Nadia

Project Manager (Assembling, Physical Prototyping, Testing, Design Blog)

Nicolas

Lead Designer (Assembling, Coding, Physical Prototyping, Testing, Upload Blog)

Nathanael

Lead Programmer (Coding, Code Prototyping, Testing, Design Blog)

WEEK EIGHTBuild Team and Assign Roles
Decide on a Project Brief
Conduct Market Research
Meeting 1
WEEK NINEBrainstorm Ideas
Research on components needed for project ideas
Low-Fi Prototype 
Meeting 2
WEEK TENOrder components needed to build final product
Use currently available components to build a technical prototype
Code Prototype (tester)
Plan extra features
Meeting 3
WEEK ELEVENCollect components
Finish physical build
Finalize Code
Evaluate project
Final Meeting
WEEK TWELVEPRESENTATION WEEK
-Showcase product
-Complete documentation/design blog(CIO wordpress website)
Gantt Chart

Maker Manual

Components

  1. X1 GSD-329 ScrewDriver
  2. X1 Car Shell
  3. X1 L298N Dual H Bridge Stepper Motor Driver Board
  4. X4 DC 3V-6V Single Axis Gear Reducer Motor
  5. X2 RGB LED (Optional, visual indication of collision)
  6. X5 Buttons
  7. X4 Smart Robot Car Tyres Wheels For TT Gear Motor Chassis
  8. X2 Breadboard
  9. X1 Sensor
  10. X1 DollaTek 4 x AA 6V Battery Holder Case Box Wired ON/OFF Switch and Cover

Breadboard Layout

Arrangement of components

How to Build

  1. Cut out all cardboard components to prepare them and keep them on standby
  2. Solder Ground and Positive wires to all 4 motors
  3. Solder elongated to wires to buttons (make sure to connect 2 teeth protruding from the same side, and not on opposite sides)
  4. Solder elongated wires to designated RGB LED inputs (color code the wires to the inputs for intuitive understanding [ex. Red wire to red input])
  5. Connect motors to wheels
  6. Connect and screw to secure wires into designated output slots on the motor driver
  7. Connect all components as demonstrated in the breadboard layout

Testing Iterations

Short demo of performance

Shortcomings

  • Soldering is a bit weak on the motors making it easily removable/detachable. (Tape used to hold it in place)
  • Not as powerful when using a battery compared to plugged in directly, believe it’s due to the battery not providing enough power/voltage to the Arduino UNO
  • Cardboard base is weak and not strong enough to protect the arduino from children recklessness (a more sturdy recyclable material should be used/OR reinforce cardboard with paper mache)
  • Buttons used are too small for children to use.
  • Could have a display to show what the current input sequence is in case the user forgets.
  • Using a stripboard and solder parts on a breadboard may have been a more neater option.
  • Huge battery drain, possibly a voltage issue and lack of resistors for efficiency purposes a rocket switch/power switch should’ve been included.
  • Exposed wires tend to touch each other causing undesired colour changes in the LEDs. wiring could be more efficient using shorter wires and thicker soldering.

Commented Code

//Simple state check, this is for the main loop of the car combination
bool start;
 
//Storing the motor pins for forward and reverse movement
int l_motorR = 13;
int l_motorF = 12;
 
int r_motorF = 11;
int r_motorR = 10;
 
//Left
int button1Pin = A0;
//Start
int button2Pin = A1;
//Forward
int button3Pin = A2;
//Right
int button4Pin = A3;
//Reset
int button5Pin = A4;
 
//Keep track of all button states
int button1State;
int button2State;
int button3State;
int button4State;
int button5State;
 
//Rather than an array which has a fixed size it's better to use a string and loop through each character as you can add to a string at any point;
String commands;
 
//RGB LED Pins
int redPin = 5;
int greenPin = 6;
int bluePin = 3;
 
void setup() {
  // put your setup code here, to run once:
  //Setup all pins
  pinMode(l_motorR, OUTPUT);
  pinMode(l_motorF, OUTPUT);
  pinMode(r_motorF, OUTPUT);
  pinMode(r_motorR, OUTPUT);
 
  pinMode(button1Pin, INPUT);
  pinMode(button2Pin, INPUT);
  pinMode(button3Pin, INPUT);
  pinMode(button4Pin, INPUT);
  pinMode(button5Pin, INPUT);
 
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
 
  //Reset Check Vars
  start = false;
 
}
 
void loop() {
 
  // put your main code here, to run repeatedly
  //Read all button Inputs
  button1State = digitalRead(button1Pin);
  button2State = digitalRead(button2Pin);
  button3State = digitalRead(button3Pin);
  button4State = digitalRead(button4Pin);
  button5State = digitalRead(button5Pin);
 
  //Set LED to Cyan at first
  setLED(255, 0, 0);
 
  //If(Left button pressed)
  if (button1State == HIGH) {
    commands += "1";
    delay(500);
  }
 
  //if (start button pressed)
  if (button2State == HIGH) {
    start = true;
  }
 
 //if (forward button pressed)
  if (button3State == HIGH) {
    commands += "2";
    delay(500);
  }
 
   //if (right start button pressed)
  if (button4State == HIGH) {
    commands += "3";
    delay(500);
  }
 
 //if (reset button pressed)
 if (button5State == HIGH) {
    Reset();
    delay(500);
  }
 
  //Force the loop to be stuck here until the string of commands is complete
  while (start) {
    //Set Color to Green to show it is running the commands
    setLED(255, 0, 255);
   
    //for loop to go through each character of the string
    for (int i = 0; i < commands.length(); i++) {
      if (commands[i] == '1') {
        Left(3500);
      } else if (commands[i] == '2') {
        Forward(3500);
      } else if (commands[i] == '3') {
        Right(3500);
      }
    }
    //reset everything when command is completed
    Reset();
    start = false;
  }
}
 
void Reset() {
  commands = "";
  setLED(0, 255, 255);
  digitalWrite(12, LOW);
  digitalWrite(11, LOW);
  digitalWrite(10, LOW);
  digitalWrite(13, LOW);
  delay(300);
  end = false;
 
  Serial.print("Reset");
}
 
void Forward(int delayTime) {
  digitalWrite(12, LOW);
  digitalWrite(11, LOW);
  digitalWrite(13, HIGH);
  digitalWrite(10, HIGH);
  delay(delayTime);
}
 
void Left(int delayTime) {
  digitalWrite(12, LOW);
  digitalWrite(10, LOW);
  digitalWrite(11, HIGH);
  digitalWrite(13, HIGH);
  delay(delayTime);
}
 
void Right(int delayTime) {
  digitalWrite(12, HIGH);
  digitalWrite(10, HIGH);
  digitalWrite(11, LOW);
  digitalWrite(13, LOW);
  delay(delayTime);
}
 
//Set RGB Values for Light
void setLED(int red_light_value, int green_light_value, int blue_light_value) {
  analogWrite(redPin, red_light_value);
  analogWrite(bluePin, blue_light_value);
  analogWrite(greenPin, green_light_value);
}