Show Posts
Pages: [1] 2 3 ... 23
1  Topics / Science and Measurement / Re: Sound record and snoring measurement : need help :) on: August 30, 2014, 10:59:37 am
I think, you should divide your Project into different phases increasing the complexity as you go. An initial phase could be, performing a quality audio recording which excludes as much noise as possible and then manual post-analysis of the audio signal in a computer using an existing audio software by a trained person and simply visually identifying the snores from the signal graph, measuring the duration, etc and manually input the data into Excel. Performing signal processing for identification and automatic analysis is way more difficult and will require advanced knowledge of mathematics, electronics and coding for which you may consider to team up with students from the EE faculty in a subsequent phase of your Project.
Some ideas…
The main problem as you mentioned could be separating the snoring sound from the background noise, therefore identifying differences between them may help. One important difference is the direction from which they arrive to a microphone used for detection. The snoring only has one possible direction of incidence, as the person snores only when sleeping in bed, while noise can arrive from any direction. There could be other sounds coming from the person reaching the mic in the same direction as the snoring; but their occurrence tends to be way less frequent and their nature and "behavioral patterns" different. While random noise may have a wide range of freq components; snoring seems to be narrowed banded with emphasis in the lower frequencies and perhaps low mid ones. That needs to be found (I don’t know precisely). This could be distinguished by observing a graph of the audio signal. Another relevant difference is that sounds coming from the person other than snores are perhaps short in duration and isolated, not repetitive in nature as snoring itself.  Additionally, there is precise correlation between snoring and respiration, further facilitating identification from the sound graph by a trained eye, as one can predict when in time a snoring event can be expected to have taken place and when not. There is a repetition frequency which does not change abruptly and remains within a certain range.
The first step could be separating the sounds depending on their direction of incidence to try to suppress as much noise as possible right there not having to deal with it later on. For that, you can place a highly directional microphone on top of the bed. Perhaps, even better, if it is placed inside some sort of partial anechoic chamber, that is, an open enclosure (some sort of tube) with the opening facing the bed and the bottom the ceiling. This box should be covered on the inside (and outside) with sound absorbent materials to prevent reverberation inside of it and double detection by the mic from the sounds bouncing off its walls or coming from different directions. In other words, any sound entering the box not reaching the mic directly should be absorbed. This in turn increases the directionality of the detection pattern.
The output of the mic is sent to an amplifier with a narrow band pass covering the expected range of freq components for an average snore, further reducing noise. The signal then is fed to Arduino for AD conversion and recording. Additional digital filtering and noise reduction can also be done by Arduino.
Obviously, performing the test in a specially prepared room with the right reverberation times for the different octaves and where there is no unnecessary noise will help.
You can check these subjects for reference:
-Ambulatory ECG Recording Systems. (Holter)
-Room reverberation times.
-Anechoic Chamber.
-Directional microphones.
-Active band pass filters (with OpAmps)
-Mic preamplifier.
 for later…
-Digital noise reduction.
-Signal pattern recognition.
-Signal power spectrum.
Hope it helps.
Good luck.
2  Using Arduino / Project Guidance / Re: Using Arduino as Bike Speedometer (with generator hub) on: August 27, 2014, 07:15:06 pm
Circuit on reply 4:

-2N3904 is acting as an Amplifier.
-10UF cap is a DC blocking cap. Blocks DC which might be present from any previous stage and prevents Dc from this stage to go to the input signal generator.
-First 74HC14 Inverter is a Schmitt trigger. Converts incoming signal wave into pulses.
-3.3K and 0.1UF cap network is a low pass filter (high frequencies are sent to ground through cap)
-Second 74HC14 is another inverter to restore signal phase.
Good luck
3  Topics / Science and Measurement / Re: notorious PID fermentation temperature control on: August 06, 2014, 04:24:32 am
You can also use "Paint". Easy to learn and once you have drawn a few parts, copy, paste and rotate helps a lot.
4  International / Proyectos / Re: voltimetro true rms con arduino on: July 26, 2014, 05:53:54 pm

Si los resultados me dieron bien. En paralelo tenia otro multimetro y los valores fueron similares
Que bien. Muy bueno tu Proyecto. Felicitaciones.
Gracias y saludos.
5  Using Arduino / Project Guidance / Re: How to measure a voltage drop. on: July 25, 2014, 04:14:38 pm
I think, perhaps something like the approach in the attached picture (in general terms) may help you, although you haven't mention the resolution you want, the pulse repetition frequency (PRF) and how many readings/time you need. You may need to introduce your own modifications according to your needs though.
Please note that the monostable multivibrator is there in case Arduino can't detect the end of the 2-3Us pulse (I don’t know if it can). If it can, then you don't need it. The flip flop is there to block the counting if the PRF is faster than the speed at which Arduino can read the values for one measurement. If the PRF is low, then you don't need that either. You will need really fast components to do that. For the comparator, something like the ultrafast TL3016 ( or faster may work. For the digital components, at least 74ALS or 74S TTL family components ( . If that’s not enough then you may need ECL technology ( The resolution will be determined by the oscillator freq. For example, if you use 10MHz then the resolution will be 0.1Usec and you will be able to count about 20 to 30 pulses for your interval of 2-3Usec. Accuracy of the readings is another story though and depends on many factors like the threshold levels you establish for the comparators (VRef1 and VRef2), propagation times of the components you select, oscillator stability, input signal levels stability, etc.
A good Voltage Reference could be the KA431 ( with low tolerance and low temp coef resistors. You will also need a fast memory oscilloscope (perhaps 100MHz or higher) for calibrations, so you can see the input and the counted pulses passing through during your input pulse falling edge to check for accuracy.
At the end Arduino can take the readings and display them where you choose. You can perform statistical calculations also with Arduino, like standard deviation, average value, etc, after taking several readings and also display them if you want. For that just program the equations and use arrays for the values read. This will be useful if you need to take repetitive measurements of that falling edge pulse. If it is a one time measurement, then you don’t need all this and a good scope is just fine.
Hope it helps.

Good luck.
6  International / Proyectos / Re: voltimetro true rms con arduino on: July 25, 2014, 03:25:26 pm
Parece estar bien para una senal sinusoidal  con periodo T<500 ms. Te dieron bien los resultados practicos?
Muy interesante,
7  International / Proyectos / Re: Ayuda- Abrir y cerrar puerta corrediza con codigo. on: July 25, 2014, 01:13:48 pm
Arduino no puede manejar directamente el motor, pues no puede entregar la corriente y los voltajes que este require. Es por eso que debes utilizar un circuito intermedio que se encargue de manejarlo.
Si necesitas invertir la rotacion del motor puedes utilizar un "Puente H"  (H Bridge). Tambien puedes utilizar alguno de los "shields" que ya estan preparados para manejar motores (Motor Shield). Debes revisar que  este sea capaz de entregar las corrientes y voltajes  que require el motor que utilizaras. Es por ello que pienso, debes comenzar por seleccionar el motor que vas a utilizar con la fuerza y velocidad necesarias para abrir y cerrar la cerradura.
Saludos y suerte.
8  Topics / Home Automation and Networked Objects / Re: DS18B20 on: July 07, 2014, 05:51:36 am
and note the number of lines involved to achieve essentially the same result
9  Topics / Science and Measurement / Re: voltage divider for temp sensor on: June 30, 2014, 03:21:26 pm
As always, if one goes through surplus junk to salvage parts, they are pretty much on their own to categorize the spoils.
That's exactly what I was telling the original poster.
10  Topics / Science and Measurement / Re: voltage divider for temp sensor on: June 30, 2014, 09:49:39 am
Again, for room temp, my experience suggests that using the
Tracks to within 0.5F at room temp based on 4 separate didital thermometers.  Not bad.
Interesting; but that's when you know the coefficients in the equation and therefore the equation. The problem is when those coefficients are not known for the particular thermistor one is trying to use, in which case they have to be found and that's a complicated and time consuming process which requires special instrumentation to be used as standards.
I used a thermistor a while ago and I could get temp readings  within 0.1C; but that was  based on the manufacturer's provided coefficients and equation.
11  International / Proyectos / Re: Interrupción Comunicación Serial + Módulo de Relay on: June 23, 2014, 02:32:30 pm
Probablemete el ruido que genera la commutacion de los reles esta interfiriendo la comunicacion con la computadora. A mi me ha pasado antes. Hace un tiempo estuve ayudando a alguien aqui con algo parecido.
Espero te ayude.
12  Topics / Science and Measurement / Re: Circular vs. Linear Compass on: June 20, 2014, 04:33:28 pm
You can try this one which is about the same. You need to clean up the code a little bit though.
here is the code:
and here is the video;
13  Topics / Science and Measurement / Re: problems in data measurement on: June 20, 2014, 06:06:59 am
My only fear is that the receiver multiplexer might blow when the induced current is more than 20mA.
It won't happen, the Rx circuit is conformed by Inductor, mux, and Amp Stage input in series. The Amp Stage Input impedance is too high for the current to go so high at the induced voltage levels you will get. Beware, its the Amp Stage  input impedance in this case, which is affected by the feedback network there is and not the OpAmp open loop input impedance. They are different.
I will try to use the pulse signal as well and experiment on it for a while.
I would try to do that starting yesterday.
14  Topics / Science and Measurement / Re: problems in data measurement on: June 17, 2014, 07:04:10 am
Probably you have built an oscillator. Open loop OpAmps can have gains of perhaps 300000. "...Too much gain and you are risking building an Oscillator instead..." (mentioned some replies ago). The coil is connected to the output and DGND. There should be a feedback network from the output to the input through the coil somewhere,  probably in the ground loop as you have AGND and DGND or through some of the caps. Sometimes its through a poorly filtered Power Supply (I don't see the low value caps in the Power Supply rails, next to the OpAmp). The tiny feedback voltage drop in the feedback network, with such a huge gain is enough to provide the feedback voltage necessary to sustain the oscillation satisfying the Barkhausen critera. The 4.5mH coil is apparently the only one producing enough feedback voltage to satisfy the criteria and sustain oscillation nor the 220UH neither the 138UH you are trying to use. Lower inductance is equivalent to lower XL producing a lower voltage drop.
This is a very unstable system and the freq of operation depends on factors difficult to control. To confirm this, you can remove the DDS chip (be careful to maintain everything else the same) and observe if the oscillation persists. I would walk away from such "lucky solution" and build something one can have real control of its operation.
15  Topics / Science and Measurement / Re: problems in data measurement on: June 16, 2014, 07:03:44 am
Yes, I think there are several ways to solve that; but all of them will require major changes in your design.
The fact that you are using a pure sine wave to drive the coils is a major limitation, I think. To increase the power applied to the coils  that way, you will need to use linear amplifiers which are difficult to build or expensive to buy. Also that limits your ability to use the multiplexers in the driver circuits and you have to use them to apply the signal to the coils at any power you are using. These muxs, as we already checked,  can't handle to much power and introduce heavy looses in your signal path as your coils reactance is very low and that's a huge limitation for your design. Furthermore, the lower the coil inductance value (L) the worst the situation is regarding to loses in the muxs Ron. Therefore, there is a need to take the muxs out of the equation, in regards to power applied to the coils to get serious improvements to your project.
To achieve AM modulation of your 20KHz carrier it does not really need to be a pure sine wave (I think) and you could use something like a "Chopper" circuit and a square wave as a carrier. Using a square wave instead of the sinusoid will free your design from having to use a linear amp as the final stage to increase power and a simple non linear switching transistor can do the job. This will allow you to use the muxs in the driver stages where they will be submitted to way less power. The transformer configuration created by your coils (Tx/Rx in front of each other) will definitely introduce some distortion to the square wave signal as the whole spectrum will not pass through. Still this could be made to have a negligible effect for you application which may tolerate some THD; but I don't know as that (how much distortion is allowed) depends on the original signal you are using as the modulator (what you are trying to measure). A switching transistor as the final stage will allow you to increase Power by simply increasing the Power Supply voltage. Your modulating signal will still (I believe) affect the amplitude of the induced signal in the RX coil and you will be able to recover it the same way by using AM demodulation. You can try also to tune the coils to the fundamental freq of the square wave carrier by making a tank circuit using a cap in parallel with the coil. That way  the signal will be more like the sine wave you are using now, as it will attenuate most of the other freq components. How effective the tunning is, depends on the Q factor you achieve for the tank.
Another way could be using FM instead of AM, by making the Tx coil part of an oscillator circuit like a "Colpitts" design for instance. Your modulation signal will probably affect the freq (and probably amplitude also) of the signal generated because of changing the properties of the Tx/Rx transformer (coils). The received signal after amplification can be demodulated  using a PLL FM demodulation circuit which is not very difficult to implement using the 4046. What I don't know though, is how linear all that process will be allowing for correct reproduction (undistorted)  of your original signal at the end. That requires testing and/or knowledge I don't have.
Back to the square wave AM circuit, the attached picture (in general terms) is the approach I was mentioning to you. Please be careful when increasing the Power Supply voltage (Vcc) as if it is too much, the current will saturate the coils core with max possible magnetic flux  and any further increase will just be converted to heat and no useful magnetic energy, possibly destroying the coils.
Furthermore you will need to make sure this approach does not produce unacceptable distortions or nonlinearities in your end demodulated signal which has to match the original one.
Hope it helps.
Pages: [1] 2 3 ... 23