Author Topic: Did I mess up? SSR control  (Read 3299 times)

0 Members and 1 Guest are viewing this topic.

Offline antonmi97Topic starter

  • Contributor
  • Posts: 18
  • Country: hr
Did I mess up? SSR control
« on: April 05, 2019, 07:22:56 pm »
Hello everyone!

This is my first forum post, and to be honest, I'm not really happy that I have to post this question, because it seems trivial. Anyhow, here we go.

I am designing a SSR mains light controller board and I want to controll the SSR with a GPIO of my ESP8266.

The SSR is the AQH3213 http://www.farnell.com/datasheets/1682136.pdf?_ga=2.232540383.1564095963.1554464329-1879432376.1547653567


I did this   

And I'm not sure if it will work. Can anyone clear things up a bit for me?
 

Offline pelule

  • Frequent Contributor
  • **
  • Posts: 513
  • Country: de
  • What is business? It’s other people’s money
Re: Did I mess up? SSR control
« Reply #1 on: April 05, 2019, 07:33:41 pm »
Missing some needed connection in your schematic ... U2 / pin (4) == cathode of the opto-LED should be tied to ground or you have a floating circuit.
/PeLuLe
You will learn something new every single day
 

Offline antonmi97Topic starter

  • Contributor
  • Posts: 18
  • Country: hr
Re: Did I mess up? SSR control
« Reply #2 on: April 05, 2019, 07:47:52 pm »
It’s just hidden. All GND pins in my schematic are hidden and connected to the GND net. The only thing worrying me is if the SSR will even turn on. I tried turning a LED on (that works), but I’m not sure I understand what it takes to turn on the SSR (I don’t understand it’s datasheet). Any help is appreciated
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4547
  • Country: dk
Re: Did I mess up? SSR control
« Reply #3 on: April 05, 2019, 08:01:21 pm »
It’s just hidden. All GND pins in my schematic are hidden and connected to the GND net. The only thing worrying me is if the SSR will even turn on. I tried turning a LED on (that works), but I’m not sure I understand what it takes to turn on the SSR (I don’t understand it’s datasheet). Any help is appreciated

it is just like driving an LED, 20mA to be use it turns on

I don't see why you need all that stuff
 
The following users thanked this post: wraper

Offline antonmi97Topic starter

  • Contributor
  • Posts: 18
  • Country: hr
Re: Did I mess up? SSR control
« Reply #4 on: April 05, 2019, 08:07:28 pm »
I thought so too, but I wasn’t sure. So you think it would work with just directly connecting a GPIO pin (with a current limiting resistor) to the VCC pin of the SSR? I don’t need a voltage divider?
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17315
  • Country: lv
Re: Did I mess up? SSR control
« Reply #5 on: April 05, 2019, 08:08:46 pm »
It’s just hidden. All GND pins in my schematic are hidden and connected to the GND net. The only thing worrying me is if the SSR will even turn on. I tried turning a LED on (that works), but I’m not sure I understand what it takes to turn on the SSR (I don’t understand it’s datasheet). Any help is appreciated

it is just like driving an LED, 20mA to be use it turns on

I don't see why you need all that stuff
Yep, if control circuit can provide over 10mA, all you need is single resistor. All that bloat is pure nonsense. Especially R4, R5, D1, C1.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 17315
  • Country: lv
Re: Did I mess up? SSR control
« Reply #6 on: April 05, 2019, 08:10:49 pm »
I thought so too, but I wasn’t sure. So you think it would work with just directly connecting a GPIO pin (with a current limiting resistor) to the VCC pin of the SSR? I don’t need a voltage divider?
Why would you need voltage divider?
 

Offline SenseofScale

  • Contributor
  • Posts: 20
  • Country: us
Re: Did I mess up? SSR control
« Reply #7 on: April 05, 2019, 08:19:53 pm »
I don't know about the particular device, can it source 10-20 mA from a GPIO pin? The datasheet gives different performance curves for currents ranging from 10 to 50 mA for activation of the SSR.

Supposing the transistor is needed, shouldn't they also move it to the ground side?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19681
  • Country: gb
  • 0999
Re: Did I mess up? SSR control
« Reply #8 on: April 05, 2019, 10:10:17 pm »
According to the datasheet, the SSR is guaranteed to trigger, when the LED forward current is above 10mA, but it will most likely trigger with just 5mA and it can be as high as 50mA, before any damage occurs.

The ESP8266 has a maximum output current of 12mA.

All you need is a resistor. Assuming the forward voltage drop of the LED is 1.2mA and a power supply voltage of 3.3V

I = 10mA = 0.1A
VF = 1.2
VDD = 3.3V

R = (VDD-VF)/I = (3.3-1.2)/0.01 = 2.1/0.01 = 210R.

Use the next standard lower value resistor such as 200R or even 180R.

If you use a transistor, it can go either side of the LED, but if it's on the positive side, it will drop another 0.6V, so the series resistor's value will need to be reduced to compensate.
 

Offline antonmi97Topic starter

  • Contributor
  • Posts: 18
  • Country: hr
