Skip to content

Final Project

A focus-timed moveBot

I would like the final project to be related to my research area. Therefore, I aim to create a device for preventing sedentary behaviour. The idea is from an earlier project described here. For this project, I will extend what we did with additional elements, for example, a smiley face when a task is complete.

Problem description

Sustained immobility (or sedentary behaviour) is an acknowledged issue both in the modern workplace as well as in the home. Office workers oftentimes spend long periods of time sitting at their desks, and at home many activities are not so much activities but sedentary intake of entertainment (watching television or playing computer games, for example).

Concept development

The project will integrate two elements:

  1. A focus timer, based on the Pomodoro technique, and
  2. Interaction –– where the user has to move when the buzzer goes off.

Building context awareness into the device:

Activity-based trigger –– when sitting down for an hour, user gets a notication which triggers the moveBot.

After a defined period, either a timer goes off or a wearable starts to vibrate. This activates sound/music and/or blinking lights on the moveBot and in order to stop it, a set of movements (physical activity) guided by proximity sensors is required. The LED lights on the device indicate how much is to be done. Once a certain number of movements are detected, a smiley face (or some other signal) appears to indicate that the task is complete and the user can resume with their work.

Because many of the activity trackers on offer have alerts that can easily be dismissed, the moveBot should, at the very least, get the user up and moving.

Core functions:

  • A trigger and some level of interactivity:

    • Schedule…
    • Confirm…
    • Create (reload)…
  • Push notifcations with options:

    • Act (vibrate, flicker, move)
    • Snooze
    • Skip

Final project requirements

As outlined in Project development, some of the features originally envisioned for the device have not been implemented. I had planned to make a human-size bot and considered different design options which integrate servos and either stepper or dc motor, but settled on sticking with just the servo motors.

Presentation

Video

Video link

What does it do?

The LEDs activate and can be stopped by the IR LEDS. Later, this will be integrated with servos.

Who’s done what beforehand?

Examples of somewhat related projects are provided in application and implications.

What did you design?

I designed the head, arms, body and enclosure for the electronics (bottom of the bot) in Fusion 360. As I got the dimensions wrong, I also had to 3D print additional support material and eyes for the bot. All the STL files are included at the bottom .

I also made a tabbed box recently in Inkscape with an opening to hold the bot and a logo for the project in Computer-aided design.

What materials and components were used?

  • ABS for the moveBot
  • RGB LED strip
  • IR LEDs
  • Servo motors
  • ATMEGA 328P microcontroller

Where did they come from?

Most of the components came from Fab Inventory. The LED strip I got from Perttu.

How much did they cost?

In Application and implications, I had given an estimate of the total costs, but as I could not implement everything, the total cost has reduced.

Bill of materials
PartValueQuantityPrice
PIN HEADER FOR BUZZERPINHD-2X2-SMD1~€0.70
PIN HEADERS FOR IR PROXIMITY SENSORSPINHD-2X2-SMD6~€5
PIN HEADERS CONNECTING THE IR BOARD TO THE MAIN BOARDPINHD-2X5-SMD2~€2
PIN HEADERS FOR SERVOSPINHD-2X3-SMD2€1.50
PIN HEADER FOR NEOPIXELSPINHD-2X3-SMD1€0.60
PIN HEADER FOR POWER SUPPLYPINHD-2X2-SMD1~€0.70
AVRISP PROGRAMMING HEADERAVRISPSMD1~1
RESISTORSDIFEERENT VALUES~10~€0.10
REGULATOR1€0.50
RESONATOR20 MHz1€0.50
CAPACITORSDIFFERENT VALUES~4~€0.80
SMD LEDSLEDFAB12062~€0.20
MICROCONTROLLERATMEGA328P-AU1~€3
SERVO MOTORS2~€16
FTDI HEADER1~€3
IR PROXIMITY SENSORS AND DIODES6~€5
BUZZER1~€1
M/M and F/F Jumper Wires~10~€1
Total~€44

Additional costs to the above were for:

  • the power supply - €10 and
  • 3D printing material

What parts and systems were made?

  • The parts (eyes, head, arms, body, and bottom) of the moveBot were 3D printed.
  • A logo was vinyl cut.
  • A rectangle acrylic enclosure for the body was laser-cut and sandblasted.
  • The main PCB board and the IR sensor board which was done in Output devices.

