ZappBots wishes a warm welcome to everyone.

Especially our visitors from
Savage///Circuits and Parallax!!!


Please take a look our new forums, we hope you register and become an active user.

The ZappBots forums are being run on phpBB 3.1.4 software which is different then the vBulletin used on the Savage///Circuits and Parallax forums.
Therefore, things look and work a little different, especially creating posts and uploading images / attachments.


The important thing is we have a place toTalk, Learn and Showcase our projects.

How to Help a 99.9% paralyzed person

This is the place to talk about Bio-Medical Electronics
User avatar
Savage///Circuits
VIP
VIP
Posts: 403
Joined: Tue May 12, 2015 2:43 pm
Location: Palmyra, NY
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Savage///Circuits » Wed Jun 03, 2015 6:09 pm

Originally posted on the Savage///Circuits Forums on February 5th, 2014, 02:35 PM by Chris Savage with edits

Originally Posted by Granz
UH OH, my inner teacher just reared up and seized the podium.

RS-232 - This is a protocol (a protocol is just a set of rules that everyone agrees to follow to get a job done - in this case everyone agrees to follow these rules to transmit data) to allow data to be transmitted over a serial line. Data can be sent across wires in either serial, or parallel, format. In parallel, all of the bits in a piece of data would be sent at the same time across multiple wires (a separate wire for each bit of data,) in the case of our ASCII code, you would need 7 bits (bit [Binary digIT] - the smallest amount of data that can be stored, it can be either a zero or a one - look up binary numbering system for more information) of data to transmit, or store, a single alphabetic character or a numeral. This would mean that you must have, at least, 7 physical wires to transmit one character in parallel. On the other hand, serial communication allows a piece of data to be sent, bit by bit, across a single wire. Nice savings over having to pay for 8 (or more) wires for each data cable. Without a protocol to define which bit you send first, second, third, etc. you would never be able to determine what data was being sent. The RS-232 protocol defines stuff like that (among many other things, such as the voltages used, etc.) RS-422 and RS-485 are other protocols for serial data transmission.

In any of those protocols, data can be transmitted either one direction at a time (simplex) or both directions at a time (duplex.) In some of the older circuits, there was all of the wiring needed to handle data transmission in both directions, but the protocol (or rules) allowed data to be sent only one direction at a time. This was similar to the telephone system that you use to call your friends; you can both talk at the same time, but neither one of you would get much out of the conversation. This was considered partial duplex; the capability for duplex was there, but not used simultaneously. Newer computers have the ability to both talk and listen at exactly the same time - this would be the full-duplex, that you mentioned. Simple, and full, duplex would be a sub-protocol of the full RS-232 (or RS-422, or RS-485) protocol that you use for your communication.

Ok, Teach just gave the podium back to Experimenter.


UH-OH! MY inner teacher just reared up and seized the podium. :shock:

RS-232 is an electrical specification, not a protocol.

Originally posted on the Savage///Circuits Forums on August 19th, 2013, 12:44 PM by Chris Savage

Serial Communication Explained

This post is long overdue. With my history of technical support and electronics / microcontroller design I often hear the term RS-232 used synonymously with serial communication. The fact is, they're not interchangeable. RS-232 refers to an electrical specification for the transmission of serial data whereas serial communication defines the protocol. Serial communication does not imply RS-232 as the interface specification. You could use RS-232 (Single-ended signaling) for serial communication, but you could just as easily use RS-422 or RS-485 (Differential signaling). And many devices communicate serially at logic level, which could be TTL or CMOS compatible (also single-ended). Note that another important thing to know here is that an RS-232 driver inverts the data, while logic level serial information remains non-inverted (true).

I think since RS-232 was the primary interface on early PC computers which had multiple RS-232 serial ports that we tend to think of serial data as RS-232. My biggest issue with this is that most serial data is simply not RS-232 level signals anymore, but some other specification, be it TTL, CMOS, RS-422, RS-485, USB...yes, that's right. USB replaces our older RS-232 technology on modern computers, which now also have serial hard drive interfaces such a Serial-ATA, or SATA. The big difference with USB and SATA is that their specification includes not only the electrical interface specification, but the communication protocol as well.

While we're on the subject of communication protocol let's discuss the difference between asynchronous serial and synchronous serial communication. Once again the electrical interface specifications above are not specific to either form of serial communication. In asynchronous serial the sender uses a start signal to signify the beginning of the transmission, which is followed by some data bits and finally a stop signal. Both sides must agree on certain parameters for successful communication, such as baud-rate (bits-per-second), bits-per-character, order the bits are sent, parity, etc. If the two sides are configured differently, coherent data communication will not be possible.

