We designed a wirelessly controlled, battery operated robot which detects metal with principles of electromagnetic induction.
There was a separate circuit for a remote controller and the robot itself. A pair of JDY-40 radios, connected via UART, enabled data transmission to and from the robot. This was comprised of subcircuitry, particularly Octocouplers and H-bridges, to drive vehicular movement.
We have detailed how the robot and controller achieve the desired system functionality in this following Architecture Diagram. This was done through deterministic acquisition, transmission, and handling of data with both the electrical and firmware design.
The controller was programmed to transmit movement coordinates to the robot. The robot was programmed to transmit a calculated inductance corresponding to the amount of detected metal.
Notice how UART RX were implemented through the main
program and are synchronous tasks. We designed the UART TX to be implemented asynchronously via ISR. There was a transmission delay of 200 ms implemented from both microcontrollers. This enabled the JDY-40 to transmit and receive data at a rate which kept data accuracy and response at an acceptable threshold.
We validated this with end-to-end testing on the actual robot with a human user (i.e. somebody other than the firmware owner for the system component).
We logged transmitted and received data to the Serial Port and analyzed data accuracy as well as latency with the coordinate_logger.py
and inductance_logger.py
Python scripts.
From the following data, we determined that the number of samples between data transmission was within a very small range, resulting in improved control and user feedback. The data accuracy was also consistently observed to be high with input variation.
The remote controller circuitry consisted of an STM32 microcontroller with ADC joystick inputs, as well as visual/auditory feedback on an LCD display and speaker.
Note that the joystick was designed to have the ability to switch between movement sensitivity, similar to a video game controller. This was implemented via GPIO toggle buttons. There was also a software enabled passcode used to unlock the controller.
The speaker was programmed to emit sounds of different frequencies for user feedback (i.e. similar to musical notes). We also transmitted a z coordinate in addition to x,y movement coordinates to enable additional robot functionality.
The controller firmware source code can be found in the Controller
directory.
The Makefile
was used to compile the C source files, link the .o
object files and flash the main.hex
executable onto the STM32 (ARM Cortex M0 family) microcontroller.
The robot circuitry was used to generate Pulse-Width Modulation (PWM) signals and drive the wheels for movement. A Colpitts Oscillator circuit was used to measure the period of a looped coil, and determine the equivalent inductance to detect magnetic material property.
The received z coordinate was used to implement an auto-parking feature in which a single command enabled the robot to conduct a front parking without user assistance into a designated spot.
The robot firmware source code can be found in the Robot
directory.
The Makefile
was used to compile the C source files, link the .o
object files and flash the main.hex
executable onto the EFM8 (8051 family) microcontroller.
We have uploaded our Final Demo on Youtube.
We have also attached our Project Report for detailed analysis of our engineered solution.
This was completed as part of the ELEC 291 - Design Studio project course in the The University of British Columbia Electrical and Computer Engineering undergraduate program. We received tremendous support and guidance from Dr. Jesus Calvino-Fraga.