CR4® - The Engineer's Place for News and Discussion®


Previous in Forum: How Can I Overlap 2 Different Signal   Next in Forum: Modem/Router IP Address
Close
Close
Close
23 comments
Active Contributor

Join Date: Aug 2016
Posts: 13

Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 5:27 AM

Hello! This is my first post. I did a jumpy note with my classmate. Now I want to post here.
Firstly, here are the finished images :

This is a circuit diagram. principle is very clear, but this screenshot is not very clear. LOL. We were going to do 16 x 8, and later we only bought 200 LEDs. So we decided to make 16 x 12, and we didn't draw the schematic again.

At first, we welding control panel. LED and transistor were bought on kynix semiconductor, and we were using a microcontroller IAP15F2K61S2. We bought it just for fun and now it make a difference. This chip was fast and very convenient, no external oscillator and reset circuit, comes with 10 ADC, 38 IO ports.

The welding of control panel was done mainly by myself. My classmate helped weld a little. LOL. He said that his hands were clumsy.He weld a few lines. I remember last time because we do not know that most Collage universal plate is attached to the power supply then caused short-circuit. This time just directly use two lines of up and down as Vcc, about two lines of left and right used as Gnd. In this way the project was easier.

We tangled for a moment when selected LED color. Because we do not know if the effect of multicolor is good, then we decided to buy the blue. But we finally decided to buy purple.
Purple is indeed very domineering but brightness is a little dim. With a 10 ohm resistor to drive current limiting then brightness is like this. And the measured voltage drop over the 3.3V. Fine, let's do it ! Put them up. It seems quite spectacular. LOL.

When torch the lights, the table may be uneven or did not put away, each of which needs to be adjusted. But fortunately I have solder a foot before, then adjusting one by one was very quickly. After weld a negative electrode lead out in sideways and the positive bristling hand in hand. This spend me a great deal of time. And fortunately no bad welding. Last time it burned out a few when welding light cube and it's very complicated to change them. This time we are very lucky.

That comes with transistors and resistors. triode using a line of 8050.My classmate bought most components and LEDs from kynix semiconductor :http://www.kynix.com/. Resistor 0805, the current limiting resistor 10 ohms, the base resistance 10K. Finally, pin, we discovered that pin is the most difficult to weld.
maybe I don't know how to weld this thing. It burnt me out to death! Here is the finished panel.

Here are some detail images. It seems that I have under estimate the 192 lights. I almost have dim eyesight!

Two boards stacked up in the middle with Dupont line, the work is finished.

Due to limited capacity, coupled with time constraints, the effect is like that of the present. You
can have a try to find more interesting features.
There are a few questions to ask you:
This stuff will have a display even without sound signal.
if AD converter pin float it seems there will be a level change, or sometimes send up with a serial voltage, and how to do this?
Sound signal output from the computer sound card should be alternating current. generally a few hundred millivolts voltage to 1V, but I use AD converter is sent directly to the host computer is 0, I do not know what's wrong and I ignored it.
And automatic gain large volume does not matter, but the volume will not be identified if it
is too small.
The AD conversion accuracy may be the reason.
when boot animation zzz displayed noise are always there.
What's the problem? And how to solve it?

Register to Reply
Pathfinder Tags: LED
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru

Join Date: Aug 2005
Location: Hemel Hempstead, UK
Posts: 4143
Good Answers: 230
#1

Re: Our Jumpy note-- purple music spectrum --LED !

08/12/2016 6:10 AM

Welcome.

Other than timing what regulates the current in the LEDs?

When you say "when boot animation zzz displayed noise are always there." Do you mean audible noise, display flicker, power supply noise or something else?

__________________
We are alone in the universe, or, we are not. Either way it's incredible... Adapted from R. Buckminster Fuller/Arthur C. Clarke
Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#15
In reply to #1

Re: Our Jumpy note-- purple music spectrum --LED !

08/15/2016 10:36 PM

Thank you. It sounds like audible noise.

Register to Reply
Guru

Join Date: Mar 2007
Location: at the beach in Florida
Posts: 19288
Good Answers: 1129
#2

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 11:04 AM

ZZZ's means the card is sleeping....no input....

__________________
Life is like riding a bicycle. To keep your balance you must keep moving. A.E.
Register to Reply
Guru

Join Date: Oct 2008
Posts: 39909
Good Answers: 1588
#4
In reply to #2

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 11:24 AM

Please disregard the previous post #2.

It is a feeble attempt at humor.

Eagles have very small brains and use all their brain power just pecking at the keys on the keyboard.

Nice project!!!!

Register to Reply
Guru

Join Date: Mar 2007
Location: at the beach in Florida
Posts: 19288
Good Answers: 1129
#5
In reply to #4

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 11:45 AM

__________________
Life is like riding a bicycle. To keep your balance you must keep moving. A.E.
Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#18
In reply to #5

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/15/2016 10:47 PM

Excellent !

Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#17
In reply to #4

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/15/2016 10:45 PM

Thank you very much. It's very nice of you.

Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#16
In reply to #2

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/15/2016 10:42 PM

LOL. No, this was the boot screen that I designed. Maybe this suggested that I should go to sleep in my mind.

Register to Reply
Guru

Join Date: Apr 2010
Posts: 5759
Good Answers: 577
#3

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 11:11 AM

It looks like an interesting project.

I couldn't locate a datasheet for your microcontroller, so I'll have to ask just general questions.

I am assuming you are taking an ac signal input into the A/D, doing a spectral analysis (amplitude FFT) and converting the result to drive output lines for the horizontal and vertical grid to light the appropriate LEDs. Did you write the software, or did it come with the microcontroller (or downloaded)?

Is the A/D on the microcontroller single ended or bipolar. If your A/D is single ended (only positive), then to feed an AC signal from the computer you will need a blocking capacitor and a couple of resistors to bias the level within the range of the A/D. Otherwise you will be clipping off the negative half of the waveform.

Register to Reply
Guru
Hobbies - Musician - Engineering Fields - Chemical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Instrumentation Engineering - New Member

Join Date: Jan 2007
Location: Moses Lake, WA, USA, Thulcandra - The Silent Planet (C.S. Lewis)
Posts: 3950
Good Answers: 175
#6
In reply to #3

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 3:58 PM

Found the following when I selected IAP15F2K61S2 from the product selection table found here.

(There was a link to a datasheet which yielded:

Not Found

The requested URL /datasheet/STC15F2K60S2-en.pdf was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.)

Anyway, here are the features (that may or may not be) for the exact MCU in the post, and may be of help.

STC15F2K32S2 Features:

Enhanced 8051 Central Processing Unit, 1T, single clock per machine cycle, faster 8~12 times than the rate of a traditional 8051.
Operating voltage range:

STC15F2K60S2 series: 5.5V ~ 4.2V.

