Shop OBEX P1 Docs P2 Docs Learn Events
The Squawking boe-Bot — Parallax Forums

The Squawking boe-Bot

Joe-BotJoe-Bot Posts: 24
edited 2013-04-04 21:03 in Robotics

So I have a little project planned. I’m calling it the Squawking boe-Bot. I guess I could call it the singing Boe-Bot.
Anyway for my Birthday I received a very funny but appropriate card. When you open the card it plays a little jingle. It’s a good jingle, but how many times do you want to open a card and here it, right.
I thought it would be fun to see if I could make my Boe-Bot play the jingle and dance a little routine. So I cut the card open to see if it was doable. I attached a photo of the guts, or as I call it, the squawk box.
The triggering device was the photocell, which I learned is just an on off switch (I always thought they generated a little voltage). Not knowing the total capability of my Micro controller yet, I figure I could use a relay to safely switch it on and off.
The relay is also in the photo, which I purchased from the local Radio Shack. I think it’s the right one for the job, feedback on this would be greatly appreciated, here are the specs.

5VDC/1A SPDT Micro Relay
Coil voltage: Nominal–5VDC; maximum–6.5VDC
Nominal coil current: 89.3 mA
Coil resistance: 56 ohms

I’m going to use the High and Low command to operate it, I’m not sure how the pause is going to work in to this, but I have time to think about that.

What do you think.

Looking at the squawker(PCB), I’m sure as I learn a little more I will be able to eliminate the Button cells and relay ,then power it from the Boe-Bot power supply.


Comments

  • kwinnkwinn Posts: 8,697
    edited 2013-02-24 12:25
    Those button cells are pretty low current devices so you may even be able to operate it directly from the I/O pin. Worst case you might need a transistor if the current required is more than the uC pin can provide. Since the relay coil draws about 89mA you will need a transistor for it. May as well use the transistor directly and do away with the relay.
  • ercoerco Posts: 20,256
    edited 2013-02-24 21:26
    Radio Shack also sells a 5V, 20 mA reed relay which a Stamp can drive directly from an IO pin. No transistor needed, just the usual flyback/freewheeling/snubber diode reverse-biased across the relay coil.
  • Joe-BotJoe-Bot Posts: 24
    edited 2013-02-25 18:18
    Alright, Thanks for the Info guys, You've given me options to explore.
  • Joe-BotJoe-Bot Posts: 24
    edited 2013-03-02 20:33
    So attached is the schematic for my relay drive, This diodes good right?
    I/O Pin HIGH = Music circuit closed
    I/O Pin LOW = Music circuit open
  • kwinnkwinn Posts: 8,697
    edited 2013-03-03 18:44
    Joe-Bot wrote: »
    So attached is the schematic for my relay drive, This diodes good right?
    I/O Pin HIGH = Music circuit closed
    I/O Pin LOW = Music circuit open

    It's good.
  • ercoerco Posts: 20,256
    edited 2013-03-05 15:36
    It is fine. Note that a Stamp pin can source 20 mA, but it can sink 25 mA. So you could increase your safety margin a tad by connecting the relay coil to the I/O pin and +5V. In this configuration, making the pin HIGH turns the relay off, and making the pin LOW turns the relay on.

    Probably only matters if you have another pin that is pulling any significant current.
  • Joe-BotJoe-Bot Posts: 24
    edited 2013-03-05 19:34
    Thanks Kwinn, and thanks Robby. I was wonder about running it from the Vdd, but I was thinking it would be on all the time, but that's not the case, it won't be anything until I give it a command. So many year with house, auto, and boat wiring, the positive is always the one switched, It's going to take awhile to make that adjustment.

    Is any particular pin better for this use, or are they all pretty much even?
    Well at least I’ve learned a few thing about relay. I ‘m really liking those latching relays I read about in one of your blogs
  • Joe-BotJoe-Bot Posts: 24
    edited 2013-03-09 09:14
    Transistor verses non transistor

    Am I correct in assuming (this is were I always got in trouble with girlfriends) that if the diode should vibrate lose during maneuvers and there was a kick back from the relay coil,

    1. With the use of a switching transistor, it would be the .59 cent transistor that might get damaged.
    Verses
    2. Without the transistor it would be the Basic Stamp that could be damaged?
  • kwinnkwinn Posts: 8,697
    edited 2013-03-09 12:25
    Joe-Bot wrote: »
    Transistor verses non transistor

    Am I correct in assuming (this is were I always got in trouble with girlfriends) that if the diode should vibrate lose during maneuvers and there was a kick back from the relay coil,

    1. With the use of a switching transistor, it would be the .59 cent transistor that might get damaged.
    Verses
    2. Without the transistor it would be the Basic Stamp that could be damaged?

    Personally I would use a transistor to drive a relay coil even though the uC pin could handle it. As you noted it gives an extra layer of protection for the uC. As for the diode coming loose, that would not be a problem if it is soldered to the board or across the relay coil contacts.
  • Joe-BotJoe-Bot Posts: 24
    edited 2013-03-10 11:25
    Ok thanks kwinn. I was at Radio Shack yesterday and found a little circuit board, so I could do just that. This way I have it off to the side where it will unclutter my breadboard so I can finish my chapters.

    If anybody’s interested, the Shack in Seaside had a decent little display of Parallax product. I didn’t see anything at the store in Monterey, which is a drag because that’s where the guy with the knowledge works.
  • Joe-BotJoe-Bot Posts: 24
    edited 2013-04-04 21:03
    Okay all done
    I’ve add a photo of my Boe-Bot with the relay circuit on top, and the music module underneath.
    In music timing is everything. Joseph

    RelayModule (2).jpg
    1024 x 920 - 116K
Sign In or Register to comment.