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

Hospital Bed

Mon Jul 01, 2013 3:05 am

Hello, I'm a quadriplegic and I my best friend is Siri and I use siriproxy to
control most devices I have.

I have an electric bed that has functions head up/down, foot up/down and raise/lower.
The wired controller has six buttons and is plugged in using a 10p10c RJ-50. But it only uses 7 pins 2-8. I fooled around with them through a RJ-50 break out board and found that pin 2 must be ground because when pins 3-8 connect to pin 2 they perform their function.
So using siriproxy to control the gpio's is what I,m doing.I need help on the wiring PLEASE.

Should I use transistors, relay's or do I need anything at all just put pin2 to ground and pins 3-8 to any gpio.

Thanks in advance for any input.

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

Re: Hospital Bed

Mon Jul 01, 2013 7:02 am

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
                      ------

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Hospital Bed

Mon Jul 01, 2013 1:12 pm

While I have sympathy for your situation, I have to caution you and others about wiring the RPi up to various devices, especially when public safety is concerned. Properly engineered solutions will have fail safe mechanisms to prevent electrical fire and personal injury. Just because you can connect something up to the RPi doesn't mean you should. Anyone posting information or suggestions may find themselves liable if their designs are later determined to be the cause of personal injury or property damage.
Last edited by elvisimprsntr on Mon Jul 01, 2013 2:47 pm, edited 1 time in total.
http://www.youtube.com/user/TheElvisImprsntr

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Hospital Bed

Mon Jul 01, 2013 1:36 pm

elvisimprsntr wrote:Anyone posting information or suggestions may find themselves liable if their designs are later determined to be the cause of personal injury or property damage.
An interesting comment, can you cite law or precedent for such prosecutions?

It seems improbable. Liability would surely rest with the "designer" who used ad-hoc forum postings to implement a safety critical system.

"Just because you can..." is fair comment.

elvisimprsntr
Posts: 131
Joined: Sat Dec 29, 2012 11:36 pm
Contact: Website

Re: Hospital Bed

Mon Jul 01, 2013 2:46 pm

PiGraham wrote:
elvisimprsntr wrote:Anyone posting information or suggestions may find themselves liable if their designs are later determined to be the cause of personal injury or property damage.
An interesting comment, can you cite law or precedent for such prosecutions?

It seems improbable. Liability would surely rest with the "designer" who used ad-hoc forum postings to implement a safety critical system.

"Just because you can..." is fair comment.
Last time I checked the RPi TOU does not provide any public safety liability protection/disclaimer.
http://www.raspberrypi.org/phpBB3/ucp.php?mode=terms

I could not find a PDF of the RPi product sheet included in the box which may provide the foundation some protection, but that would not cover forum users.
Last edited by elvisimprsntr on Mon Jul 01, 2013 3:17 pm, edited 1 time in total.
http://www.youtube.com/user/TheElvisImprsntr

User avatar
jackokring
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Hospital Bed

Mon Jul 01, 2013 3:13 pm

The responsibility rests with the manufacturer. The designer may have some liability, but just copying a design, (which surely is a copyright violation or maybe a registered design violation, and maybe that's why it's registered - kerching!) is not at the discretion of the designer. Anyone who had no say in eventual use and implementation could not be liable for free speech.

In electrical and electronic engineering, the rule is of the form "You must not MAKE a product with which people can accidentally injure themselves via misadventure." Of course this excludes the obvious "But the laptop was used to hit the man on the head, and so the manufacturer is responsible."

This of course lead to the sealed unit, and the landfill paradox of defending against the "it's got electrolytes!" majority. Although screws are often sufficient, there is quite a lot of wiring standard practice based around double insulation and acceptable failure modes without interlocks, warning signs and emergency stop controls.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

PiGraham
Posts: 3665
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Hospital Bed

Mon Jul 01, 2013 3:27 pm

elvisimprsntr wrote:I could not find a PDF of the RPi product sheet included in the box which may provide the foundation some protection, but that would not cover forum users.
I don't think the RasPi is marketed as fit for any particular purposes. It is an educational product.
If anyone uses it for a purpose it is surely up to them to ensure suitability, at their own liability.

User avatar
jackokring
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: Hospital Bed

Mon Jul 01, 2013 3:40 pm

