Design Con 2015
Breaking News
View Comments: Threaded | Newest First | Oldest First
Max The Magnificent
User Rank
Blogger
King of Visio
Max The Magnificent   7/8/2014 9:39:01 PM
NO RATINGS
Just call me the "King of Visio" because all of the drawings in this blog -- including the block diagrams, schematics, and especially the ones of the breadboards -- were lovingly created by yours truly.

David Ashton
User Rank
Blogger
Re: King of Visio
David Ashton   7/8/2014 11:22:42 PM
NO RATINGS
I'll go along with that Max, awesome diagrams.  I'm still woefully inadequate at Visio.

One thing that occurs to me here, especially after watching the video of your LEDs flickering away.  True VU displays - and the LM3915 - have a logarithmic response, whereas MCU ADCs are linear.   What does the MSCEQ7 do - the datasheet says the DC output for each band is just an amplified peak detected amplitude of the input - but is it linear or logarithmic?  As it does not say, I'm assuming linear, and the way your LEDs are flashing I think goes along with this.

If it is linear, you could do a log conversion in software, either mathematically or via a look-up table.  I seem to remember this was touched on in a previous blog - am I right?

I still think it is a great little chip...

 

Max The Magnificent
User Rank
Blogger
Re: King of Visio
Max The Magnificent   7/9/2014 9:19:47 AM
NO RATINGS
@David: ...True VU displays - and the LM3915 - have a logarithmic response, whereas MCU ADCs are linear.   What does the MSCEQ7 do...

The data sheet doesn't say -- the vertical frequency response axis is simply annotated 0 at the bottomn and 20 at the top.

Actually, thsi is something I can test using my frequency generator -- I can put in a 0.5V peak-to-peak signal, 1.0V pk-pk, 1.5V pk-pk, and 2.0V pk-pk and see what I get -- I'll do that this coming weekend and report back.

David Ashton
User Rank
Blogger
Timings
David Ashton   7/8/2014 11:46:16 PM
NO RATINGS
Max, another query - the MSGEQ7 timings in your article are all given as "minimum".  I assume that as long as you stick to these minimum timings you can extend them a bit (for example if your MCU is busy doing something else, or if it takes a long time to do the ADC conversion) without problems?   And as long as you read the ouput at least to (settling time) after the strobe goes low (and before the next strobe pulse) you are ok - I notice the minimum strobe pulse width is less (18us) than the settling time (36us) - which implies you can read the data even if the strobe has gone back high?  (ie you could actually read data during the purple times in your diagram?)

 

Max The Magnificent
User Rank
Blogger
Re: Timings
Max The Magnificent   7/9/2014 9:36:07 AM
NO RATINGS
@David: I notice the minimum strobe pulse width is less (18us) than the settling time (36us) - which implies you can read the data even if the strobe has gone back high? (ie you could actually read data during the purple times in your diagram?)


As you say, the minimum strobe pulse of 18us is less rthan the outpout settling time of 36us, so I too assume that you can read the data even afgter the strobe has gone back high (although in my software I delay 40us after the strobe goes low before doing the read).

However, you can't read data during the purple times in my diagram because the minimum tss (strobe-to-strobe delay) is 72us.

Hmmm -- looking at my original diagram (which I re-drew from the one in the data sheet), I see what you mean -- that original diagram implies that the data goes invalid on the rising edge of the strobe.

Maybe the following depiction is better -- what do you think?

 



David Ashton
User Rank
Blogger
Re: Timings
David Ashton   7/9/2014 6:21:47 PM
NO RATINGS
@Max....I think that's better....but really this should be in the datasheet - as someone else pointed out the datasheet could have a lot more info in it.

Max The Magnificent
User Rank
Blogger
Re: Timings
Max The Magnificent   7/9/2014 11:56:02 AM
NO RATINGS
@David: I notice the minimum strobe pulse width is less (18us) than the settling time (36us) - which implies you can read the data even if the strobe has gone back high? (ie you could actually read data during the purple times in your diagram?)


David -- I decided this point was important enough that I've gone back and added some stuff to the main column (page 1) -- take a look and see what you think.

Max The Magnificent
User Rank
Blogger
Re: Timings
Max The Magnificent   7/11/2014 5:32:26 PM
NO RATINGS
@David: I notice the minimum strobe pulse width is less (18us) than the settling time (36us) - which implies you can read the data even if the strobe has gone back high? (ie you could actually read data during the purple times in your diagram?)


Hi David -- based on your question -- and on the fact that it wasn't possible to say one way or the other from the existing datasheet -- I contacted the folks who make the MSGEQ7. They gave me a lot of information, which I've reflected back into the main column above. But the bottom line is that the waveform diagram shoudl actually look like the following:



David Ashton
User Rank
Blogger
Re: Timings
David Ashton   7/11/2014 9:14:29 PM
NO RATINGS
@Max...well I certainly stirred up a hornet's nest there, didn't I? :-)

That makes a lot more sense.  You can't read the data while the strobe is high but you can extend the strobe low as long as you want or need, as long as you wait the 36us for the data to settle...  But the minimum strobe high time is not given, maybe that is the 18 us?   It would be important to know that if you were using a fast MCU and giving a strobe high pulse at the end of your ADC conversion.  Could MSI confirm that?

Max The Magnificent
User Rank
Blogger
Re: Timings
Max The Magnificent   7/12/2014 1:59:27 PM
NO RATINGS
@David: But the minimum strobe high time is not given...

I'm simply making the strobe go low -- waiting 40us (a bit more than the specified minimum of 36us), reading the data, making the  strobe go high, and waiting another 40us, giving a strobe-to-strobe period of 80+us (which is bigger than the specified minimum of 72us)...

David Ashton
User Rank
Blogger
Re: Timings
David Ashton   7/12/2014 7:54:57 PM
NO RATINGS
@Max....well you have proved that the above works and you have exceeded the minimum strobe to strobe time.  Have you factored youre ADC conversion time into this?  (Is it fixed or variable?) Without knowing the specs for the minimum strobe high time you may be wasting time that might be precious later when your design gets more advanced.   I may be being pedantic here but I'm sure you could find any number of readers here who've come unstuck by NOT being pedantic about timings... :-) 

Max The Magnificent
User Rank
Blogger
Re: Timings
Max The Magnificent   7/14/2014 11:29:47 AM
NO RATINGS
@David: Have you factored you're ADC conversion time into this?

I checked this the old-fashioned way on a scope -- check out my next blog which will be on the test procedures I used.

David Ashton
User Rank
Blogger
Re: Timings
David Ashton   7/12/2014 4:07:13 AM
NO RATINGS
@Max - maybe we could get a gig compiling data sheets for MSI :-)

Max The Magnificent
User Rank
Blogger
Re: Timings
Max The Magnificent   7/12/2014 2:00:50 PM
NO RATINGS
@David: maybe we could get a gig compiling data sheets for MSI :-)

Stranger things have happened -- I've created data sheets before -- I pride myself on my waveform diagrams LOL

mithrandir
User Rank
Rookie
Moving the filters in
mithrandir   7/9/2014 12:41:49 AM
NO RATINGS
Nice post Max! Even nicer visio drawings!

I'm curious if you could actually push the MSGEQ7 functionality into the arduino itself. The max frequency is 16KHz, so you could probably get away with a 3~4x oversampling ADC and pushing it through digital filters running in firmware.

