Maker.io main logo

Smart Vibrational Dog Collar for Leash Training

2024-04-05 | By Lucy Camblin

License: None Vibration / Haptic Arduino ESP32

Over the course of ten weeks, I worked with a team of other engineering students in my capstone class to build an end-to-end embedded system equipped with Bluetooth, GPIO functionalities, and an external user interface. For our project, we decided to build a smart dog collar that would humanely and effectively train dogs not to pull on the leash when going on walks. Our goal was to have the collar detect the amount of force the dog was pulling with, determine if that force was strong enough to be classified as a strong pull (negative behavior), and then deliver a proportional amount of vibration to the dog to act as negative feedback. The vibration is delivered as a response to the negative behavior with the intention of correcting that negative behavior.

The most notable components used in our prototype were the following:

  • ESP32-S3 microcontroller
  • Tension and compression load cell sensor
  • Tinycircuits Vibration motors equipped with DRV2605 haptic drivers for ERM and LRA
  • HX711 weighing sensor A/D module

The load cell sensor was used to detect the force on the leash that the dog was pulling with. The output signal from the load cell sensor was connected to the HX711 module, which we used as an amplifier so that the sensor readings could be interpreted. The output signal of the HX711 module was sent as an analog input signal to the ESP32, which was programmed to process this input and determine if a vibration should be delivered to the dog. The ESP32 used I2C communication to pass the information regarding the vibrational output to the haptic drivers of the vibrational motors. Additionally, the ESP32 used Bluetooth Low Energy to advertise the individual sensor readings to a mobile application client. The mobile application served as a means for the dog owner to track the training and pull statistics of their dog over time. The flow of information in our device is summarized in the image below:

block diagram of device

The sensor, ESP32, and HX711 were housed in a 3D-printed encasement that could be fastened to a dog collar. We connected a hook to one end of the sensor so that a leash could be attached. The vibration motors were outside of the encasement and attached directly to the collar. These materials and components are shown below before any components (other than the load cell sensor) were placed in the black box.

end-to-end circuit used in project

I mostly contributed to programming the ESP32 to work with the vibration motors. We chose to use vibration motors with pre-configured haptic driver boards available from DigiKey since these were already programmed with 123 different vibration patterns. This was an alternative to using regular vibration motors and varying the voltage supplied to them to change the vibration strength delivered. The vibration motors with haptic drivers allowed us to customize different vibrational outputs for different strengths of pulls from a dog. These components were easy to program and interact with via the ESP32.

We used the preset vibration configurations on the drivers to develop three unique vibration patterns to respond to pulls that exceeded three different force thresholds. Although our initial prototype was limited in the types of pulls it responded to and the corresponding vibrations it delivered, we found that the easy calibration and customizable aspect of these vibration motors with haptic drivers would be very helpful in optimizing the vibrational response of the collar in future iterations of this device.

Our prototype after 10 weeks is shown below:

final prototype

Our initial prototype was successful in delivering varying vibrations that corresponded to varying pull strengths. These vibrations were stronger and more prominent as the pulls got stronger. For the next steps in this project, I would like to build another prototype with a greater number of vibrational outputs corresponding to different pull strength thresholds. I also think the effectiveness of this device should be tested over time to see if the current vibration patterns are enough to correct and train a dog on a leash. More testing and development is certainly necessary, but I'm very proud of the device we built in just 10 weeks!

Finally, I would like to acknowledge my team members who also contributed to this project: Diana Ochoa Mendoza, Quentin Fiessinger, and Mason Wheeler.

制造商零件编号 AST1013
LRA BOARD (LRA MOTOR SOLDERED) W
TinyCircuits
制造商零件编号 ASR00009
200MM 5-PIN WIRELING CABLE
TinyCircuits
制造商零件编号 SEN-13879
LOAD CELL AMP HX711
SparkFun Electronics
制造商零件编号 ESP32-DEVKITC-32E
ESP32-WROOM-32E 4MB FLASH
Espressif Systems
制造商零件编号 232
BATT CONNECTOR SNAP 9V 4" LEADS
Keystone Electronics
Add all DigiKey Parts to Cart
TechForum

Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.

Visit TechForum