Sensors and Buttons
hit sensor

Description

Project Blackjack interacts with users through several sensors and buttons on the mechanism.

First, we have two buttons on the base: a start button and an emergency stop button. You can see how these two are connected in the top right of our system diagram. Each of these buttons is hooked up to a 200-Ohm pull-down resistor. The buttons each have two states: off and pressed.

sensors and buttons

We have three reflectance sensors mounted onto different parts of our mechanical system that allow us to move a game along. The first of these reflectance sensors is soldered into a protoboard and mounted at the top of the slide. When a card falls down the slide, it immediately covers up the reflectance sensor so that it sends a different value to the Arduino. We detect this change in input value and know that a card has been dealt. This allows us to deal one card at a time with a very high accuracy.

The second and third reflectance sensors are soldered to protoboards that are mounted near the bottom of the slide. These reflectance sensors have a very different purpose as the players are meant to interact with them. The sensor on the right of the slide is a “hit me” sensor. That is, when a player puts their hand up to that sensor, Project Blackjack deals them another card. The sensor on the left of the slide is a “stand” sensor. When a player puts their hand up to that sensor, Project Blackjack rotates to the next player at the table and waits for input from them.

Project Blackjack is also equipped with three limit switches. There is a limit switch at the top and bottom of the card advancer and a third limit switch on the bottom of the spinning base. These allow us to better control Project Blackjack’s movement because we know when it has reached the end of where it can move. As you can see in our electrical diagram, each limit switch is connected exactly like our buttons with a 200-ohm pull-down resistor.

These sensors and buttons are all simple to set up, and the most difficult part we found was getting them all to work together. We needed to think very carefully about how to connect everything and how to wire our system inside the mountain-like center of Project Blackjack. Always plan out how your wires will connect to the necessary components without hindering other parts of the mechanism as you add complexity to the electrical system. This should be something that you always keep in mind.

Things to keep in mind

  • Plan how your wires will connect without interfering with other components
  • Keep wiring organized