Lifelites LED's with PCF8574

Discussion specific to the intelligent brick, sensors, motors, and more.
achechin
Posts: 8
Joined: 04 Nov 2012, 03:38

Lifelites LED's with PCF8574

Post by achechin »

Dear All,

I have a lot of LED's for LEGO from Lifelites (http://lifelites.com/). Now would like to connect them to Mndsensor PCF8574.
To make a device flexible I would like to solder on board female sockets like Lifelites use (http://lifelites.com/products/133), rather than LED cables.

Does anyone know what type of sockets Lifelites use? Are they standard or custom made?

Second question is what resistors should I use with Lifelites LED's?

Thanks and regards,
Alex
achechin
Posts: 8
Joined: 04 Nov 2012, 03:38

Re: Lifelites LED's with PCF8574

Post by achechin »

Update.

Lifelites helped me with socket type as well as provided LED parameters.
Could you please recommend me a resistor size and type (metal or carbon) for the following LED's:
3.2 V and 20 mA.

Am i right thinking about 120Ohm and 1/4 Watt?

Thanks and regards,
Alex
iplewis
Posts: 25
Joined: 22 Mar 2012, 08:48

Re: Lifelites LED's with PCF8574

Post by iplewis »

You need to know what voltage your LED/resistor combination will be driven with.

Assuming it is the full 9V (6 x 1.5V AA cells) from the NXT, the calculation is:

LED has 3.2V across it, so there is 9-3.2 = 5.8V across the resistor.

R=V/I (Ohm's law)
R=5.8/0.02
R=290 Ohms

P=I x V
P=0.02 x 5.8
P=0.116 Watts

You'll find 270 Ohm or 330 Ohm resistors easily (http://en.wikipedia.org/wiki/Preferred_number#E_series), and I expect either would be fine. You can work out the exact current and power with those values easily enough from the equations above.

1/8 W (=0.125W) should be OK for power dissipation, though obviously 1/4 will be fine, and may make you feel that your design has more margin.

I haven't seen carbon resistors for years! I think metal-film types are generally better (stability, tolerance etc.)

Cheers,

Ian.
iplewis
Posts: 25
Joined: 22 Mar 2012, 08:48

Re: Lifelites LED's with PCF8574

Post by iplewis »

Hmmmmm.. I had a look at some documentation for the Mindsensors PCF8574 to see if it did drive the LEDs with 9V. I couldn't find anything that actually stated the voltage it used, but there were some references to 5V, so that seems a more likely value. Repeating the calculations with 5V, I get 90 Ohms and 0.036 Watts.

Hope this helps,

Ian.
iplewis
Posts: 25
Joined: 22 Mar 2012, 08:48

Re: Lifelites LED's with PCF8574

Post by iplewis »

Hello again, I've actually read the data sheet for the PCF-8574 (IC) this time! I'm not sure I entirely understand the 'quasi-bi-directional' IOs, but it seems clear that they will sink much more current than they will source.

This means that you should connect you LED between 5V and the IC output, and drive the output low to turn you LED on, rather than conencting it between the output and ground, and driving it high.

Of course, you may have known this already.....

I'll go away now.. :-)

I.
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Lifelites LED's with PCF8574

Post by h-g-t »

Values for the actual chip here - indicates output V ~= input V with a preferred max of 6v - http://www.ti.com/lit/ds/symlink/pcf8574.pdf

Mind you, looking at the photos of the LEDs it seems that they might have resistors in the wiring already.
A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
achechin
Posts: 8
Joined: 04 Nov 2012, 03:38

Re: Lifelites LED's with PCF8574

Post by achechin »

Thanks everyone for your help! Lifelites wired resisters into some LED's thats why regardless the color they all rated 3.2V.
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: Lifelites LED's with PCF8574

Post by mightor »

I had very mixed results driving LEDs with this chip. You're much better off sinking this current instead. Unless you really like your LEDs dim and barely visible, of course.

= Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
h-g-t
Posts: 552
Joined: 07 Jan 2011, 08:59
Location: Albania

Re: Lifelites LED's with PCF8574

Post by h-g-t »

A sophistical rhetorician, inebriated with the exuberance of his own verbosity, and gifted with an egotistical imagination that can at all times command an interminable and inconsistent series of arguments to malign an opponent and to glorify himself.
achechin
Posts: 8
Joined: 04 Nov 2012, 03:38

Re: Lifelites LED's with PCF8574

Post by achechin »

Finally I bought couple mindsensors PCF8574 sets http://mindsensors.com/index.php?module ... PAGE_id=71
Now I have coupl
e more questions about it.

On PCB connector area, each item (ie 5 v) have two holes. Are they exactly the same and doubled for convinience?

When shortering jumpers should I solder together either 1 and 2 squares (for 0) or 2 and 3 squares (for 1)?

Also, I a bit confused with address. As I understood the address for PCF8574 is forming from the following combination:
S 0 1 0 0 A2 A1 A0 0 A. If A0-2 equal to zero the binary address is 01000000, which is equal to 0x40. If A0=1,A1=0,A2=1, the binary address is 01001010, which is equal to 0x4A. On I2C tutorial page I found that I should add 101 (0x05) to 0x40, hence 0x45. Please let me know which way is correct.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests