Shop OBEX P1 Docs P2 Docs Learn Events
Having trouble with DataLogger, please help!!!! — Parallax Forums

Having trouble with DataLogger, please help!!!!

javelin nubyjavelin nuby Posts: 27
edited 2009-08-28 15:45 in General Discussion
I can't get the javalin to communicate with the datalogger
It just hangs for a long time (not consistant) and once and a while I get a "no disk presecnt Please insert disk" message.
It is hooked·up for UART protocol.

OK, so there what I tried
I changed the connetion wires to 1K resistors. (before changing them out I was only seeing about 2.2 volts on the scope, now I'm seeing 5)
Tried three diferent thumb drives (2 1Gig, and a brand new 4 Gig)
I'v reformatted one of the 1Gig's for FAT 512 ( by the way is FAT the same as FAT16 when fromated from windows?)
I'v also tried cycling the power.
I'v spent the last two weekends tring to get this thing working.

I'm tring to run the dataloggerUARTtest code found in the forum.
DataLoggerUART class
Revision History:
·* March 25, 2009 v1.1: Updated.
·* January 16, 2008 v1.0: Initial release.
·* @author Peter Verkaik (verkaik6@zonnet.nl)


Iwas unable to get it working in SPI mode also.

It new 4Gig drive light does blink and then turn off where the 2 1Gig stick the light just stays on.
«1

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-17 21:04
    Have you read this thread:
    http://forums.parallax.com/showthread.php?p=793294

    My post from March 25, 2009 9:16 AM attaches SPI version classes that work.
    My post from March 25, 2009 12:55 PM attaches Uart version classes that I
    have not tested but have been reported to work, although not with every
    USB stick.
    You said...
    I changed the connetion wires to 1K resistors. (before changing them out I was only seeing about 2.2 volts on the scope, now I'm seeing 5)

    which makes me believe there is a power issue here or a connection short. The Datalogger module requires
    quite a lot of current. If your board that carries the Javelin (Javelin demoboard?) is battery powered
    then that may be the cause the datalogger is not working.

    The usb stick should be formatted as FAT16 (named FAT in windows)·with·512 byte sectors.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-18 02:40
    I'm using a 16VDC from an old note IBM Think Pad. It is capable of providing 1 AMP.
    I don't think its a power issue. I am using the Javelin demoboard though.

    I missed the fact that I,m suposed to use the SPI class with the UART test code.
    I"ll try that now, and let you you know if that works.
    Thanks
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-18 03:19
    That didn't work.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-18 03:27
    With 16V input, the LM2940 regulator at 250mA disspates 11*0.25 ~ 3W
    which is way too high. My guess is the LM2940 regulator does a thermal shutdown
    at a lower current (meaning dropping the 5V output and so the datalogger
    will not work). Try getting a 7.5V/1A power supply.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-18 04:04
    I can't get the datalogger Tx pulse train highter than 2.2 Volts to the javelin.
    I'v tried different pins and still get 2.2 Volts.
    Could the be a problem with the data logger driving circuit for the Tx?
    It puts out the pulses every time I insert or remove the drive, but it's only 2.2 volts.

    Please help.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-18 06:14
    Measure the voltage between Vdd and Vss when the datalogger is plugged in.
    I expect this voltage to be much lower than 5V for the reason I gave in
    my previous post.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-19 00:15
    I have 4.939 Volts from Vdd to Vss when the logger is connected and 4.942 volts with the data logger not connected.
    Yet I'm only seeing 2.2 volt pulses on the logger Tx (on the scope).
    I see the full 5 volts from the javelin Tx.
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-19 00:21
    Do I need to set up a transistor switching circuit to drive the javelin Rx with the logger Tx?
    I didn't think that would be necessary.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-19 00:29
    4.93V seems ok.
    Can you draw a picture how you have everything connected (exactly),
    not how you think you have everything connected.
    If you only get 2.2V there could be a wiring error.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-19 04:04
    LOGGER IN >>>>JAVELIN
    1>>>Vss
    2>>> PIN 11
    3>>>Vdd
    4>>>PIN10
    5>>>PIN9
    6>>>PIN8
    8>>>PIN7
    Code pertaining to the UART as follows:
    //Datalogger SPI pins
    static final int pinTX = CPU.pin10; //serial data out (connects to Vinculum RXD pin) 4
    static final int pinRX = CPU.pin9; //serial data in (connects to Vinculum TXD pin) 5
    static final int pinCTS = CPU.pin11; //serial hs in (connects to Vinculum RTS pin) 2
    static final int pinRTS = CPU.pin8; //serial hs out (connects to Vinculum CTS pin) 6
    static final int pinRI = CPU.pin7; //wakeup out (connects to Vinculum RI pin) (optional) 8

    static final int CR = 13; //Carriage return

    static Uart tx = new Uart(Uart.dirTransmit,pinTX,Uart.dontInvert,pinCTS,Uart.dontInvert,Uart.speed9600,Uart.stop1);
    static Uart rx = new Uart(Uart.dirReceive,pinRX,Uart.dontInvert,pinRTS,Uart.dontInvert,Uart.speed9600,Uart.stop1);
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-19 10:46
    Can you post a picture of your setup?

    Also, I would use the SPI interface as that is synchronous
    and always returns data, even if corrupted. The uart VP code
    may not recognize characters if corrupted but these are
    just ignored.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-19 15:25
    I'll get a picture later in the day, I'm at work now.
    I wanted to use the UART because the javelin is also running two 8 channel ADC's and a TI time and date chip using SPI, and a 4x20 display using UART.
    I wanted to be able to dump the data to the UART VP and not have to worry about it again beacuse it would be going in the background.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-19 15:30
    Once the SPI is working you can change to uart,
    because·then you know all connections are ok.
    Right now we don't know.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-20 00:10
    Here are links to the pictures of the loger circuit.
    Note: I'v tried it with the wires in place of the resistors and that didn't word either.


    http://www.arbortech.com/pt/circuits/IMG_3632.JPG

    http://www.arbortech.com/pt/circuits/IMG_3636.JPG

    ·
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-20 01:48
    OK, I hooked it back up in SPI mode, and ran the LoggerSPI_test code.
    I'm still only getting 2Volt pulses between the Javelin pin 11 and Logger pin 2.
    All the others a 5 volt pulses, and it still is just hanging after the inital "Datalogger Test Program for Javelin".
    Any other thoughts?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-20 02:59
    Pictures do not show in internet explorer.
    Please attach pictures to your next post.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-20 04:33
    See if you can see these pictures?
    3888 x 2592 - 1M
    3888 x 2592 - 1M
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-20 06:22
    From the picture I get:

    JavP11 -> DL.2 (SDO)
    JavP10 -> DL.4 (SDI)
    JavP9 -> DL.5 (SCLK)
    JavP8 -> DL.6 (CS)
    JavP7 -> DL.8 (no connection)

    Also, DL jumper is set to uart mode. Change it to SPI mode.
    Recycle power so datalogger sees SPI jumper on powerup.
    Remove JavP7 as it is not required.

    In the DataloggerSPI_test program

    public class DataloggerSPI_test {
      //Datalogger SPI pins
      static final int pinCLK = CPU.pin5;  //Clock out       (connects to Vinculum SCLK pin)
      static final int pinCS  = CPU.pin4;  //Chip Select out (connects to Vinculum CS pin)
      static final int pinSDO = CPU.pin6;  //Data out        (connects to Vinculum SDI pin)
      static final int pinSDI = CPU.pin8;  //Data in         (connects to Vinculum SDO pin)
     
    

    Change it to match pins

    public class DataloggerSPI_test {  //Datalogger SPI pins
      static final int pinCLK = CPU.pin9;  //Clock out       (connects to Vinculum SCLK pin)
      static final int pinCS  = CPU.pin8;  //Chip Select out (connects to Vinculum CS pin)
      static final int pinSDO = CPU.pin10;  //Data out        (connects to Vinculum SDI pin)
      static final int pinSDI = CPU.pin11;  //Data in         (connects to Vinculum SDO pin)
    

    Download DataloggerSPI_test to javelin.
    Let us know the results.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-21 00:52
    That is exactly the way I have it.
    The pictures were taken when I was in UART, before I went back to SPI.
    I had switchted it back to SPI right after I took the pictures the first time I sent them and you could,nt open them.
    It still is not working.
    It just hangs after the inital "Datalogger Test Program for Javelin"
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-21 01:00
    Where can I get a USB memory stick that I know will work?
    What brand and Model are you using?
    IF I had known there things were so finiky, I wouldn't had bought this @#$%^ thing.
    Now every time I remove the USB stick, I have to reformat it.
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-21 03:01
    I'm about to give up on this thing, now I can't get any of the the three thunb drives to format FAT 512.
    If this thing trashed my drive I'm really going to be ticked.

    Post Edited By Moderator (Chris Savage (Parallax)) : 8/21/2009 5:55:19 PM GMT
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-21 06:06
    Try attached test progrsm.
    It displays characters returned by the datalogger, and it allows
    you to send commands to the datalogger.

    Make sure the pin constants match your setup.

    regards peter
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-08-21 18:14
    javelin nuby said...(trimmed)
    Where can I get a USB memory stick that I know will work?
    What brand and Model are you using?
    IF I had known there things were so finiky, I wouldn't had bought this @#$%^ thing.
    Now every time I remove the USB stick, I have to reformat it.
    The Vinculum chip on the Datalogger was designed to access USB Thumb Drives using lower level protocols.· The problem is that not all drive maufacturers implement things the same way.· It is impossible to know without extensive testing which drives will work and which ones won't.· We've been through this with USB to Serial adapters.· Many don't work with our product so we carry our own.

    As for having to format a drive everytime you remove it, that doesn't make any sense.· The only time the drive could be corrupted is if it were being written to when you removed it.· But you have already stated that you are unable to write to the memory stick.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-21 18:26
    Somebody said...
    As for having to format a drive everytime you remove it, that doesn't make any sense.· The only time the drive could be corrupted is if it were being written to when you removed it.· But you have already stated that you are unable to write to the memory stick.
    It may be that there is a very short duration drop in Vdd while attempting to write, due to the 16V input
    to the demoboard regulator. It depends on the current draw of datalogger+usbstick when that
    regulator enters thermal shutdown. A drop in Vdd during write could have unwanted effects.
    I still recommend using a 7.5V/1A power supply.

    When I wrote the class I used a Databar 1GB stick.

    regards peter

    Post Edited (Peter Verkaik) : 8/21/2009 6:32:40 PM GMT
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-22 17:25
    Peter,
    If there is a drop in Vdd, I should be able to pick it up on the scope. I've checked the Vdd to Vss with the scope (2micro sec /div (trigger on falling and rising edge)) and see no drop what so ever when running the test code or when inserting and removing a drive, or when cycling power to the logger.

    I had three different USB sticks (one of which is a ScanDisk Cruzer micro 2GB) that I has reformatted through windows as FAT 512. After trying them in the logger and trying the DataloggerSPI_test program, I took them back to the desktop and they needed to be reformatted. I've tried several times (even right after rebooting the desktop) and they will not reformat FAT 512 any more. However they will format FAT32(default) and the default file allocation size. I've even tried reformatting them FAT 512 after first reformatting them FAT32 16K, and they still wouldn't format FAT 512.

    Last night I ran the File Attachment : DataloggerSPI_ManualCommands_test.java and got no return messages.
    I'm going to go out today and buy one of the following recommends drives (off the Paralax web site, logger page):
    Transcend® USB Flash Drive 1GB, Kingston® Technology 2GB DataTraveler 100, SanDisk Cruzer® Micro USB 2.0 Flash Drive 1GB.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-22 18:52
    If you still only get 2V on the dataloggers TX pin (which explains
    getting no response at all), also contact Parallax Tech Support.
    It is possible the logger has a defect.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-22 20:09
    I talked to Josh at Parallex and he said the 2 volts was higher than logic high so the it should work.
    Your name came up at some point, I can't remember if he said that I should talk to you or that He wanted to talk to you, and that you were the guy to talk to about getting the logger working with the javelin.
    I found a SanDisk Cruzer micro USB2 1 gig drive. I also add a coulpe of· Format.printf line to track where it is hanging.
    ······ Lines added:
    ······· Format.printf("Datalogger Manual Commands Test Program for Javelin\n");
    ··· CPU.delay(31500); //wait 3sec
    ······ Format.printf("a\n");
    ··· logger.diskIdentify(dirbuf);
    ······ Format.printf("b\n");
    ··· CPU.delay(31500); //wait 3sec
    ······ Format.printf("c\n");
    ··· Format.printf("disk info:\n");
    ······ Format.printf("d\n");
    ··· Format.printf("%s\n",dirbuf);
    After starting, I get back the "Datalogger Manual Commands Test Program for Javelin" and "a".
    Which means that it is hanging on the· "logger.diskIdentify(dirbuf);" line.
    I am still only getting 2 volts on the logger pin #2.

    What is the min voltage for logic high for the javelin?
    Either the the javelin is not picking up the logic high or the logger is not outputting a voltage high enough.
    I still thing I got a bad logger (the voltage on pin 2 should be closer to 5 volts)?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2009-08-22 21:28
    The 2V high is above logic treshold for 3.3V mcu like propeller,
    but definitely not for the javelin which has a treshold of 2.5V
    Besides that, output high of the logger should be close to 5V.

    Talk to Tech Support again and insist on replacing the unit.
    There are ways to pull up the 2V to 5V, but we don't know
    why you get the 2V. There is probably an internal defect
    that may also affect your usbstick in a bad way.

    regards peter
  • javelin nubyjavelin nuby Posts: 27
    edited 2009-08-22 21:32
    Thank you very much for all your help.
    I will contact them on Monday.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-08-24 18:41
    Hello,

    I have requested that we simply swap out the Datalogger. From my understanding Tech Support has already gotten this underway as of this morning. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.