B.O.T.C.H - Bone Operated Tracking Cyber Hound
by JonasGorges in Circuits > Arduino
117 Views, 3 Favorites, 0 Comments
B.O.T.C.H - Bone Operated Tracking Cyber Hound
The B.O.T.C.H [Bone Operated Tracking Cyber Hound] is a food motivated dog that will only show you affection if you give it its bone to chew on, and if you don't, it will leave you with a wet surprise!
It identifies if someone is in front of it and will walk towards that person. If you give it a bone it wil be friendly and give you its paw, but if you don't feed it it will be mad and mark its territory before walking back.
--------------------------------------------------------------------------------------------------
Project by:
Juan David Frank, Jonas Gorges and KaiJie Kwang
This project was conducted as part of the seminar: Computational Design and Digital Fabrication in the ITECH master's program in Summer 2024.
[Disclaimer: This project is still work in progress and is not walking yet (more information in Step 5: Problems & Troubleshooting). Use stronger servos to increase the strength of the legs, so they are strong enough to hold the robot and move it! This might also mean that you have to use more / stronger batteries in order to power the servos]
Supplies
Tools:
- 3D Printer (printing with PLA)
- Screwdriver
- Crimping Pliers (with Dupont Connectors, Crimp Pins and Socket Housings)
Nice to have:
- Digital Multimeter
- Tweezers
- Pliers
- Wire Strippers
Components:
- Arduino Uno
- Mini Breadboards (x2)
- XL6009 DC-DC Boost Converter Module (x2)
- 5V One Channel Relay Module
- LP103395 Lithium Polymer Battery 3,7V 3700mAh (x2)
- DC 3V 5V Micro Mini Submersible Water Pump
- HC-SR04 Ultrasonic Sensor
- LJ12A3-4-Z/BX Parent Inductive Proximity Sensor
- SG90 9G Micro Servos (x8)
- Jumper Wires
- PTFE Tubes for pump (diameters: 9mm, 4.9mm)
- MB102 Power Supply Module 3.3V/5V
- PCA9685 16 Channel 12 Bit PWM Servo Driver
- 10kOhm Resistors (x2)
- 9V Battery (x3)
- 9V Battery Snap Connectors (x3)
- Magnets
- #2 3/8 Micro Philips Screws (~30)
- M3 x 10 Bolts (x10)
- M3 x 16 Bolts (x4)
- M3 Nuts (x14)
- (Double sided) tape
- Belt drive (small pieces for the feet)
Movement - Inverse Kinematics
Connections:
Because the Arduino has limited PIN slots we were using an 16-channel PWM servo driver to control our servo motors. A 16-channel PWM servo driver is an electronic device that allows you to control up to 16 servos using a single multicontroller. It simplifies thte process of managing multiple servos by generating precise Pulse Width Modulation (PWM) signals for each channel. These PWM signals determine the position of each servo motor by varying the pulse duration. The driver offloads the PWM signal generation from the microcontroller, enabling it to handle other tasks more efficiently while maintaining accurate servo control. This makes it ideal for robotics, automation and other projects requiring the simultaneus control of multiple servos. In this way only 2 pins are used to control the 8 servos instead of 8 (+ the pins for the power supply of the servo driver: VCC and GND).
To supply 8 servos with enough power you need a source with 5V and alot of amperage. Therefore two 3.7V 3700mAh Lithium Polymere Batteries are used. To power the PWM servo driver with enough voltage we boost it to 5V by adjusting the screw on the DC-DC Boost Converter Module. After converting they are connected in parallel. In this way the total voltage is still 1,5V but we increase our current capacity (Ampere-hours, Ah) adds up. If the batteries run empty during testing you can recharge them with a linear battery charger IC (TP4056 USB Type-C), 5V 1A Adapter (take care, most of the Adapters are 5V 3A and don't work) and a USB-C cable.
The Arduino is powered either by connecting it to a Laptop (for testing) or by an additional 9V battery plugged into the power supply slot. The UltraSonic sensor is powered by the Arduino's 5V pin.
Inverse Kinematics:
To simplify the process of assigning the correct angles of the motors for the leg movement we used an Inverse Kinematics approach. It involves calculating the joint angles required for each of the robot's legs to achieve a desired position and orientation of its feet. This process is crucial for enabling the robot to move smoothly and maintain stability. But at this point we won't go into detail into this mathematical problems. You can find our calculations in the provided Arduino code.
Step-by-Step Wiring:
- Connect GND, SDA and SCL pins of the Arduino with GND, SDA and SCL pins of the PWM servo driver.
- Plug the servo motors in the PWM servo driver in slots 0-7. Make sure you connect the brown/ black, red and yellow cables correctly (brown/ black = Ground (GND), red = power supply (VCC), yellow/white/orange = signal). Connection logic: 0 = Front Left Hip, 1 = Front Left Knee, 2 = Front Right Hip, 3 = Front Right Knee, 4 = Back Left Hip, 5 = Back Left Knee, 6 = Back Right Hip, 7 = Back Right Knee
- Connect the LiPo batteries with the DC-DC Step up. For this step it was necessary to cut and crimp the LiPo battery wires. Make sure if you need to do so too that you ALWAYS USE FEMALE connections. A short circuit can be fatal!
- The positive and negative Outputs of the two DC-DC Step up modules are then connected in parallel (we did it with one of the mini breadboards but you can also just solder them) and the positive connected to the V+ side input of the Servo Driver. The negative to GND. Take care, the Step up modules can get very hot!
- Now connect the UltraSonic Sensor. The Vcc goes into the 5V of the Arduino (the same the PWM servo driver is connected to, so use the breadboard again). Trig is connected to Pin 4, Echo to Pin Pin 5 and Gnd to the GND of the Arduino.
- Power the Arduino either through connecting to a laptop or with a 9V battery.
Downloads
How to Pee
Connections:
The circuit for the peeing behavior of the B.O.T.C.H is powered by 2x 9V batteries. One of these can be connected to the directly to the inductive proximity sensor because it can take from 6 to 36 VDC. The inductive proximity sensor is used to detect the presence of metal objects without physical contact. It operates by generating an electromagnetic field and detecting changes in this field caused by the proximity of a metallic target within a 4mm range. This is used to detect the bone of the B.O.T.C.H which has an metallic washer implemented. To protect the Arduino from too much voltage two 10kOhm resistors are put in series in between the sensor and the Arduino.
The water pump is powered by the other 9V battery but stepped down into 5V with the MB102 power supply module. To be able to control the pump precisely, a 5V One Channel Relay Module is connected in between. This is a electromechanical switch that allows a low voltage signal to control a higher voltage circuit. It consists of an electromagnet that, when energized by the control signal, moves a contact to open or close the high voltage circuit. This provides a safe and effective way to control our pump using a low power control signal from the microcontroller/ proximity sensor. On one side it has 3 connections to control the relay: VCC (power supply), GND (ground) and IN (control signal). On the other side: COM (common) connects to one terminal of the device you want to control. NO (normally open) is open (disconnected) when the relay is inactive. When the relay is activated it connects the COM terminal, completing the circuit and powering the device. NC (normally closed) is connected to the COM terminal when the relay is inactive. When the relay is activated, the connection is broken, turning off the device.
If the proximity sensor detects the bone the B.O.T.C.H should just perform the "givePaw" movement. But if it doesn't detect the bone after 20 seconds it raises his back leg and activates the pump for a second to "pee".
Step-by-Step Wiring:
General Setup: Use a mini breadboard to distribute power from the Arduino to multiple elements by connecting the 5V and GND pins of the Arduino to one rail on the breadboard each.
Pump:
- Connect a 9V battery to the 5V step-down power supply module
- Use a bridge to connect the VCC and 5V pins on the module to set the output voltage.
- Connect the DC+ (or VCC) and DC- (or GND) from the module to the breadboard and use the rails to plug the black (negative) wire from the pump directly to NEGATIVE and the COM terminal in the relay
- Connect the NO terminal of the relay to the red(positive) wire of the pump
- Wire the IN of the relay to pin 7 on the arduino
- Connect the DC+ or VCC input of the relay module with the 5V pin of the Arduino on the breadboard
- Connect the DC- or GND of the relay module with the Arduino's GND pin on the breadboard
Inductive Sensor:
- Using the breadboard, connect the positive and negative wires coming straight from the 9V battery to two of the free rails in the breadboard.
- Bridge the negative rail to the rail with the Arduino's GND to have the same reference voltage between the sensor and the board.
- Connect one of the two 10kOhm resistors to this node and another free rail.
- From this rail, take a wire to pin 2 on the Arudino (this is the signal wire) and the other 10kOhm resistor to another free rail on the breadboard.
- Connect the brown wire from the induction sensor to the rail with the positive of the battery
- Then the black wire from the sensor to the free end of the second resistor.
- Finally take the blue wire of the sensor to the breadboard's rail sharing the GND with the Arduino
Downloads
Design and 3D Modelling
The body of the B.O.T.C.H had to be big enough to fit all components. As the 3D modelling was done alongside the assembly and testing of the electrical components, extra space was left for spontaneous changes and new components. For the important parts extra slots were implemented to hold them in place. Also the cable management had to be taken into account. For this reason, several cable openings have been inserted in the core, which also allow flexible cable positioning. The water tank and the pump were deliberately positioned below the other electrical components to minimize the rist of a water-related short circuit. Also some connective holes in the head to the body were planned to connect every component to the Arduino in the main body. The tail can be adjusted individually and attatched afterwards to compensate for the weight imbalance created by the head.
Attatched is the 3D model of the B.O.T.C.H. (Note: not all electrical components are implemented, which were added later).
Downloads
Integration of Both Systems
The integration of the two circuits for the motion apparatus and the peeing can be connected very simple. 2 breadboards are used to connect the shared GND of the Arduino and the components aswell as the 5V output pin of the Arduino. To simplify the connection process of the components you can either solder a custom PCB or use the breadboards. Also take care that your cable management is clear and you use the designed cable slits and the declared positions for your components. If you don't have cables the length you need you can crimp yourself new ones or just extend the jumper wires by connecting them together. Take care you dont create short circuits! Because all componentes are in the main core of the robot it can become chaotic very quickly so make sure you follow the Step-by-Step wiring explainations in the previous steps. Also take care that you don't accidently connect the power sources wrong because this can cause some serious damage on your components.
If you want to test the assembled robot, make sure that every power source is connected correctly and that the 5V power supply module is turned ON (LED on).
Downloads
Problems & Troubleshooting
Problems:
Like mentioned in the beginning there are still some problems that need to be solved to make the B.O.T.C.H working how it was planned.
- The Servo motors are too weak to lift the robots weight and make it move without support. To demonstrate that it would work in theory we reliefed some weight off the robot.
- The Power supply was a crucial aspect in the project. LiPo batteries seem like a good idea to provide enough current for the servos and the rest of the sensors could be powered with 9V batteries (one stepped down to 5V). If you use stronger motors you need bigger batteries
- Even when replacing the back legs with free running wheels on ball bearings the motors are too weak to move the body forward on its own
Result:
The major problem of the B.O.T.C.H are the weak servo motors. We tried everything to get it running with this SG90s but in the end there is no way around spending more money and to buy more powerful servos. In theory everything should work if you use stronger servos and if you also adjust the power supply depending on what the new servos need. The videos are just demonstrating the current state and were filmed with the help of various assistance for the robot such as reducing the weight on the legs with the help of threads. Also the alternative attempt with the wheels was not as successfull as expected.