Re: Did I mess up? SSR control
« Reply #9 on: April 06, 2019, 10:09:08 am »
Yes, this is what I needed. I was not sure if my uC could source the needed current so I put in the transistor, and yes I should’ve put it on the ground side, but this should work anyhow. When the boards arrive I’ll give it a final test with and without the transistor, but I’d prefer it with the transistor in order to protect the uC
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12981
Re: Did I mess up? SSR control
« Reply #10 on: April 06, 2019, 11:01:04 am »
There's nothing wrong with an emitter follower if you need to source more  current from a MCU pin, don't want to invert the signal, and can tolerate the 0.7V Vbe drop.  However, as Wraper points out, your circuit needs decrapifying.   When the boards come, do not populate D1, C1, R2, R5, and fit zero ohm jumpers for R1, R4.

56 ohms should work well for R3 giving a LED current of about 23mA., which is pretty close to the recommended 20mA.   I wouldn't go much higher for R3 as the efficiency will drop as the LED ages.

Zero999's calculation neglects the internal voltage drop in the ESP8266 output, which when sourcing close to 12mA is going to be significant.  IMHO its too close to the bleeding edge - if you choose a resistor to satisfy the constraints If>=10mA and Iout <12mA, you should be able to get it to work OK on the bench in a shirtsleeve environment, but you wont have any margin for LED ageing and low temperatures, and at high temperatures you are likely to draw excessive current from the EP8266 I/O pin, so reliability will be poor.
« Last Edit: April 06, 2019, 11:12:23 am by Ian.M »
 

Offline antonmi97Topic starter

  • Contributor
  • Posts: 18
  • Country: hr
Re: Did I mess up? SSR control
« Reply #11 on: April 06, 2019, 01:35:57 pm »
Thank you for the advice guys, you made this much easier and faster for me. Appreciate it  :-+
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19681
  • Country: gb
  • 0999
Re: Did I mess up? SSR control
« Reply #12 on: April 06, 2019, 01:48:27 pm »
Zero999's calculation neglects the internal voltage drop in the ESP8266 output, which when sourcing close to 12mA is going to be significant.  IMHO its too close to the bleeding edge - if you choose a resistor to satisfy the constraints If>=10mA and Iout <12mA, you should be able to get it to work OK on the bench in a shirtsleeve environment, but you wont have any margin for LED ageing and low temperatures, and at high temperatures you are likely to draw excessive current from the EP8266 I/O pin, so reliability will be poor.
Good point, but the output voltage drop/resistance isn't specified, which makes that approach more difficult, as it would have to be derived experimentally.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12981
Re: Did I mess up? SSR control
« Reply #13 on: April 06, 2019, 02:02:26 pm »
Yes.  I didn't take the time to look for ESP8266 output characteristic curves, and am not particularly surprised to be informed there's no official data.

If the emitter follower transistor has a min. hFE of 100, the worst case load on the pin will be less than 2% of its max current rating so one can be certain that the pin will swing rail-to-rail under load.
Therefore, with the transistor, a simple analytic solution with appropriate tolerances will be sufficient.
« Last Edit: April 06, 2019, 02:04:13 pm by Ian.M »
 

Offline antonmi97Topic starter

  • Contributor
  • Posts: 18
  • Country: hr
Re: Did I mess up? SSR control
« Reply #14 on: April 06, 2019, 03:18:26 pm »
So the outtake of this would be to:
1. Short the Base to the gpio pio and remove 10k resistor conecting the base and emitter.
2. Not use the voltage divider and put in a resistor limiting the LED current to about 20-25 mA with the 3.3V - the transistors Vce voltage drop (0.8V with the one I have)
3. Remove the diode and the bypass cap

This means that I can use my boards. Yay!
Anything else? Advice, suggestions?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19681
  • Country: gb
  • 0999
Re: Did I mess up? SSR control
« Reply #15 on: April 06, 2019, 03:49:14 pm »
Yes, you should be able to use your existing PCB by replacing R1 and R3 or R4 with jumpers and not fitting the other components. It should look like this.


I hope you've allowed enough distance between the mains and DC side? If not, I suggest you just use these boards as a proof of concept and redo the PCB, paying more attention to the creapage and clearances: certainly if you're going to sell this.
« Last Edit: April 06, 2019, 05:20:13 pm by Zero999 »
 

Offline antonmi97Topic starter

  • Contributor
  • Posts: 18
  • Country: hr
Re: Did I mess up? SSR control
« Reply #16 on: April 07, 2019, 04:36:37 pm »
All my boards are proof of concepts for now. Once we test everything, a older colleague will revise the boards with us in order for them to pass all required testing and stuff. I'm still a young 21 yo college student  :)
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3566
  • Country: nl
Re: Did I mess up? SSR control
« Reply #17 on: April 08, 2019, 01:37:28 pm »
For experimenting with SSR's it is handy to use a low voltage transformer (12V or 24V) and a light bulb for the load of your SSR.
This circumvents messin' with high voltages and you can experiment all you want on a breadboard.
 

Offline antonmi97Topic starter

  • Contributor
  • Posts: 18
  • Country: hr
Re: Did I mess up? SSR control
« Reply #18 on: April 21, 2019, 09:28:57 pm »
Quick update guys. Everything is fine with the board, with a sole exception that i misaligned the pins of the transistor on the schematic and the footprint, but luckily it's only a 90 degree rotation. I'll redo the board and hopefully get it right this time. Thank you for all the help <3
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf