Elektronica Stynus
 

ESR-Meter

Een tijdje geleden kwam ik een ontwerp van een ESR meter tegen. Ik heb toen besloten dit na te bouwen maar de uitlezing met een pic + lcd te maken.

Mijn schema:
schema
(Klikbaar)

 

Foto's:
Frontplaat ESR-Meter
De tekst is er met wrijfletters opgezet.
ESR-Meter
ESR-Meter

Top

Update 22/07/08

Ik had blijkbaar een fout in het schema gemaakt. De niet inverterende ingangen van de opamp moesten blijkbaar niet aan de massa verboven worden maar aan 2,5V. Dat heb ik nu opgelost door het ic voetje op headers te solderen en daaraan een spanningsdeler te maken.

bugfix

bugfix

bugfix

Nieuw schema:

schema

Top

Update 24/02/09

Ik heb nu de code werkend gekregen. Er is iets mis met picbasic waardoor de AD omzetting problemen geeft bij een 16f690. Daarom heb ik zelf een stukje code geschreven voor het "handmatig" uit te lezen.

De code:

'****************************************************************
'*  Name    : ESR_meter                                         *
'*  Author  : [Stynus]                                          *
'*  Notice  : Copyright (c) 2008 [www.elektronicastynus.be]     *
'*          : All Rights Reserved                               *
'*  Date    : 24/02/2009                                        *
'*  Version : 1.1                                               *
'****************************************************************
'Config
    Device         16F690
    Config         INTRC_OSC_NOCLKOUT, WDT_OFF, PWRTE_OFF, MCLRE_OFF
    XTAL = 8
    OSCCON = %01110111

    Dim spanning As Word
    Dim esr As Float
 
    Declare LCD_DTPIN PORTC.4
    Declare LCD_ENPIN PORTC.3
    Declare LCD_RSPIN PORTB.6
    Declare LCD_LINES 2   

    TRISA.2  = 1 
    ADCON0 = %10000001
    ANSEL  = %00000100       
    ANSELH = %00000000
    
    ADIN_RES = 10         
    ADIN_TAD = FRC           
    ADIN_STIME = 500              

    Symbol lcdTijd  = 600
    Clear
    Cls
    Print At 1, 1,  "ElektronicaStynu"
    Print At 2, 1,  " ESR-Meter V1.2 "
    DelayMS  lcdTijd
    Print At 1, 1,  "lektronicaStynus"
    DelayMS  lcdTijd
    Print At 1, 1,  "ektronicaStynus."
    DelayMS  lcdTijd
    Print At 1, 1,  "ktronicaStynus.b"
    DelayMS  lcdTijd
    Print At 1, 1,  "tronicaStynus.be"
    DelayMS  lcdTijd
    
    Cls
    Print At 1,  1,  " ESR-Meter V1.2 "  
    Print At 2,  1,  "  ESR =   ,     "
    Print At 2, 16, $FE,$40,$00,$0E,$11,$11,$11,$0A,$1B,$00


While 1 = 1 
    GoSub AD_in
    spanning = spanning - 480
    esr = spanning  / 19
    If esr > 27 Then
        Print At 2, 9, "Open       "
    Else 
        Print At 2, 9, DEC2 esr , "         "
    EndIf
    DelayMS 550    

Wend
AD_in:
    ADCON0 = %10001001    
    DelayMS 510
    ADCON0.1 = 1 
    While  ADCON0.1 = 1 : Wend
    spanning = 0
    spanning.HighByte = ADRESH
    spanning.LowByte = ADRESL

Return
End
De hex file

Top

Reactie's

Naam: siebo
Datum: 03 Juli 2008, 15:22
Bericht:
Ziet er mooi uit. goed gedaan!
Naam: ирек
Datum: 28 November 2008, 09:37
Bericht:
HEX fail plis
Naam: Stynus
Datum: 28 November 2008, 23:26
Bericht:
Hello,

The code is far from finished yet.
The analog part works now but somewhere in the analog digital converter there is something wrong.
When all is finished I will update this page with the code and hex file. (But because of school I don’t have much time to work on electronic projects :( )

With kind regards,

Stynus
Naam: Szekeres Milán
Datum: 23 Februari 2009, 09:32
Bericht:
Hello !

he managed to solve it since then the hexe filet ?
If yes you would send it the mail my title !
I say thank you for it
Naam: Stynus
Datum: 23 Februari 2009, 10:49
Bericht:
Patience!!
Naam: SzekeresMilan
Datum: 23 Februari 2009, 17:19
Bericht:
Ok thank you!


Naam: Szekeres Milan
Datum: 14 Maart 2009, 00:28
Bericht:
Hello!
What is the product for the lcd display ( 2x16 caracter) ?

Thank you
Milu
Naam: Stynus
Datum: 14 Maart 2009, 11:30
Bericht:
Hello,

A hd44780 2*16 lcd.

With kind regards,

Stynus
Naam: Szekeres Milan
Datum: 15 Maart 2009, 00:32
Bericht:

Hello
Thank you!!

Does the instrument work for you?
Does the pic not start?
Milan
Naam: Stynus
Datum: 15 Maart 2009, 01:02
Bericht:
Hello,

Yes, it works now.

I've translated this page in to English because of the great interest of people that don't speak Dutch.

You can find it here:
http://www.elektronicastynus.be/english/Projects/lab_equipment/esr_meter/


With kind regards,

Stynus
Naam: Charles
Datum: 17 Maart 2009, 08:11
Bericht:
Hello Sir. The web link to the english page does not work. Is it possible you can send me complete project files in zip format ?
Naam: Stynus
Datum: 17 Maart 2009, 20:29
Bericht:
Hello,

Links should work now.
Everything I release from this project is on that page.
http://www.elektronicastynus.be/english/Projects/lab_equipment/esr_meter/

With kind regards,
Stynus

Naam: Zoltan Szilvasy
Datum: 21 Maart 2009, 19:13
Bericht:
Hello,

I would ask why the BASIC code contains the following lines:

Declare LCD_DTPIN PORTC.4
Declare LCD_ENPIN PORTC.3
Declare LCD_RSPIN PORTB.6

while this signals are connected to PORTA pins (RA2, RA3, RA4) on the schematics? Where is the mistake? What configuration does the published hex file contain: PORTC/PORTB (BASIC code) version or PORTA version (schematics)?

BTW: what kind of compiler should I use to recompile the code for my wiring?

Thanks in advance,
Zoltan
Naam: Stynus
Datum: 21 Maart 2009, 19:24
Bericht:
Hello,

PORTA.4 is a open collector output so it wouldn’t work. I changed it on my pcb and in the code but forgot the schematic. I will correct the schematic tomorrow.

The code compiles with proton picbaisc

With kind regards,
Stynus
Naam: Zoltan Szilvasy
Datum: 21 Maart 2009, 21:03
Bericht:
Hello,

Thanks for your quick answer! I help to Milan to start this useful equipment that he had rebuilt, but he is not experienced in PIC programming. I will tell him to re-wire the LCD signals according to the code.

Regards,
Zoltan
Naam: Ralph van der Lee
Datum: 29 April 2009, 17:10
Bericht:
Hello,

I've build the circuit following the schematics, when i download the hex file it all works but when i compile the .bas code and load it into the pic nothing appears on the display.
I use proton+, any ideas why this doesn't work?

Regards, Ralph
Naam: Stynus
Datum: 29 April 2009, 21:21
Bericht:
Hello,

The picbasic code is the same as the hex file when it is compiled. However it might be that your programmer doesn’t uses the fuses from yourself compiled hex. But then it's strange that the hex file from here does work.
With kind regards,
Stynus
Naam*:
Email: (Wordt niet weergegeven)
  Waarschuw me als er reacties op deze pagina zijn
Tekst*:
 
Powered by Scriptsmill Comments Script

Top

© 2002-2010 Elektronica Stynus.
Valid XHTML 1.0