The Bogart Pentametric arrived in the mail yesterday and I connected it to a 12V power supply in my study. Connecting it was straight forward following the wiring diagram printed on the cover of the input unit. The connectors are of high quality. After applying power I hooked it to the serial port of my PC using a standard serial cable. Using the PMComm software from the Bogart Engineering web site configuring the unit was very easy. Below is a picture of the setup. In the middle in the bottom is the Pentametric input unit and serial interface connected to the Atmel Xplain board. The Xplain board is connected to an nRF24LE1 evaluation board (left) through SPI and this board sends a radio packet with the measured data every second. To the right is the nRF24LE1 receiver board showing the battery voltage, 13.8V. The battery in this setup is a laboratory type power supply.
Instructions for communicating with Pentametric via the serial interface can be found in this document: How to access data via the RS232 port from the PentaMetric battery monitor.
I will post the full source code here after it is finished but here is a preview of the “short read” command:
bool pentametric_short_read(uint8_t a, uint8_t n, uint8_t *msg)
{
uint8_t crc, i;
putchar(usart_data_, 0x81);
putchar(usart_data_, a);
putchar(usart_data_, n);
crc = 0x81 + a + n;
putchar(usart_data_, ~crc);
crc = 0;
for(i=0;i<n;i++)
{
msg[i] = getchar(usart_data_);
crc += msg[i];
}
crc += getchar(usart_data_);
if (crc != 0xff)
return false;
return true;
}