There doesn't seem to be a lot of information on the filter charactersitcs on the datasheet so I'm guessing a 2 or 3-tap IIR should do it which will amount to somewhere around 30 cycles(if there's a hardware multiply, sadly not at all familiar with Arduino cores) for each bandpass. That will amount to 8*30 which is 240 cycles roughly for all the 8 parallel bandpasses to run. Plus some latency for the ADC interrupt to run and grab, but that happens only once every cycle so lets put another 20 cycles for that. Since the actual processor is running at 80MHz, you should still be able to have something around 1200 cycles(assuming a 4x oversampled ADC so it gets a new sample at 64ksps) to work with which should leave plenty of processing room to spare for the PWM's to dim according to the filtered output.

2 channels could may be fit in too but I'm presuming too much at this stage :)

Max The Magnificent
User Rank
Blogger
Re: Moving the filters in
Max The Magnificent   7/9/2014 9:41:19 AM
NO RATINGS
@mithrandir: I'm curious if you could actually push the MSGEQ7 functionality into the Arduino itself.

I'm sure you could achieve somethging like thsi in the Arduino -- I've seen software DSP versions of spectrum analyzers running on Arduinos. My problem is that this is going to be part of my BADASS Display, so I'll be using my Arduino to drive the display itself.

I'm actually running this on a chipKIT MAX32, which is more than capable of running sophisticated DSP algorithms in software -- that's the longer term plan -- it was just that when I was introduced to these MSGEQ7 chips I thought I'd give them a whirl.

mithrandir
User Rank
Rookie
Re: Moving the filters in
mithrandir   7/9/2014 10:19:01 AM
NO RATINGS
My interest is piqued now. I'll see if I can get just the front end filtering running on my Pioneer kit. Alas I don't seem to have many LED's with me right now so time hunt down, scrounge or steal a few!

Weekend project, here I come :)

Clive
User Rank
Rookie
Re: Moving the filters in
Clive "Max" Maxfield   7/9/2014 10:59:23 AM
NO RATINGS
@mithrandir: I'll see if I can get just the front end filtering running on my Pioneer kit.

Is that a PSoC 4 Pioneer kit, or are you talking about something else?

 

Alas I don't seem to have many LED's with me right now

I buy bags of them at a time because I seem to use them in so many things.

 

Weekend project, here I come :)

Have a great time, email me to tell me how you get on (max.maxfield@ubm.com and max@clivemaxfield.com), keep notes and take pictures -- maybe you could even write your experiments up as a column for me to post here on EETimes 

mithrandir
User Rank
Rookie
Re: Moving the filters in
mithrandir   7/9/2014 11:36:06 AM
NO RATINGS
Yup, it's the PSoC4 kit. Have it close at hand and I'm used to the IDE so it'll be quick.

 

I'll keep you posted.

Max The Magnificent
User Rank
Blogger
Re: Moving the filters in
Max The Magnificent   7/9/2014 11:57:48 AM
NO RATINGS
@mithrandit: Yup, it's the PSoC4 kit. Have it close at hand and I'm used to the IDE so it'll be quick.

I have an unopened PSoC 4 Pioneer Kit sitting on my desk -- it's staring at me making me feel guilty -- I'd love to see your C code when you've written it.

antedeluvian
User Rank
Blogger
New devices
antedeluvian   7/9/2014 11:40:09 AM
NO RATINGS
Max

I love finding new manufacturers of speciality devices, so I looked up the manuafacturer of the MSGEQ7. They are called Mixed System Integration with some interesting devices. I will keep them in mind. They seem to have been in business for 10 years or more, but I must say that in this day and age of word processing and electronic publishing that their data sheets are decidedly "retro" to say the very least.

Max The Magnificent
User Rank
Blogger
Re: New devices
Max The Magnificent   7/9/2014 12:01:30 PM
NO RATINGS
@antedeluvian: I must say that in this day and age of word processing and electronic publishing that their data sheets are decidedly "retro" to say the very least.

They aren't alone. Some companies do a really good job at this. Others ... not so much. The datasheets from Mixed Signal Integration are distinguished as much by the useful information they leave out as by the information they actually decide to include.

For example, as David Ashton points out, from the data sheet we don't know if the spectrum values generated by the chip are linear or logarithmic. This really is a key piece of information (I'm going to determine it experimentally thsi coming weekend).

jambrose950
User Rank
Rookie
Re: New devices: MSGEQ7
jambrose950   7/9/2014 1:15:18 PM
NO RATINGS

The Mixed Signal Integration MSGEQ7 has a linear output. 

antedeluvian
User Rank
Blogger
Resistor value tools
antedeluvian   7/9/2014 2:00:21 PM
NO RATINGS
Max

The color code for a 68Ω resistor (the three colored bands on the resistor) is blue-gray-black. You can find all sorts of information about resistor color codes on the Internet, including this rather nice resistor color code converter. Another useful tool is this LED resistor calculator, which rounds the result to the closest resistance value that is actually available.

