4

What is the best and most reliable way to detect if a book is pulled out of a book case?

I have a book case which I want to mount sensors to so that I can detect when certain books are pulled out, I don't need to know how much, all I need is a boolean trigger if the book has been pulled out 2+ cm or so (works with lower too). I would preferably also want to know when they have been replaced but that is just a bonus.

The goal of the project is to move a servo which may or may not open a secret door when 3 books are pulled out in a certain order.

The sensors need to be able to work continuously 24/7 for years.

Here is a masterfully drawn picture to explain it even better.

enter image description here

So far I have been thinking of mechanical switches, Ultrasonic Sensor (HC-SR04), or possibly some sort of infrared light and sensor that can detect a change in intensity (where a lower intensity is book being pulled out).

The mechanical switch I could easily do, but I would prefer something that is less obvious, and less "clicky" when it's triggered. I don't want to give away that there is something special with a book if someone picks it up on accident.

Any ideas on how it can be done? Would love tips for specific components as I'm not native to the arduino world and have a hard time finding exactly what I'm looking for.

JensB
  • 151
  • 3

4 Answers4

3

As Majenko stated in the comments, an easy and discrete way would be using IR proximity sensors behind each book. The IR light from them is invisible to the eye, they are easy to read with an Arduino and often the casing of the IR LED and IR sensor are black, so that you could easily hide them in a black backplate of your book case.

The IR sensor will output one pin state (HIGH or LOW depending on the sensor), when something (the book) is near it (on most sensor modules you can change to threshold to your liking), and the other, if nothing is near it (empty place in the book case)

Searching "ir proximity sensor" at amazon gives multiple good looking results for ready to use sensor boards.


Another - more hacky - way would be to build your own switches at the top of the book case. As a switch is nothing more than 2 electrical contacts with some mechanic suroundings, you could add a small piece of cardboard above each book, which falls down a bit, when the book is removed, but not enough, that it is easily spotted (a few millimeters should be enough). At the top of the case and on the cardboard piece you put some piece of tinfoil or aluminum tape. When the book is put in the box, the tinfoil pieces get pressed together by the book, thus make contact. Wire one piece to ground, the other to an Arduino pin.

I find the IR sensor solution better, but I wanted to include a solution, where you don't need to buy extra sensor modules.

chrisl
  • 16,622
  • 2
  • 18
  • 27
1

If you want the book and shelf to look normal, then use tiny magnets in the books and either reed switches or hall magnetic sensors embedded in the bookshelf. You can even discriminate two books by minding the magnet's polarity.

dandavis
  • 1,037
  • 9
  • 12
0

I assume all these solutions need to know exactly what book is where (positioned).

A solution could be a long LED strip (or other light) above the books, and at the bottom a strip of photo resistors (LDR), placed at every 2 cm. Place this photo resistors far enough backwards to cover the end of the shortest book (unless you do never change the order of the books you can place them exactly at the width of the book minus a cm or so).

Michel Keijzers
  • 13,014
  • 7
  • 41
  • 58
0

Why not use RFID tags and sensor. You can do an inventory any time you want. The RFID tags are inexpensive and the sensor is not that much and available for the Arduino. Nothing shows if you put the tag in the spine of the book.

Gil
  • 1,863
  • 9
  • 17