User avatar
rpdom
Posts: 15451
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Hospital Bed

Wed Jul 03, 2013 6:11 am

simple972 wrote:
rpdom wrote:It depends on how much current the connections take. I'd assume not a lot as they are just push buttons. In that case I'd go for simple opto-isolators to keep the Pi electronics separate from the bed electronics.

You say that connecting the other pins to pin 2 makes the bed function. That doesn't mean it is ground (unless you tested with a meter). It could be +5v or +3.3v or any low voltage. You'll need to check the polarity first. But I don't see any real problems with getting it working.

Circuit would be something like this crude ASCII art for each pin.

Code: Select all

                      ------
GPIOx----[Resistor]---|OPTO|----Bedx
                      |ISOL|
GND-------------------|ATOR|----BedCommon
                      ------
what do you think about this?
http://www.bdmicro.com/opto8/
That board looks like it is designed to handle inputs to something like the Pi, rather than drive outputs. The resistors on the input side seem to be aimed at receiving a higher voltage input than the Pi would be giving them (5v, 12v etc) and the outputs look suitable for driving GPIO pins. It could work, but you'd need to fit the "user option" resistors with values suitable for 3.3v.

We still need to find out how much current is required to trigger the bed, even though I strongly suspect it is just a few tens of milliamps at most. Perhaps one of the other people who are looking at similar units can make a measurement with an ammeter across one of the buttons. The voltage would be good to know too, but that is also going to be low for safety reasons.

simple972
Posts: 12
Joined: Mon Jul 01, 2013 2:20 am

Re: Hospital Bed

Wed Jul 03, 2013 4:33 pm

ok makes sense
I got a cheap digital multimeter from the shack. I'll get some numbers asap

simple972
Posts: 12
Joined: Mon Jul 01, 2013 2:20 am

Re: Hospital Bed

Fri Jul 05, 2013 10:12 pm

Is this correct?
Attachments
Capture.JPG
Capture.JPG (62.13 KiB) Viewed 1480 times

User avatar
rpdom
Posts: 15451
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Hospital Bed

Sun Jul 07, 2013 12:06 pm

simple972 wrote:Is this correct?
It looks right to me :)

simple972
Posts: 12
Joined: Mon Jul 01, 2013 2:20 am

Re: Hospital Bed

Mon Jul 15, 2013 2:12 am

I must be doing something wrong.
I went successfully went through led setup just to make sure I was on the right page. So siriproxy and wiringpi working great and are not the problem.
But when I hook up the pins from my bed control ...nada. In fact the buttons on the original controller don't work either.
But if I unplug the ground pin from the breadboard the buttons on the original work again.

(oh I have a Y-plug for the control box on the bed. from the manufacturer. picture below.) The Y-plug does work and is not the problem.

So controller (A) works as long as contoller (B) has the ground unplugged.
Attachments
71602_l.jpg
one has a cap on in the photo
71602_l.jpg (50.86 KiB) Viewed 1420 times

User avatar
rpdom
Posts: 15451
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Hospital Bed

Tue Jul 16, 2013 8:16 am

It does sound like something is wired up incorrectly.

I'm wondering about the pin-out of the opto-isolators you are using. I couldn't make out a part number on the diagram you posted. If we've got the transistor (output) side of the isolator hooked up wrong, it could act as if it was always on and be like all the buttons being pressed at once!

Could you give the part/type you've used and I'll check the wiring from your breadboard diagram.

simple972
Posts: 12
Joined: Mon Jul 01, 2013 2:20 am

Re: Hospital Bed

Tue Jul 16, 2013 2:27 pm

Liteon 4n35 from oddwires.com SKU:COC-0000001

http://cdn1.bigcommerce.com/server800/a ... 0.1280.jpg

User avatar
rpdom
Posts: 15451
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Hospital Bed

Fri Jul 19, 2013 7:24 am

simple972 wrote:4n35
Yes, that should do the job, and the pin-out is pretty standard. Your diagram looks correct.

The next thing that I would try is disconnecting all the connections to from the bed to the breadboard except the ground and just one switch wire. Then see if that acts as if that one button is pressed all the time, or if it still locks up.

Return to “General programming discussion”