Shop OBEX P1 Docs P2 Docs Learn Events
BS2, driving a pump/AC motor, latch output? — Parallax Forums

BS2, driving a pump/AC motor, latch output?

InerlogicInerlogic Posts: 4
edited 2006-04-18 16:19 in BASIC Stamp
ok, after a bunch of searching around on the forums i didn't see anything that i figured could help me, so here goes...

i'm looking to convert a system at the lab i work at from analog electronics
(which have ceased to work, and it's inventor has passed away and left no schematics)
to being controlled by a BS2

the device i am looking to control is for bleach regeneration in a photo processing lab,
here's what i need to do:

high level float sensor trips indicating the tank is full
a buzzer in the darkroom is triggered and a lightbulb outside the darkroom is lit (40watt AC current)
thus alerted the ever vigilant darkroom tech adds the appropriate ammount of regenerator to the tank and pushes a button
this button press will silence the buzzer, turn off the lightbulb and will start a 120V AC motor in the tank which mixes the solution
for 15 minutes, i'd like this 15 minutes to be adjustable which is why i like a microcontroller for this project.
anyway, after the set mixing time, the mixer should shut off, and a peristaltic pump is activated which pumps the
mixed solution back up to the source tank until the liquid level gets low enough to deactivate the low level float sensor.

i've been experimenting with the BS2 homework board, but i've ordered 2 of the BS2 OEM kits for use when i finally implement
this solution. i do not have the specs on the AC mixer's motor or the AC peristaltic pump, the unit as it stands now has a 6amp fuse
on the AC line, so i figure if i use relays rated for at least 10Amps i'll be good to go....

i've included ALL the details i could think of looking for any expert suggestions from the members here [noparse]:)[/noparse]

the specific issue i was wondering about is the 18ms drop-out every 2.3 seconds with the BS2

if i drive a mechanical relay (with a transistor) will the relay "chatter?" every 2.3 seconds?
i don't want to deal with a lot of heat as i'd like to seal the controller board and electronics from the environment (photochemistry is quite corrosive)
so i wasn't considering solid state stuff... would a cap across the relay's coil leads dampen the 18ms drop-out?
should i look into a D-latch?

are there any gotchas i haven't thought of?

Thank you for your time [noparse]:)[/noparse]

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-15 23:00
    Hello,

    ·· The "drop-out" you refer to happens either when you use the SLEEP command or the program ends and is a result of the internal watchdog timer.· If your program doesn't end this won't happen.· You can end it with STOP which will also prevent this.· Depending on how the circuit is driven you could also use a pull-up/pull-down resistor to keep the line pulled toward the desired signal.· This really depends on many factors though.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • InerlogicInerlogic Posts: 4
    edited 2006-04-15 23:27
    right, i figured i could set the pin which controlls the mixer relay high and then put in a sleep command to give me the 10 or 15 minutes of mixing required.

    oh, and i don't actually want the program to end, once it steps through the process, i want it to go back and wait for the high level senor to go high again...

    Depending on how the circuit is driven you could also use a pull-up/pull-down resistor to keep the line pulled toward the desired signal. This really depends on many factors though.

    well, i was going to have an output pin from the stamp tied to the base of a transistor which would drive a relay which would in turn (no pun intended, honest) drive the motor (and seperate ones to drive the lightbulb and pump)
    or use a MOSFET to drive the relay which drives the motor....

    i'm just looking for some expertise from those who've done this type of thing before so i don't have to be a guinea pig,
    why re-invent the wheel ya know? [noparse]:)[/noparse]
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-16 02:25
    The reason I said it depends on the circuit is because it could cause problems if you're not careful.· But you could use a pull-up resistor on a transistor to keep the Relay on when the Stamp I/O pin goes Hi-Z.· The I/O pin needs to be low to turn the transistor off.· However, if the Stamp is off the relay power needs to be off with it or it is possible to have the relay be on when the Stamp is off.· I hope that made sense.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • InerlogicInerlogic Posts: 4
    edited 2006-04-18 05:00
    well, as it turns out, using a MOSFET was the answer to my query...

    i set a BS2 pin high to direct drive an LED and then put the stamp to sleep..

    flicker-flicker

    tie a pin to the gate of an IRF-510, use that to drive the LED (a subsititute for my load) and the gate retains enough charge
    to keep the LED lit steady...

    haven't hooked up the scope to see what's really going on, but i think this may just do it...
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-04-18 06:20
    I could see that happening since normally you would use a 10K resistor pull-down on the gate to curb this effect.· I guess in your case it's wanted though.· But is it reliable?· Especially in the finished circuit...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • InerlogicInerlogic Posts: 4
    edited 2006-04-18 16:19
    But is it reliable? Especially in the finished circuit...

    i'll let you know [noparse];)[/noparse]
Sign In or Register to comment.