Arduino VU meter using 240v lights.

Hey Guys!

I am planning to make a VU meter using 240v lights and a Solid state relay.

The SSR used is a FSS1-102Z which happily accepts 5v to switch on the 240v light.

My concern is that I want to use about 15 lights on the VU meter, but would the arduino(2560) deliver the 5v from its PWM pins to trigger the relay. I was also concerned that if the VU meter is High and the 15 bulb would have to be turned on, that would mean that 15 PWM pins would have to deliver the respective 5 volts to 15 SSR to trigger the lights. Can the arduino do this? If not any advice on how I could make this work?

Thank You so very much in advance guys!

ravrichard0:
Hey Guys!

I am planning to make a VU meter using 240v lights and a Solid state relay.

The SSR used is a FSS1-102Z which happily accepts 5v to switch on the 240v light.

My concern is that I want to use about 15 lights on the VU meter, but would the arduino(2560) deliver the 5v from its PWM pins to trigger the relay. I was also concerned that if the VU meter is High and the 15 bulb would have to be turned on, that would mean that 15 PWM pins would have to deliver the respective 5 volts to 15 SSR to trigger the lights. Can the arduino do this? If not any advice on how I could make this work?

Thank You so very much in advance guys!

Well the arduino mega2560 board certainly has more then 15 digital pins available, so you certainly can wire 15 digital output pins to 15 SSRs. One thing you may my have mixed up a little, you don't control typical AC SSRs with pwm output via analogWrite() commands. You use simple digitalWrite commands to turn the pin high or low as you desire in your sketch program. SSR relays do not work with PWM signals as the switching frequency and duty cycle timing used by analogWrite() commands does not work with the AC zero crossing turn-on at 8.333 millisec switch timing of a SSR. The digital pins marked with PWM on the mega board can operate either as simple digital input or output pins or work as PWM output pins depending on the software commands you use, but what you are wiring the pins too determines how you must utilize the arduino digital pin, if that makes sense?

Lefty

Thank You for the reply Lefty! :slight_smile:

I am aware that I need to use digitalwrite.
But my question is can the Arduino simultaneously output 15 five volt signals to trigger the relays?

ravrichard0:
Thank You for the reply Lefty! :slight_smile:

I am aware that I need to use digitalwrite.
But my question is can the Arduino simultaneously output 15 five volt signals to trigger the relays?

Yes, if your definition of 'simultaneously' allows enough time to perform the 15 digitaWrite commands in a row (or a loop), which is much faster then an eye can notice, so yes, they will appear to change simultaneously.

Have a look at:
http://tronixstuff.wordpress.com/2011/10/22/tutorial-arduino-port-manipulation/

It shows a different way to work with ports in a faster way and how to control groups of ports in one go.

Good luck,
Kenneth

But my question is can the Arduino simultaneously output 15 five volt signals to trigger the relays?

Yes, if your definition of 'simultaneously' allows enough time to perform the 15 digitaWrite commands in a row (or a loop), which is much faster then an eye can notice, so yes, they will appear to change simultaneously.

And if the total current draw of the 15 pins does not exceed the total that the Arduino can supply at one time.

Apparently it does, today I tried it. I hooked up four voltmeters. The ground was common. The positive terminal was connected to pins 8,9,10,11 respectively onto the voltmeters. 3 voltmeters gave out 5v exactly whereas one gave under 2v. Any help guys?

I want all 15 pins to deliver 5v at the same time.

I know it cant be a modification on the board. But is there some external way to accomplish this?

Thanks in advance Guys! :slight_smile:

The positive terminal was connected to pins 8,9,10,11 respectively onto the voltmeters. 3 voltmeters gave out 5v exactly whereas one gave under 2v. Any help guys?

The voltmeter draws very little current, so all 4 of them should show 5 volts IF the pin mode is OUTPUT and the pin is HIGH.

The default mode is not OUTPUT.

Yes, the pin Mode was OUTPUT.
And it was set to high yet still only 3 out of 4 of the Volt meters showed 5 volts.

Is there any additional component I could introduce?

The whole purpose of my project is to drive 15 relays which would turn on 15 240v light bulbs.

Im doing this to create a VU meter.

ravrichard0:
Yes, the pin Mode was OUTPUT.
And it was set to high yet still only 3 out of 4 of the Volt meters showed 5 volts.

Is the one reading lower voltage wired to anything? If so it must be drawing too much current from the output pin. If not you must have a damaged output pin.

Is there any additional component I could introduce?

The whole purpose of my project is to drive 15 relays which would turn on 15 240v light bulbs.

Well most relays must utilize a switching transistor (or other type of driver device) between the arduino output pin and the relay coil, unless you have a very low (<30ma) coil current 5 vdc relays. The use of such 'buffering' removes the current restrictions on arduino output pins and driving 15 such circuits is not a problem. However one still have to figure out if the arduino board can supply enough +5vdc current to power all the external loads (relay coils in your case) you wish to drive, even with the output pin current restriction taken out of the picture by the use of switching transistors.
Lefty

Im doing this to create a VU meter.

Yes, the pin Mode was OUTPUT.
And it was set to high yet still only 3 out of 4 of the Volt meters showed 5 volts.

Something "funny" is going on... With only a voltmeter (or multiple voltmeters) attached, you should be able to turn on all of the pins. Do you have "real" voltmeters? Most of us don't have 4 multi-meters, and if we did we'd only be using one at a time to measure one output at at time.

Maybe you've got a bad Arduino (unlikely), or there's something wrong with your measurement, or your software (sketch).

With 15 solid state relays you are slightly exceeding the specs. Your solid state relay requires 15mA. The ATmega chip is spec'd for 40mA maximum per pin, but limited to a total of 200mA.

So... To be perfectly reliable, you'd need to reduce the number of outputs to 13, use a different relay, or use a MOSFET (or something) in-between the Ardunio and the SSR. But, if it was me.... I might just say 225mA is "close enough", and go for it! If the Arduino burns-out, then I'd work on a better design, keeping everything in-spec. :stuck_out_tongue:

There's usually some safety-margin in the specs. The relay might take a bit less than 15mA, and the Arduino might be able to source/sink slightly more than 200mA. It's up to you if you want to risk it.


There is no coil in a solid state relay... Lefty is a bit confused.

There was also some previous discussion about switching speed... With an incandescant lamp, the limiting factor is how fast the element can heat-up and start to glow. I don't know how long it takes, but it's somewhere between 1/10th of a second and 1 second to reach full-brightness...

There is no coil in a solid state relay... Lefty is a bit confused.

Not my fault, I was born left handed and that is a proven source of confusion.

Lefty

retrolefty:
... analogWrite() commands does not work with the AC zero crossing turn-on at 8.333 millisec switch timing of a SSR.

Timing is not a property of the SSR, but of the mains supply and I don't think the quoted half period is correct for St. Lucia. Consulting a local certified electrician is probably a good idea for anything mains related.

The SSR used is a FSS1-102Z which happily accepts 5v to switch on the 240v light.

You may want to read the SSR's datasheet to make sure that it can be turned on / off that fast.

You may want to read the SSR's datasheet to make sure that it can be turned on / off that fast

The point is... You simply cannot use analogWrite() or PWM with 50/60Hz AC and solid state relays.

This is not a dimming application anyway... (You can get a "dim flash", depending on the programming.) He will need to use digitalWrite() and hold the output on at least long enough for the filament to start glowing.

This is a Vu meter... Typically, the lamps at the bottom of the meter are almost constantly-on and the top-lamp will only flash-on on during the loudest parts. (The VU meter "effect" that I made also has a "dot mode" where there is only one lamp on at any time, and a "dots mode" where a random number of lamps indicate the volume.... just to keep things interesting.)

Can this be the solution to my problem?

Well... It would probably "work", but I wouldn't recommend mechanical relays in this application. They are basically a mechanical switch controlled by an electromagnet and they don't "like" to be switched on & off many times a second.

And, they will "click" or "chatter", which could be an issue.... Probably not a big issue if the music is really loud! :wink:

There are solid state relays that operate from less than 15mA. I don't know if you'll find one you want to use, but for example [u]this one[/u] has in input resistance of 1000 Ohms, which means 5mA @ 5V. But, it's more bulky and more expensive than the one you are planning on using.