magnetic field

Hi, there is a working example on the Texas Instruments DSP support
website. Look for University teaching support, and Richard Sikora's
source code. These were very helpful to me in developing my own code
with a TI C6000 DSP board! I think the guitar tuner example uses IIR
filters to produce the reference sine waves (string pitches), and then
mixes them with the guitar input. You can hear the 'beat-note' or the
frequency error from your headphones and see it on the board leds.

I wrote my own code though which uses FFT. There's still some things to
do with classification of the fundamental frequency, as the results
contains many harmonics. Maybe I should make an algorithm to locate
some local maxima and calculate the difference of the lowest of them.
That should be the fundamental frequency of the string vibration! This
is just a hobby, and I have not too much time to experiment but it's
nice learn some DSP theory in practice!

Good luck,

Jussi
 
dhaevhid wrote:
AND HERE COMES "RICH THE NEWSGROUP WACKO" CALLING ME AN ASSHOLE AND
ASKING FOR MY PAYCHECK... TRY TO THINK ABOUT IT, YOU CALL A GUY AN
ASSHOLE AND THEN ASK FOR HIS PAYCHECK... WHO'S THE REAL ASSHOLE?...

Why do you think he's a "Wacko"? He thinks he's funny, but...

--
Former professional electron wrangler.

Michael A. Terrell
Central Florida
 
"ehsjr" <ehsjr@bellatlantic.net> wrote in message
news:3pEae.5108$Fc.1488@trnddc01...
Watson A.Name - "Watt Sun, the Dark Remover" wrote:
"ehsjr" <ehsjr@bellatlantic.net> wrote in message
news:cMiae.477$Yc.187@trnddc06...

Rich Grise wrote:

On Thu, 21 Apr 2005 03:32:11 +0000, ehsjr wrote:


Watson A.Name - "Watt Sun, the Dark Remover" wrote:

I'm just curious as to why you'd want to use a toroid. The whole

idea

of a toroid is to increase the magnetic field containment, so you

get

better inductance. Then you go winding it bifilar, to _get_rid_
of

the

inductance! This doesn't make sense.

First, it is not bifilar. Picture a center tapped coil wound
single
layer on a toroid. It is that, except that the second half is
wound

in

the opposite direction.

And it makes sense. I'll try a diagram.

+------+-----------------+
| | |
| Mosfet |
___ | B
___ +------|<----+ A
| ( | T
| ( L1 | T
| ( | E
+------+ | R
) | Y
) L2 | |
) | |
-----------+------------+----+

L2 isolates the bottom of L1 from the negative rail on the
discharge
part of the cycle. On the charge part, the Xl's cancel out,
leaving

only

the winding R in the charge path. That allows reduction of the

charge

time.

Yabbut, that's a reset winding. We were talking about noninductive
wirewound resistors.

Cheers!
Rich


The point I was making was about *windings*, the direction
they go, the fact that the inductances cancel out (verifying
what you were told from my own experience with coils wound
on toroids), and the fact that they are not bifilar.
I didn't think it necessary to state that the thing wound on
a toroid wasn't intended to be a resistor, figuring that is
obvious. But perhaps not....
Ed


I can only speak for others, not myself. er, whatever...

Here's a copy of your original post (between the << and >>):

No! The post you quoted (below) was from Rich, not me.
My reply to it begins with the words "That's it , exactly."




Bifilar means to me that the wires stay parallel throughout:

Loop
^
\\ \\ \\ \\ \\_
\_ Leads

But the one I had in mind was more like this:
Loop
^
Lead _/ / / / \ \ \ \_ Lead

I don't know what it's called.

Cheers!
Rich


That's it, exactly. Someone called it "contra-wound" -
but I don't know if that is the proper term. On the toroids
I wind that way, the first half occupies about 40% of
the diameter and the last half occupies another 40%.
Ed


But earlier, this whole thread was all about cancelling inductance
so I
assumed that the point of doing either of these was to cancel out
the
inductance.

In my case, I was thinking that the first example, \\ \\ \\.. is the
way
they were telling me to wind the turns on the resistor with 2
conductors
paralleled in each turn. Of course this is to cancel out
inductance.

Then you talked about contra-wound on a toroid. I assumed this was
to
cancel out inductance as was being done previously. I did make a
mistake about yours being bifilar. Sorry.

But to continue, I would like to see the complete circuit with the
MOSFET you drew above. Might make a whole lot more sense.


You're seeing most of it. Add a 555 circuit to the gate
of the mosfet and you have it. See
http://www.homepower.com/files/desulfator.pdf
The desulfator article uses two separate inductors, I don't see how
you're doing it with one.


I can post pictures of a toroid wound that
way, if it would make things clearer.
Ed
 
On Sun, 24 Apr 2005 08:17:04 +0300, Jussi Saily
<etunimi.sukunimi@vtt.fi> wrote:

I think the guitar tuner example uses IIR
filters to produce the reference sine waves (string pitches), and then
mixes them with the guitar input. You can hear the 'beat-note' or the
frequency error from your headphones and see it on the board leds.
Provided that the micro controller will provide crystal controlled
timer interrupts, it would quite easy to use the NCO (Numerically
controlled oscillator) principle to add a frequency specific constant
value to a phase accumulator, which will address a sine look-up table
to get the sine wave samples that are then multiplied (mixed) with the
microphone signal to get some kind of frequency/phase detector.

Even updating six phase accumulators (one for each string) should not
be too computationally intensive, since the string fundamental
frequencies are quite low, so even a micro controller should be able
to handle it, since the sample frequency would only have to bee a few
hundred Hertz.

Paul
 
On 24 Apr 2005 00:24:40 -0700, dhaevhid@hotmail.com (dhaevhid) wrote:


im thinking about zero crossing detection but the guitar signal is
consists of the fundamental and higher harmonics maybe up to 4 or 5
harmonics... and these harmonics cause erroneous zero crossings...
Just look at the guitar signal in the oscilloscope and it is easy to
see that the 2nd and 3rd harmonics are going to cause all kinds of
problems. At least you should insert a low pass filter with a corner
frequency at the frequency of the highest string before the
comparator.

A comparator with a large hysteresis will also help eliminate false
triggerings due to harmonics.

Some kind of AGC may also be needed in front of the comparator, so
that the hysteresis levels are some predefined amount (say +/- 20 %)
compared to the waveform maximum amplitude.

You should now evaluate if it does make sense to do a lot of signal
processing in the analog domain and how much in the digital domain.
For a one-off product, it would be quite acceptable to use quite a lot
of analog signal preconditioning in order to simplify the program.
However, for mass production, any extra hardware (especially with
precision components such as precision capacitors in low pass filters)
should be avoided and doing as much as possible in software, would
make much more sense economically.

anyways, if theres anyone out there who can give an idea on how to do
the "analog needle meter" program routine, i will greatly appreciate
it. im willing to study all of these stuff. references, examples,
related codes could be very helpful..
Apparently the LCD has not been selected yet, the easiest would be to
select one that is first scanning each column from top to bottom
before going to the next column. With such displays, you could send
0xFF bytes until the threshold has been reached and then send 0x00
bytes.

With line scanning, there is the small extra complication of
generating the bit pattern in the transition area, in which you would
have to send bytes with 1 to 7 bits set.

Before selecting the display, you should carefully evaluate, how the
display is controlled.

Paul
 
["Followup-To:" header set to sci.electronics.design.]
On 23 Apr 2005 01:11:51 -0700,
dhaevhid <dhaevhid@hotmail.com> wrote
in Msg. <23be6f4c.0504230011.4415c399@posting.google.com>

its actually a qualifying sample project for my first job. actually, i
was just tasked to study the assembly programming and hardware design
and be able to produce a working model for me to qualify for the job.
Well, maybe "Go out and buy one for $20 at a store" is still the answer.
Knowing what's already on the market (especially in unrelated fields) is
probably just as important as knowing how to design something.

--D.
 
"dhaevhid" <dhaevhid@hotmail.com> wrote in message
news:23be6f4c.0504232324.7a54bb70@posting.google.com...
im aiming for
about +/-2 hz accuracy. with the fastest possible response time...
Not adequate for musical purposes, I think. Basically what you're saying is
that the best you can do would result in a 2Hz beat between a tuned string
and the correct pitch; that's still annoyingly out of tune. Simply tuning
by ear you can get 3 to 4 times better than that (i.e., one beat every 2
seconds). It might be "close enough for bluegrass," and certainly still
quite an interesting electronics project, but it's not a very good tuner.
 
On Sun, 24 Apr 2005 14:30:37 +0300, Paul Keinanen <keinanen@sci.fi>
wrote:

....to add a frequency specific constant
value to a phase accumulator, which will address a sine look-up table
to get the sine wave samples that are then multiplied (mixed) with the
microphone signal to get some kind of frequency/phase detector..
The trouble with phase detectors in the presence of noise is that they
only work if you are close. The indication for "way off" is useless.
It is like using a strobe. The pattern is clear only if the pitch is
within a certain range.


-Robert Scott
Ypsilanti, Michigan
 
On 24 Apr 2005 00:24:40 -0700, dhaevhid@hotmail.com (dhaevhid) wrote:

im thinking about zero crossing detection but the guitar signal is
consists of the fundamental and higher harmonics maybe up to 4 or 5
harmonics... and these harmonics cause erroneous zero crossings...
The trouble with using zero-crossings is that what you call harmonics
are not really harmonics. That is, they are not exact multiples of a
fundamental frequency. Since these overtones are not locked to the
fundamental, they float through the fundamental waveform, causing
time-varying distortion to the zero-crossing point. If you want to
use zero-crossings, you must first bandpass filter (either in software
or in hardware) for on particular narrow range of frequencies so that
the effect of these inharmonic overtones will have mininal effect on
the zero-crossing time. Of course you could just sample for a longer
time so that the individual errors in zero-crossings would be averaged
out. But that would contradict your stated goal of getting a response
from the device as soon as possible. Good luck.


-Robert Scott
Ypsilanti, Michigan
 
"Watson A.Name - "Watt Sun, the Dark Remover"" <NOSPAM@dslextreme.com> wrote
in message news:116hgkglr9sra84@corp.supernews.com...
"twags6" <twags6@hotmail.com> wrote in message
news:1114067073.072994.268340@f14g2000cwb.googlegroups.com...
Is there any way to make a dc power supply capable of 50+ amps at
12-13.8 vdc? Basically, I'm looking for something to simulate the
power from a car without the whole battery and charger setup. Parts
express sells a nice rackmount one, but I'd rather not part with $190.

TIA
Trevor

You might be able to find better deals on Astron or other similar power
supplies. This company sells a 45A PS for over $200. You may be able
to get a used one on Ebay for a lot less.
http://www.skywavzelectronics.com/powersupplies.htm


If it's only for occasional testing such as drawing 50 amps for 10% or less
of the time it sounds as though a good auto battery plus a charger would be
the cheapest way to go. The battery will automatically smooth the output of
the charger, provide sufficient capacity for 50 amps for short periods and
simulate conditions such as those found in a typical vehicle?
Make sure of good ventilation while battery recharging!
 
Just so you know, using an FFT for this purpose is going to lead
to huge disappointment. It's not the way to go.

- The frequency resolution will be too poor, because obviously you
can only use a very limited number of points in this application.

- You will face having to decide what peak to choose when analysing
the resulting FFT. This is not so obvious as you will notice there
are nasty transients.
 
dhaevhid wrote:
AND HERE COMES "RICH THE NEWSGROUP WACKO" CALLING ME AN ASSHOLE AND
ASKING FOR MY PAYCHECK... TRY TO THINK ABOUT IT, YOU CALL A GUY AN
ASSHOLE AND THEN ASK FOR HIS PAYCHECK... WHO'S THE REAL ASSHOLE?...

Dumbass,

He's only an asshole in his own wet dreams. He isn't smart enough to be
a real asshole.

Ignore him. He's almost as stupid as Sloman.


Have a great day,
Pup
 
Walter Harley wrote:
"dhaevhid" <dhaevhid@hotmail.com> wrote in message
news:23be6f4c.0504232324.7a54bb70@posting.google.com...

[...] im aiming for
about +/-2 hz accuracy. with the fastest possible response time...


Not adequate for musical purposes, I think. Basically what you're saying is
that the best you can do would result in a 2Hz beat between a tuned string
and the correct pitch; that's still annoyingly out of tune. Simply tuning
by ear you can get 3 to 4 times better than that (i.e., one beat every 2
seconds). It might be "close enough for bluegrass," and certainly still
quite an interesting electronics project, but it's not a very good tuner.
I am reading "Musical Acoustics" by Donald Hall, and he has a graph on
page 108 that charts Hz against "JND" (which stands for "Just Noticable
Difference".) Within the frequency range of open strings on a guitar, 1
Hz appears to be 'noticable' for between 60 and 90 dB. For quieter
sounds, it goes up to 3 or 4 Hz. This is for pure sine waves.

Thus, sadly, 2 Hz probably isn't going to be good enough. The maximum
error should probably be 1/2 Hz, as Walter says.

---
Regards,
Bob Monsen
 
In article <4268657b$0$98808$c3e8da3@news.astraweb.com>, blazeinferno wrote:
Hi,

The output is 65W. Does the charger specify how many watts on the
input side or maybe how much current it consumes on 120V?
If it does specify the current then: Power (Watts=Volts *Amps) and that
should tell you the minimum power your transformer should be able to handle.
If nothing is specified for the input side, then I would estimate the
efficiency of the charger to be at worst 75%. With this approximation, the
input power should roughly be about 65W/0.75=87W. A transformer between 85W
and 100W should be fine. The power for 120V or 240V will still be the same.
The fundamental difference is that current is halved at 240V.
One more thing to worry about when a transformer powers anything with a
rectifier if it also has a filter capacitor: The waveform of the current
drawn by the device. The RMS current can be higher than that of a
resistive load drawing the same amount of power and a sinewave current
waveform - sometimes a lot higher. The RMS current is what will heat up
transformer windings.

Try putting a low value resistor in series with the input of the
charger, and looking at the current waveform on an oscilloscope. Draw it
on graph paper and calculate an approximated RMS value.
Or, you may be able to find an automotive lamp that, when placed in
series with the input of the charger, glows without dropping a lot of
voltage nor burning out. Find out how much current it takes to make the
lamp glow the same way, and that's the RMS current drawn by the charger.
Multiply RMS current by voltage, and that's what the transformer has to be
rated for (often in volt-amps rather than watts).

- Don Klipstein (don@misty.com)
 
In article <23be6f4c.0504232324.7a54bb70@posting.google.com>,
dhaevhid@hotmail.com (dhaevhid) wrote:

im finished with the signal conditioning part of the hardware. i used
an op amp to have a 2volts squarewave that will be the input signal of
the microcontroller. i will be using the eFH5830 mcu buy EMC.(elan
microelectronics) the mcu is 8-bit RISC type, 3.582Mhz. im aiming for
about +/-2 hz accuracy. with the fastest possible response time...
You do know that +2 Hz on the low E string (84'ish Hz) gets you halfway
to F.
 
"Mark" <makolber@yahoo.com> wrote in message
news:1114396375.307552.281880@g14g2000cwa.googlegroups.com...
Is this really true?

I know if you excite a string (or any mechanical resonance) to vibrate
on an overtone, that the overtone is not exactly a harmonic of the
fundamental mode, just like a quartz crystal.

But in this case the string is vibrating on the fundamental frequency
and I would think that nay harmonics generated harmonics would be
exact. If what you say is true, then you should be able to hear a beat
note with only ONE string. The beat note would be between the true
harmonics of the fundamental and the overtones. I don't think it works
that way. Anybody know for sure?
Listen to a guitar string! Or better, a bass string, because they're
thicker. New strings aren't so bad, but as they get older they get worse;
that "out of tune with itself-ness" is one of the things that causes one to
need new strings. The grooves that frets chew into strings also make the
string sound out of tune with itself.

A guitar/bass string is not quite a perfect resonant system, because of its
finite thickness, particularly at the witness points. The "length" of the
string is effectively not the same at all frequencies.

I wouldn't swear I'm right about the underlying theory; but the end result
is that a string definitely does audibly beat against itself.

There are also other problems - e.g., plucking a string hard tends to pull
it sharp at first. The producer Jack Endino mentioned some of these issues
in an interesting article a couple years back (maybe in TapeOp?) about the
challenge of properly tuning a guitar; basically, his feeling is you have to
tune for a particular song and playing style.
 
In article <1114389887.905632.264830@z14g2000cwz.googlegroups.com>,
Glenn Gundlach wrote:
Pet subject of mine as I used to have a pipe organ I built. I could
...
the desired pitch. The '0' crossing is the clock pulse to the latch
driving the 4-16 decoder. When you're on pitch, the LED pattern doesn't
move,
Yup. But pipe organ is easy (depending on the pipe type), as its
output is quite close to sine wave. Reed pipes are more difficult,
but probably not as bad as the sound from string instruments.

just like a turntable strobe. Generating the scale is tough since
the ratio note-note is 12th root of 2.
Nononononnononoooooo! If you tune it to the "even-tempered" scale,
the result is very bad-tempered. All the fifths are bad, all the
thirds are bad.

And here we come to the point where a custom-made tuning tool would
be useful. It is quite easy to go and buy a simple one which just
shows the pitch on a scale. However, I'd like to have one which
can be taught different temperaments.

There are some such instruments available, but they tend to be
rather bulky, eat up a lot of batteries, and cost a lot. On the
other hand, it should not be difficult to use different tempera-
ments once a reliable frequency meter has been made.

---

There are a few challenges which have to be addressed. Here is my
list:

- accuracy down to 1 cent (1/100 of a half note, around 0.6 permille
of the frequency, i.e. 0.24 Hz @ 415 Hz)

- fast response (preferably in the 100s of milliseconds), because
slow response makes it difficult to tune plucked instruments
(rapidly changing pitch)

- freely adjustable a', at least from 390 Hz to 465 Hz

- custom temperations

- good response over four octaves (lowest string of a violone is
at around 35 Hz, the highest string of a violin at 625 Hz)

I know this is not a trivial problem. Using FFT might be a solution.
On the other hand, a sliding sampling window or some other trickery
should be used, and there might be some better algorithms. In
any case the first problem is to have a coarse idea of the basic
tone and get rid of the harmonics. After that some time-domain
algorithms might be good enough.

The good thing is that the relative accuracy requirement (1 cent)
can be relaxed a lot in the low frequencies.

If someone comes up with a robust, fast, and relatively simple
algorithm, that would be nice. Even nicer if the algorithm is
simple enough to be realized with a few hundred kIPS, but OTOH
MIPS are not so expensive after all.

- Ville (viola da gamba player)

--
Ville Voipio, Dr.Tech., M.Sc. (EE)
 
I read in sci.electronics.design that dhaevhid
<carlo_dizon@netlimit.com> wrote (in
<b2fbe445.0504242220.3a0d854@posting.google.com>) about 'DIGITAL GUITAR
AUTO-TUNER PROJECT', on Sun, 24 Apr 2005:
well, from all of the documents ive read so far, the guitar string
vibrates at its fundamental frequency and also have harmonics that are
multiples of 1/12th root of 2 that's (2^(1/12))...
Thos are the frequencies of the well-tempered scale, not harmonics.
Harmonics are 2 times frequency, 3 times, 4 times etc.

this is the first time that someone told me that the othet components
of the guitar signal signal is not actually harmonics...
I think this is a subject that you don't need to go into very much. It
seems to me that a wholly digital tuner is rather difficult, and I would
look at a hybrid design - using digital to get a series of stable
frequencies (as in 'top octave generator' for organs), and then analogue
methods for comparing the string frequency with the reference. A
Lissajou display is a very good way of adjusting one frequency to be
very near indeed to another.
--
Regards, John Woodgate, OOO - Own Opinions Only.
There are two sides to every question, except
'What is a Moebius strip?'
http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk
 
["Followup-To:" header set to sci.electronics.design.]
On Mon, 25 Apr 2005 07:42:38 +0100,
John Woodgate <jmw@jmwa.demon.contraspam.yuk> wrote
in Msg. <m0vdV3FeFJbCFwcT@jmwa.demon.co.uk>

I think this is a subject that you don't need to go into very much. It
seems to me that a wholly digital tuner is rather difficult, and I would
look at a hybrid design - using digital to get a series of stable
frequencies (as in 'top octave generator' for organs), and then analogue
methods for comparing the string frequency with the reference. A
Lissajou display is a very good way of adjusting one frequency to be
very near indeed to another.
Many years ago the magazine "Elektor" featured a very simple and clever
design: An oscillator/counter (probably a 4017) stepped through a row of
LEDs, but a LED would only turn on when the input signal had a zero
crossing at the same time. Given an appropriate oscillator frequency, the
right tuning of the string would be indicated by a standing light, whereas
a deviation in frequency would cause the light to "wander" to one side or
another.

Cheap, simple, and stage-proof. When I read the article I regretted that
my hearing was perfect.

--Daniel
 
In article <426be5e4$0$21143$7a628cd7@news.club-internet.fr>,
Guillaume <"grsNOSPAM at NOTTHATmail dot com"> wrote:
Just so you know, using an FFT for this purpose is going to lead
to huge disappointment. It's not the way to go.
Only if you use an FFT naively.

- The frequency resolution will be too poor, because obviously you
can only use a very limited number of points in this application.
Incorrect. For single pitch detection, one can use as many points as
the signal-to-noise ratio will allow.

Given a sufficient signal-to-noise ratio, one can always interpolate more
points between FFT frequency bins (using a windowed-Sync, not a linear
interpolation of course), and/or zero-pad the samples for a longer
FFT with as many points as you want. There are also other methods,
depending on the amount of memory and CPU cycles available.

- You will face having to decide what peak to choose when analysing
the resulting FFT.
One does have to determine which local maxima are nearest (or near
multiples of) the pitch of interest, but there are several methods to
help with this (autocorrelation, cepstral, template pattern matching or
even back-propogation neural net techniques).

This is not so obvious as you will notice there
are nasty transients.
Not sure what you mean here. You do need to make sure your FFT output
looks like it might represent a musical note of interest, and not just
background noise between notes.


IMHO. YMMV.
--
Ron Nicholson rhn AT nicholson DOT com http://www.nicholson.com/rhn/
#include <canonical.disclaimer> // only my own opinions, etc.
 

Welcome to EDABoard.com

Sponsor

Back
Top