STC15F2K60S2 series: 3.6V ~ 2.4V.
On-chip 16K/32K/40K/48K/56K/58K/61K/63.5K FLASH program memory with flexible ISP/IAP capability,can be repeatedly erased more than 100 thousand times.
Large capacity of on-chip 2048 bytes SRAM: 256 byte scratch-pad RAM and 1792 bytes of auxiliary RAM
Be capable of addressing up to 64K byte of external RAM
On-chip EEPROM with large capacity can be repeatedly erased more than 100 thousand times.
Dual Data Pointer (DPTR) to speed up data movement
ISP/IAP, In-System-Programming and In-Application-Programming - no need for programmer and emulator.
8 channels and 10 bits Analog-to-Digital Converter (ADC), the speed up to 300 thousand times per second, 3 channels PWM also can be used as 3 channels D/A Converter (DAC).
3 channels Capture/Compare units (CCP /PCA /PWM) ---- can be used as 3 Times or 3 external Interrupts (which can be generated on rising or falling edge) or 3 channels D/A Converter.
The high-speed pulse function of CCP/PCA can be utilized to realize 3 channels 9 ~ 16 bits PWM (each channel of which takes less than 0.6% system time).
The Clock output function of T0,T1or T2 can be utilized to realize 8 ~ 16 bits PWM with a high degree of accuracy (which takes less than 0.4% system time)
Internal highly reliable Reset with 8 levels optional threshold voltage of reset, so that external reset circuit can be completely removed.
Internal high-precision R/C clock(±0.3%) with ±1% temperature drift (-40~+85°C) while ±0.6% (-20~+65°C) in normal temperature and wide frequency adjustable between 5MHz and 35MHz (5.5296MHz/11.0592MHz/22.1184MHz/33.1776MHz).
Operating frequency range: 0 - 28MHz, is equivalent to traditional 8051:0~336MHz.
Two high-speed asynchronous serial ports----UARTs (UART1/UART2 can be used simultaneously and regarded as 9 serial ports by shifting among 9 groups of pins):

--UART1 (RxD/P3.0, TxD/P3.1) can be switched to (RxD_2/P3.6, TxD_2/P3.7), also can be switched to (RxD_3/P1.6, TxD_3/P1.7);

--UART2 (RxD2/P1.0, TxD2/P1.1) can be switched to (RxD2_2/P4.6, TxD2_2/P4.7).
A high-speed synchronous serial peripheral interface----SPI.
Support the function of Encryption Download (to protect your code from being intercepted).
Support the function of RS485 Control.
Code protection for flash memory access, excellent noise immunity, very low power consumption
Power management mode: Slow-Down mode, Idle mode (all interrupt can wake up Idle mode), Stop/Power-Down mode.

Timers which can wake up stop/power-down mode: have internal low-power special wake-up Timer.
Resource which can wake up stop/power-down mode are:

INT0/P3.2, INT1/P3.3 (INT0/INT1, may be generated on both rising and falling edges),

INT2/P3.6, INT3/P3.7, INT4/P3.0 (INT2 /INT3/INT4, only be generated on falling edge); pins CCP0/CCP1/CCP2; pins T0/T1/T2(their falling edge can wake up if T0/T1/T2 have been enabled before power-down mode, but no interrupts can be generated);

internal low-power special wake-up Timer.
6 Timers/Counters: three 16-bit reloadable Timers/Counters (T0/T1/T2, T0 and T1 are compatible with Timer0/Timer1 of traditional 8051)

T0/T1/T2 all can independently achieve external programmable clock output 3 channels) - 3 channels CCP PCA PWM also can be used as three Timers
Programmable clock output function (output by dividing the frequency of the internal system clock or the input clock of external pin):

The Programmable clock output of T0 is on P3.5/T0CLKO (output by dividing the frequency of the internal system clock or the input clock of external pin T0/P3.4).

The Programmable clock output of T1 is on P3.4/T1CLKO (output by dividing the frequency of the internal system clock or the input clock of external pin T1/P3.5).

The Programmable clock output of T2 is on P3.0/T2CLKO (output by dividing the frequency of the internal system clock or the input clock of external pin T2/P3.1).

Three timers/counters in above all can be output by dividing the frequency from 1 to 65536.

The Programmable clock output of master clock is on P5.4/MCLKO, and its frequency can be divided.into MCLK/1, MCLK/2, MCLK/4.

The master clock can either be internal R/C clock or the external input clock or the external crystal oscillator.

MCLK is the frequency of master clock. MCLKO is the output of master clock.
One 15 bits Watch-Dog-Timer with 8-bit pre-scaler (one-time-enabled)
Advanced instruction set, which is fully compatible with traditional 8051 MCU, have hardware multiplication / division command.
42/38/30/26 common I/O ports are available, their mode is quasi-bidirectional / weak pull-up

(traditional 8051 I/O ports mode) after reset, and can be set to four modes: quasi-bidirectional / weak pull-up, strong push-pull / strong pull-up, input-only/high-impedance and open drain.

The driving ability of each I/O port can be up to 20mA, but it don't exceed this maximum 120mA that the current of the whole chip of 40-pin or more than 40-pin MCU, while 90mA that the current of the whole chip of 16-pin or more than 16-pin MCU or 32-pin or less than 32-pin MCU.
Package:LQFP44, LQFP32,TSSOP20, SOP28, SKDIP28, PDIP40.
All products are baked 8 hours in high-temperature 175°C after being packaged. Manufacture guarantee good quality.
In Keil C development environment, select the Intel 8052 to compiling and only contain < reg51.h >

__________________
"Reason is not automatic. Those who deny it cannot be conquered by it. Do not count on them. Leave them alone." - Ayn Rand
Register to Reply
Guru

Join Date: Apr 2010
Posts: 5759
Good Answers: 577
#9
In reply to #6

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 4:53 PM

Thanks. I did find the STC version but not all the data you found. (Everything I found was in Chinese, so I'm not sure how much gets properly translated.)

I'm not exactly sure what the OP's question is, but I don't see a negative supply input on the schematic. Unless the chip has an internal charge pump to generate negative voltage (I doubt, but possible), it seems that the A/D can't process a negative going input signal from the computer audio.

(Just a guess. I can't make out any of the pin labels from the schematic.)

Register to Reply
Guru
Hobbies - Musician - Engineering Fields - Chemical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Instrumentation Engineering - New Member

Join Date: Jan 2007
Location: Moses Lake, WA, USA, Thulcandra - The Silent Planet (C.S. Lewis)
Posts: 3950
Good Answers: 175
#10
In reply to #9

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 5:25 PM

Here's what I think: There is an input to the ADC on the microprocessor coming from the output of the sound card on a computer that is playing music (which was not mentioned by the OP). The amplitude, and perhaps the frequency, is used to effect some pattern of lighting of the LEDs.

Apparently, he is seeing no effect from the music. Hopefully, we will get some feedback from the OP to my second post. And hopefully, we can get a better schematic!

__________________
"Reason is not automatic. Those who deny it cannot be conquered by it. Do not count on them. Leave them alone." - Ayn Rand
Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#23
In reply to #10

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/15/2016 11:33 PM

Thank you very much. But I don't know what kind of schematic you want to see.

Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#20
In reply to #6

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/15/2016 11:08 PM

You are really considerable. Thanks a lot.

Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#19
In reply to #3

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/15/2016 11:04 PM

Yes, the micro-controller A/D was single ended.

Register to Reply
Guru
Hobbies - Musician - Engineering Fields - Chemical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Instrumentation Engineering - New Member

Join Date: Jan 2007
Location: Moses Lake, WA, USA, Thulcandra - The Silent Planet (C.S. Lewis)
Posts: 3950
Good Answers: 175
#7

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 4:44 PM

I admire your tenacity in finishing that incredible amount of soldering!

You said:

There are a few questions to ask you:
This stuff will have a display even without sound signal.

if AD converter pin float it seems there will be a level change, or sometimes send up with a serial voltage, and how to do this?

[I do not understand exactly what you are trying to say here. Please try again!]

Sound signal output from the computer sound card should be alternating current

[No - AC has equally positive and negative portions and passes through a zero point (ground).]

, generally a few hundred millivolts voltage to 1V

[Call this an Analog signal. Have you measured this? It should be measured with the DC setting on your voltmeter.[

, but I use AD converter is sent directly to the host computer

[You mean that the digital output from the ADC is being sent to the host computer? If yes, how is this being done?] is 0, I do not know what's wrong and I ignored it.
And automatic gain large volume does not matter, but the volume will not be identified if it
is too small.
The AD conversion accuracy may be the reason.
when boot animation zzz displayed noise are always there.
What's the problem? And how to solve it?

What we need is a complete, legible schematic of all of the circuits. Or, better yet, did you find this project on-line? If so, a link to it would be invaluable.

__________________
"Reason is not automatic. Those who deny it cannot be conquered by it. Do not count on them. Leave them alone." - Ayn Rand
Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 13569
Good Answers: 155
#8

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 4:51 PM

Not sure about the problem, but wow, what a lot of work! Kudos.

I am lucky if I can blink one LED, much less hundreds.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#21
In reply to #8

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/15/2016 11:25 PM

Yes, this spend me much time to do.

Register to Reply
Guru

Join Date: Apr 2010
Posts: 5759
Good Answers: 577
#11

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 7:21 PM

I believe your problem is the AD converter. Here is a simple description of how the AD converter works.

There are two reference voltages (low and high) for the AD converter. For example, a ten bit AD divides the voltage between these two reference values into 1024 steps (2 to the 10th power). Each time it samples the audio coming in, it compares the sample voltage with the 1024 voltage values to find the closest one.

So, the low reference voltage has to be lower voltage than the audio signal and the high reference voltage has to be higher voltage than the audio signal for the AD to work.

Sorry I can't give you any specifics because I can't read the diagram and I can't find the datasheet (pinout) for the microcontroller.

(If you have a better picture, please paste it in.)

I hope this helps.

Register to Reply
Active Contributor

Join Date: Aug 2016
Posts: 13
#22
In reply to #11

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/15/2016 11:27 PM

Thanks. I think you're right.

Register to Reply
Guru

Join Date: Apr 2010
Posts: 5759
Good Answers: 577
#12

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/12/2016 10:02 PM

OK, I found a similar microcontroller that I could find a datasheet for, STC12C5A60S2

From the datasheet:

"The ADC on STC12C5A60S2 is an 10-bit resolution, successive-approximation approach, medium-speed A/D converter. VREFP/VREFM is the positive/negative reference voltage input for internal voltage-scaling DAC use, the typical sink current on it is 600uA ~ 1mA. For STC12C5A60S2, these two references are internally tied to VCC and GND separately."

So, if yours is like this, the audio input has to be dc shifted to a level between ground and Vcc. You can do this with a blocking capacitor and voltage divider between ground and Vcc, similar to (A) but with resistances equal.

Register to Reply
Guru
Hobbies - Musician - Engineering Fields - Chemical Engineering - New Member Engineering Fields - Control Engineering - New Member Engineering Fields - Instrumentation Engineering - New Member

Join Date: Jan 2007
Location: Moses Lake, WA, USA, Thulcandra - The Silent Planet (C.S. Lewis)
Posts: 3950
Good Answers: 175
#13
In reply to #12

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/13/2016 1:34 AM

That's just crazy enough that it might work!

__________________
"Reason is not automatic. Those who deny it cannot be conquered by it. Do not count on them. Leave them alone." - Ayn Rand
Register to Reply
Guru

Join Date: Apr 2010
Posts: 5759
Good Answers: 577
#14
In reply to #12

Re: Our Jumpy Note--Purple Music Spectrum--LED !

08/13/2016 10:12 AM

Reference: http://www.stcmicro.com/datasheet/STC12C5A60S2-en.pdf

BTW: You may have to subtract a constant in software from the data before FFT to compensate for the dc offset so that the dc component (0 frequency) won't overwhelm the spectrum.

Register to Reply
Register to Reply 23 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Copy to Clipboard

Users who posted comments:

Chuoiujk (9); James Stewart (1); lyn (1); Mikerho (4); Randall (1); Rixter (5); SolarEagle (2)

Previous in Forum: How Can I Overlap 2 Different Signal   Next in Forum: Modem/Router IP Address

Advertisement