Go Down

Topic: PWM cable lenght (Read 9387 times) previous topic - next topic

MrGlasspoole

#30
Dec 24, 2015, 09:18 pm Last Edit: Dec 24, 2015, 09:21 pm by MrGlasspoole
Programming two sequences into one MCU is not that hard, and there is plenty of help here.
It's not the sequences it's the space i'm worried.

Using Cat-6 for the Cree LEDs could also save you some money for power. 1.5mm for <1Amp is overkill.
How does that save money on power? The bigger the cable the less power loss.
1.5-2.5mm2 is standard in Germany for 230V in house installation and the cheapest cable and you never know what you want to change someday.

And for DC you normally take bigger cables.
Most people use 0.75-2.5mm2 (depends on the length) for there 12V installations (halogen/LED).

I'm not below 1Amp - my drivers are exactly 1Amp.
At the moment i have 9.75V/1Amp LEDs.
Lets say 8 meters cable (4 meters towards/4 meters backwards).
AWG23 is ~0.25mm2
That is 0.5 watts power dissipation on such a cable -> efficiency bellow 95%

With 1.5mm2 the dissipation is 0.09 watts -> efficiency 99%

And you can already buy 2-3Amp LEDs and you never know if you change them one day.

Then this is just the shower wall and i have to do also some ceiling lamps and others (~10 meters)
and don't want to use different cables everywhere.
There i have then 5Amps or more and then CAT cable is a no go.

Why did you connect D10 and D11 to the LED drivers.
As i wrote: to read the dimming level (PWM feedback)

Wawa

PWM feedback...
Sounds like an analogue idea to me.

Use a variable that holds the PWM value.
Then you know what the PWM value is when you need it again.
Leo..

MrGlasspoole

That only tells me what the pin should be:
Quote
Reading the internal register will always return for you what the controller is trying to put on the pin, not the actual pin value.
I control this thing from different places: physical button also browser, app...
Everything talks MQTT (even my HTPC).
I want to see what the light is set to in % in my browser (WebSockets, JavaScript, Python).
I already did this with a potentiometer on the mixing valve of our central heating system and also with other sensors (live data).

Also a variable/boolean maybe gets out of sync.

BUT:
After thinking and thinking and again thinking about it :D
i take now the two PCA9685 and but them in the ceiling.
That means there are 12 pins wasted and it hurts with this cool chips.
But I paid 2,85$ for one (the same that the second 328 would cost) also i need just
one CAT cable to the ceiling and also save on the MAX 485.

I guess i never need access to the PCA9685 and you said 5 meters I2C is not a problem.
I always thought a bus buffer like the P82B96 is needed.

And if the code is to big for the 328 i need to change to a 2560.

But now let me change my schematic so you guys can shoot it down in flames again *lol

raschemmel

What about pulseIn() ?

MrGlasspoole

@raschemmel, need to check what that is :D

New schematic in the attachment.
Damn does that look clean compared to the old one *lol

Do i need a extra power supply on the PCA9685 LEDs (20-22 3.2V/20mA)?

And MERRY CHRISTMAS from Germany to everybody!

Wawa

Tip:
An old 19volt laptop supply is a good/efficient/safe LED supply.
19volt is good for a string of three or four power LEDs.

A (micro) buck converter could efficiently lower that 19volt to 5volt.
The 5volt supply could be used to power the 22 other LEDs (440mA), the PCA (6mA) and the MCU (40mA).

Also a Merry Christmas to all from New Zealand.
Leo..

MrGlasspoole

I should have said power source instead of supply.
There are no power supply's in different locations.
I have 12V everywhere and just use buck's.


New Zealand - thats cool cause i have a face tattoo :)

raschemmel

Quote
@raschemmel, need to check what that is 
Pulsein()

MrGlasspoole

Ok now I also connected the mirror and ceiling lights to this Arduino.
Neither do i dim from the Arduino. Ceiling needs no dimming and the mirror lights
are dimmed on the left mirror lamp via the potentiometer.
Voltage dimming on the PT4115 is done with 0-2.5v

I will put a switch in the ceiling lamp on the dimming line.
This is if i need to do something on the Arduino or it fails i can turn on the light (cut pull-down).

@Wawa, how did you came up with the 3.3 or 10k for the PT4115 pull-down?
The ceiling will have a "Mean Well MW LDD-1500L" driver and i need to know what pull-down
i need there: www.meanwell.com/mw_search/ldd-l/LDD-L-SPEC.PDF
To bad the specs only list the off current for 24v :-(

The MAX RS485 is gone...
There is a second Arduino (flow meters, temp, humidity, 2 servos, small OLED) and first
i wanted to do the network communication of both Arduinos trough this one.
But one WIZnet W5100 cost the same as 2 MAX chips.

I guess a electrolytic cap in some places would be a good idea?

Wawa

The PT4115 has an internal 200k pullup resistor to it's internal 5volt supply.
So the voltage on the DIM pin is 5volt when you disconnect/float the DIM pin (full brightness).
e.g with a switch.

A resistor (or pot) to ground creates a voltage divider with the internal resistor.
VOLTAGE dimming 0-100% is ~0.5 to ~2.5volt.
PWM dimming is fast switching between <0.5volt and >2.5volt (max 5volt).

A 10k resistor from the DIM pin to ground gives <0.25volt on the DIM pin, so the chip must be off e.g. when the MCU is booting (floating output pin).

Beware of the W5100. It is power-hungry.

I run a W5100 shield on a Mega for the home lighting.
It gives me Ethernet and WiFi/smartphone control through the router.
I also have a 433Mhz RF receiver connected.
Keychain remote control.
And voice control with an EasyVR shield on top of an UNO with 433Mhz transmitter.
And ofcourse walk-in PIR sensors and daylight sensors.

5k (2x10k) on the I2C lines might not be low enough.
Change R23-R26 to 4k7.
Leo..

MrGlasspoole

#40
Dec 26, 2015, 02:12 pm Last Edit: Dec 26, 2015, 06:13 pm by MrGlasspoole
Ok that means my Potentiometer calculation is wrong?

For the Mean Well there is nothing in the datasheet like that.

You where talking about the dimming levels.
That was my question here: 8-bit vs 12/16-bit LED PWM
But i thought you can change somehow the timer for PWM?
So i have free pins on the PCA9685 and it is 12-bit maybe it would be better to also connect the shower lights PT4115 to him.
The Problem is i am really scared about the code. I never did something I2C and want to control dimming with one button.
I started a thread here but did not have the time yet to check the code BulldogLowell gave me:
One Button Dimmer

OFF TOPIC:
I have 5 W5100 here and 2 ENC28J60.
I never checked the power consumption of them and don't know if they are different.
But since the W5100 has TCP build in...

Today so many devices have ethernet and low power consumption so why is the power consumption of the W5100 high? Is there an alternative because i need several of them.

For RF i have a URC MX-780 remote: LINK

First time i heard of the EasyVR shield. How good is it?
I'm running VoxCommando: VoxCommando - Scenario: Coming Home from Work

Edit:
Did check the W5100 and ENC28J60 without connection to anything.
W5100 = 195mA
ENC28J60 = 145mA
Not much difference and with the ENC28J60 the ATmega has to do the work.
Thats 1 watt for the W5100 - wow

And then a question came to my mind.
Is IEEE802.3az just plug and play or does the board need to be designed for it or maybe you need to program the ATmega that it works?

Edit #2:
Damn just bought 2 W5100 and now see there is the newer W5500 and they are just 2-3$ more.
Looks like they also consume a little bit less power.

Wawa

#41
Dec 26, 2015, 09:28 pm Last Edit: Dec 26, 2015, 09:33 pm by Wawa
So i have free pins on the PCA9685 and it is 12-bit maybe it would be better to also connect the shower lights PT4115 to him.
The Problem is i am really scared about the code. I never did something I2C and want to control dimming with one button.
As said, 12-bit PWM gives smoother low level dimming.

After including the library, and declaring the board and PWM frequency in setup (three or four lines of code), you can use easy commands like this:

board_0.PWM(0, 15, 0); // board_0 (I named it that) is the first PCA, Set output 0-15 (all 16) to 0 (off).

board_0.PWM(3, 255); // set output 4 on board_0 to full brightness

board_1.PWM(7, 9, 128); // set output 8-10 on the second PCA board to half brightness (not half power).

This uses a CIE lighting lookup table. 0-255 is converted to 12-bits by the library.
Leo..




MrGlasspoole

#42
Dec 27, 2015, 03:09 pm Last Edit: Dec 27, 2015, 03:10 pm by MrGlasspoole
I just saw the the PCA9552.
Is there any difference to the PCA9685 beside that its 16-bit.

I had the 9685 from eBay from private person who had 2 of them.
Our two big electronic shops in Germany don't have them.
But they have the 9552 and they are cheaper then the 9685.

Also the 9552 is easier to solder because they are SO24.

raschemmel

I know it's just a technicality but if you  convert 256    8- bit  lighting levels to  256   12- bit  lighting levels , what happens  the other  3,840
12- bit valuea that weren't part of the original 256  8-bit values that were converted ?  Do they still exist ?

Wawa

Lineair 0-255 spacing is converted to 0-4095 log spacing.
Leo..

Go Up