Shop OBEX P1 Docs P2 Docs Learn Events
Sinking 5V safely? — Parallax Forums

Sinking 5V safely?

Matthew HayMatthew Hay Posts: 63
edited 2008-03-28 05:58 in Propeller 1
Okay I've read through the thread on safely connecting 5V to the propeller and nobody mentioned anything about sinking 5V with the prop (unless I missread something).·

Can I just use a series resistor like when you have a 5V input? or do I need better precautions?

The device with the 5V output is using a totem-pole driver if that makes a difference.

Sorry if this was covered and I did not see it (I did use search.parallax.com but not sure if I was wording it right)

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-03-26 22:36
    You will need to use a transistor or level shifter to sink the 5V. The reason is that there will still be a current draw through a simple series resistor when the Propeller pin is high or floating, which will pull the output down to 3.9V or so.

    But what is it you're sinking exactly? You mention a device with a totem pole output. You can't sink a pin that's driven both high and low!

    -Phil
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-26 22:40
    You have the same issue with a 5V input regardless of the source. It's above the protective diode conduction threshold. You need a series resistor to limit the amount of current through the diode (and into the Propeller's 3.3V supply lines). Even though the 5V device sinks (is set to 0V) most of the time, it may be high (a source of +5V) a little bit of the time and that's enough to damage the Propeller. Use a series resistor around 1K, more will usually work.
  • Matthew HayMatthew Hay Posts: 63
    edited 2008-03-26 22:58
    The device I'm working with is a standard IDE harddrive, but 5 of my control lines have to be pulled low by the prop and I was concerned that there might be some damage to the prop.

    I thought I'd go ahead and write up a basic IDE controller object and possibly a fat fs obj to use it.

    I had made an 8051 project that connected to·a·HD but it was a 5V chip.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-03-27 05:18
    Sounds like they are only pullup resistors so the worst that would happen if you connected directly is the prop would be sinking some current as the +5V through the pullup would be clamped at ~3.9V. If you want to play it safe then you could always use a 74HC04 as the inverting buffer from the prop to the +5V logic.

    You will have the same problem when you read from the data bus as that will be at +5V levels but with no current limiting as it is straight from the IDE buffers. You could try some value of current limiting resistors and perhaps clamp diodes. At I/O speeds the resistors shouldn't make much difference although I don't know for sure if the IDE accepts 3.3V as a logic high. If it were me I would just keep it simple first up and see what works. But do yourself a favor and use a 40-pin DIP prop in your testing as they are a lot easier to replace if you happen to blow one.

    *Peter*
  • Matthew HayMatthew Hay Posts: 63
    edited 2008-03-28 02:54
    Okay so what about using·a MM74HC244·chip (which I have sitting around) tying the enable line to ground running the chip at 3.3V and using a resistor on ide side to bring down the voltage enough for the chip.· That should protect the prop from any damage right.· I know it's not the best chip for the job but it should work for now right?

    http://www.fairchildsemi.com/ds/MM/MM74HC244.pdf

    I'm going to be using PEKit so yep I'll be using a DIP chip.·

    I guess I'm going to go with resistors· on the data lines and use the chip above for the control lines.

    Thanks for your help.
  • SapiehaSapieha Posts: 2,964
    edited 2008-03-28 05:58
    Hi Matthew

    Most compatible IC 74LVC245

    http://www.futurlec.com/IC74LVC00SMD.shtml

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.

    Sapieha
Sign In or Register to comment.