Shop OBEX P1 Docs P2 Docs Learn Events
[Fwd: Re: newbie - replace 3 switches - 5 Volt; 0,1 mA] — Parallax Forums

[Fwd: Re: newbie - replace 3 switches - 5 Volt; 0,1 mA]

ArchiverArchiver Posts: 46,084
edited 2003-09-16 21:23 in General Discussion
Since this inadvertently went to me directly instead of the list I
thought I'd post it and the reponse here [noparse]:)[/noparse]
CLIP

Francesco,

Based on your use, wouldn't it seem you'd be best off with a Joystick
rather than switches? I picture the "long click" or "short click" method
as being troublesome since you would have to make real-time decisions. I
can imagine the chair moving forward while you're clicking away at the
switches trying to get it to stop! [noparse]:)[/noparse]

I know there are lots of folks using the Stamp to create projects so
there might be a number of solutions that are already available. [noparse]:)[/noparse]

Vern

Original Message
Subject: Re: newbie - replace 3 switches - 5 Volt; 0,1 mA
From: "Francesco Fumanti" <francesco.fumanti@g...>
Date: Tue, September 16, 2003 2:40 pm
To: From:
Hello Vern,

First of all thank you for your reply.
[noparse]:)[/noparse]

>A few questions for you first:
>
>Would there be any feedback device for the operator?
>(i.e. beeper, LED indicator?)

If there will be a feedback device, it will be a beeper; this question
has not been settled yet.

>Do the three discrete switches you have now need to stay in a
>postion or are they momentary?

It will be a mix (see explanation below).

>Is the goal of the circuit to reduce the amnount of wire between the
>switch and the device? Iis it to reduce the count of switch components
>thereby reducing cost? Is it to reduce operator error? Reduce operator
>training?

It is to reduce the number of switches:

My powerchair is operated by 3 switches, but I have difficulties to
operate the 3 switches; however I will be able to operate 2 switches with
much more dexterity.

The brand of my powerchair does offer a 2 switch solution, but it is
reduced to scanning: this means it is not possible to steer while
driving: one can only drive straight and has to stop to turn left or
right. Other brands however offer a non-scanning solution with 2
switches.

As I cannot change powerchair, I decided to do it by myself and chose the
Basic Stamp because it is possible to program it in Basic (I have
moderate experience with programming in Pascal and C; so I am a newbie
only at electronics ;-).

The 3 switches of my powerchair are:
switchL is to turn left
switchR is to turn right
switchG is to drive

The powerchair advances as long as switchG is active; as soon as switchG
is released, the powerchair stops independently of the state of the other
two switches; however, while advancing, the switchL steers to the left as
long as switch is active; similar for switchR. (To toggle between
forwards/backwards, I have to activate switchR for 3 seconds while
standing still.)

How will I code it with to switches:

A doule-click on switch1 will toggle the state of switchG
A simple down on switch1 will be momentary with switchL (there will be a
little delay to differentiate between double-click and simple down, but
the speed of the powerchair is so low that it does not matter if switchL
activates about half
a second later after switch1 is activated)
A simple down on switch2 will be momentary with switchR

(For security reasons, there already is an emergency stop; and it will
remain independant from the BS2.)

>Sometimes it is best to know the *goal* of the project (i.e. I will get
>a better response to a questions such as "How do I increase my car gas
>milage" instead of a question such as "how do I adjust the timing of my
>distributor?" since in the latter, you may have decided that adjusting
>the distributor is the only solution, thereby limiting what others may
>offer for advice on the *real* goal.)
>
>The answer to these questions would help in guiding my (and
>others) responses... [noparse]:)[/noparse]
>
>That being said, it would be possible to use two SPST switches to
>produce the output of three SPST switches using binary as such:
>
>S1 S2 S1 S2 S3
>
>0 0 = 0 0 0
>1 0 = 1 0 0
>0 1 = 0 1 0
>1 1 = 0 0 1
>
>Again, I have to work with assumptions that may not be correct in
>your circumstances (i.e. there are no "combo" positions of the
>three switches where more than one is closed at a time)


An activation of switcheL and switchR will be possible while switchG is
active (to steer while driving); so a combo position will be possible.
Moreoever the two switches I will use, will be mutually exclusive; so
(S1,S2) = (1,1) will not be possible.

I measured the sockets where switchL and switchG will be connected to,
and it read: 4.9 VDC; 0.1 mA.

If you have any suggestion, especially about how to create the circuit
for the 3 output switches, I will be glad to here about it.

Have a nice day.

Francesco

>Francesco Fumanti said:
>>
>> Hello,
>>
>>
>> I want to replace 3 (A,B,C) handswitches with 2 switches (1,2); for
example a double click of switch1 will toggle switchB; a long click
on switch1 will activate switchA for as long as switch1 is active;...
>>
>> ________
>> | |
>> --Switch1-->
| |
>> | |--switchA->---
>> | BS2 |--switchB->---
>> | |--switchC->---
>> --Switch2-->
| |
>> |________|
>>
>>
>> How to connect the input switches to the BS2 is discribed in the
Basic Stamp manual; but how can I create the 3 SPST normaly open
output switches?
>>
>> I found a schematic, where a pin of the BS2 controls a transistor,
which controls a relay (as the BS2 cannot provide enough current for
the relay).
>>
>> I measured the tension and current of the socket where the
>> switches A, B, C will be connected to: 4.9 V and 0.1 mA for
>> each socket.
>>
>>
>> Could you please tell me precisely what transistor or relay to
>> use? Moreover, as I am a complete newbie in electronics could
>> you please tell me whether there is a more elegant way to
>> implement the 3 output switches? Maybe an IC? a Solid State
>> Relay? What IC?
>>
>>
>> Thanks in advance for your help.
>>
>> Francesco Fumanti
>>
Sign In or Register to comment.