Inspiration

We tried to solve a problem probably everyone in the room has had.

How many times have you sat through a lecture on Panopto, then caught yourself rewinding for the tenth time because you keep zoning out? Our attention spans are fried.

That's why we built the StudySlapper: to keep you and your lecture IN SYNC.

What it does

StudySlapper is a helmet with a phone on the forehead showing an auntie's live face, a servo-driven hand beside your face, and a sweet dispenser on the other side.

Laptop eye-tracking follows your head and eyes while you watch the lecture, and a small motion sensor on your writing hand tells it whether you are taking notes.

  • Looking away. If your gaze leaves the lecture for 1.5 seconds, mum shouts at you and the hand slaps your cheek.
  • Falling asleep. Eyes shut for 1.5 seconds gets the same treatment, with a different line.
  • Taking notes. Looking down at your desk is fine for as long as your hand is writing. To a webcam, writing notes and nodding off look the same, so the hand sensor is what tells them apart.
  • Pretending to take notes. If you are looking down and your hand stops moving for 2 seconds, she notices and you get slapped.
  • Staying focused. After 8 seconds of unbroken attention she looks proud and the dispenser drops a sweet.

Blinks and quick glances are ignored, and after each slap there is a 3 second pause so she can finish telling you off.

How we built it

Three processors, two wireless links, four programs in three languages.

  • Eyes (Python on the laptop). The webcam runs MediaPipe face tracking at 30 fps. We take head angle, eye direction and how shut your eyelids are, add head turn and eye turn into one "where are you looking" angle, and compare it with your own calibrated pose. It votes over the last 0.8 s so one bad frame can't slap you.
  • Hand (C++ on a XIAO nRF52840 Sense). Strapped to your writing hand, it reads its motion sensor and sends it over Bluetooth 50 times a second. The laptop turns that into "writing or not" with a threshold calibrated to your own handwriting.
  • Slap and sweets (MicroPython on a Pico 2 W). Two servos: the arm that slaps you and the dispenser. The loop never blocks, so a slow sweet never delays a slap.
  • Mum (JavaScript on the phone). Generated video clips with lip-synced lines. Her voice is the clock and every video frame is nudged to match it, so her lips stay in sync on any phone or speaker.
  • Brain (Python). A rules engine decides ten times a second and tells the phone and the Pico what to do.

Challenges we ran into

  • Asleep, reading your notes and writing all look the same to a webcam. Head down, eyelids lowered. The hand sensor splits writing from not writing. For asleep versus looking down you can teach it: close your eyes for a few seconds, look at your desk for a few seconds, and it tells them apart from your two examples.
  • Eyes or head? Head angle alone missed sneaky glances. Eye direction alone slapped people who turned their head but kept watching. Adding the two fixed both. We found the thresholds by recording what the sensors saw and reading back the moments it got wrong.
  • Phones really don't want to play sound and video on command. Autoplay locks, audio that goes to sleep and swallows a one-second line, lip sync that drifts differently on every device.
  • Generated clips don't cut together. We precompute look-alike frames between every pair of clips and measure her face in every frame, so she never jump-cuts or suddenly zooms.
  • Hardware at 3 a.m. A servo with more travel than we assumed, two boards fighting over the same serial port, and a motion sensor that won't start unless you drive its power pin hard.

Accomplishments that we're proud of

  • It knows the difference between taking notes and zoning out. That was the open question when we started.
  • It calibrates to whoever sits down in two seconds, and keeps adjusting as you slump.
  • Her lips match her voice, and the slap sound lands when the arm does.
  • The rules have tests that replay the whole demo with no hardware.
  • Everything can be faked or fired by hand, so the demo survives a dead part.

What we learned

Two cheap sensors that agree beat one clever one. Calibrating to the person beats tuning one number for everyone. Recording what the sensors saw is faster than guessing. And a phone browser was the hardest embedded platform in the project.

What's next for StudySlapper

Listening to the lecture so she knows when you should be taking notes. Eye tracking on the phone, so no laptop. And a gentler arm for three-hour lectures.

Built With

Share this project:

Updates

Submission history