PiGraham wrote:
elvisimprsntr wrote:I could not find a PDF of the RPi product sheet included in the box which may provide the foundation some protection, but that would not cover forum users.
I don't think the RasPi is marketed as fit for any particular purposes. It is an educational product.
If anyone uses it for a purpose it is surely up to them to ensure suitability, at their own liability.
As a development board, it is suitable for development of product. This means it is useful for testing a product idea. It does not mean it is suitable for eventual use in a product (although it may be under certain circumstances). Testing in this circumstance does not mean on the end of power machinery with live subjects, without sufficient safety oversight.

Forum users have no liability for other peoples developments. I expect that they intend to be informative rather than compulsory.
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

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

Re: Hospital Bed

Mon Jul 01, 2013 6:16 pm

This is not what I wanted besides RPDOM nobody is helping.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23872
Joined: Sat Jul 30, 2011 7:41 pm

Re: Hospital Bed

Mon Jul 01, 2013 6:26 pm

simple972 wrote:This is not what I wanted besides RPDOM nobody is helping.
Very true.

Come on people, ignore the unnecessary legal fluff, anyone have answers?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

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

Re: Hospital Bed

Mon Jul 01, 2013 7:06 pm

some pics
Attachments
IMG_0098.JPG
IMG_0098.JPG (50.49 KiB) Viewed 3102 times
IMG_0099.JPG
IMG_0099.JPG (55.05 KiB) Viewed 3102 times

jameswalmsley
Posts: 35
Joined: Thu Nov 08, 2012 3:26 pm

Re: Hospital Bed

Mon Jul 01, 2013 7:12 pm

RPDom has the best advice, the rest are all spouting non-sense :P gotta have fun sometimes guys, or no-one would ever invent anything.

I cant give you any definite answers, but...

1. Judging by the fact that you can pull the lines to ground, (without any bangs/sparks) and stuff actually happens. And furthermore its a control box on a likely medical grade system... and therefore reasonable to assume no current, and low voltage, i.e. a pull-up resistor...

2. A basic transistor should work, and you could even put in a little resistor for good measure.

Sounds like a really awesome project.

James :)

OtherCrashOverride
Posts: 582
Joined: Sat Feb 02, 2013 3:25 am

Re: Hospital Bed

Mon Jul 01, 2013 7:14 pm

jamesh wrote:Come on people, ignore the unnecessary legal fluff, anyone have answers?
I'm sure someone's legal department just had their hearts stopped.

Legal issues aside, its also unethical and/or immoral to assist someone with experimenting on themselves. This individual is unable to escape by themselves in the event of malfunction. Furthermore, that could easily lead to death through asphyxiation or a number of other plausible scenarios. Should others wish to participate in this reckless endeavor, at the very least the schematic or even the model number of the bed should be know. Additionally, testing should be conducted on a bed that is not used by the patient and with someone who could egress should thing go wonky while ingesting a beverage.

jameswalmsley
Posts: 35
Joined: Thu Nov 08, 2012 3:26 pm

Re: Hospital Bed

Mon Jul 01, 2013 7:18 pm

I'm finding datasheets on this thing. Thanks for the images, I'll see what I can dig up.

James

jameswalmsley
Posts: 35
Joined: Thu Nov 08, 2012 3:26 pm

Re: Hospital Bed

Mon Jul 01, 2013 7:20 pm

OtherCrashOverride wrote:
jamesh wrote:Come on people, ignore the unnecessary legal fluff, anyone have answers?
I'm sure someone's legal department just had their hearts stopped.

Legal issues aside, its also unethical and/or immoral to assist someone with experimenting on themselves. This individual is unable to escape by themselves in the event of malfunction. Furthermore, that could easily lead to death through asphyxiation or a number of other plausible scenarios. Should others wish to participate in this reckless endeavor, at the very least the schematic or even the model number of the bed should be know. Additionally, testing should be conducted on a bed that is not used by the patient and with someone who could egress should thing go wonky while ingesting a beverage.
Sounds like your being over cautious. Although I would say make sure someone is around to help you as your testing this stuff out.

I with jamesh on this ;)

OtherCrashOverride
Posts: 582
Joined: Sat Feb 02, 2013 3:25 am

Re: Hospital Bed

Mon Jul 01, 2013 7:32 pm

