Shop OBEX P1 Docs P2 Docs Learn Events
help controlling a hacked toy w/ Stamp — Parallax Forums

help controlling a hacked toy w/ Stamp

chthonikchthonik Posts: 2
edited 2009-10-11 10:19 in BASIC Stamp
So I have a hacked toy cat I'm trying to control w/ my BS2 (I also have a BoE). I've used a Stamp for years to control MIDI devices but this is my first foray into motors and could use some pointers.

What I'm trying to do: There are two motors controlling the cat's motions. I'm mostly new to motors, but unless I'm mistaken they aren't servos (told you I was new to this!)- applying voltage to one pole rotates clockwise, to the other pole, ccw. In order to get this thing to work, I need to rotate slightly one way, then slightly the other (the toy did this with it's original circuit board, and there are stops for the motor but I'm not using the original circuit, just the motors).

Getting the motor to move one way is easy (short pulsout to one pole, other end connected to ground), but how to get it to move back (i.e. reverse the arrangement)?

I'd prefer to use the Stamp alone but if there's a pretty easy cheap solution out there (like a couple cheap ICs or whatever) that's great too. Anybody got any thoughts, suggestions, or hints?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-06 14:11
    You need what's called an "H-bridge". Read the Wikipedia articla on this (Google "Wiki H-Bridge"). There are some simple H-Bridge ICs that are easy to use and relatively cheap (the L293 comes to mind). Parallax provides one of these with their Professional Development Board and the StampWorks Manual has some exercises / examples of its use.

    www.me.umn.edu/courses/me2011/robot/technotes/L293/L293.html
  • chthonikchthonik Posts: 2
    edited 2009-10-06 14:15
    Great, thanks Mike, I'll check that out!

    Just checked the article, datasheets and even found a schematic and PBasic code for the L293. Perfect, thanks again!

    I'll have that cat arching it's back and yowling soon!

    Post Edited (chthonik) : 10/6/2009 2:23:18 PM GMT
  • Marz KrishnaMarz Krishna Posts: 26
    edited 2009-10-11 10:19
    also, if you could remove the controller chip from the cat there's probably H-bridges that you can tap directly from the native circuit board. just make sure you ground the cat to you're basic stamp.
Sign In or Register to comment.