In synchronous serial communication, such as SPI (Serial Peripheral Interface) and I2C, there is a separate clock signal for each bit that is communicated. Both sides must still agree on the protocol and while SPI and I2C are both synchronous serial communication, each has its own protocol. And while they can use various electrical interfaces to communicate, I2C is an open-collector/drain interface, meaning that it does not typically drive the signal line high, but instead only low, allowing the line to be pulled high by a resistor (typically 4.7K). I2C has the advantage that multiple devices can occupy the same two wires, SDA and SCL. These devices operate in a Master/Slave communication mode where the master is typically in control of the SCL line.

SPI devices come in a few variations. Some devices have a single data line (DIO), clock line (SCK) and chip select line (CS). However some devices follow the Motorola Specification more closely having a data out line (MISO), a data in line (MOSI), a synchronous clock line (SCLK) and a slave select line (SS). Like I2C, these devices operate in a Master/Slave fashion with the master being in control of the clock and select lines. Unlike I2C devices SPI devices cannot share the same I/O lines. They can often share clock and data lines however, meaning only one additional I/O line is typically required for each SPI device added to the system, rather than three or four.

Both asynchronous and synchronous serial devices have communication speed limitations imposed by their electrical interface specification. For asynchronous devices this varies greatly with many devices these days supporting several Gbps, where we originally started at 300 bps and had a typical max rate of 115.2 Kbps on our PC serial port. SPI devices have speed ratings in their datasheets, usually based on the max clock frequency. I2C devices ran at rates of 100 kHz, 400 kHz or 1 MHz and now many are capable of going much faster.

So there it is...a kind of quick run down on communication protocol versus electrical interface specifications and how on some things they're both a part of the device and on many not so much. I also wanted to add a quick blurb about protocols in wired and wireless communication that also seems to be a point of contention for some people these days. I remember back in the day when I got my first 300 baud modem for my C= computer and had to write my own terminal program to get online since I didn't have one. But that didn't handle downloading files using X-Modem, Y-Modem, Z-Modem and Kermit. These were file transfer protocols designed to make sure the file you downloaded got from one PC to another intact.

I liken wireless communication to the old days of modems. In our wired world we don't worry too much about losing data or even corrupted data. When our microcontroller sends data to our serial LCD it is assumed to be intact and there is no mechanism for ensuring that, such as error-correction/checking. But in the wireless world things are very much like they were in the modem days with the possibility of noise or other interference that prevents your data from getting from point A to point B correctly. In many inexpensive analog and digital wireless systems data is sent on the radio frequency and all receivers on that frequency either get the data or not. If they do get it, they may get what was sent or something different. It is up to the end user to sort it all out.

But then we got Bluetooth and XBee transceivers which include error-checking and are able to retry for corrupted data. And what I see happening sometimes is that people use these systems thinking that since the built-in protocol does all the work for them that they can just send it and forget it. But that's not the case and I have seen people designing systems which can, in the event of a failure, reasonably be expected to cause damage or loss of life. It is in these systems that some people will assume that the data always gets there because the radio makes sure of that. Let me clarify what the protocol does do in a radio system like this...it makes sure that your data in intact when it arrives at the other side. But what if the data never arrives? With the aforementioned file transfer protocols there was an ACK/NAK system in place along with a CRC system to make sure that the data was received intact. But also with a timeout so that if the data never arrived both side terminated communication and you would have to try again. The protocol does allow for retries, but if after so many tries a message and ACK is not received it is assumed the other side is not listening anymore.

So on the Bluetooth and XBee Wireless systems you have to remember that the protocol handles the error side of things, but doesn't timeout if the data never arrives. It is still up to the user to implement a system to ensure that in a system where loss of communication can cause bad things to happen, you have to be ready to handle that. This means developing your own simple next level/layer protocol to handle the things the radio doesn't. For example, say I want to send a command to turn on a water pump in response to a flood warning from a sensor. The pump is wireless. I received the data from the sensor so I send a command for the pump to turn on. Because I am using an XBee radio I can be sure that if my command is received it will be intact, so I don't have to worry about corrupt data, however what if the pump never received the command at all? By having the pump send me an ACK response I know that it received my command. If I don't receive the ACK I can retry a certain number of times before perhaps sounding an alarm to notify someone of the issue.

Things can get more complicated than this as well. Let's take another example of the same system but now the sensor is wireless too. What if I never receive the alert from the sensor? Then I will never send the command to turn on the pump. So in a system like this we have two options...one is to have the sensor sending data in a timely manner and setting a timeout counter so that loss of data from that sensor is detected as a timeout and an alarmed sounded to let someone know. Another option is to query each sensor for data in a timely manner and if the sensor does not respond we sound the alarm alerting someone to the issue. In systems where safety is a concern it is important to implement your own protocol layer to ensure that everything is working and not depend on the error-checking in the radio protocol. I hope this information saves someone from a bad situation.


RS-232 defines the voltages present as well as the signal type; in this case single-ended. Similar to how RS-485 is defined using differential drive.

The serial protocol can be applied to RS-232, RS-485 or even wireless communication, however serial does not imply RS-232. ;)

The August 19th, 2013, 12:44 post I quoted above explains in more details and provides links. I can't apologize because I've always been a stickler for keeping these things from becoming ambiguous. :roll: It's kind of like when someone pronounces Nuclear as Nucular. I can't not respond... :|

You may have your podium back now, sir. :geek:
Image
I'm only responsible for what I say, not what you understand.

User avatar
Savage///Circuits
VIP
VIP
Posts: 403
Joined: Tue May 12, 2015 2:43 pm
Location: Palmyra, NY
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Savage///Circuits » Wed Jun 03, 2015 6:26 pm

Originally posted on the Savage///Circuits Forums on February 5th, 2014, 02:44 PM by Chris Savage

Originally Posted by ElectronsRfun
As I mentioned I have the xBee starter kit from Parallax but have not even cracked the box. Chris did say the book will give some good explanations so I'll probably have to read through it.

Jason


Read the book through and try the experiments. If you're not sure on something check the book again and make sure you have everything correct. If you're still having an issue at that point post your issue in the Microcontrollers & Processors forum. This way we can see what's going on and offer suggestions/solutions.
Image
I'm only responsible for what I say, not what you understand.

User avatar
Granz
Member
Member
Posts: 130
Joined: Sun May 31, 2015 2:37 pm
Location: Pittsburgh, PA, USA, Terra, Sol, Andromeda Arm, Milky Way Galaxy, Milky Way Cluster, Local Universe
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Granz » Wed Jun 03, 2015 6:30 pm

Originally posted on the Savage///Circuits Forums on February 21st, 2014, 07:51 PM by Granz

Jason,

Any progress with Lisa being able to control the ball of the Jedi Trainer? That looks like our best bet (so far, at least) the cheapest, easiest way to get Lisa to signal a computer.

Also, I've seen a few other things that I wanted to bring to your attention:

1) A couple of students at Cornell built a brain-computer interface using an AVR microcontroller. It's not directly compatible with what you are doing, but pretty closely related. Take a look at http://people.ece.cornell.edu/land/cour ... m55_mj294/.

2) I mentioned that you could have Lisa control the positioning of the ball on the trainer (or at least use the same brain controls) to "send" Morse code to the computer. I found an article about what I meant. The article is at: http://www.nycresistor.com/2012/02/20/m ... -keyboard/. The author describes his system for using an iambic keyer for Morse code, and the AVR takes the signals and interprets the Morse code and converts it to ASCII, which it then sends to the PC. Once you get Lisa able to send ASCII commands to a PC, all bets are off - she can do anything from there (or at least you have a nice start to that.) Hook up a voice output (or use Google text-to-speech) and Lisa can speak again. Have the PC (or Prop, or whatever) intercept the commands and interpret/carry them out, and then pass on the rest to the speech output.

Thoughts?
Art G. Granzeier III, President
GranzTronix
http://projects.granzeier.com
Helping to Build a Better Engineer

User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Electrons-R-Fun » Wed Jun 03, 2015 6:34 pm

Originally posted on the Savage///Circuits Forums on February 22nd, 2014, 01:26 AM by ElectronsRfun

Art,

The Jedi mind reader is going slow. Lisa can not work the device fast enough. It takes her a while. I think if I could get it to communicate with a computer and have a bar graph of what is going on it will help her how to think to make a certain function happen. Right now it's all about "what's going on"

My thoughts on what would be the fastest for Lisa to control a computer (today and for a while to come) would be eye movement control and/or my matrix grid and the switch I made for her. I could load a video of how Lisa changes the TV channel or how Lisa moves a curser across the screen it all works the same. I just wrote the program and built most of the operating I.C.'s on my PPDB. I have two of them also. My first PPDB is my wireless remote station that gives off an alarm, audio and visual, when Lisa triggers the alert signal, it also sets off another alarm audio and visual for my mother in law who I made one of those "help I can't get up" wireless remotes she carries on a necklace. It also turns on a night light for me in the middle of the night when Lisa sets off the alarm and I need to get up and talk to her to find out what is wrong( need light to see her face ). It also controls the timing and channel changing feature for Lisa to control the TV. I think that's it for now on the PPDB.

Moving the ball is slow going and sometimes none responsive to how Lisa is thinking. Since we can tap into the data stream I was thinking we can have a conditional statement enabled at any level we choose but I really need to see what is going on and how much difference is occurring in the data stream The base of the unit does have 5 lights wired in a bar graph manor that light up in succession, when you think harder the more of the lights light up but even that is vague as to what way is the voltage going.

I was able to get Lisa to use the LISA alarm and Jedi head set at the same time. Meaning she can wear and use both at the same time. That essentially would give her 3 switches to enable and also the alert signal, so 4 total. I think all Lisa really needs is 2 switches. One for the alarm, the most important, and then one that can do everything else, which is why I made the 100 input matrix grid.

I want Lisa to talk again very much. Just the other day I got her to select a pre-written statement that has a certain position on the matrix grid and she was able to select Happy Birthday for a friend who we were talking to over the phone. So the Emic2 basically said it for her, all she had to do was select the correct statement, just like selecting the correct channel for the TV. Very simple for her.

The rest of my thoughts are: experiment to find what works the best for her and the rest is, what ever it takes to find what works best for her that is within my power to due. What would any of us give up if in Lisa position just to be able to talk again.

Jason

User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Electrons-R-Fun » Wed Jun 03, 2015 6:36 pm

Originally posted on the Savage///Circuits Forums on April 14th, 2014, 07:32 AM by ElectronsRfun

Art,

Which ina102 should I get, Ag,Au, Kp? Also that IC is up to $30. I think that is the most expensive IC I've ever seen. The article at the end says were they got the parts but that was many years ago.

Ag(silver?)
Au(gold?)

This project doesn't seem to need a lot of parts but I need to get them all to try it out
It's 4:30 am here I'm super tired

User avatar
Granz
Member
Member
Posts: 130
Joined: Sun May 31, 2015 2:37 pm
Location: Pittsburgh, PA, USA, Terra, Sol, Andromeda Arm, Milky Way Galaxy, Milky Way Cluster, Local Universe
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Granz » Wed Jun 03, 2015 6:40 pm

Originally posted on the Savage///Circuits Forums on April 14th, 2014, 08:21 AM by Granz

Jason,

Sorry, the ol' memory ain't what it used to be... I'm afraid that you are going to need to refresh my memory about which article mentioned the INA102. Gotta admit that I have not read all of the articles that I quoted, I was trying to give you some leads and see which looked interesting to you (from the standpoint of: 1) the article's interest level to you personally; 2) how well it might work for Lisa; and 3) your technical level.) So, there was some shotgun-type presentation of articles.

Unfortunately, I do not remember the INA102 chip, and have not been able to find it by going back through the last several articles that I mentioned. As far as which part to get, I would think that, for this prototyping level, you would be able to get the lowest-cost ones that you can find. The chip make-up (if that is what those letters are) would probably be more important in the production runs, than in the prototyping. Just from what you have mentioned in this last post, I would guess that you are correct in your guess about the Au and Ag, but don't know about the Kp - no Kp listed in the Periodic Table. I'll need to see it in context to take a better guess about this.

Chris, any thoughts from you? You're still young, yet, and it seems that your memory works better than mine. :lol: (I can say that, because Chris is a few years younger than me.)
Art G. Granzeier III, President
GranzTronix
http://projects.granzeier.com
Helping to Build a Better Engineer

User avatar
Granz
Member
Member
Posts: 130
Joined: Sun May 31, 2015 2:37 pm
Location: Pittsburgh, PA, USA, Terra, Sol, Andromeda Arm, Milky Way Galaxy, Milky Way Cluster, Local Universe
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Granz » Wed Jun 03, 2015 6:53 pm

Originally posted on the Savage///Circuits Forums on April 14th, 2014, 08:53 AM by Granz

