Shop OBEX P1 Docs P2 Docs Learn Events
Serial to USB Coverter Possible With BS2 and Basic Carrier Board — Parallax Forums

Serial to USB Coverter Possible With BS2 and Basic Carrier Board

BrianZBrianZ Posts: 28
edited 2012-02-12 10:42 in BASIC Stamp
I have the Basic Stamp 2 with carrier board with serial port, however I don't have a serial port available on my PC. Can anyone tell me if it is possible to simply use some kind of serial to USB cable or converter to use via a USB port, or must I buy a new USB carrier board for the BS2? Any advice or links to hardware I could use would be appreciated. Thanks.

Comments

  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2012-01-27 17:16
    Welcome to the Forum!

    All you need is the USB to Serial adapter (and a cable of course)
    http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/adapter/List/0/SortField/4/ProductID/378/Default.aspx
  • BrianZBrianZ Posts: 28
    edited 2012-01-28 04:47
    Thank you, Ron!
    I haven't used my BS2 for about 15 years, and you can't even find a serial port on a PC these days unless you add it yourself. The newer USB "board of education" is nice, but I can just add a breadboard, so this USB converter is a cheaper solution.

    What I want to do is interface with a solenoid valve for precise control of delivering water drops for photography. The solenoid I have in mind uses 24V and about 200ma, so will need a switching interface to protect the stamp from the higher power. I will also need to write a program that can deliver two drops at a time (for collisions) with about 60ms between drops, while opening the valve for approx 10-50ms per drop, and with a way to make that time period selectable. Seems like this should be fairly simple.
    Any advice or tips for interfacing or programming are welcome. I already found Nuts&Volts Column#6, which appears to have a good solution for the switching interface. Now I wonder if there is a sample solenoid control program already written somewhere.

    Thanks again for your help and saving me some money, which I can now use for the other stuff I still need.
    -Brian
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2012-01-28 04:59
    You could use a IRF3708 or IRLZ34N MOSFET to drive the solenoid.
  • BrianZBrianZ Posts: 28
    edited 2012-01-28 11:49
    Thanks, Ron. Would the MOSFET offer any advantage over using a 2803 Darlington chip?
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2012-01-28 16:25
    If you only need to control one relay, the ULN2803A would have seven unused switching circuits. I think the MOSFET would draw less current from the Basic Stamp but not sure.

    The MOSFETS will handle much more current too.

    An interesting comment about the current limit of the ULN2803 http://sci.tech-archive.net/Archive/sci.electronics.basics/2005-10/msg00192.html

    There are some forum members who do know - maybe they'll chime in...
  • BrianZBrianZ Posts: 28
    edited 2012-02-12 10:42
    Thanks. I found a 3-pin TIP120 Darlington Transistor at Radio Shack (#276-2068), which I think should work for switching this solenoid. The valve is 24V/6.9W, so should be less than 300mA, and the TIP120 is rated at 65W, 60V, 5A. One thing I'm not sure about is the response time, since I will be trying to turn the switch on and then off so that it's only open for anywhere from 10-50 milliseconds at a time and then do it again exactly 60ms later, give or take a few ms.
Sign In or Register to comment.