retrofitting an auto-mute volume control?

On a sunny day (Sat, 12 Dec 2009 12:48:42 -0800) it happened Jon Kirwan wrote in :

There are other possibilities. I assume you have considered CCTV, a camera and monitors. A camera gives a new possibility, in this digital age, I think one can do some analysis of the picture, for example 'falling over' could be detected perhaps, with some frame by frame processing. Never programmed that, but I did do motion detection, and for sure frequency of motion can be detected. It is said that Microsoft is coming out soon with a new version of the Xbox or one of it's variants (dunno), that has a camera that can detect gestures... There must be some game developer API available... Now I am just thinking aloud... could be some direction to look, the vibration sensor or 'angle' (vertical versus horizontal, and speed of position change) could be one of those 3 axis acceleration sensors, some people here (not me) have extensive experience with those.

Reply to
Jan Panteltje
Loading thread data ...

An automatic volume-reducer can be relatively easy.

If TV and stereo are relatively modern, they will have remote controls for volume, so it's just a matter of periodically sending the incremental-down signal (different signals for all the devices, of course) at a prescribed rate, so that after X minutes, the volume is down by N steps...

LIRC open-source project has emitter plans and software; it can't be too hard to implement.

Not sure about iPod and computer sound, but Mac remote controls exist (Bluetooth, I suspect) that could be reverse-engineered with some confidence.

In any case, the normal knobs or the remote unit will turn the sound back up without fuss.

Reply to
whit3rd

sing.

ncy of

ox

es...

position

re (not me)

Yes, even 1D accelerometer would be enough to detect impact (falling). But perhaps she is just jumping around for fun. So, accelerometer could be part of the sensor, but not only one. However, false positive might not be so bad, the OP might want to know when she is having fun anyway.

Reply to
linnix

This is an answer towards a different part of the piecemeal problem. And yes, if I could lock down a remote control device I build so that it points at the TV set supporting it, that could work.

However, I do still have some of the old vacuum tube TVs and it is a Bell and Howell that she uses, right now. No remote control, IR or otherwise. But it does use up/down buttons and not a rotating knob. (Yes, I have yet another one that does use the old rotating tuner and volume control! Some of these old babies just keep on going!)

Agreed.

No Mac here (mostly because I just have a hard time paying that much

-- I worked on the original Lisa computer [monochrome and $10k each] and loved it and do like Macs for what they offer... just price, you know?) No bluetooth here in the home, anywhere. And I use a basic cell phone that doesn't support it. (I don't think I ever will start using bluetooth unless it gets rammed down my throat and when I buy gps systems I get ones that don't use bluetooth, just so you know.)

The speaker system on her computer can be modified. Or I could simply design and build one from scratch. The amplifiers are only a few watts and I know how to design something cheesy but workable by myself! So I've been thinking I might do that in this case.

I'm trying to reduce maintenence issues (battery replacement that is too frequent, for example), additional burdens upon our own need to remain aware and conscious that may hinder our other work, and mounting and fixtures which themselves may complicate our lives or further endanger her because they simply exist (unless carefully designed, a mounted controller, for example, could actually present something she lands on during a seizure.)

The focus on placing whatever the solution may be _inside_ the unit avoids the introduction of something new to the ambient environment equation. Which is why I'm looking that direction, right now.

Lots of good thoughts from everyone and I appreciate it.

Jon

Reply to
Jon Kirwan

Well, kind of. I spoke too soon. She doesn't _use_ a remote control. She will go to the TV, itself. So assuming all the rest, the IR controller (for example) would need to have some way of knowing she did that.

Jon

Reply to
Jon Kirwan

position

(not me)

So many possible sources of data (sound, vibration, video pixels, and now accelerometer data), so much needed research to analyze a usable way to process all that for my circumstances. I love it. I suppose I could bury myself in this for years and years.

Accelerometers require power and in this case to be usable would need to be attached to her (non-trivial) and powered continuously. I couldn't sample them, periodically, because I'd need to know "right away" and sampling couldn't occur once a minute or once every 10 seconds. It would have to be relatively continuous and this places a burden on the power source. Besides the difficulty of keeping it on her, somehow, without her clawing it off. And did I mention RF? More power, though that could be used only upon "detection."

False positives are okay. Up to a point. She is very active, skips and dances a lot and loves to jump up and down while clapping her hands together, laughing and giggling loudly. She is very happy, by and large. I'm not sure how to hew very close to zero false negatives while keeping false positives to a "dull roar" here. Something may come to mind, so I'll keep this in view. But right now I'm not sure how to deal with continuous sampling, power, keeping such a thing attached to her, together with usable detection negative/positive rates -- algorithms. Good ideas there may help push me along that line, though.

