Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

[SOLVED] Analog latch memory?

Status
Not open for further replies.

VisRoboris

Newbie level 4
Joined
Jun 30, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Hi there.
I'm quite a newbye in this field, but I'd like to show you my ideas and possibly discuss how to improve them.
In my current project I need to create a little Led stick of 16 led with a simple interface so that any mcu may control it.
In essence, I have 4 pin to address a single led , an analog pin and an enable digital signal. When enable is high, the analog voltage is written to the memory linked to the specified led so that one can execute something like "SetLedBrighness(num, brightness)".
I use the 4 pin bus as the select input to two 6 channels demultiplexers to connect the enable and analog signals to a specific pin. Then, to store the analog value, I simply use a capacitor with a buffer like this:
0078a84ad16b7fdc1de65ec1a3978de1.png
The problem is, I have to repeat this for each and every LED (*3 if I use RGB led) and it would become quite complicated to do in a PCB..
so my first question is: how can i simplify this circuit? Maybe there are some ICs that already implement this?
 

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
13,645
Helped
2,701
Reputation
5,398
Reaction score
2,620
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
101,896
This is like a sample-and-hold circuit. A mosfet can be substituted for the op amp. You must select a type which is able to respond to your bias and supply voltage.

You may need a bleeder resistor in parallel with the capacitor, to discharge it gradually.
 

VisRoboris

Newbie level 4
Joined
Jun 30, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Thank you, never thought about S&H. I just found some documentation.. it's a bit of a good feeling when you come to understand they make it just like you guessed.
 

ernpao

Advanced Member level 4
Joined
Sep 16, 2010
Messages
100
Helped
26
Reputation
52
Reaction score
24
Trophy points
1,298
Activity points
2,043
I think using pwm with your mcu would be best for what you are trying to do. You can try looking up digital-to-analog conversion via pwm. Using pwm, you will need 1 mcu pin for each led, and no additional hardware. But it is also unlikely that your mcu has 16 pwm pins, so you may need to use software pwm. Alternatively, you can also look for a pwm controller that can be interfaced to your mcu (which will most likely be via i2c, spi, etc.)
 

VisRoboris

Newbie level 4
Joined
Jun 30, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
I did know about PWM but I discarded that beforehand because of the same reason you appointed (not enough pin), and because I like the idea of independent and scalable modules (led stick should not make the MCU busy, and I may add more leds simply adding address pins. The PWM controller is something i didn't think about, so thank you, i'll be searching about them too and eventually ask here.
 

VisRoboris

Newbie level 4
Joined
Jun 30, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,324
Ok I think I'll be going with the TLC5955 ic by TI which provides 48 channels (16 RGB leds) and doesen't really require anything more than some wiring, even though the Sample & Hold solution would have been more challengy and interesting.
I'm still going to do that with another project of mine anyways.
Thank you very much!
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top