Shop OBEX P1 Docs P2 Docs Learn Events
DS2405 1-Wire Communications — Parallax Forums

DS2405 1-Wire Communications

Matt WhiteMatt White Posts: 60
edited 2006-07-04 03:40 in BASIC Stamp
Anyone know where I can find some example BS2 code for the DS2405 Digital Switch?· Maybe an old Nuts and Volts article or something.· I've done some searching but haven't come up anything yet.·

Thanks!
Matt

Comments

  • Matt WhiteMatt White Posts: 60
    edited 2006-07-03 20:45
    Also here is a brief description of what I'm looking to do with this device:

    I'm running 3 standard servo's and 2 continous rotation servo's from on my Boebot. 2 standard servo's are for a pan/tilt assembly which I have a ping sensor mounted on... I also have a standard servo is mounted on the front for another sensor. Then 2 continous rotation servo's to drive the wheels.

    I ran into a problem when trying to move several of the standard servo's at the same time. Randomly the BS2p would reset itself, I assumed due to current draw?? Anyway... I figured the best solution (given that I haven't bought a servo controller board yet) would be to supply power to the servo's from another 6v battery pack. I've built a small 5v power supply which I'd like to be able to turn on and off with a digital switch... I was planning on putting this switch between the 6v battery pack and power supply circuit which provides a regulated 5v. The idea being that when the Boebot powers up it would then turn on the battery power for the servo's as well. I think the max voltage for the DS2405 on any pin is around 7v.

    I think ultimately I'll just get that nifty USB servo controller. But I'd like to know how to do something like this... any suggestions would be appreachated!

    Thanks!
    Matt
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-03 20:56
    Matt,

    ·· I didn't look up the part or data, but you listed it as a 1-wire device, something the BS2 cannot talk to.· You would need a BS2p-series Module to talk to a 1-Wire device.· Optionally there is an adapter chip, but no sample code for using it, since it's really a serial-to-1-wire interface.· I hope this helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Matt WhiteMatt White Posts: 60
    edited 2006-07-03 22:55
    Thanks Chris..·at least I know what stamp to use·(I also have a BS2p and a BS2px).· So I'll switch over to using one of those.· I believe I bought the DS2405 Digital Switch from·the Parallax·website in the misc. components section.· I did a search on google for the datasheet and found one, I'm more or less looking for an example of how to communicate with the device using OWIN and/or OWOUT.· I may have a DS1820 laying around in a bin someplace.· I'll try working through some example code with the DS1820·and see if I can make sense of the DS2405's·datasheet.

    Thanks!
    Matt
  • Matt WhiteMatt White Posts: 60
    edited 2006-07-04 01:28
    Okay well... after reading through the datasheet and Jon's N&V column #72, and·reading through code for the·DS1820, it seems using 1-wire to activate a switch for my application is over complicated (although 1-wire looks very intresting).· I ended up using a 2N3904 transistor... much easier!

    Thanks!
    Matt
    1600 x 1200 - 444K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-07-04 03:40
    Matt,

    ·· That part works better in an environment where you need a whole network of switches...In that case using NPN transistors would require an I/O line for each one, but the 1-Wire parts can be networked.· So it really depends on your application.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
Sign In or Register to comment.