Jon

Reply to
Jon Kirwan

f position

ere (not me)

I
e

Accelerometers takes 1 to 2mA continuously, plus another 1mA for a microcontroller. Yes, RF would push it up to 50mA area in burst, upon detection. So, 200mAHr CR2032 coin cell should last 100+ hours. However, you have to build something fun for her to wear it. Musical watch?

Reply to
linnix

position

(not me)

100 hours per change would get old, fast. Call it 8-10 per month? okay. If it really saves her just once...

Still have to figure out what to process and how.

I think Vladimir (I love practicing the proper Russian pronunciation of that name!) pointed out an excellent option (which I've purchased, but haven't seen yet) that the TI MSP430 is inside of -- it's a watch that includes 3-axis accelerometer (if I remember what I read correctly) and RF capability and I already have all the needed development tools and know how to use them.

It's possible it will work out.

Jon

Reply to
Jon Kirwan

Would it do to have a camera mounted fairly low, so that continuous motion only in the lower half of the image corresponds to a siezure? This also assumes she isn't constantly moving around when lying down, of course the magnitude of motion could be controlled too.

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
Reply to
Tim Williams

I'm thinking more of a central point in the house that generates a steady stream of 'volume-slightly-down' commands, and using wiring (like, the black/yellow pair on telephone connectors) to run to each room, and blast out the codes in all directions.

The central controller eventually turns the volume all the way down, but not by a single 'mute' step. And, it has its own IR emitters, there's no interaction with any handheld remote control option.

Reply to
whit3rd

Interesting questions. Some hours of each day, she just goes into her room and lays down under a blanket and looks at the ceiling, laughs a bit, rolls over, etc. Assume there is a camera mounted there. If she has a seizure during her sleep (very rare, as it is almost always within about 1.5 to 2 hours within waking up), that might work. But she plays, too. Besides, her seizing when under a blanket is not the kind of "wild flapping" that you see on TV, sometimes. It's as though all of her muscles are tightened up -- she feels like a solid rock -- and she is shaking somewhat. There is NO oxygen getting into her blood, so she damages her brain if it lasts too long. It is very tense, low-motion, and she can grind (destroy, even) her teeth in the process or cut her tongue in half if her jaw clenches down hard instead of up. Sometimes, the jaw opens and closes. Sometimes, it is stuck open or stuck closed. Sometimes, that changes during the seizure. But by and large, not a lot of motion. Just a sudden high tightness tensing of muscles and fairly low-intensity motions that last for between one minute and as much as four.

Which reminds me... a pulse-ox might be appropriate for detection after the fact. Oxygenation levels should drop precipitously. And these are dirt cheap, nowadays, and not hard to develop either. Of course, it doesn't solve the detection problem until after it is way too late. But it would make sure we know close to 100% of the time when one happens. And that has value, too.

We do have, sometimes, some indications 10 or 20 minutes early. A kind of spasmatic jerk in her hands and shoulders that isn't visibly noticeable, but if you are holding her you can feel them. They are an indication that we are within an hour or so and that can allow is to dose her before it happens or to at least hover and be there at the right time.

My instincts tell me to hold off of using video processing, for now. Difficult and expensive for all the needed coverage areas, processing complexities, etc. I need to explore other solutions that I can 'see' the other end of more readily, first.

I'd also still like to try out an auto-mute or two, as well. Those aren't more direct detection, but they enable our own ears and that's also important. The twin approaches... auto-mute and direct detection on her body are like playing this from two ends to the middle. On one end, there is our own fine-tuned detection (ears and brain) where the auto-mute helps us; and on the other end there is the direct detection that provides an entirely different pathway for detection and can be made to reach us by altering the 'signal' so that we definitely notice it.

Jon

Reply to
Jon Kirwan

Egads. I think I'm not quite ready for all that, just yet. And even then, it's only a partial solution as it only handles those cases where IR emitters are useful. I may get there someday?

Hopefully, the seizures will just stop or else we will outfit her with a medical device to halt them. (There are two such things available as I speak, which may or may not yield results for us when and if we decide to try them. One is a vagal nerve stimulator and another is actually placed into the brain, itself.)

Short of that kind of cessation or cessation because of death, the right solution is surrounding her by a knowledgeable human community, good record keeping, and appropriate physical, technical and chemical adjustments. The balance in all that is a path one walks and not a destination one can ever hope to ultimately reach.

Jon

