Products > Test Equipment

Fluke 5x-II series thermometer tear-down and hacks

<< < (3/6) > >>

Lunasix:
As somebody asked me, here is part of schematic used to do an USB to IrDa converter working with FlukeView.

Signals TXD_FTDI and RXD_FTDI are routed to a FT230X, ore any equivalent circuit or MAX3232 (not tested) for RS232 / IrDa converter.

I used 2 processors because 1 was already on my board supporting the FT230X, and I've seen the need to prevent collisions while debuging. They are easy to connect in the SOT23-6 package. Of course, a single processor could be used, if you take care to guarantee a regular 16XCLK. The upper processor is used to generate the 16XCLK (153600Hz).  Be sure that generated clock is correct, and compiler can give other result, as this is not the hex file ! The lower is used to prevent RX/TX collisions (see previous response)

As code was modified from another application, some lines are probably useless, or only for debug. An better writing is always possible.

Code for Half/Duplex processor

#define _LEGACY_HEADERS;

#define __PICC_
#include <htc.h>

__CONFIG (MCLRE_OFF & LVP_OFF & WDTE_OFF & CP_ON & FOSC_INTOSC);        // LVP_OFF indispensable pour utiliser l'entrée 3 !!!

// Two bits bUser0 and bUser1 in system variable OS_Flags can be used for user purposes.


/****************************************************************************/



/****************************************************************************/


/****************************************************************************/
// GP0 : entree pour RX IrDa
// GP1 : sortie vers TX IrDa
// GP2 : sortie vers RX FTDI
// GP3 : entree vers TX FTDI

/****************************************************************************/
/*                                                                          */
/****************************************************************************/

#define VAL_TEMPO 5

void main (void)
{   
    OSCCONbits.IRCF2  = 1;          // oscillateur 16MHz
    OSCCONbits.IRCF1  = 1;       
    OSCCONbits.IRCF0  = 1;
   
   // Configuration des IO
    // Validation des pullups
    OPTION_REGbits.nWPUEN = 0;      // Autorisation pullup
   
   // Pas de pullup
    WPUAbits.WPUA0 = 0;
    WPUAbits.WPUA1 = 0;   
    WPUAbits.WPUA2 = 0;
    WPUAbits.WPUA3 = 0;
   
    // IO en numérique
    ANSELA = 0;
   
    // Dans le fichier pic10f322.h, il manque la définition des bits  chemin : C:\Program Files\HI-TECH Software\PICC\9.83\include
    TRISA = 0b1001;               // GPIO1 et GPIO2 en sortie

   unsigned char sens = 0;      // 0 libre, 1 IrDa vers USB, 2 usb vers IrDa
   unsigned char tempo = 0;

    while(1) // ------------------------------------------------ BOUCLE GENERALE DE L'APPLICATION--------------------------
   {
      switch ( sens )
      {
         case 0 :
            // Signal sur IrDa
            if ( PORTA0 == 0 )
               sens = 1;
            // Signal sur USB
            else if ( PORTA3 == 0 )
               sens = 2;
            else
               // Sortie vers IrDa
               LATA2 = 1;
               // Sortie vers USB
               LATA1 = 1;
            break;
            
         case 1 :
            // Recopie RX venant de l'IrDa
            LATA2 = PORTA0;
            
            if ( PORTA0 == 0 )
               // Initialisation temporisation
               tempo = VAL_TEMPO;
            else if ( tempo )
               tempo--;
            else
            {
               sens = 0;
               LATA2 = 1;
            }
            
            break;
            
         case 2 :
            // Recopie TX venant de l'USB
            LATA1 = PORTA3;
            
            if ( PORTA3 == 0 )
               // Initialisation temporisation
               tempo = VAL_TEMPO;
            else if ( tempo )
               tempo--;
            else
            {
               sens = 0;
               LATA1 = 1;
            }
               
            break;
            
         default :
            sens = 0;
            break;
      }
   }
}



Code for clock

#define _LEGACY_HEADERS;

#define __PICC_
#include <htc.h>

