Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Kermit's Content

There have been 78 items by Kermit (Search limited from 04-June 23)


By content type

See this member's


Sort by                Order  

#28447 TLC5940 PWM Driver

Posted by Kermit on 02 May 2012 - 06:01 PM in Project Showcase

Hi Mark, and thanks for your help. It looks like I totally misunderstood the role of the GSCLK signal, so I have to study again the documentation... :-( To clarify my goals: I want to have many PWM outputs controlled by Netduino, so I thought that an SPI chain of TLC5940's could be ideal, but the chip has much more functionalities I don't need at all. What I would need is: set the PWM 12 to 40%, make something else for five seconds, then set PWM 8 to 80%, then after two seconds more, re-set the PWM 12 to 0%, and so on. Nothing to fade in real time, no corrections, no adjustments of any type. I think I would use only a fraction of the chip capabilities, but that's ok, for me. Only, it has to be simple, I (still) don't have much experience on electronics... Thanks again. Andrea



#28451 TLC5940 PWM Driver

Posted by Kermit on 02 May 2012 - 08:42 PM in Project Showcase

Hope this helps??? Sure it does! :-) So, for example, could you point me to some chainable ICs for multiplying PWMs? As of tonight, I still cannot even light a LED with your code, I think I'm missing something with the wiring, but I don't know why... Thanks any time! :-) Andrea



#28445 TLC5940 PWM Driver

Posted by Kermit on 02 May 2012 - 04:06 PM in Project Showcase

...for those that are not so experts, could we have a Fritzing schema to follow (or any equivalent mapping of the wires from Netduino to the TLC5940), NOT using an external GSCLK signal (not anyone wants to fade... maybe many want to be able to switch between different discrete predetermined levels). I googled and find many examples using arduino, without the GSCLK set, so I would like to know if there are very simple implementations using only netduino and the chip, how to connect them, and a minimal (hence simple) sample code... Am I asking too much? :-))) Thanks in advance to anyone available to help... Andrea



#28785 TLC5940

Posted by Kermit on 10 May 2012 - 08:45 PM in General Discussion

No, I don't have an oscilloscope: with my friend, we are thinking to buy one half and half, just to have it available, but not at the moment. Tonight I'm busy, but thanks for your suggestions: I'll try them tomorrow morning, and yes, I would follow Texas flowchart as strictly as I can. Andrea



#28450 TLC5940

Posted by Kermit on 02 May 2012 - 06:59 PM in General Discussion

I'm looking for some examples (wiring diagram & code) on how to use this IC without any special function (just to start with setting PWM output values, no corrections, nothing).
There is already another thread, where I asked for info, http://forums.netdui...h__1#entry18925 but I see that it doesn't come up on the list (maybe it's too old), so I start a new thread here.
I found very difficult even only to understand the needed wiring, so a very very short mini-tutorial would be really appreciated (not only by me, I'm sure...).
Thanks in advance
Andrea



#28848 TLC5940

Posted by Kermit on 11 May 2012 - 06:29 PM in General Discussion

I made another test: I took an ATX PSU from a computer I don't use, opened it and taken +5VDC and ground. Moreover, before using this power, I put a big big capacitor (100uF, 400VDC), to be sure the voltage is really stabilized. I don't have an oscilloscope, but with a voltmeter I measure 5.01 VDC (constant, for what I can see). Led is still flashing very very quickly (I tried to lower SPI frequency too). The strange thing is that if I check again between VCC and one of the pin, when set to 4000 (fixed, the program stopped at a breakpoint), voltage is floating between about 2.00 and 2.50 (and this explains maybe why the led is flashing). So it looks like (again) it's not a software problem, but an electric problem. I clarify that I'm not pinning VPRG and DCPRG to anything (they are free to float): could this be a problem? Andrea



#29012 TLC5940

Posted by Kermit on 14 May 2012 - 02:19 PM in General Discussion

Ok, since I didn't give up, and made again all the steps suggested in this, as in other, thread, I finally found (I must have made something wrong on the first trial) what the problem really is: NEVYN was totally right, in the high level limit for the 5VDC used as Vcc. The datasheet is clear, even if I didn't pay too much attention on this: the high level limit is 0.8 * Vcc, so Netduino pins cannot drive the signal high (Nevyn says 0.7, but I think he hadn't the datasheet just in front). When powered by a 3.3 signal, all is smooth and good, under any condition, so I think this is the right solution to have. My only remaining problem is now that some of the pins are always off, some are partially powered, and so on. Now, there are two alternatives... one is that the source code I'm using (by NZC) still has some bug :-))) (no critics, here: you've done a wonderful work!) OR there is some dot correction on the chip (but this looks a little improbable... I never gave it the 20more VCC to write it! Some other test will solve (I hope) the situation! :-) I'll prepare a Fritzing commented diagram for the solution... Andrea



#28815 TLC5940

Posted by Kermit on 11 May 2012 - 12:33 PM in General Discussion

Sorry, I didn't write the right thing, of course I have the LEDs, and I checked with the voltmeter, between Vcc and signal.



#28482 TLC5940

Posted by Kermit on 03 May 2012 - 02:11 PM in General Discussion

Hi, Mario, nice to hear from you again! :-) Yes, you are right, 'cumbersome', for the TLC5940 is the minimum :-) I've seen the ICs you mention, and they look promising: you can also order free samples, but I see that they are all in formats not much hobby-friendly (no DIP, just to be clear!). If it's really the case, I cannot understand how I could use them in my small, single, applications... Andrea