Reply to
Jon Kirwan

position

(not me)

Probably will need to do a 'shrink' on it, though. It's too big as it is. Much too big. She won't wear it for long. But I'm going to try it out, anyway. Still looking for auto-mute ideas, though. This isn't an either-or situation.

Jon

Reply to
Jon Kirwan

Two things: first, separate the life condition from the functional requirements you present here. That means you want a circuit that does:

1) Every X minutes, mute the device 2) Un-mute it when the volume control is fiddled That is the only functional requirement set we (responders) should address. We are not capable of knowing whether it will address the life situation, and not professionals on the medical side of things.

Second thing: to meet 1 & 2 above one general approach that might fit is as follows. Put DC and signal on the volume pot - the wiper will give you a DC voltage as well as the signal. Use a cap to bring the ac to the amplifying stages, blocking the DC. Run the DC from the wiper through an R to a small 'lytic which will charge to the level at the wiper. (A sort of poor man's sample & hold.) The cap connects to one input of a comparator. The input goes to the wiper through an identical R with no cap. Use enough hysteresis to accomodate slight difference in the DC applied to the inputs. The output of the comparator resets the ten minute timer. The timer gates the audio out to the speakers.

I see plenty of possible downside to the above - it requires "surgery" to each device, which may make it a non-starter. It also operates for only one direction of the volume control, and it is only conceptual - you would have to flesh it out. But it is one idea you could experiment with, and the power source is already inside the equipment.

Ed

Reply to
ehsjr

Yup.

Obviously.

Let me rephrase this and expose my ignorance.

I'm not sure where a volume control intercedes in an audio amplifier system, but if I had to guess then I'd probably imagine it placed it as a divider on the output load of some early stage of the amplifier chain -- mostly because it's probably better located where there is less power to worry about (read: cheaper pot.)

The DC offset added to the audio at this point will be 'somewhere.' Changing the pot will move this bias point and you want me to use averaging (RC) to "sample and hold" this set point (actually, after some number of taus have passed, it will have settled on that point -- a reasonable approach for a manual control.) Then use a comparator to compare this against an unfiltered version (instantaneous set point.)

I may get lucky and have a pot that has one end at ground or some volt source. Or all three nodes may not be tied to a v-source.

If I got it, one immediate issue is that I want _any change_. That's up-volume or down-volume. You mention 'hysteresis' in your suggestion but not for this purpose, as I gather it, but instead as a way of avoiding noisy false tripping due to barely noticeable jarring of the unit, electrical noise, etc. I'd like to detect manual volume changes in either direction. But that is solvable. Do I get the gist so far?

Another issue is what mutes the output. If I actively mute, that act itself will affect what those same nodes do for the comparator inputs (filtered and unfiltered) since those nodes must be involved in the muting, itself. That presents a possible problem. What I may like to do is separate things so that I isolate the pot and 'copy' its value to the prior nodes being controlled. Well, that gives me some thought lines to move along.

Possible variations are discrete circuits, IC circuits, and a host of topologies to ferret out and design around. Maybe the best way to start is to just start. I'll open up one of the devices and see what I see there.

Jon

Reply to
Jon Kirwan

On a sunny day (Sat, 12 Dec 2009 15:41:16 -0800) it happened Jon Kirwan wrote in :

Photocell power? Yes, but I was actually thinking about sampling hundreds of times per second. I dunno how much power, as a alternative to an accelerometer a movable magnet in a coil (remember the old magnetic phone cartridges) could be used as a zero power consuming vibration detector. This is what I thought after writing that posting, and a night sleep:

OK, this is how *I* would proceed, that is not how you or anyone else should proceed, but how I would proceed based on what I know and have done in the past.

I would start with making some bracelet or belt with a 3 axis acceleration sensor. The sensor would be sampled by a small PIC with ADC, and I would compose a SDLC or HDLC packet. That is to say a sync byte, some data bytes, and CRC. This I would connect to one of those 430 MHz (free band) transmitters. Those are the size of a dime, I have one here to remote control the lights. The range of those is maybe 10 meters or less. In the same room I would have a receiver for that. Cable from that receiver to the PC elsewhere. Digital data stream, twisted cable, perhaps optical. In the PC a card with a 8035 SCC or similar, to decode the packets. Hang on a huge harddisk, construct a data format, few bytes, say n samples per second, some bytes (x, y, z, i, t), where 'i' can hold some extra data, markers, what not. time stamp.

Then I would just let it run, recording data 24/7, and mark the times when there are seizures. The advantage is that you do not have to bother the person, you can do any further testing and development on the PC in non-real time. What you MUST do however is mark the times that each seizure occurs. Then, after collecting some real data, have a look at the data, maybe do a FFT to look for any specific vibrations that may precede or indicate a seizure. Then it is perhaps just a case of counting times between pulses..

If all else fails, set up a simple neural net, there are many, at least for Linux, neural net programs available for free. Some net topology, and run the data through it together with the signals when the seizure really happened. The net will learn what you yourself have learned, maybe even better and 100% attentive. From that, over time, you can get a reliable system, by having the PC alert you.

If it works , and why not, you can market it and make a buck or 2 too.

Reply to
Jan Panteltje

As Vladimir suggested, by the way. The eZ430-Chronos includes a 96- seg LCD display, pressure sensor, 3-axis accelerometer and wireless comms ... cheaply, too. See:

formatting link
formatting link

or HDLC packet.

The above is offered with any of: 433 MHz, 868 MHz, or 915 MHz.

extra data,

I've got one of the above on order, some days ago. Before Vladimir mentioned it, in fact.

I still will have the great difficulty getting her to wear it. Given past experience, it may take months (probably years) to get her to cooperate. But I might get lucky.

there are seizures.

further testing and development

a seizure.

Linux,

the seizure really happened.

attentive.

Well, we've been discussing almost these thoughts earlier in this thread. I've already sat down to think through some ideas about processing methods. It's an option I will _also_ follow up on (should she allow me to do so, of course.)

I'm not particularly partial to neural nets. I won't go into details here, but they are a narrow tool for a narrow range of jobs in my opinion. There might be something new, but years ago I was decidedly unimpressed except in a very few cases. Regarding FFT, that is an obvious step for early post-analysis. For implementation, though, I may consider cross-correlation against known 'signatures' if I can develop a set of those. That's easy to understand and can work well, at times. At the lowest levels of data conditioning, I've a lot of learning to do about 3-axis accelerometers and their noise and distribution shape, biases, and other features so that I can make some sense out of what I read from them. I may consider Kalman filtering.

In short, this won't be a quick fix. Nor the only one, even if it succeeds to achieve something. One of the nice things about the concept is that it may provide an hour's notice.

And yes, I intend to discuss some details of such a device with a neurologist and endocrinologist in February. They may inform me of other products that already exist (though for some reason they've not yet done so) and may be willing to support anything I find in the process over the next year or two. Each individual is different and adaptation may be easy or hard -- I just don't know. But it is possible there is a product here. No idea, for now. If so, it's going to take a team or two and some serious time to get there.

In the meantime, I still plan on working through the auto-mute. More near term and supplements well anything else I do, regardless.

Jon

Reply to
Jon Kirwan

On a sunny day (Sun, 13 Dec 2009 02:46:24 -0800) it happened Jon Kirwan wrote in :

Well, once can cheat. Just an idea, say if you can encode the data stream 'preamble' of the seizure into a wave file or raw audio format, and such a transformation would not be difficult, you could perhaps feed it to 'Dragon Naturally Speaking' voice dictating software. Dragon uses a neural net IIRC (could be wrong about that, but there are ones that do). It can also couple a word to an action on the PC... the rest follows logically. Dragon was for sale a while back at a big discount on Amazon IIRC (but I did not buy it, it runs on MS windows for a start, and the discount was only in the US).

Have fun :-)

Reply to
Jan Panteltje

Yes, I think you understand it. The hysteresis does what you said, but it was more to make the trigger "window" a little wider, and make the switching crisp and definite. As far as moving the control in either direction, it is solvable as you said. Maybe use a second comparator set up to switch when the control moves in the other direction. As far as muting, use the comparator output(s) to reset the timer, and the timer output to switch the audio output line from the speaker(s) to a resistor or resistors and vice versa.

Regarding the existing pot setup, it is often like this, where the signal comes from the preamp: Signal---[cap]---+ | P O

It should't affect the comparators if it occurs between the final amplifier and the speaker(s).

Good luck!

Ed

Reply to
ehsjr

Yes. I anticipate this _after_ the first stage's conditioning of the input and well before the final power stage.

Suppose that the 'signal out' you mention passes through yet another cap before the next stage. If so, isn't this a problem for a DC path?

|| C1 IN --------||-----, || | | \ Rx / || \ amplifier and the speaker(s).

I have a hard time imagining a pot right at the final stage, because of the power (few watts, at least) involved. But you might be talking about something else I said.

Thanks. Looks like I'm going to need it. Blasted thing.

Jon

Reply to
Jon Kirwan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.