Update - by doing a Google search, I found the INA102 datasheet (http://www.ti.com/lit/ds/sbos137/sbos137.pdf )- sorry, still tired from trying to switch back to day shift here - did not think to search Google until after my last post. ) Assuming that we are talking about the same part (almost certain) the INA102 is a high precision instrumentation amplifier - basically it would just be a way to build up the signal strength so that your circuitry could read the brainwave signal better. If you use commercial sensors (like in the Jedi Mind Trainer, etc.) they will already have the amplifier built-in.

As far as the letters after the part number, the data sheet shows that they refer to the packaging for the integrated circuit. An integrated circuit that you see from your parts box (the little black box with the silver-colored pins) is not really the integrated circuit itself. The little plastic black box is really, what is called a carrier. The integrated circuit itself is a tiny piece of substrate (often silicon) embedded inside the plastic carrier, and with tiny wires running from the silicon circuit to the metal pins of the carrier. You can see a bit more about that at http://shriramscircuits.wordpress.com/2 ... -circuits/ (As of june 3, 2015 this link is bad). The packaging table in the datasheet (lower-right corner of page 3) shows that the AG, CG and KP are all 16-pin DIP (Dual In-line Pacakage) carriers. Any of these would work for prototyping on a breadboard. The last one (the AU suffix) is an SOIC package - this Small Outline Integrated Circuit is a surface mount device (in other words a very tiny package, better suited for production units which will be assembled by machine.) Since these suffixes all refer to the carrier, you do not need to worry about them - just use the cheapest one you can find (most likely it will be the KP, plastic is usually cheaper than ceramic.)
Art G. Granzeier III, President
GranzTronix
http://projects.granzeier.com
Helping to Build a Better Engineer

User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Electrons-R-Fun » Wed Jun 03, 2015 6:57 pm

Originally posted on the Savage///Circuits Forums on April 14th, 2014, 11:30 AM by ElectronsRfun

Art,

Sorry about confusion. I thought if I connected my question to your old response about tracking the eyes you would think I was speaking about the article in the post I responded too.

But I wanted to try the eye mouse thing out. After testing yesterday Lisa is having such a hard time moving her eyebrow to use the matrix switch part of the alarm system now but her eyes are still usable.

User avatar
Granz
Member
Member
Posts: 130
Joined: Sun May 31, 2015 2:37 pm
Location: Pittsburgh, PA, USA, Terra, Sol, Andromeda Arm, Milky Way Galaxy, Milky Way Cluster, Local Universe
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Granz » Wed Jun 03, 2015 7:00 pm

Originally posted on the Savage///Circuits Forums on April 14th, 2014, 01:04 PM by Granz

Ok, found the article - it has been years (since 1995, actually) since I fully read that article. Things like that tend to stick in my memory, waiting to be jogged out by requests like yours, even though I do not go back and reread them (at not least not all of each article.)

So, anyway, the guesses in my second post (April 14th, 2014, 08:53 AM,) are confirmed. The INA102 is the same chip that I found in my Google search. TI shows the chip as obsolete (not that it is no good, just that they do not produce it any more, and support may be hard to come by.) There may be other manufacturers producing that chip, but I could not find any. None of my regular suppliers show the 102 in their inventory (Chris, others, anyone out there have a supplier that carries the INA102?) I did find some on E-Bay (below $10,) but you want to be careful about a couple of things with E-Bay: 1) make sure that you get a DIP version - the pictures should verify that the one(s) for sale are in DIP format, 2) that you buy from a reliable vendor (check for a large number of feedback, with a very high percentage (above 95%, preferably above 99%) of positive feedback, and 3) pay only with PayPal. When you get the chip, do some basic testing (we can work out a simple procedure to verify basic operation of the chip) and notify the seller immediately, if it does not work. If all else fails, you will still have the E-Bay Protection to fall back on.
Art G. Granzeier III, President
GranzTronix
http://projects.granzeier.com
Helping to Build a Better Engineer

User avatar
Granz
Member
Member
Posts: 130
Joined: Sun May 31, 2015 2:37 pm
Location: Pittsburgh, PA, USA, Terra, Sol, Andromeda Arm, Milky Way Galaxy, Milky Way Cluster, Local Universe
Contact:

Re: How to Help a 99.9% paralyzed person

Postby Granz » Wed Jun 03, 2015 7:02 pm

Originally posted on the Savage///Circuits Forums on April 14th, 2014, 01:17 PM by Granz

One more caveat, from starting to re-read the article: when I first mentioned this Eye Mouse, I said that it used the blinking of Lisa's eye to operate the clicking of the mouse buttons. I believe that you mentioned that Lisa does not have reliable control of her eyelids. Norris & Wilson's Byte article does use the blinking of the eye. If I remember correctly, and Lisa cannot control her blinks reliably, then we will need to use something else - perhaps the Jedi Trainer could be utilized to control the blinking? We will need to look into that.
Art G. Granzeier III, President
GranzTronix
http://projects.granzeier.com
Helping to Build a Better Engineer


Return to “Bio-Medical Electronics”

Who is online

Users browsing this forum: No registered users and 4 guests