#28858 TLC5940

Posted by Kermit on 11 May 2012 - 09:42 PM in General Discussion

Ok, it looks I have to excuse myself (again!) for the trouble I caused in this thread! :-( I finally found the *REAL* problem I'm having. One of the connectors of my Netduino is faulty ! :-((((((( The block from D8 to Aref is loose, in the sense that I put the wires inside, but it makes a strange contact (I suppose). I don't know how to explain it well in English, but if I put a finger on the wires, not on the connector itself, and push them left (or right, it's the same thing) the contact becomes perfect, and everything is ok (LEDs fade on and off really smoothly!). If only I relax the push (without even taking out the finger completely) and all becomes flashy and flickering. What do I have to do, in a case like this? First option is of course to throw it away, and buy another... but is there anything else to do? I don't think that desoldering it can be the right thing to do... Andrea



#28495 TLC5940

Posted by Kermit on 03 May 2012 - 04:32 PM in General Discussion

...I'm to ask if some good angel can give a look and tell me what he thinks about this configuration, with my TLC5940.
I found a small but interesting document here: TLC5940 One-Wire Control, where, with an apparently simple wiring, I should be able to turn on and off the entire block of LEDs. The only interesting page is page 3, even if the whole document is there.
I wired the chip in this way:
Posted Image
and used this code to try to get the led flashing:
Thread.Sleep(300);

var gsclk = new OutputPort(Pins.GPIO_PIN_D0, false);
var blank = new OutputPort(Pins.GPIO_PIN_D1, true);

Thread.Sleep(200);

bool enable = false;
while (enable)
{
    blank.Write(enable);
    Thread.Sleep(1);
    gsclk.Write(!enable);
    Thread.Sleep(2000);
    enable = !enable;
}

Here I'm supposing I can use the Netduino to turn high and low the two signals GSCLK and BLANK, with a simple delay, as suggested by the document (it uses a subcircuit, there).
The other difference is the capacitor in the bottom of the figure, between Vcc and ground: there are no numbers, and I suppose it's there to stabilize input voltage (or not?).
Please, is there someone who can give a look and enlighten me on anything that can be wrong?
Thanks again.
Andrea



#29024 TLC5940

Posted by Kermit on 14 May 2012 - 03:31 PM in General Discussion

QUICK UPDATE: I changed the chip (I got 6 of them :-)), and all the outputs (minus one!) are uniform and smooth, so the code, for what I can see, is perfect. One output is kind of flickering, something like 10 20 times a second, but never going completely off, for what I see. The strange thing is that if I move the wires, in some position the flickering goes away. Can it be some sort of interference? Andrea



#28496 TLC5940

Posted by Kermit on 03 May 2012 - 04:40 PM in General Discussion

I add that the resistance linked to Iref and ground is 500Ohm, as suggested by formulas in the original TLC5940 datasheet, to get about 78mA sink current to the LEDs. Andrea



#28498 TLC5940

Posted by Kermit on 03 May 2012 - 04:55 PM in General Discussion

:-(((((((( I win the 'Stupid of the year' prize hands down... At least now my wiring is ok, and the leds are flashing... I have a jumpstart, to understand how to handle the chip! As always, the most obvious thing (error) is invisible, when you see it too many times! :-( Andrea P.S.: I hope you all will never know I am a 20 years+ experienced software programmer... :-)))



#28805 TLC5940

Posted by Kermit on 11 May 2012 - 10:10 AM in General Discussion

Ok, it looks my problem is just on the electric side of things... :-( To give a +5VDC to the TLC5940 I use and old power supply (variable) that gives a NON stabilized output: so I put a big capacitor between + and - before feeding an L7805 to get the right output. If I check with the voltmeter the positive where I wire a LED and the ground, I see a strange (at least for me) phenomenon: the voltage is something between 4.8 and 5.02, with a period of 10/15 seconds (the program is running, fading on and off a couple of leds). Is it normal, or really I have to find another source of input voltage? Leds are fading with a visible flickering... Andrea



#28748 TLC5940

Posted by Kermit on 09 May 2012 - 08:22 PM in General Discussion

@nzc: why did you say vprg is not wired out? From the pictures and the schematic, it looks just right there! Andrea



#28831 TLC5940

Posted by Kermit on 11 May 2012 - 03:55 PM in General Discussion

Brilliant idea: it made me think. But, when I tried, I got no output on the leds: even on pins that should be high, voltage difference was very close to zero... Nzc: can you confirm you go on external 5VDC? Andrea



#28756 TLC5940

Posted by Kermit on 09 May 2012 - 09:09 PM in General Discussion

@NZC I thank you really much, because at last I found my problem: one of the wires I use on my breadboard was partially broken, or better, could not make a right contact on the netduino. Since I saw that the led pulsed erratically, I started to change the wires one by one, and I found the faulty one. Once I changed it, everything was ok!!! :-(((((((((( If you didn't gave me all the indications to have a functioning solution (thanks to the schematic on sparkfun too!) I could never think to a faulty wire! :-) Andrea



#28851 TLC5940

Posted by Kermit on 11 May 2012 - 07:17 PM in General Discussion

@nzc: I tried commenting and uncommenting, but the problem still remains... led is flashing, as I said, even with the program stopped in the debugger. Andrea



#28759 TLC5940

Posted by Kermit on 09 May 2012 - 09:28 PM in General Discussion

Not that I know of... :-( Good night, and thank you again! Andrea



#28941 TLC5940

Posted by Kermit on 12 May 2012 - 10:08 PM in General Discussion

No, it's really stranger than what I said: if I use directly led+resistor, all is smooth and soft... when using the TLC5940 all changes... :-((( Mario was right, when he said that this is a very strange chip... :-((( I don't know what to do: I changed the breadboard, the wires, and the netduino is perfect, using for example a motor with an L293D, but when I use the TLC, I have to touch the wires, and not always it behaves well... :-( I have three of them, and all show this behaviour! Bewitched chip... I'm sure... :-) Andrea



#28770 TLC5940

Posted by Kermit on 10 May 2012 - 11:37 AM in General Discussion

@Nzc: I'm using your code, but in my case I see a great flicker, when changing values. I'm stepping inside to understand if I can improve it, or at least understand where is the problem, on my side. Andrea



#29022 TLC5940

Posted by Kermit on 14 May 2012 - 03:20 PM in General Discussion

Hi, Nzc, nice to hear from you again, thanks! No, of course I'm not looking for a power output, maybe I already said I'm to use the outputs to feed some L293Ds to control DC motors, so a few milliAmpere are more than enough. But on my side, if I feed (an external and stabilized) 5V I get erratic behaviour from the TLC5940, while with 3.3V (and coming from the Netduino!!!) it's all really perfect and smooth. Dot correction: in the datasheet it's said that to override it I have to give a more than 20VDC, and I'm pretty sure that I don't have such a supply! :-) So each time I turn on the chip, it should have just the factory set (1.0). In your code you don't set the values, so it should be all normal. ...I'm going on with my tests... A



#28780 TLC5940

Posted by Kermit on 10 May 2012 - 05:55 PM in General Discussion

Each time that a duty changes, small or big increment, it looks like there is a black hole, where the led doesn't receive current. If I make a cycle stepping by 1 very quickly, it's really flickering on and off. I didn't have the time to test it thoroughly, I'm sorry: I try to step into the code (and the datasheet) when I have some time for me... :-( Andrea



#29049 TLC5940

Posted by Kermit on 14 May 2012 - 09:15 PM in General Discussion

Hi Mark (Nevyn? :-)). As usual, you are right, even to be convinced I had to read the datasheet three more times! :-) It's so strange that I'm used to software, but electronics is still so hard to grasp, for me! :-( Anyway, if the DC registers are random, it's so strange that in the current chip they are all at 100% minus one (at least for what I can say, looking the leds...) Other things to test... I will never see the end of this!!! :-))) Andrea P.S.: I could use this pwms to control three L293Ds with attached motors, and at least this part flowed really smooth! Motors go up and down without any problem!




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.