1
\$\begingroup\$

I am new here and new to programming, so I thought maybe some of you might be able to help me in the right direction.

I am looking to design a circuit that receives serial data from an RS232 port on my CPU, and input that into what I would imagine would be a microcontroller of sorts, containing a Digital-to-Analog converter. From there, based on the specific data from serial, output voltages to drive a Bar Graph LED meter.

In more detail, there is an audio recording program I am using that outputs MIDI metering data in groups of 8. I am able to convert those MIDI messages to serial messages, outputting via one RS232 cable. I would like to send this serial data to a microchip, and program that data to output specific voltages, per channel.

Lets say I have Meter 1 outputting serial data to a microcontroller. I would want to use the microchip to convert that data to a voltage, out of one pin of the micro chip. Since there are 8 channels of metering, I hope it's possible to have 8 separate pins, outputting 8 specific voltages based on its serial data input programming, to drive 8 separate LED Bar Meters.

The reason I am looking to convert to analog, is because it gives the meter a finer resolution. After lots of research on LED matrices (digital meters), this seems like a better solution. The serial data should have specific levels outputting, as does the converted MIDI data. I will be monitoring this in the near future to confirm. The LED meter circuits do accept analog input.

The initial plan to design a 'Midi Meter bridge', staying in the digital realm didn't seem possible after lots of talking and research. This is why I am exploring this route. Ultimately I am looking to have a meter 32 LED's tall, 32 channels across total... but using a digital led matrix, I haven't found that to be an option.

My apologies, when I refer to resolution, I mean this... designing a meter bridge via an LED matrix, the most resolution I can get is 16 LEDs. Even though, the MIDI protocol is 8-bit, allowing 128 steps for the meter. If it were possible to program a Microchip to output a specific voltage for every 4 steps, the resolution on the analog LED bar meter would look better than the MIDI matrix. Additionally, using my analog LED bar graph, I can add many more segments than I could with the matrix.

enter image description hereAs an alternative, (noob here) looking at the analog schematic above, would it make more sense (or even be possible) for the PIC16f88 to accept the 'serial data' instead of the audio to control the LED meters??

\$\endgroup\$
  • \$\begingroup\$ Is there a reason you need to convert to analog, before displaying? Does the serial data have an explicit level that you know digitally? \$\endgroup\$ – Joe Apr 7 '14 at 15:59
  • 1
    \$\begingroup\$ Scott, you are missing a fundamental principle, MIDI is digital, by converting to analogue you don't get any more resolution than you would with the same number of bits driving a digital LED bar meter. If the meter has 20 segments, then it would take 5 bits to encode that data, regardless of if it's analogue or digital. In fact converting to analogue and back losses information though conversion error and the addition of analogue noise. \$\endgroup\$ – Jason Morgan Apr 7 '14 at 16:18
  • \$\begingroup\$ It doesn't matter if you drive a string of LEDs via analog or digital. If there are only 16 or only 32 LEDs, there is no way to represent 128 values. If you are in the digital realm and going to the digital realm, there is no reason to bring analog into it. Just scale what you need in a micro. \$\endgroup\$ – Joe Apr 7 '14 at 16:56
  • \$\begingroup\$ @ScottK If someone asks your for more details, put those details into your original question, not as comments to the question. It's not appropriate on SE sites. Also don't link to your private Photobucket site - SE has built-in image hosting (just point to the original and it will be cloned on imgur). \$\endgroup\$ – Adam Lawrence Apr 7 '14 at 19:58
  • \$\begingroup\$ Just signed up today, thanks for making me aware of the rules and appropriate methods of the site. My apologies for commenting again. \$\endgroup\$ – Scott K Apr 7 '14 at 20:04
1
\$\begingroup\$

I would suggest doing this in a small FPGA. What you want is clockwork it is more suited to an FPGA than a CPU. The VHDL for it is trivial.

You can get cheap FPGA dev boards, e.g. From Actel (Igloo Nano) that have all the hardware on board that you need. You just need to connect a level translator for the MIDI and dot matrix driver, e.g. those given in other answers. The dev board has pins to do that. Instead of a PCB you can even use stripboard. I've connected an LCD matrix display in this way.

Igloo Dev Boar Manual

\$\endgroup\$
  • \$\begingroup\$ Two problems with an FPGA in this situation. First, it is daunting for a new person to electronics. Second, and more important, the driving capability for each pin is most likely too small for powering LEDs directly, which eliminates the advantages of using the logic in an FPGA. \$\endgroup\$ – Joe Apr 7 '14 at 17:09
  • 1
    \$\begingroup\$ Microcontroller and an external DAC should be absolutely fine, assuming sample rates are acceptable for that approach. \$\endgroup\$ – Scott Seidman Apr 7 '14 at 20:07
  • \$\begingroup\$ An FPGA solution is also likely to be many times more expensive. \$\endgroup\$ – Chris Stratton Apr 7 '14 at 20:12
0
\$\begingroup\$

For what you are asking for in the comments, a 32 bit level display. You can use shift registers with enough power to drive LEDs directly, like the http://www.ti.com/lit/ds/symlink/tpic6b595.pdf These can use 1 micro pin for each 32 bit display. 2 pins for clocks, one to shift the values in and one to swap to the new values. This would take a ton of chips and 34 pins.

If you are driving that many, you probably want to look at something like the http://datasheets.maximintegrated.com/en/ds/MAX6960-MAX6963.pdf Matrix driver. This can do one 8x16 matrix per chip. So eight of these chips will do your 32x32 matrix. Then you just need a micro with enough pins to do the rs232 conversion and digital driving. You need 8 pins for chip select and then data pins.

\$\endgroup\$
  • \$\begingroup\$ Many Thanks guys for the recommendations and links... I've still got a lot of studying and research to do in regards to the above mentioned. I will post again with any additional questions! \$\endgroup\$ – Scott K Apr 7 '14 at 17:08
  • \$\begingroup\$ Joe, is there a micro you would recommend to convert the serial and drive the MAX6960's? \$\endgroup\$ – Scott K Apr 7 '14 at 18:51
  • \$\begingroup\$ I would go with the most familiar to you. If you aren't very comfortable with micros, it might be good to start in Arduino. Even an Uno would have enough pins to drive this, but you might need Mega program space, depending on what you need to do. You can graduate to real code, instead of Arduino if you need more speed. \$\endgroup\$ – Joe Apr 7 '14 at 18:54
  • \$\begingroup\$ This appears to be my most solid option. I have an Arduino Mega2560 now, and can use it for test purposes without a problem. You mention 8 pins for chip selection, wouldn't I need 8 pins for data send to MAX6960's as well? \$\endgroup\$ – Scott K Apr 8 '14 at 2:28
  • \$\begingroup\$ It is a 4-wire serial interface, including CS. And it looks like you can map multiples together with the ADDOUT, ADDIN, and ADDCLK. Best configuration is probably chaining 4 sets together for 32x16 array with 4 pins. Then 4 more, sharing the 3 data lines from the micro and 1 additional CS line. \$\endgroup\$ – Joe Apr 8 '14 at 11:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.