What processes were used?

  • 2D and 3D design of the logo and the parts of the moveBot.
  • Computer-controlled cutting - Laser-cutting acrylic and Vinyl cutting a logo to attach to the acrylic for sandblasting in Wildcard week.
  • 3D printing the parts of the moveBot.
  • Electronics design and production for the main PCB board.

    • Update (20.6.19): With Ivan’s help (20.6.19), we tried to solve the problem with the IR proximity sensors and the servos. Turns out (another problem again!) I used the wrong regulator. From the data sheet: “The [LM3480 is a linear voltage regulator with 1.2-V ensured maximum dropout and 100-mA ensured minimum load current”. I used the 5-V 100mA version that didn’t generate enough current to drive the servo motors. Antti suggested I make a separate smaller board for power supply with additional capacitance to be able to drive the servo motors and power up the LEDs. On this board, I used the ZLDO1117 a low dropout positive adjustable or fixed-mode regulator with 1A output. This smaller board will then be connected to the main board with connectors. The GND pins to GND pins in the main board, the data in to the data in pins for the servos and the LED strip, the input voltage pin of the smaller board to the input voltage of the main board and then powering it up.

    • (21.6.19): After connecting the two boards and powering it up, the servos still did not work and we couldn’t find a solution. I will continue working on this over the weekend and next week to figure out the problem.

    • Note: I have included the sketch for controlling the servos and LEDs below and will update it once I get all the components working together. Below I outline controlling a NeoPixel strip with IR LED.

Power supply board design

Fabricated supply board

  • Embedded programming - Before Atmega microcontrollers can be programmed with the Arduino IDE, they need to be added to the Boards Manager of the Arduino as it was done for the ATtiny in Embedded programming. I went to this address and followed the instructions for adding the URL to the Boards manager list of the Arduino.

After installation, I burnt the bootloader to configure the fuse bits of the microcontroller and tested the program for controlling servos from Output devices, to ensure that everything was ok.

With the IR proximity sensors, there is an IR LED and a photo diode pair that transmit and receive light. The IR LED (Transmitter) emits IR light which gets reflected at the object, the reflected light is then received by the IR receiver (Photo Diode). The reason they were not working is that the Diodes were not receiving any light. By changing the diode in one of the pairs, we got it to work. We tested the signal with an O-scope by attaching the probes to GND on the IR board and the analog pin PC2 (Pin 2 on ATMEGA) which corresponds to pin 16 on the Arduino and we could see the variation when an object was moved closer and further away from the LEDs.

(21.06.19): As I couldn’t get the servos to work, we decided it was better to focus on at least getting the IR sensors to work with the NeoPixels. Following the example for testing a NeoPixel strip, I downloaded the code to test the NeoPixel and it was working. Then with Ivan’s help, I modified the code to be able to turn on and off the pixels.

In the code, the time it takes the LEDs to turn on after start up or after being stopped, the threshold value of the strip (the digital value needed for the IR LEDs to operate well), and when to turn on an off is defined. The colour values for the blinking LEDs are also defined. The file is included at the end and this will be integrated with the servo control once all components are working.

Code Sample

In the video below, when I bring my hand closer to the IR LEDs the NeoPixel strip turns off and when I move it away they start blinking after 5 seconds (TIMEINTERVAL in the code).

Video of the test

The input (IR LEDs) is working, the output (the NeoPixel strip) is working and they both work together.

More details of the design process and the schematic design for the IR sensors and main board PCBs are outlined in Output devices and Project development. The processes for additive and substractive techniques were also covered in computer-controlled cutting and 3D scanning and printing. For designing parts of the moveBot and other smaller pieces for laser cutting, these techniques were used.

Assembly

After finishing the above processes and ensuring both the main board and the IR board were working, I assembled the 3D printed parts with the electronics. When designing parts of the moveBot, I forgot (problem when you work late at night at times) to round the edges which are now pointed. They can be smoothened by filing, but this doesn’t leave the best result. I also got the dimensions for the different parts wrong hence the need for the additional support described above and had to file the edges of the enclosure for it to fit into the body. I assembled the different parts without messing and it wasn’t pretty, but it works (so far at least).

What questions were answered?

The overall structure of the device. It was not the human-size model originally planned as this is just the initial MVP. Plus, I wanted to make something light and portable that could be easily carried around if needed. The current design is also not the final one. If I continue with the same later, will add joints that are movable and maybe attach LEDs to different parts of the device rather than just the one strip inside as it is currently. So far, how to control Neo

License

In Invention, intellectual property and income, I chose the Attribution-ShareAlike license, which lets others remix, tweak, and build upon the work even for commercial purposes, as long as they credit the creator and license their new creations under the identical terms.

Files