Batmonitor » History » Version 6

« Previous - Version 6/14 (diff) - Next » - Current version
Txinto Vaz, 11/12/2014 11:27 PM


Construction of a BATmonitor

Present mini-project will develop a Battery monitor using an Arduino Uno R3 and the uCANca tools.

To build a testable circuit, we will implement a solution like this one:

http://arduino.cc/en/Tutorial/ReadAnalogVoltage

After we have played with the potentiomenter, the idea is to switch the input to monitor the battery level of a robot or toy controlled by the Arduino.

Project creation

We will create a project called BatMonitor in uCANca.

And add ourselves as team member (as contributor).

Functions specification

Add the main function of the system: Monitor the battery voltage value.

Add the secondary function of the system: Discretize battery voltage values into different battery ranges.

Add a diagnostics function on battery: Warn (and register) battery low levels.

And another diagnostic function for battery high: Warn (and register) battery high levels.

As summary:

To make the system more testable, we will introduce a function that uses the LED to inform of the current situation of the system:

Technical concept

We will use an arduino uno R3 as microcontroller containing the software. We will have a module that reads the input from the ADC and infers the voltage value (as described in F1). Another module will select the current unfiltered battery level (as described in F2). Then a time filter will be applied to select stable values of battery levels (debouncing system for F2). No hysteresis, just time filtering. After that battery level is selected, a FSM algorithm will determine if the high/low battery level failure is present (after qualifying for a certain time in the specific low/high range), or has dissapeared (as described in F3 and F4). The FSM will also save the occurrence. And finally there must be another module that will control the blinking LED (according to F5).

We can use a tool like XCos or yEd to make and understandable diagram of the desired solution technical concept.

Bat01.png View (28.5 KB) Txinto Vaz, 11/12/2014 10:45 PM

Bat02.png View (13.6 KB) Txinto Vaz, 11/12/2014 10:46 PM

Bat03.png View (4.4 KB) Txinto Vaz, 11/12/2014 10:48 PM

Bat04.png View (20.5 KB) Txinto Vaz, 11/12/2014 10:57 PM

Bat05.png View (23.3 KB) Txinto Vaz, 11/12/2014 11:01 PM

Bat06.png View (23 KB) Txinto Vaz, 11/12/2014 11:02 PM

Bat08.png View (23.1 KB) Txinto Vaz, 11/12/2014 11:07 PM

Bat07.png View (26.6 KB) Txinto Vaz, 11/12/2014 11:07 PM

Bat09.png View (62.1 KB) Txinto Vaz, 11/12/2014 11:18 PM

Bat11.png View (68.7 KB) Txinto Vaz, 11/13/2014 12:16 AM

Bat10.png View (52.3 KB) Txinto Vaz, 11/13/2014 12:19 AM

Bat12.png View (20.7 KB) Txinto Vaz, 11/13/2014 12:35 AM

Bat13.png View (3.34 KB) Txinto Vaz, 11/13/2014 12:38 AM

Bat14.png View (10.7 KB) Txinto Vaz, 11/13/2014 12:38 AM

Bat15.png View (23.2 KB) Txinto Vaz, 11/13/2014 12:38 AM

Bat16.png View (8.47 KB) Txinto Vaz, 11/13/2014 12:45 AM

Bat17.png View (9.87 KB) Txinto Vaz, 11/13/2014 12:52 AM

Bat18.png View (10.3 KB) Txinto Vaz, 11/13/2014 12:52 AM

Bat19.png View (3.9 KB) Txinto Vaz, 11/13/2014 12:55 AM