Author Topic: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards  (Read 44720 times)

0 Members and 1 Guest are viewing this topic.

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
After I fried my "scope" - an external USB sound card (fleabay USD 10  ;D) -  modified with DC coupled buffer and level shifter, I was happy I didn't kill the laptop.

I am going to buy a scope, so no more sound cards. But I started to think about opto couplers, battery powering and isolating power supplies and what not for other test and measurement stuff I have that goes into USB.


While I searched the web I found this. It is called Linduino One (Linear Technology "Arduino UNO" ?):




and:

" ... it comes with a LTM2884 uModule that provides full USB isolation ... "
Source: http://www.linear.com/blog/79

"An LTM2884 USB Isolator breaks the ground connection to the PC, allowing projects to operate at a different ground potential than the computer that is controlling it."
Source: http://www.linear.com/blog/b15

It is meant to serve as an intermediate between LT's Demo / Evaluation Boards and a PC:

"This board features a 14-pin “QuikEval” connector that can be plugged into nearly 100 daughter boards for various Linear Technology parts, including Analog to Digital converters, Digital to Analog Converters, high-voltage power monitors, temperature measurement devices, RF synthesizers, battery stack monitors, and more."

But it is also an Arduino clone and can do everything an Arduino can.

The schematic for the board is here: http://cds.linear.com/docs/en/demo-board-manual/dc2026afa.pdf

I will study this and see if I can find a DIY solution for my Arduinos (Yes, I do like them and do use them - my first experience with computers was FORTRAN Punch Cards on a VAC in the early 1970's - and Arduino is much simpler  :D).

Edit: Title.


« Last Edit: October 19, 2013, 04:24:47 am by quantumvolt »
 

Offline Richard_Fry

  • Contributor
  • Posts: 12
  • Country: au
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #1 on: October 07, 2013, 08:20:27 am »
For anything I've made at home and for products at work, I always connected them to a PC through a USB hub - so there's a less change of the motherboard getting fried from having VBUS connected to D+ etc.
We found out the hard way at work when having to connected all units built to a PC to upgrade firmware and one had 'developed a fault'.
After blowing up 1 PC and then plugging the faulty unit into another PC 'just to make sure' it got figured out!

On the main subject, the Linduino looks quite good.
I've got one of the Demo 590B boards somewhere, but that just connects to LT software for measuring performance etc.
It has opto isolation in the data connections I think, so that schematic may prove interesting reading too.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #2 on: October 07, 2013, 09:40:31 am »
Yes, I guess I won't do real-time measurements on the USB port anymore  :-[

I have studied the DC590B board a bit (http://www.linear.com/demo/DC590B). It has a PIC. LT does not give the code for the PC GUI. But the Linduino emulates DC590B in addition to being an Arduino clone. And there is open code. Maybe they have libraries that are not with code. I haven't checked yet.

The isolation is cool. I can find no data on it yet, but may be it is similar to ADuM3160 and ADuM4160. I really have not checked anything yet. And I am new to this floating relative USB ground stuff. Only knew about optocouplers.

But I am working on getting my latest (will be # 7  >:D) Arduino from LT. Hope I get lucky ...
 

Offline Linduino

  • Contributor
  • Posts: 12
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #3 on: October 18, 2013, 05:26:52 pm »
Hey guys!

Just wanted to say thank you for the interest in Linduino. If you have any questions or comments please do let me know.

Also, just wanted to point out that our library has been updated. We also have an automatic installer that will download our suggested Arduino IDE and point it to the correct library installation, however due to the way the IDE handles library locations this will redirect any existing IDE installs. If you know what you're doing, and it sounds like you guys do, just download the library and stick it in the right folder.

We're planning on keeping all of the library components open source, and we planning on adding to the parts that it supports.

Thanks for taking a look at our stuff and please let me know if there's anything I can do to help.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #4 on: October 18, 2013, 09:56:27 pm »
Hi Linduino - and if you are a LT representative - welcome.

I have kindly been given a Linduino board after asking LT in an email, but I haven't got it yet. But I have been looking a bit at the code. Even if the code is written for dedicated use with the LT demo boards, the code is a well of resources since it obviously (at least parts of it) has been written by a trained professional programmer.

Most code on the web for Arduino is nothing but helpless dumb junk. The Linduino libraries is a very welcome gift of decent more advanced code.

I have already in principle "hacked" the parts of the code that "locks" the QuikEval GUI (LT only gives an .exe-file - you MUST have a LT board connected to make it run) by looking for the USB connected board and it's EEPROM signature. I guess LT is OK with this, since the whole idea with Arduino is openness and reuse.

So I will - after some testing - be able to use the code and GUI software on my own bread-/vero DIY-boards with SPI and I2C. Nothing wrong with the LT demo boards, it is just that either you have to pay (sometimes big) dollars for them or be someone in a company or similar in order to get them.

The gate into QuikEval ( ;D)  (Source: LT Sketchbook from http://www.linear.com/designtools/linduino.php)

Code: [Select]
 

  quikeval_I2C_init();                    //! Initializes Linduino I2C port.

  quikeval_SPI_init();                    //! Configures the SPI port for 4Mhz SCK
  quikeval_SPI_connect();                 //! Connects SPI to QuikEval port

  Serial.begin(115200);                   //! Initializes the serial port to the PC
  print_title();                          //! Displays the title

  demo_board_connected = discover_demo_board(demo_name); //! Checks if correct demo board is connected.

  if (demo_board_connected)               //! Prints the prompt if the correct demo board is connected
  {
    print_prompt(0);                      // Prints prompt and indicates that "A" is selected.
  }
 

Offline Linduino

  • Contributor
  • Posts: 12
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #5 on: October 18, 2013, 11:17:35 pm »
Well actually if you want to "hack" your boards to work with the QuikEval suite. You can do that with the Linduino.

If you look at the code under Sketchbook->utilities->DC590B

Look for this line:
Code: [Select]
     case 'I':
      // get controller id string
      quikeval_SPI_connect();   // Connect SPI to main data port
      psuedo_reset = 0;
      byte_count = read_quikeval_id_string(&ui_buffer[0]);
      if (byte_count!=0)
      {
        Serial.print(ui_buffer);
        Serial.print('\0');
        Serial.flush();
      }
      break;




If you have it return the right string, then QuikEval will actually pull up the correct demo module. If you send me an email at linduino@linear.com I can help you figure out what the string is.

« Last Edit: October 18, 2013, 11:21:48 pm by Linduino »
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #6 on: October 18, 2013, 11:28:38 pm »
Just wanted to say thank you for the interest in Linduino. If you have any questions or comments please do let me know.

A couple of things from me,

Where can you buy them and at what price?  Google just returns nothing useful.

The LTM2884 uModule, what's the story with that part?  No datasheet available?
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #7 on: October 18, 2013, 11:52:03 pm »
Well actually if you want to "hack" your boards to work with the QuikEval suite. You can do that with the Linduino.

If you look at the code under Sketchbook->utilities->DC590B

Look for this line:
Code: [Select]
     case 'I':
      // get controller id string
      quikeval_SPI_connect();   // Connect SPI to main data port
      psuedo_reset = 0;
      byte_count = read_quikeval_id_string(&ui_buffer[0]);
      if (byte_count!=0)
      {
        Serial.print(ui_buffer);
        Serial.print('\0');
        Serial.flush();
      }
      break;




If you have it return the right string, then QuikEval will actually pull up the correct demo module. If you send me an email at linduino@linear.com I can help you figure out what the string is.

Thanks. But no need for questions yet. I have already done it. I have found that the simplest starting point for DIY boards is the DAC board DC1333. Of course it would be nice to have an official board, but as LT publishes parts list (a few dollars in total parts cost), schematics and PCB layout I guess it is OK to DIY-it.

So now anyone with an Arduino (if they cannot get their hands on a Linduino) can build quite a few of the LT Demo Boards themselves and use the Linduino code and the QuikEval GUI Test software at a very low cost.

The EEPROM is as you say totally unnecessary for the function of the boards - it just returns a string so that the QuikEval software knows which board is running. This string is just a single line in the Linduino code.

I even see that LT has had to bang the string themselves since there seems to be 4 different refs with the DC1333A DAC board (I have modified the code with info from the LT website). When I have a working emulator for this board (which has an extensive menu), I will make some kind of tutorial. Great fun  :D

Code: [Select]
void setup()
// Setup the program
{
  quikeval_SPI_init();                  // Configure the spi port for 4Mhz SCK
  quikeval_SPI_connect();   // Connect SPI to main data port
  quikeval_I2C_init();                            // Configure the EEPROM I2C port for 100khz
  Serial.begin(115200);                         // Initialize the serial port to the PC
  print_title();
  demo_board_connected = discover_demo_board(demo_name);
  if (demo_board_connected)
  {
    // The DC1333A does not have the option indicated in the demo board name
    // Uses product name for the option
   
    //quantumvolt begin
    //LTC2640-LZ12: 12-Bit SPI DAC (2.5V ref, Reset to Zero-Scale), req DC590
    //LTC2640-HZ12: 12-Bit SPI DAC (4.096V ref, Reset to Zero-Scale), req DC590
    //LTC2640-LM12: 12-Bit SPI DAC (2.5V ref, Reset to Mid-Scale), req DC590
    //LTC2640-HM12: 12-Bit SPI DAC (4.096V ref, Reset to Mid-Scale), req DC590
    //quantumvolt end
   
    if (strlen(strstr(demo_board.product_name, "-LM")) > 1)
      demo_board.option = 'A';
    if (strlen(strstr(demo_board.product_name, "-LZ")) > 1)
      demo_board.option = 'B';
    if (strlen(strstr(demo_board.product_name, "-HM")) > 1)
      demo_board.option = 'C';
    if (strlen(strstr(demo_board.product_name, "-HZ")) > 1)
      demo_board.option = 'D';
    initialize_dac();
    restore_calibration();
    print_prompt();
  }
}
 

Offline Linduino

  • Contributor
  • Posts: 12
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #8 on: October 18, 2013, 11:56:16 pm »
Just wanted to say thank you for the interest in Linduino. If you have any questions or comments please do let me know.

A couple of things from me,

Where can you buy them and at what price?  Google just returns nothing useful.

The LTM2884 uModule, what's the story with that part?  No datasheet available?


1) It can be purchased by emailing linduino@linear.com. I believe the official price is $75. We wanted to price ourselves out of the range of being a direct competitor to Arduino. Basically, we wanted people to buy our demo board only if they really really needed that isolation.
The whole point of this project was to provide source code to everyone, an Arduino clone just happened to be the easiest hardware base we could build on.
Usually you can buy it from here: www.linear.com/purchase/DC2026A?
but for whatever reason our website seems to not show it right now.

2) LTM2884, it's actually not released yet. It's a USB isolator, and unfortunately because the datasheet isn't available I can't tell you too much else about it. I know it's handwavy, and I HATE being handwavy but until it's officially released that's the best I can do.
 

Offline Linduino

  • Contributor
  • Posts: 12
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #9 on: October 19, 2013, 12:01:55 am »

So now anyone with an Arduino (if they cannot get their hands on a Linduino) can build quite a few of the LT Demo Boards themselves and use the Linduino code and the QuikEval GUI Test software at a very low cost.


That's the goal of this whole Linduino program. Actually the goal was to make it as portable as possible, you don't even need an Arduino. If you're a die hard PIC user, you'd just have to rewrite the LT_I2C or LT_SPI (depending on the protocol you use) libraries and you should be off to the races.

Our goal here was to make it as easy as possible to use our parts.

What's REALLY cool in my book, is if you go to the part pages of our parts, we now have example code. For example: http://www.linear.com/product/ltc1867#code

So if you just want source code reference, you don't even need to download our entire library. It's all available on the LTC parts page. Sorry if I'm rambling, I'm actually really excited about this part of Linduino. I am an Apps Engineer at LTC and the thing is, I've gotten so many questions from small startups or hobbyists about example code. The problem is we just don't have the bandwidth to help a lot of the little guys and Linduino lets us try and help out the people who need it the most.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for DAQ Demo Boards etc.
« Reply #10 on: October 19, 2013, 02:44:09 am »
Well actually if you want to "hack" your boards to work with the QuikEval suite. You can do that with the Linduino.

If you look at the code under Sketchbook->utilities->DC590B

Look for this line:
Code: [Select]
     case 'I':
      // get controller id string
      quikeval_SPI_connect();   // Connect SPI to main data port
      psuedo_reset = 0;
      byte_count = read_quikeval_id_string(&ui_buffer[0]);
      if (byte_count!=0)
      {
        Serial.print(ui_buffer);
        Serial.print('\0');
        Serial.flush();
      }
      break;




If you have it return the right string, then QuikEval will actually pull up the correct demo module. If you send me an email at linduino@linear.com I can help you figure out what the string is.

Very nice well documented code. I have it running on an ordinary Arduino in less than an hour.

However - it seems that the place to change the code is in QuikEval_EEPROM.cpp. Here are the changes I have made:

Code: [Select]
uint8_t read_quikeval_id_string(char *buffer)
{
  uint8_t i, j;                // Iteration variables
  uint8_t comma_position[8];  // Contains the position of the commas in the buffer
  uint8_t comma_count = 0;      // The number of commas found in the buffer
  uint8_t buffer_count;       // The number of characters read
  int8_t option;              // Temporary demo board option
  // read the id string from the demo board EEPROM
  // starting EEPROM address=0, terminator=0x0a, max buffer length=52 bytes
  // Enable I2C

/* quantumvolt commented out
  pinMode(QUIKEVAL_MUX_MODE_PIN, OUTPUT);   // Configure MUX to disconnect I2C pins on QuikEval connector. Remember EEPROM has its own I2C pins on the the

connector.
  int8_t QUIKEVAL_MUX_MODE_PIN_state;
  QUIKEVAL_MUX_MODE_PIN_state=digitalRead(QUIKEVAL_MUX_MODE_PIN);
  digitalWrite(QUIKEVAL_MUX_MODE_PIN, LOW);
  buffer_count = eeprom_read_buffer_with_terminator(EEPROM_I2C_ADDRESS, buffer, 0, QUIKEVAL_ID_TERMINATOR, QUIKEVAL_ID_SIZE+2);
  digitalWrite(QUIKEVAL_MUX_MODE_PIN, QUIKEVAL_MUX_MODE_PIN_state);  // Restore the QUIKEVAL_MUX_MODE_PIN (8) to its previous state.  (But, it will be left

as output.)
*/

/* quantumvolt
The QuikEval ID string has the following 50 byte format :
@verbatim
LTCxxxx,cls,Dxxxx,xx,yy,DC,DCxxxx--------------,\n\0
Example: LTC2309,Cls,D1859,01,01,DC,DC1337A-A,------------\n\0
@endverbatim
*/

// quantumvolt begin
buffer_count= 52;
buffer= "LTC2309,Cls,D1859,01,01,DC,DC1337A-A,------------\n\0";
// quantumvolt end

  if (buffer_count == 0) return(0);   // quit if no data read
  // find comma positions
  for (i = 0; i < buffer_count; i++)
  {
    if (buffer[i] == ',') comma_position[comma_count++]=i;
  }
  // get product name. All characters before the 1st comma.
  for (i = 0; i < comma_position[0]; i++)
  {
    demo_board.product_name[i]=buffer[i];
  }
  demo_board.product_name[i]='\0';  // add terminator
  // Get demo board name between the 5th and 6th comma
  j = 0;
  if (comma_position[6] < comma_position[5]) comma_position[6]=strlen(buffer);  // some demo boards are missing the last comma
  for (i = comma_position[5]+1; i < comma_position[6]; i++)
  {
    demo_board.name[j++]=buffer[i];
  }

  demo_board.name[j]='\0';  // add terminator
  // get demo board option from the demo board name
  for (i = 0; i < strlen(demo_board.name); i++)
  {
    if (demo_board.name[i] == '-') option = demo_board.name[i+1];
  }
  if ((option >= 0x41) && (option <= 0x5A)) demo_board.option = option;
  // final demo board name is 6 characters without the option
  demo_board.name[6]='\0';
  return(buffer_count);
}


When run on an ordinary Arduino Uno this returns in the serial monitor:


*****************************************************************
* DC1333 Demonstration Program                                  *
*                                                               *
* This program demonstrates how to send data to the LTC2640     *
* 12-bit DAC found on the DC1333 demo board.                    *
*                                                               *
* Set the baud rate to 115200 and select the newline terminator.*
*                                                               *
*****************************************************************
Demo board DC1333 not found,
found DC1337 instead.
Connect the correct demo board, then press the reset button.


So this means that the code for DC1333 finds the hard coded signature for the DC1337 board.

Maybe you could publish the code signature for LTC2400. I want to try to run the LTC2400 DVM shield from this thread  https://www.eevblog.com/forum/projects/ppmgeek!-5-5-digit-dvm-volt-ref-cal-%28for-arduino-or-any-uc-w-spi%29/ on the QuikEval software.

Thanks.
« Last Edit: October 19, 2013, 03:46:32 am by quantumvolt »
 

Offline Linduino

  • Contributor
  • Posts: 12
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #11 on: October 19, 2013, 02:51:10 pm »
I'll get you this on Monday :)

Can you do me a favor and send me an email at Linduino@linear.com to remind me please?
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #12 on: October 20, 2013, 05:06:01 am »
I'll get you this on Monday :)

Can you do me a favor and send me an email at Linduino@linear.com to remind me please?

No need, thanks - it is easy to find by looking at other hard coded names, the 'comma rule' (explained in the code) or reading the EEPROM by using the 'Serial EEPROM Test' code in the LTSketchbook.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #13 on: October 20, 2013, 05:41:42 am »
For those who might not understand my enthusiasm for the Linduino and the LTSketchbook code library, I will try to explain. First of all it should be obvious that if a large chip maker uses Arduino as a platform for more than 100 demo boards, one might expect many benefits both in software and hardware for the Arduino user group. Afterall, most users of Arduino have very little knowledge and resources to add to the platform or to C++ coding for the Atmega family.

Secondly, LTC has PC software of high class and usability. One very versatile program is the QuikEval GUI test program http://www.linear.com/designtools/software/#QE1 for demo boards. It detects via the computer USB port which of those more than 100 demo boards that is hooked up, and changes user interface and functions accordingly.


The connection chain is: 

PC w. QuikEval         <-- USB cable --       

                                                           DC590B w. PIC and firmware      <-- Ribbon cable --     

                                                                                                                                            Any demo board w. EEPROM signature



The interface board that goes directly into the computer USB port is called DC590B http://www.linear.com/demo/DC590B. The DC590B has a connector to which you can connect any demo board via a flat cable. DC590B then reads the EEPROM on the demo board and tells QuikEval that a demo board is connected AND which board it is. Hence QuikEval brings up the right user interface for the demo board.


This video (from a Japanese 'volt-nut'?) shows the the 3 parts - in this case QuickEval on the PC, the big DC590B board and the small DC573B demo board for the LTC2400 24 bit ADC http://www.linear.com/demo/dc573a.




 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #14 on: October 20, 2013, 06:26:55 am »
So what's the big deal?

LTC has produced the Linduino board as a platform for their newly developed C++ code that goes with their ICs. The Linduino is said to be 'Arduino-compatible'.

The Linduino can replace the DC590B interface board as the go-in-between the QuikEval PC GUI and the actual demo board for a an IC. So my thought was that if Linduino is Arduino-compatible and Linduino is able to interface QuikEval on one side and the more than 100 demo boards on the other side - well, then an Arduino with the LTC code should be able to do the same.

But alas, IMO it does not work. Linduino is - I am sure - Arduino-compatible, but I am just as sure that Arduino is not Linduino-compatible.

LTC has put a multiplexer chip on the Linduino board and - if I am not totally mistaken - the Linduino code multiplex - as well as switch between software / hardware - SPI and/or I2C. This I cannot see how should easily be done on an Arduino.

[EDIT: I have ordered the Fairchild MUX from England (fast shipping), and will try to make a MUX breakout for an Arduino Uno and then test the code again.]

So at least all code from LTC that starts like this (with a call to "quikeval_SPI_connect()"), will IMO not run on an Arduino. I might be wrong and am willing to withdraw all I say. But not before someone prove me wrong ...

Code: [Select]

void setup()
// Setup the program
{
  digitalWrite(QUIKEVAL_GPIO, LOW);
  digitalWrite(QUIKEVAL_CS, HIGH);
  digitalWrite(2, LOW);
  digitalWrite(3, LOW);
  digitalWrite(4, LOW);
  digitalWrite(5, LOW);
  digitalWrite(6, LOW);
  digitalWrite(7, LOW);
  pinMode(QUIKEVAL_GPIO, OUTPUT);
  pinMode(QUIKEVAL_CS, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);

  Serial.begin(115200);          // enable the serial port for 115200 baud

  quikeval_SPI_init();
  quikeval_SPI_connect();   // Connect SPI to main data port

quantumvolt comment (2 lines)
// Won't work for an ordinary Arduino ... because
// (File LT_SPI.cpp / void quikeval_SPI_connect())
// Connect SPI pins to QuikEval connector through the Linduino MUX. This will disconnect I2C.

  quikeval_I2C_init();           // Configure the EEPROM I2C port for 100khz SCK




Even the code for the part (not a demo board, just a part/component/integrated circuit) LTC2607 http://www.linear.com/product/LTC2607#code that is presented as an '.ino'-file (not a '.cpp' -file), starts with:

Code: [Select]

//! Initialize Linduino
void setup()
// Setup the Program
{
  char demo_name[] = "DC934";             // Demo Board Name stored in QuikEval EEPROM
 
  output_high(LTC2422_CS);                //! Pulls LTC2442 Chip Select High
 
  quikeval_I2C_init();                    //! Initializes Linduino I2C port.
 
  quikeval_SPI_init();                    //! Configures the SPI port for 4MHz SCK
  quikeval_SPI_connect();                 //! Connects SPI to QuikEval port
 
  Serial.begin(115200);                   //! Initializes the serial port to the PC
  print_title();                          //! Displays the title
 


and can IMO not be used to initialize an Arduino.

I hope LTC answers and prove me wrong. On the other hand - no one from LTC has AFAIK said that you actually CAN USE a generic Arduino board in stead of the Linduino. It might be that I am the only one who thought so because the Linduino is presented as 'Arduino-compatible'.

And I would still like to have a Linduino board - especially because of its galvanic isolation of the USB port.
« Last Edit: October 20, 2013, 07:43:22 am by quantumvolt »
 

Offline Linduino

  • Contributor
  • Posts: 12
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #15 on: October 20, 2013, 10:43:52 pm »
Hey there!

So the mux is there to basically read from the EEPROM. That's the only real purpose of that part on our board.

So, you can get by without all that setup code if you simply spoof the readback from the EEPROM. Then your non LTC Arduino is ready to go.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #16 on: October 20, 2013, 11:51:55 pm »
Thanks. But the role of the MUX/EEPROM is IMO quite necessary if one wants to use QuikEval - it stores calibration constants / function modes etc.

So in the choice of chopping the code or beat Linduino by emulating it's hardware, I have found that the last solution is the the smartest.

The FSA2257MUX is a Dual SPDT Switch with low on resistance. I will try to build one from 2 x CD4051 on an Arduino shield. If it doesn't work - well - I have ordered the real part from fleabay UK (will be here in a week).

I am sure I will succeed - I just got me a surprise when I realized how intimately the code is linked to the non-Arduino hardware.

The more I think about it - the more sure I am. If LTC wants to have the LTSketchbook library spread out in the Arduino community, LTC should (since the Linduino is quite expensive and really is a superset of the Arduino board) make a shield with the MUX and a few regulators and LEDs and sell it almost for nothing. Then you really makes it easy to run QuikEval on purchased or DIY demo boards. The exotic 24LC05 EEPROM can be replaced by anything I2C based (almost free from Chinese fleabay sellers).

Just my 2 pennies. I will succeed anyway by making one myself  :-DMM
« Last Edit: October 20, 2013, 11:56:07 pm by quantumvolt »
 

Offline Linduino

  • Contributor
  • Posts: 12
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #17 on: October 21, 2013, 04:19:33 am »
Pardon me, but are all Quikeval calibration values are stored on the PC and not on the EEPROM.

I will have to double check this to make sure of this tomorrow but I'm 99% positive of this.

However what does get stored would be the calibration routines within the Arduino sketch for the ADC. Is this what you're talking about? We're viewing the Linduino and Quikeval as 2 separate entities internally.

 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #18 on: October 21, 2013, 05:00:27 am »
Nah, I may be wrong. I'll check it later. If menu choices from the sketches are saved, then it will be on the EEPROM (as you say - no PC involved).

Anyway, I am getting pretty sure that one has to find hammer and saw anyway. Pin 4 on the demo board - SPI SCK - is connected to nowhere on the Linduino but 5 V (R10 4.99 k) and the MUX (pin4). So no money (MUX), no love (DATA)  :-//
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #19 on: October 21, 2013, 07:50:57 am »
Well, I am on my way. I am now reading the 24LS05 EEPROM on the DC573A LTC2400 demo board via I2C.



Since the board DC934A with an I2C DAC and an SPI ADC is a very nice board  ^-^, I have decided I will go for full hardware compability (in order to get data transfer I2C, data transfer SPI and dedicated I2C for the EEPROM all at the same time). I therefore decicate one of my many Chinese fleabay Arduino Uno clones to make a Linduino backpack.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #20 on: October 21, 2013, 10:10:43 am »


 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #21 on: October 21, 2013, 06:56:04 pm »
Hey there!

So the mux is there to basically read from the EEPROM. That's the only real purpose of that part on our board.

So, you can get by without all that setup code if you simply spoof the readback from the EEPROM. Then your non LTC Arduino is ready to go.

I have now worked intensely with the LTSketchbook library, and I really like most of it. The code has high quality and is obviously being worked with and updated at LTC.I found a link to code that is only a few days old:

Code: [Select]

....

http://www.linear.com/product/LTC2309

http://www.linear.com/product/LTC2309#demoboards

REVISION HISTORY
$Revision: 2045 $
$Date: 2013-10-17 11:45:52 -0700 (Thu, 17 Oct 2013) $

Copyright (c) 2013, Linear Technology Corp.(LTC)
All rights reserved.

....

*/

//! @defgroup LTC2309 LTC2309: 8-channel, 12-Bit SAR ADC with I2C interface

/*! @file
    @ingroup LTC2309
    Library for LTC2309: 8-channel, 12-Bit SAR ADC with I2C interface
*/

#include <Arduino.h>
#include <stdint.h>
#include "Linduino.h"
#include "LT_I2C.h"
#include "LTC2309.h"
#include <Wire.h>

// Commands
// Construct a channel / uni/bipolar by bitwise ORing one choice from the channel configuration
// and one choice from the command.

// Example - read channel 3 single-ended
// adc_command = LTC2309_CH3 | LTC2309_UNIPOLAR_MODE;

// Example - read voltage between channels 5 and 4 with 4 as positive polarity and in bipolar mode.
// adc_command = LTC2309_P4_N5 | LTC2309_BIPOLAR_MODE;

// Reads 12 bits
int8_t LTC2309_read(uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code)
{
  int8_t ack = 0;

  ack = i2c_read_word_data(i2c_address, adc_command, adc_code);
  *adc_code >>= 4;  // Shifts data 4 bits to the right. uint16 to prevent 1's from shifting in if sign bit is 1.
  return(ack);
}

// Calculates the LTC2309 input unipolar voltage.
float LTC2309_unipolar_code_to_voltage(uint16_t adc_code, float LTC2309_lsb, int16_t LTC2309_offset_code)
{
  float adc_voltage;
  adc_voltage=(float)(adc_code+LTC2309_offset_code)*LTC2309_lsb;        //! 1) Calculate voltage from ADC code, lsb, offset.
  return(adc_voltage);
}

// Calculates the LTC2309 input bipolar voltage
float LTC2309_bipolar_code_to_voltage(uint16_t adc_code, float LTC2309_lsb, int16_t LTC2309_offset_code)
{
  float adc_voltage, sign = 1.0;
  if ((adc_code & 0x800) == 0x800)
  {
    adc_code = (adc_code ^ 0xFFF)+1;                                    //! 1) Convert ADC code from two's complement to binary
    sign = -1;
  }
  adc_voltage=(float)(adc_code+LTC2309_offset_code)*LTC2309_lsb*sign;   //! 2) Calculate voltage from ADC code, lsb, offset.
  return(adc_voltage);
}

// Calibrate the lsb
void LTC2309_cal_voltage(int16_t zero_code, int16_t fs_code, float zero_voltage, float fs_voltage, float *LTC2309_lsb, int16_t *LTC2309_offset_code)
{
  float temp_offset;
  *LTC2309_lsb = (fs_voltage-zero_voltage)/((float)(fs_code - zero_code));                              //! 1) Calculate the LSB
 
  temp_offset = (zero_voltage/ *LTC2309_lsb) - zero_code;                                               //! 2) Calculate Unipolar offset
  temp_offset = (temp_offset > (floor(temp_offset) + 0.5)) ? ceil(temp_offset) : floor(temp_offset);    //! 3) Round
  *LTC2309_offset_code = (int32_t)temp_offset;                                                          //! 4) Cast as int32_t
}

I have also studied the role of the MUX on the Linduino board.

Traditionally the DC590B board has had its I2C port dedicated to the EEPROM board name chip through QuikEval connector pins 9 EESDA and 11 EESCL. This hardware I2C is not muxed but is still today hardwired between the demo boards and the DC590B PIC and the Linduino Atmega.

The LTC devices on the demo boards have traditionally been communicating via SPI through pins 4-7 (BAR)CS, SCK, MOSI and MISO.

However - and this is crucial - when LTC introduces devices with I2C on the demo boards, there is no I2C port on the "old" QuikEval connector. So instead of making a new connector interface to the demo boards and an adapter for the old boards, LTC chooses to multiplex I2C and SPI on the SPI bus. Hence there are now 3 buses on 2 wire sets : auxiliary I2C (hardware I2C) for the EEPROM board identification chip, data SPI (muxed to hardware SPI), and data I2C (muxed to hardware SPI).

This works good. But everyone should know that for instance the board DC934A - which includes an I2C DAC, an SPI ADC and a MUX for sending both data streams to the SPI bus - can NEVER be read by an ordinary Arduino without hardware surgery or totally new high precision timed software that samples the SPI bus and splits the bits from the single SPI data stream into two data streams I2C and SPI.

« Last Edit: October 21, 2013, 07:04:48 pm by quantumvolt »
 

Offline liquibyte

  • Frequent Contributor
  • **
  • Posts: 475
  • Country: us
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #22 on: October 22, 2013, 04:01:02 am »
I'd love to play around with one of these but, alas, I'll have to content myself with the library.  $75 is too steep a hill for me right now.

On a side note, the pdf of the demo manual is 404'ing.  Just an FYI.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #23 on: October 23, 2013, 08:01:21 pm »
I'd love to play around with one of these but, alas, I'll have to content myself with the library.  $75 is too steep a hill for me right now.

On a side note, the pdf of the demo manual is 404'ing.  Just an FYI.

It's been on and off for days. Here is an alternative link http://cds.linear.com/docs/en/demo-board-manual/dc2026afa.pdf

I didn't manage to get a Linduino this time, so I'll have to wait and see. But I am modifying an Arduino clone to hardware compability (except from the isolation) with the Linduino because I really like the LTSketch library.

I guess this thread will go nowhere. The same old thing - playing with AVR and PIC is OK - but don't use the word Arduino ...  :-DD
 

Offline liquibyte

  • Frequent Contributor
  • **
  • Posts: 475
  • Country: us
Re: Linduino : Isolated Arduino-Compatible Board for LTC Demo Boards
« Reply #24 on: October 24, 2013, 01:54:12 am »
I'd love to play around with one of these but, alas, I'll have to content myself with the library.  $75 is too steep a hill for me right now.

On a side note, the pdf of the demo manual is 404'ing.  Just an FYI.

It's been on and off for days. Here is an alternative link http://cds.linear.com/docs/en/demo-board-manual/dc2026afa.pdf

I didn't manage to get a Linduino this time, so I'll have to wait and see. But I am modifying an Arduino clone to hardware compability (except from the isolation) with the Linduino because I really like the LTSketch library.

I guess this thread will go nowhere. The same old thing - playing with AVR and PIC is OK - but don't use the word Arduino ...  :-DD

Thanks for that.  I wanted to have a look at the schematic but couldn't get it.  To top it off, the same day I posted that my root drive died and I'm just now getting up on a spare drive I had, posing this from a Gentoo live cd.  I don't understand why arduinos are so frowned upon, they're a neat little gizmo to play with.  I've got a few spare Atmel chips on the way with plans of pairing them up as a volt/ammeter with one of the VFD's from the givaway from Noritake.  That's kind of why I wanted a peek at the LT librariess, the Noritake stuff could use some improvements.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf