Home > Projects > Other Projects > LazyMax 1000: Arduino Phototransistor and Haptics Project

LazyMax 1000: Arduino Phototransistor and Haptics Project

Summary of LazyMax 1000: Arduino Phototransistor and Haptics Project


This article describes an Arduino-based project designed to prevent sedentary behavior by alerting users to stand up after sitting for over 10 minutes. The device uses a phototransistor to detect when someone is seated (blocking light) and activates a haptic motor via an ATtiny44 controller to provide silent feedback. The project involves milling electronics with Modella, programming the microcontroller, and 3D printing the casing using an Ultimaker.

Parts used in the Chair Reminder Project:

  • NPN plcc 2 phototransistor
  • ATtiny44 controller
  • 20MHz crystal
  • 10K resistor
  • 6 pin (3×2) header 2nos
  • 1uF SMD capacitor
  • 9V battery and clip
  • Haptic motor

The idea for this Arduino phototransistor project came to me based on an idea that was shared by one of my friends at the FabLab. He talked about how his lab only has stools for people to sit on. Being very uncomfortable, the person succumbs to the discomfort and stands up to move around. In our case, we had very comfortable rolling chairs for sitting and reclining, which can get you lazy and even sleepy real quick.

Arduino Phototransistor and Haptics Project

In this project, I wanted to solve that problem by creating a sleek gadget which when plugged into our chairs, will prompt the user to get up if they are sitting continuously for more than 10 mins. It does this by using a haptic feedback motor, and it will only notify the person sitting on the chair, instead of disturbing others around him (if I were to use other means like sounds/lights).

This Arduino phototransistor project consists of three stages:

  • Preparing the electronics with the help of Modella
  • Programming
  • Designing and printing it using the Ultimaker

How Does it Work?

How Does it Work

The NPN phototransistor signals the ATtiny44 when there is no light (this is the case when a person is sitting on the chair). After which the controller starts a timer. If the timer exceeds 10 minutes, then it immediately activates the haptic motor, which prompts the user to get up.

Required Materials

  1. NPN plcc 2 phototransistor
  2. ATtiny44 controller (Arduino works too)
  3. 20MHz crystal
  4. 10K resistor
  5. 6 pin (3×2) header 2nos
  6. 1uF SMD capacitor
  7. 9V battery and clip
  8. Haptic motor

Electronics and Programming

I used this tutorial to learn about phototransistors. The NPN phototransistor will be used with a floating base and the emitter connected to ground. The collector needs to be pulled up to Vcc through a resistor (I am doing this with the internal pull-up resistor). When the phototransistor detects light (the collector and emitter are shorted) it outputs a logic LOW voltage and a logic HIGH voltage when there is no light. The configuration:

trans

I started off by using my HelloWorld board milled from the Modella and de soldering the button from it. I then attached the phototransistor to ATtiny pin no: 7. I found out that the notch in the package of the phototransistor represents the collector terminal. I learned this from the VEMT3700F NPN Transistor datasheet (PDF). Another resource worth checking out is the TT Electronics Optek Technology resource guide. You can also just use an Arduino board and connect the phototransistor to the Arduino’s digital pin 7 and use the same code shown below.

Read More:  Arduino Phototransistor and Haptics Project

Quick Solutions to Questions related to Chair Reminder Project:

  • How does the system detect if a person is sitting?
    The NPN phototransistor signals the controller when there is no light, which occurs when a person sits on the chair.
  • What happens if the timer exceeds 10 minutes?
    The controller immediately activates the haptic motor to prompt the user to get up.
  • Can I use an Arduino board instead of the ATtiny44?
    Yes, you can use an Arduino board and connect the phototransistor to digital pin 7 using the same code.
  • How is the haptic motor configured in the circuit?
    The haptic motor is activated by the controller only when the timer exceeds 10 minutes to notify the sitter.
  • What are the three main stages of this project?
    The stages are preparing the electronics with Modella, programming the controller, and designing and printing the case with an Ultimaker.
  • Why was a haptic motor chosen over sound or lights?
    A haptic motor was chosen to notify only the person sitting without disturbing others around them.
  • Which terminal represents the collector on the phototransistor package?
    The notch in the package of the phototransistor represents the collector terminal.
  • What voltage level does the phototransistor output when it detects light?
    When detecting light, the phototransistor outputs a logic LOW voltage.
  • Where should the emitter of the phototransistor be connected?
    The emitter should be connected to ground while the base remains floating.
  • What tutorial resource helped explain the phototransistor usage?
    The author used a specific tutorial to learn about phototransistors and their configuration.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top