top of page
  • Writer's pictureShiao-ya (Maggie) Huang

How to Make a TypeBot

Updated: Dec 1, 2021

designed & created by: Vamsi Grandhi & Shiao-ya (Maggie) Huang


INTRODUCTION

According to a global study nearly 6 in 10 Singaporeans aren’t sleeping well with an average of 6.8 hours per night. Going to bed early at a regular time has significant health benefits and pushing the body clock can make one feel stressed and can lead to psychological effects in one’s future. As a small step towards driving people to inculcate good sleeping habits we introduce “SleepBot” - your personal sleep reminder that reminds you to sleep by wishing goodnight to you by typing.



COMPONENTS USED

  • 1 x Arduino

  • 3 x Potentiometer

  • 3 x Servo motors

  • 1 x Breadboard

  • Jumper wires

  • Wooden popsicle sticks

  • Wooden base

  • Miscellaneous (hot glue, some wood, end effector)



DESIGN

SleepBot has a total of 3 servo motors. One of the servos is used to pan and two other servos are used for tilting and pressing the keys of the keyboard. In order to make the control of the SleepBot simple we attached the links( popsicle sticks) directly to the servo motor. To provide good stability and to avoid jerkiness motion, we designed to position the pan and tilt servo motor close to each other to the torso. Since another servo is positioned at the end link-2 that is responsible for typing, we chose to have a wide base to increase the stability of the robotic arm. The minimum length of the base is selected by the projection of center of gravity onto the base at the arm’s maximum extension.


Preliminary Design


Initial sketches used at the early stage of designing


CAD

From the design thinking considerations and our preliminary sketches, a Solidworks model was constructed to visualize the reach of the SleepBot and to aid in calibration as we would roughly know the orientation of each link to type a key on the keyboard.




PROTOTYPING

Initially, we drilled through a bunch of popsicle sticks together to attach to the motor as a revolute joint. However, due to the absence of the gear tooth pattern, the links were exhibiting slipping. In order to overcome the slipping we used the servo motor accessories to attach the motor to the links with the help of hot glue gun.

An end effector whose material hardness is just enough for typing has been attached to link-3 using hot glue.


Circuit Diagram

The following is the final circuit diagram used to make the SleepBot. Potentiometer was attached for calibrating purposes.




Calibration

The base of the SleepBot was positioned according to the CAD model by taking into consideration the distance between the base of the SleepBot and the keyboard. All the servo motors were given an input of 20 using servo.write() command and that position is taken as the home position. The links are added and the links and motors have been marked with identification marks to avoid calibrating multiple times.


Only 20 degrees to 160 degrees is used by SleepBot as that is the safe range to operate the servo. The servo was behaving strangely when trying to move less than 20 degrees or more than 160 degrees and was exhibiting some jerk. Potentiometer was used to read the servo position to debug this issue with varying delay periods so that there was enough time for the electrical pulses to simulate the motion of the gears inside the servo motor. Hence, we restricted our servo motion between 20 and 160 degrees.


See Code with Potentiometer


TYPEBOT

For wishing good night, we need to first type “g” and then “n”. Potentiometer was used to control the motion of each servo motor from 20 to 160 degrees and figured out the ideal combination of joint values to be passed to the motors to type “g” and “n”.


The following code is a preliminary code that was used:

  1. Type “g” using for loop and incorporating incremental increase in the angle with a sufficient delay to avoid any jerk

  2. Return to home position as the accuracy of the servo.read() is not accurate enough to be taken as a base value and to go to the next destination

  3. Type “n” using the similar method to that of typing “g”


See Final Code



WATCH SLEEPBOT!



References

Khim, Khoo Bee. “Nearly 6 in 10 Singaporeans Aren't Sleeping Well Because OF Covid-19, Study Confirms.” CNA Lifestyle, 19 Mar. 2021, cnalifestyle.channelnewsasia.com/wellness/sleep-tips-insomnia-singapore-philips-global- survey-237866.

Recent Posts

See All

Comentarios


bottom of page