arduino code help
 
Notifications
Clear all

arduino code help

21 Posts
7 Users
0 Reactions
10.6 K Views
Posts: 89
(@dont1982)
Estimable Member
Joined: 13 years ago

On the relays, Are these solid state relays like the ones in my projects folder. I have a very good sketch that a member on here made and let me use. I used it last year for my 16 channels, It worked great with vixen. PM natale. I cannot send you the code since i am not the author. But like i said it worked for me. Hope this helps.


Reply
Posts: 2541
(@lightup)
Famed Member
Joined: 17 years ago
cliff smith wrote:I'm using a 5v ssr (8 channel ) but switching 12v LED strips on a test board. If I turn on one one channel at a time with vixen sequence the lights stay lit but the LED on the ssr goes off as expected. Is it ok to switch different voltage that operating voltage with ssr's ? .

Yes, the relay output portion can have a different voltage, like your 12VDC.

What is not clear to me if you are using a mechanical relay or a solid state relay (SSR).
The SSR's output works with an AC voltage, not DC for light control, while the mechanical relay output can use AC or DC.
You have used both terms in this thread.


Reply
Posts: 66
Topic starter
(@cliff-smith)
Trusted Member
Joined: 13 years ago

hi guys I have had a chance to mess about with my mock board and think I got to the route of my problem.....the ssr's don't like switching D.C. voltage. I rigged up some 230v A.C. led string and.....you guessed it they switched fine !!!!
Now I know I can control 16 channels of 230v LED strings for my mega tree and am starting to think about another arduino uno to control some other lights simultaneously form another port. Can any one tell me if this is possible and how the arduino code would have to be adapted or would it be easier to buy a mega to to give me the extra channels ? cost as ever is an issue so ide prefere another uno ????
thank for comments and help so far guys


Reply
Posts: 2541
(@lightup)
Famed Member
Joined: 17 years ago

SSR's use a triac, hence the "dislike" for DC.

The Uno has limited digital outputs. You could convert your sketch to a MEGA type and control more than 16 channels directly. Or you can use the Uno plus either 74HC595 shift registers, or TLC5940 with dimming, to expand the channel count.


Reply
Posts: 437
(@masterful)
Honorable Member
Joined: 13 years ago

I agree with light up.
If you are looking for on off only the 595 is better as there's less wiring involved.


Reply
Matt_Edwards
Posts: 2664
(@matt-edwards)
Famed Member
Joined: 18 years ago

Not sure what led you to say HC595s are on off only. I use them in all my controllers above 8 channels. Yep they dim too.

Sent from my SM-N9005 using Tapatalk


Reply
Posts: 437
(@masterful)
Honorable Member
Joined: 13 years ago
Matt_Edwards wrote:Not sure what led you to say HC595s are on off only. I use them in all my controllers above 8 channels. Yep they dim too.

Sent from my SM-N9005 using Tapatalk

OK then that's new to me. How is the question I have for you. Are using the TLC to control the 595 or vice versa. I'm am very interested.

Thanks

Matt


Reply
Matt_Edwards
Posts: 2664
(@matt-edwards)
Famed Member
Joined: 18 years ago

Tlc5940 and hc595s are different devices. Have a ready of this one: http://forum.arduino.cc/index.php/topic,66988.0.html

Sent from my SM-N9005 using Tapatalk


Reply
Posts: 2541
(@lightup)
Famed Member
Joined: 17 years ago

As Matt_Edwards said the HC595 can be used as 8 channels ON/OF or dimming. The dimming will need to be done by the Arduino sketch using PWM.
With the TLC5940 the 16 channel dimming is done inside the chip with a max of 12 bits resolution. It also uses serial data but a bit more complex than the HC595.
Since the Arduino has limited memory and speed, you can drive a lot more dimming channels using the TLC5940 than using the HC595.
The TLC5940 has current limit control built-in so that a LED resistor is not required. Even thought an output can drive 120 ma of constant current, the chip can't handle 16 channels of 120 ma each. It will fry to death.
Then there is the cost of the HC595 vs TLC5940, where the TLC is at least 4X more - depending where you shop.


Reply
Posts: 437
(@masterful)
Honorable Member
Joined: 13 years ago
LightUp wrote:As Matt_Edwards said the HC595 can be used as 8 channels ON/OF or dimming. The dimming will need to be done by the Arduino sketch using PWM.
With the TLC5940 the 16 channel dimming is done inside the chip with a max of 12 bits resolution. It also uses serial data but a bit more complex than the HC595.
Since the Arduino has limited memory and speed, you can drive a lot more dimming channels using the TLC5940 than using the HC595.
The TLC5940 has current limit control built-in so that a LED resistor is not required. Even thought an output can drive 120 ma of constant current, the chip can't handle 16 channels of 120 ma each. It will fry to death.
Then there is the cost of the HC595 vs TLC5940, where the TLC is at least 4X more - depending where you shop.

Hi light up. Thanks for that reply. It clarifies a few things for me. Since I'm only looking for 12 channels of ac dimming using a second arduino. I've bought a h11aa1 opto to play with to get the zero cross detection. But could I use a moc3021x as a random phase SSR thus not requiring the zero cross detection circuit.
Sorry if I'm rabbiting on just a thought.

Cheers
Matt


Reply
Page 2 / 3
Share: