# Design and Implementation of an Autonomous Charging Station for Agricultural Electrical Vehicles
## 3 Results
That is why when we turn the robot arm to face the AEV, an additional step is to move if below the known height of the AEV, or up again when it needs to face the wall-plug. At this point, the AEV is charging its batteries (meanwhile, the ACS can proceed to charge another vehicle if needed). It can monitor in real-time the power level, and compare it to the required level needed to pursue its field tasks (or just wait until the batteries are fully charged). In both cases, when the AEV is finished charging, it sends a websocket request to the ACS asking to unplug the power cable so it can drive out of the garage. The final sequence starts when the ACS receives a websocket message from the AEV requesting the ACS to remove the charging cable. In the case that the ACS received other charging requests, and the AEV is finished charging and asking for the charging cable to be removed, the first step for the ACS is to align to the AEV, center the gripper to the AEV reference (the fiducial marker), then proceed with removing the cable. In the case of the presented experiment, and for the sake of simplicity, there was no charging requests from other AEVs; therefore, the ACS was on standby mode while the latter was charging. Thus, the first step is to proceed again to the approach position with the gripper being open (Figure 15a). The gripper then closes and unplug the cable (Figure 15b), then the robot arm turns towards the wall-plug to initiate the next sequence to plug the cable back to the wall-plug (Figure 15c,d). Figure 14: Sequence 3: Plug the cable into the AEV. (**a**) Seq 3.1: Turn the robot arm, then move the gripper down to face the AEV. (**b**) Seq 3.2: Align the ACS to the AEV. (**c**) Seq 3.3: Align the gripper to the AEV fiducial marker. (**d**) Seq 3.4: Move the gripper to the approach point. (**e**) Seq 3.5: Plug the cable to the AEV. (**f**) Seq 3.6: Open the gripper then move back to the waiting position. The final sequence is to plug the charging cable back to the wall-plug. Similar to the first sequence, the ACS aligns first its MP to the wall-plug (Figure 15(a)), then proceeding with the centering step (Figure 15(b)), moving the gripper to the approach step (Figure 15(c)), and finally plugging the cable back to the wall-plug (Figure 15(d)). Once the final sequence is completed, the robot arm goes back to the initial pose, and the ACS goes into an idle mode waiting for a new charging request (Figure 17). Figure 16: Sequence 5: Plug the cable back into the wall-plug. (**a**) Seq 5.1: Align the MP to the wall-plug. (**b**) Seq 5.2: Align the gripper to the AEV fiducial marker. (**c**) Seq 5.3: Move the gripper to the approach point. (**d**) Seq 5.4: Plug the cable back to the wall-plug. Figure 17: The ACS is back to an idle mode waiting to receive a new charging request through websocket from another AEV. Figure 15: Sequence 4: Unplug the cable from the AEV. (**a**) Seq 4.1: Move the gripper to the approach point. (**b**) Seq 4.2: Close the gripper and move back to unplug the cable. (**c**) Seq 4.3: Turn the robot arm to face the wall-plug. (**d**) Seq 4.4: Face the wall-plug and initiate next sequence. The communication between the ACS and the AEV cannot be demonstrated using figures, however, it is possible to observe that the AEV light indicator changes between the sequences when watching the video of the whole process. The light indicator blinks red to warn that the plug/unplug process is undergoing. It changes to a blinking orange when charging, and green when charging is completed, and that the ACS is in an idle state. The successful sequences confirmed the efficiency of the implemented decision-tree-based scheme of the ACS. The experiments also showed that the proposed controllers in this paper behaved as expected when regulating the position of both the MP and the robotic arm to desired waypoints in space. The video of the experiment can be found online ([[https://youtu.be/qwU2](https://youtu.be/qwU2) TFvCi6M]([https://youtu.be/qwU2](https://youtu.be/qwU2) TFvCi6M) accessed on 1 July 2021).