jameswalmsley wrote:Sounds like your being over cautious.
I just dont trust the RPi or Siri with my or anyone else's life. Siri has tried to kill before!
http://newsfeed.time.com/2012/12/11/aus ... reatening/
;)

In today's world, apparently warning labels are required for everything.

jameswalmsley
Posts: 35
Joined: Thu Nov 08, 2012 3:26 pm

Re: Hospital Bed

Mon Jul 01, 2013 7:36 pm

I'm struggling to find a pinout for that connector. Although it seems like a few manufacturers actually make compatible control boxes.

If you could upload some pictures of the box when opened up, high-resolution of the PCB from both sides then we can easily see how it works. It should be very simple.

In the meantime I'll see if I can find anything.

Currently I'm going by pin2 being GND.

Is there any specific model number on the control box?

James

jameswalmsley
Posts: 35
Joined: Thu Nov 08, 2012 3:26 pm

Re: Hospital Bed

Mon Jul 01, 2013 7:37 pm

OtherCrashOverride wrote:
jameswalmsley wrote:Sounds like your being over cautious.
I just dont trust the RPi or Siri with my or anyone else's life. Siri has tried to kill before!
http://newsfeed.time.com/2012/12/11/aus ... reatening/
;)

In today's world, apparently warning labels are required for everything.
Maybe Apple would be liable then :D ... thats good enough for me.

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

Re: Hospital Bed

Mon Jul 01, 2013 8:00 pm

From the sounds of things, I would say that the standard control panel is just a few switches between various pins and ground. All the fail-safe and other safety features would be built into the bed itself and associated control circuitry - which would be sensible. There have to be safety cut-outs for the case where someone holds the button down for too long.

So no need to be ultra-cautious on the Pi. All it is doing is emulating a set of switches being pressed.

User avatar
cyrano
Posts: 714
Joined: Wed Dec 05, 2012 11:48 pm
Location: Belgium

Re: Hospital Bed

Mon Jul 01, 2013 9:40 pm

rpdom wrote:From the sounds of things, I would say that the standard control panel is just a few switches between various pins and ground.
I just opened a similar connector on a similar bed. It's just six switches to ground - makes sense.
All the fail-safe and other safety features would be built into the bed itself and associated control circuitry - which would be sensible. There have to be safety cut-outs for the case where someone holds the button down for too long.
You can't block the motors. They just switch off in the end position or when friction gets too high. And that friction is low. It would be hard to really injure yourself. Of course, some people are better at these things ;-)
So no need to be ultra-cautious on the Pi. All it is doing is emulating a set of switches being pressed.
Even engaging both down and up switches at the same time does nothing at all.

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

Re: Hospital Bed

Mon Jul 01, 2013 9:52 pm

OK!
For the concerned people out there I appreciate the thought.

But my bed (mattress and frame) is fire retardant. I have cams with audio and detectors in my room. My safety is well taken care of.
I do have breathing problems laying on my back I also use my xbmc for hours before I lay down.
It would be nice if my mother did not have get up at 1 or 2 am to push the head down button.

---------------

put a 1.7V led from (pin 2) to 3-8 today and it lit up but the functions did
nothing.

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

Re: Hospital Bed

Tue Jul 02, 2013 5:26 pm

jameswalmsley wrote:I'm struggling to find a pinout for that connector. Although it seems like a few manufacturers actually make compatible control boxes.

If you could upload some pictures of the box when opened up, high-resolution of the PCB from both sides then we can easily see how it works. It should be very simple.

In the meantime I'll see if I can find anything.

Currently I'm going by pin2 being GND.

Is there any specific model number on the control box?

James
I can barely get to it but I think it is CB60003-08

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

Re: Hospital Bed

Tue Jul 02, 2013 6:08 pm

control box pics
Attachments
IMG_0104.JPG
IMG_0104.JPG (61.29 KiB) Viewed 2906 times
IMG_0102.JPG
IMG_0102.JPG (63.91 KiB) Viewed 2906 times
IMG_0105.JPG
IMG_0105.JPG (62.61 KiB) Viewed 2906 times

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

Re: Hospital Bed

Tue Jul 02, 2013 6:44 pm

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/

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

Re: Hospital Bed

Tue Jul 02, 2013 8:45 pm

I appreciate the help. I'll be posting pics of all the progress.

Return to “General programming discussion”