__CONFIG (MCLRE_OFF & LVP_OFF & WDTE_OFF & CP_ON & FOSC_INTOSC);        // LVP_OFF indispensable pour utiliser l'entrée 3 !!!

// Two bits bUser0 and bUser1 in system variable OS_Flags can be used for user purposes.


/****************************************************************************/



/****************************************************************************/


/****************************************************************************/

// GP2 : sortie frequence

/****************************************************************************/
/*                                                                          */
/****************************************************************************/

void main (void)
{   
    OSCCONbits.IRCF2  = 1;          // oscillateur 16MHz
    OSCCONbits.IRCF1  = 1;       
    OSCCONbits.IRCF0  = 1;
   
   // Configuration des IO
    // Validation des pullups
    OPTION_REGbits.nWPUEN = 0;      // Autorisation pullup
   
    WPUAbits.WPUA0 = 1;            // Pull-up
    WPUAbits.WPUA1 = 1;            // Pull-up
    WPUAbits.WPUA2 = 0;
    WPUAbits.WPUA3 = 0;
   
    // IO en numérique
    ANSELA = 0;
   
    // Dans le fichier pic10f322.h, il manque la définition des bits  chemin : C:\Program Files\HI-TECH Software\PICC\9.83\include
    TRISA = 0b1011;               // GPIO2 en sortie

   unsigned char out;

   // Cette boucle donne environ 153.75 kHz pour une cible à 153.60 kHz, soit 0.1% d'erreur !
    while(1) // ------------------------------------------------ BOUCLE GENERALE DE L'APPLICATION--------------------------
   {
      if ( OSCCONbits.HFIOFS )      // Horloge stabilisee, en fait juste pour faire un test et trouver la bonne frequence
      { 
         out += 1;
         LATA2 = out;
         LATA1 = out;            // juste pour retarder sans que l'optimisation supprime l'instruction
      }
   }
}


kamcm:

--- Quote from: Lunasix on May 01, 2014, 09:12:57 pm ---I've soldered TIR1000 and HSDL-3201-001 (with 1uF near it) in Fluke, and made an IrDa/USB interface with another TIR1000 and HSDL-3201. As baudrate is 9600, we must generate 9600 x 16 = 153600 Hz clock for the TIR1000. I've made this clock with a small PIC10LF322, and I have a real clock between 153600 and 153800 Hz, the error is lower than 0.15% which is quite nice for the UART TIR1000. The processeur is unable to do something else when generating this frequency !
Then, the FlukeView software find the Fluke thermometer, can reset memory, synchronize date, but is unable to read memory, indicating memory empty ???
I've searched and found that all characters sent from USB to IrDa were received back by the IrDa transceiver, whatever was done on the transceiver to separate TX from RX on IR. And not disturbing for short requests. But during reading memory, when themometer was responding, there was collisions (if there are enough data) due to regular query from USB to verify if equipment is present (why ?), giving framing error on characters sent to USB at this moment.
So, I've used a second PIC10LF322 to prevent collisions and ensuring correct half duplex. Software is easy to do, a small arbiter gives priority to the first talking for a sufficient time, and data is copied from one side to other side only if allowed by the arbiter.

All could be done by a bigger processor or with other circuits, there are many solutions.

Now, all is fine !!!

--- End quote ---

I am having the same problem.
But I had not solder the TIR1000 on the board. I add a bluetooth module on it.

Now, I can reset memory, synchronize date in flukeview, but unable to read memory from the meter.

How to prevent collisions when bluetooth module is used ? |O

Please advice,

Thanks
===========

Update:
MSP430P337I datasheet attached. :)

TiN:
Hm, that is neat idea. Let me try adding BT module and test that out! If only I can find time :-X

georgd:
TiN,
how did you make this excellent photos in first post (2014), what lighting equipment used by you?

Georg

TiN:
Hi Georg,

Simple LED flashlight and long exposure was used, just like with 99% of any other photos I post.
Perhaps you will find details in my new article, how to take photos of hardware more interesting.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod