Shop OBEX P1 Docs P2 Docs Learn Events
Help Needed (Solved) — Parallax Forums

Help Needed (Solved)

DiscoveryDiscovery Posts: 606
edited 2016-05-31 08:09 in BASIC Stamp
Several months ago, I wrote a pbasic program for reading a variety of inputs over the one-wire and controlling a variety of devices over the one-wire. The hardware and software ran perfectly for many months of testing.
I decided to make a couple of simplifying adjustments to the code and now the DS2450 digital outputs (all of them) no longer work. I have not been able to determine what I did wrong so I would like to post the code so that someone sharper than me can find the error and make the correction. The output voltage from the 4-channel devices is around 1.25 volts not logic low nor logic high.

Sincerely

Discovery

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    I don't know what changes you made, but does going back to the original version of the code work or does even that version result in non-working hardware?
  • I made changes saving them as versions 1-6. I checked version 5 and the DS2450 output devices did not function.
    I checked each DS2450 using the address ID program and each DS2450 returned the correct ID. I checked all the voltages and they are correct. I use the internal chip cap for VCC and an external 5 volt source for powering the electronic switches. Everything measures correctly. It is strange that all the output DS2450s are not working. All the DS2450 analog input chips are working perfectly.

    I am able to disconnect the electronic switch circuity PC board leaving just the DS2450s with their pull up resistors of around 220 ohms. They still don't work. I watch the one-wire signal on the scope and the signal looks fine as far as I can tell.

    Discovery
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    Are you saying that the device ID check program does run on the DS2450s connected exactly as they normally are?

    220 ohms seems super low and would equate to a really hard pull up on the line. And if you have multiple ones it would be worse. IIRC 4.7K is the nominal value for a pull-up on the 1-Wire bus.
  • No ...no. There is one 4.7 kohm pull up resistor on the one-wire for all four DS2450 chips. The data stream looks excellent on the scope. The 220 ohm resistors are connected to the open drain FET outputs. When the digital output is low, the FET is turned on and when working properly read near zero volts. When the output is high the FET is turned off and the drain is pulled to 5 volts.

    I do not know the silicon in the DS2450 chip so I cannot speak as an expert but I wonder if the four DS2450 chips are locked up in a peculiar mode that is uncontrollable and cannot be over written by the register control word for digital output. If this is the case, is there a command word that can be sent during initialization that will force the chip to clear out any erroneous instruction?

    By the way...did you find any error in my code?

    Discovery
  • Yes to the question regarding the ID program. The hardware is exactly the same. I think these four chips are locked up. I have other DS2450s so I will make another digital output board and see if it functions properly.

    It would be nice if there was a DS expert reviewing this thread!

    Discovery
  • I manufactured another PC board with a new DS2450 four channel Analog/Digital chip. The only one-wire device on the line. The address ID program read the new ID perfectly. This address was inserted into the program but the digital out puts could not be set to go low. The pull up resistors were changed to 350 ohms from 220 ohms...same failure result.

    This suggests that the other four PC boards with DS2450 devices are most likely fine. It appears that the chip is not being setup to an output device.

    Is my code correct for setting the chips to digital output?

    Discovery
  • Chris Savage and others...
    Can you get in tough with a Maxim/Dallas Semiconductor engineer knowledgeable with DS2450 ICs and get that person involved with solving my problem?

    I am building a factory that will be ready in about two months. The control system that I developed using Parallax module controllers and Maxim chips was working in a test mode for many months...then the DS2450s stopped functioning as digital outputs.

    This DS2450 problem must be solved really soon so that the control system can be installed and certified as operational.

    Identifying and solving this problem is critical for the project. Please help.

    Sincerely,

    Discovery
  • Hi Discovery!

    As you mentioned this as urgent for you, it might help others help you faster if you could post the actual schematic with the code.

    And also if not already, the last known working code as well as your current version of code that is causing trouble.

    If your hardware was working before, and you recently changed code, then comparing both code versions and refering to the schematic would seem to be the logical place to start any diagnosis.

    Hope you can get more help this way from other forum members.

    Btw, Parallax is closed until Tuesday for the Memorial day federal holiday.
  • kwinnkwinn Posts: 8,697
    Discovery wrote: »
    Chris Savage and others...
    Can you get in tough with a Maxim/Dallas Semiconductor engineer knowledgeable with DS2450 ICs and get that person involved with solving my problem?

    I am building a factory that will be ready in about two months. The control system that I developed using Parallax module controllers and Maxim chips was working in a test mode for many months...then the DS2450s stopped functioning as digital outputs.

    This DS2450 problem must be solved really soon so that the control system can be installed and certified as operational.

    Identifying and solving this problem is critical for the project. Please help.

    Sincerely,

    Discovery

    The data sheet for the DS2450 shows it as a 1-Wire Quad A/D Converter yet you posted "then the DS2450s stopped functioning as digital outputs. ".

    Is this a typo?
  • Mike GreenMike Green Posts: 23,101
    edited 2016-05-30 04:28
    An output voltage of 1.25V suggests that you're attempting to draw too much current from the open-drain output transistors. The datasheet isn't too clear on this, but I think they indicate that the output voltage should be 0.4V with a current draw of 4mA. Pullups of 350 Ohms or 220 Ohms would result in a current of well over 10mA which would cause the output voltage to be higher than 0.4V ... just what you're seeing.
  • I FOUND IT!!!

    Some how the code for the One-Wire "MatchROM" instruction was changed.

    The program now has the correct code for the instruction and the control system works perfectly.

    Sincerely,

    Discovery
  • Congratulations. I'm still concerned that you're trying to draw too much current from the outputs. They're not designed for supplying more than a couple of mA. I wouldn't use less than a 1K pullup.
  • I understand your concern. However, the "ON" state must source about 17 ma to an optical isolator and in the "OFF" state sink about 20 ma. I have used this circuit for many applications without any problems. This means several years of continuous operation. It is a really good component.

    Sincerely,

    Discovery
  • Good news Discovery- well done finding the code blip.

    I've updated this thread title to solved.
Sign In or Register to comment.