Shop OBEX P1 Docs P2 Docs Learn Events
Can the Propeller power itself like a 1-wire device? — Parallax Forums

Can the Propeller power itself like a 1-wire device?

william chanwilliam chan Posts: 1,326
edited 2008-09-03 14:46 in Propeller 1
Hey,

Can the Propeller act like an 1wire device to power itself and communicate with other Props all from just 2 wires?

How would such a circuit look like?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • AleksAleks Posts: 52
    edited 2008-09-03 12:59
    On the object exchange is Serial Com, obex.parallax.com/objects/356/ that uses a three line communication protocol between two propellers, but could easily be adapted to multiple propellers. If you want to move down to two lines, you're typically going to need an identification code of sorts for each propeller, so you can connect all of them to the same clock and data lines. Then you use program the propellers to only respond when they receive their identification code in the beginning of the transmitted data. Take it a step further and try using FullDuplexSerial or Simple_Serial to use a single line as your TX and RX pins, and communicate at a single baud rate. Again, the ID code is going to be necessary. An example of this that would make things simple is to look at the documentation of the 24LC64 Serial EEPROM offered by Microchip. It will take some time and creative programming, but using the same line for transmitting, receiving, and timing is a possibility. As for power, watch your current draw.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~Some men see things as they are and ask "why?"
    I dream of things that never were and ask "why not?"~
  • william chanwilliam chan Posts: 1,326
    edited 2008-09-03 13:03
    Would I need a bridge or some diodes to prevent the Prop from shorting out its own power supply source?
    Can the 2 wires be exchangeable polarity wise?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • evanhevanh Posts: 15,545
    edited 2008-09-03 13:04
    The answer will be yes. You'd prolly want to use a low power mode of operation. For a typical connection, rip open an existing unit and draw out the circuit.
  • william chanwilliam chan Posts: 1,326
    edited 2008-09-03 14:06
    Aleks,

    Sharing power supply is not difficult.

    But when power supply and comm. share the same 2 wires, things can get hairy.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • AleksAleks Posts: 52
    edited 2008-09-03 14:07
    Ah. I've misunderstood what you were trying to do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~Some men see things as they are and ask "why?"
    I dream of things that never were and ask "why not?"~
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-03 14:34
    William,
    Read some of the white papers from Dallas/Maxim on using their 1-wire protocol with relatively high current devices like analog to digital converters.
    The basic idea is that your line stays powered most of the time with brief interruptions for zero data bits (like a regular serial line ... it idles in "mark" state). The zero bits are short, much less than the bit time so you mostly have power available. The power source (pull up) is current limited to somewhat more than what you'll need for an average current. You'll need external switching transistors because the Propeller will probably need more current than it can switch by itself. You'll need a Shottky diode to minimize the voltage drop and a good size filter capacitor to hold the supply voltage during the brief outages. You'll need to modify some existing serial I/O driver so it uses short pulses in a longer bit-time window.
  • hippyhippy Posts: 1,981
    edited 2008-09-03 14:46
    I've done similar with other micros so I cannot see that it wouldn't work with the Propeller. The basic principle is to keep a power-supplying cap charged up for the Propeller ( TX Normally high ), it reads active low signalling ( serial say ) and when it wants to transmit back it pulls the TX line low which the transmitter monitors, something like ...

    TX >---.--------.----|>|----.------------. +V
          .|.       |           |            |
          |_|       |    ___    |      .-----^-----.
           |        `---|___|---|------| In        |
           `---|                |      |           |
           .-->|----------------|------| Out       |
           |---|                |      |           |
           |                 +__|__    | Propeller |
           |                  =====    |           |
           |                    |      `-----.-----'
           |                    |            |
    0V ----^--------------------^------------' 0V
    
    
    



    I've only every done two wire transmit plus power so cannot comment on how the talk-back would need to be implemented. Using differential ( rather than TX/0V ) and a full-bridge the cap can be kept charged continually.
Sign In or Register to comment.