Go Down

Topic: Can Audrino Collect Data Ouput from 2 Devices and Show it LCD Display? (Read 5102 times) previous topic - next topic

wildbill

By the look of it, that modbus protocol is a request and respond protocol i.e. your arduino will need to ask the device for data. Given that and the slow 9600 baud rate, I would expect that an uno can handle it easily. Further, if you're displaying data on an LCD, you won't want it changing particularly frequently or the users won't be able to read it.

SolarDude


By the look of it, that modbus protocol is a request and respond protocol i.e. your arduino will need to ask the device for data. Given that and the slow 9600 baud rate, I would expect that an uno can handle it easily. Further, if you're displaying data on an LCD, you won't want it changing particularly frequently or the users won't be able to read it.


I was thinking that the data had to be requested via Modbus to get the data sent back so its good that we can only request that data that I want displayed.

The other device (Victron Battery Monitor) outputs data via a TTL.

?The serial port is accessed via the 4-pin header located on the rear of the BMV.

Pin Function #1 3.3 - #2 BMV-TX - #3 BMV-RX - #4 GND

The signals on the BMV serial link are non-isolated 3.3V logic levels.

Can the Audrino accept serial data output directly from these 4 pins that output data via TTL?

Message format
The BMV transmits blocks of statistics in 1 second intervals. Each statistic uses the following format:
<Newline><Label><Tab><Value>

The identifiers are defined as follows:

Identifier Meaning

<Newline> A carriage return followed by a line feed (0x0D, 0x0A).
<Label> An arbitrary length label that identifies the statistic. Where applicable, this will be
the same as the label that is used on the LCD.
<Tab> A horizontal tab (0x09).
<Value> The ASCII formatted value of this statistic. The number of characters transmitted
depends on the magnitude and sign of the value.

Data integrity

The statistics items are grouped in blocks with a checksum appended. The last statistic in a block will
always have the label "Checksum". The value of this statistic is a single byte, and will not necessarily
be a printable ASCII character. The modulo 256 sum of all bytes in a block will equal 0 if there were
no transmission errors. Multiple blocks are sent containing different statics.

SolarDude


I suspect before buying hardware, you should write a program on your PC that can read two serial lines and displays the data you want in a format that would be similar to the LCD you plan on using.  Write this in C or C++ and not higher level languages like perl/python/etc.  This will tell you if it is doable.  After that, I would buy an UNO, and see if it can handle the flow.  If it does, you can then look at custom PCB parts using an AVR chip so you can get the cost down for the finished product.

If the UNO can't keep up, you probably need to step up to an arm.  I tend to think the tweeny 3.0 which has multiple UARTs might keep up with really fast streams, and it has hardware floating point.  Hardware serial ports tend to support signalling when they are ready to read data, so it is less likely you might have dropped data, which is important if the device just sends a full status report every minute or so.  Obviously if there is a command to send just the data you are interested in rather than a summary of the entire machine state, that can speed things up.

There are many other ARM solutions, but you would probably need to carefully read the data sheet of the particular ARM chip involved.  Even so, the most power reduced ARM is probably an order of magnitude faster than the AVR.  Again, like with the UNO, you might start with a more expensive development kit, and then once you have a proof of concept, refine the design so it is cheaper and easier to manufacturer.


Yes initially the larger Uno boards are fine but I would like to keep this as small as possible since alot of the systems I build have very little room inside the case for extra parts.

Currently I do not need high quantity so just building them as needed is fine for now so I do not anticipate ever designing a special board just for this task. The Digispark looks killer but the Tweeny 3 looks great also, either would work I just prefer the smallest solution possible.

No I just have to figure out if I can use simple wires from the equipments data output port to the regular serial input ports on the Audrino without the need of any additional adapters. If so then all I need is to pay a software person to do all that which I have no clue how to do. I just know what I want to end up with once its all working.

Thanks again for the help!

Go Up