Charging Station Design, Part IX

As part of the project to implement autonomous charging capability for Wall-E2, I needed a way to monitor main battery voltage in normal ‘run’ mode, in order to tell when to start searching for a charging station. The main battery is a 2-cell LiPo stack, and so has a nominal stack voltage of around 7.5-8V when fully charged. Since this is well above the Arduino Mega’s internal +5V operating voltage, I can’t measure this directly via the analog input ports. So, I installed a 1/3-2/3 resistive voltage divider between the main battery voltage input, analog input A0, and ground, as shown in the following schematic detail.

In addition, I measured the battery voltage directly using my trusty multimeter, and got 8.03V, so a pretty reasonable monitor setup.

Next up; I had previously added the 4-detector IR module to the robot, and now I needed to integrate the IR detector measurements into the telemetry stream. The battery monitor is on A0, and the 4 detectors are on A1-A5. After adding the telemetry code, I got the following printout.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

Time Batt DET1 DET2 DET3 DET4

0.208.15937935651950

0.408.01943934739952

0.607.61934935792953

0.807.90932937824955

1.008.14940940847957

1.208.04927937862956

1.407.70930939876957

1.607.70932942889959

1.808.11935940898957

2.008.06929941899959

2.207.89944943904960

Now I will add back in the left/right/forward distances, the forward variance, and the left/right wheel speeds. After adding everything back, I get the following telemetry stream: