Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to make a clock to feed a 4017 with the bass of a music.

Status
Not open for further replies.
The problem is probably that what you think is one bass note is actually more than one pulse (= < 1 clock tick) so far as your circuit is concerned (like two bass pulses close together that sound like a single note). No way to tell, really, without putting a 'scope on your circuit. It might be possible to handle this by tweaking your low-pass filter, but it could be a complicated problem to fix.
 
Sure, I get your point.

I am searching for some kind of solution now on google...

If I find anything I come back.

More opinions?

bye
 
The guitar audio is a complex signal. It closely resembles an AM waveform so on 1 pluck of the string you will have a waveform that undulates with peaks and valleys, so it is no surprise you get random multiple triggers. Perhaps a peak detector would resolve some of this.
 
How about using a one-shot to generate pulses of a known length? at least that would set the minimum length for a clock tick.
 
A "one-shot" is a simple circuit that generates a pulse of a constant width (length of time) given an input pulse of indefinite length. In other words, whether the input pulse is long or short, the one-shot generates a fixed-length pulse. And there's no effect if the input is re-triggered (another pulse occurs) before the one-shot pulse is completed. So it's a way to "clean up" random-length pulses, which can be very useful for an application like yours where you're trying to count random events.

Look it up; lots of info and circuits out there. (Try searching this site first.)

Question: how are you defining the "notes" that you're counting? What constitutes a note? how long or short can it be? what frequency? Have you looked at any waveforms?

If you don't have an oscilloscope, you might consider using a sound-card oscilloscope to look at some of the music you're using as input to see what the pulses actually look like.
 
Last edited:
Ok. I getting the point now.

Just to ilustrate, let me show you some screenshot of my simulator program:

Lets get a music of example : Black Eyed Peas - The Time [The Dirty Bit] (Main)

If you get this music, and play it from 40 seconds to 80 seconds, you will ear some mid and high notes from 40secs to 60secs and from 60 to 80 secs, there bass notes.....

So I took this music and put into my simulator program, the Proteus from Labcenter Electronics and configured the audio input like this:

https://img.photobucket.com/albums/v222/ahhh/Eletronica/audio_in.png


I put the audio into my simple RC circuit:

https://img.photobucket.com/albums/v222/ahhh/circuit_LP.png

and got this:

https://img.photobucket.com/albums/v222/ahhh/Eletronica/out-1.jpg

The green one is the audio in and the red one is the out after the filter.

Look and you wil se that from 40 to 60 sec most of the audio is cut beacuse I have a lower-pass filter. From 60 to 80 most of the song pass beacause there is a lot of bass on that part.

The filter works, if on my original ciruit, above, I put the out signal into a trasistor base and on the collector I put a simple LED with a current limiting resistor, the led blinks only with the bass notes.

So I thought that if I put this "pulsing" signal from the collector into a 4017 this would be a clock.... but like I said, do not work very well....

PS: Sorry my english mistakes, not my mother language.

bye
 
Last edited:
I don't quite get the purpose of this circuit?
 
He wants to count bass notes, apparently. Or operate some LEDs in sequence in time to the beat of the music.
 
Last edited:
The "filter" is too simple with only one resistor and one capacitor. It passes voice frequencies up to 1kHz and higher.
You need a multiple-order (maybe 3rd-order or 4th-order) active lowpass filter so that only deep bass is passed.
 
He wants to count bass notes, apparently. Or operate some LEDs in sequence in time to the beat of the music.

Right! Exactly this!

The "filter" is too simple with only one resistor and one capacitor. It passes voice frequencies up to 1kHz and higher.
You need a multiple-order (maybe 3rd-order or 4th-order) active lowpass filter so that only deep bass is passed.

Yes, you are right too. I was trying with a simple one first.......

So, What do you recomend for a audio filter? What one:

  • Chebyshev filter;
  • Butterworth filter;
  • Linkwitz–Riley filter;
  • Paynter or transitional Thompson-Butterworth or "compromise" filter;
  • Bessel filter;
  • Elliptic filter or Cauer filter.

Thanks again for the help.

Matheus Lopes
 
A 2nd-order or 3rd-order Butterworth Sallen and Key lowpass filter works very well and is made with a single opamp.
 
Audioguru, i read on this forum many time that you do not recomend the 741 opamp because it is very old.....

What one do you recomend? The circuit i will study by myself.

EDIT:

I made a test with a LM358 ampop and get this:

First, this was my waveform with the RC filter:

https://img.photobucket.com/albums/v222/ahhh/Eletronica/out-1.jpg

With the active filter I got this:

https://img.photobucket.com/albums/v222/ahhh/circuit_low_pass_active.jpg

Bigger:

https://img.photobucket.com/albums/v222/ahhh/circuit_low_pass_active_wave.jpg

EDIT 2

I downloaded the program called Filter Pro from the Texas Instruments because i do not want to do the calculation with my hands.. I am lazy :D

So, the program returned a n-order filter:

https://img.photobucket.com/albums/v222/ahhh/Eletronica/circuit_low_pass_active_n_order.jpg

Bigger:
https://img.photobucket.com/albums/v222/ahhh/Eletronica/circuit_low_pass_active_n_order_wave.jpg

So, the LM358 is a dual ampop. With 2 i can make this circuit.

Is this a good filter? Now I need to buy the parts. If I feed the base of the transistor with this signal maybe it will work, right?

bye
 
Last edited:
Audioguru, i read on this forum many time that you do not recomend the 741 opamp because it is very old.....
What one do you recomend?
A lousy old 741 opamp has low bandwidth (trouble above 9kHz) and noise (hiss). It is designed to use ONLY a 30V supply but some work with a supply as low as 10V. I have used TL071 single, TL072 dual and TL074 quad low-noise audio opamps for years like used in many hi-fi's. They work well up to 100kHz and have very low distortion of 0.003%. They have Jfet inputs so they have no input bias current and have an extremely high input impedance. They are popular so they are inexpensive.

I made a test with a LM358 opamp
It has trouble above 2kHz, has crossover distortion and has noise (hiss).

I get this:
It is a poor filter because it has a very low input impedance but it must be fed from a source impedance that is much lower (6 ohms or less). It has a cutoff frequency of 200kHz (its 120 ohm resistor values are much too low) instead of 100Hz.

With your 4.7nF and 9.4nF capacitors, the resistors must be 240k ohms each for a 100Hz cutoff frequency and the circuit must be fed from an impedance of 12k ohms or less. Use an audio opamp. Try it.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top