Both these tools work with, at best, 5% resistor values, the E24 range. I haven't looked at hobby distributors recently but we are finding it increasingly difficult to find 5% resistors (that were originally used to pinch some pennies), without a minimum order. It seems the technology has improved to the point where 1% reistsors are easy enough to make without sufficient rejects to justify a 5% range. It is easy enough to change the values to the E96 range- it just means tons of ECNs.

At one point, I did read that 0.1% resistors were becoming cheaper, but they were going to revert back to the E24 series rather than the E96. I am not sure where that is right now.

On a self-serving note I should mention that it is easy enough to do these calculations with any computer based tool- I have used and written about using Excel for electronics extensively. Using some variation of the LOOKUP function and a table of resistor values, it is easy enough to find the nearest standard resistor value. My latest blog on Planet Analog goes a step further and is about finding the best match for a resistor pair using standard values (as in the gain of an op-amp or the voltage of an LM317). Excel-Optimizing Resistor Ratios Part 1 and Part 2. You can see all my blogs on Excel interspersed amongst some others here.

David Ashton
User Rank
Blogger
Re: Resistor value tools
David Ashton   7/9/2014 9:39:29 PM
NO RATINGS
@Antedeluvian - as you know I am a confirmed scrounger of bits from old boards.  While I very rarely remove resistors these days unless they are very easy, I do see a lot of them and can confirm that (for thru-hole components anyway) the vast majority of them, even though they are 1% resistors, confirm to E12 values (not even E24, though you do see some of those).  The same seems to apply to SMD resistors though I cannot speak with the same experience on those - they are usually so small it's a pain to check the values.

I guess there is a good reason for this - for (say) LED dropping resistors or pull-up resistors (which covers a good deal of what resistors are used for theses days) the exact value is not critical at all, so by sticking to E12 values, manufacturers don't need large (and expensive) inventories. 

 

Max The Magnificent
User Rank
Blogger
Re: Resistor value tools
Max The Magnificent   7/10/2014 11:33:21 AM
NO RATINGS
@David: ... as you know I am a confirmed scrounger of bits from old boards.

I didn't know you'd been confirmed -- I thought you still maintained your amateur status LOL

David Ashton
User Rank
Blogger
Re: Resistor value tools
David Ashton   7/10/2014 4:16:20 PM
NO RATINGS
@Max...I am a card-carrying member of Scroungers Of Boards (SOB :-)

antedeluvian
User Rank
Blogger
Re: Resistor value tools
antedeluvian   7/10/2014 12:09:03 PM
NO RATINGS
David

I guess there is a good reason for this - for (say) LED dropping resistors or pull-up resistors (which covers a good deal of what resistors are used for theses days) the exact value is not critical at all, so by sticking to E12 values

There may be a bit more. A 681R 1% resistor is the same as a 680R 5% resistor if you up the wattage rating. As an example, in the same package the 1% is rated at 1/4W and the 5% as 1/2W. As a boss of mine used to say, when it comes to power dissipation there is no magic so why the power rating difference (actually there is a bit more to that as well- maybe the subject of a future blog)? The real difference is that if you allow the 1% to warm up the resistance will drift out beyond the 1% limit. When it comes to LEDs there is a good probability that the current you are driving them with will warm up the resistor, but for an LED as you point out, who cares?

David Ashton
User Rank
Blogger
Re: Resistor value tools
David Ashton   7/10/2014 4:19:52 PM
NO RATINGS
@Antedeluvian - as well as this, I have very rarely seen an extra band on a resistor to indicate temperature coefficient, and in the old days they used to put a pink band on to indicate high stability.     Fortunately I don't move in such esoteric circles and for what I need E12 values are usually fine....

Radio
LATEST ARCHIVED BROADCAST
EE Times Senior Technical Editor Martin Rowe will interview EMC engineer Kenneth Wyatt.
Top Comments of the Week
Like Us on Facebook

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
EE Times on Twitter
EE Times Twitter Feed
Flash Poll