AVR with SCR

Go To Last Post
27 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hy guys!
I'd like to switch on-off a thyristor (BT151 or TIC106) with an Atmega328p to fire a film capacitor and I want to choose the proper value of the resistor between the I/O pin and the SCR gate. Can somebody help me with some tutorial (or newbie's guide) how to calculate this value? 

This topic has a solution.
Last Edited: Thu. Jul 23, 2015 - 07:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yoman91 wrote:
I'd like to switch on-off a thyristor

You do realise that you can't switch a Thyristor OFF - don't you?

 

I want to choose the proper value of the resistor between the I/O pin and the SCR gate. Can somebody help me with some tutorial

Ohm's law?

 

http://www.lmgtfy.com?q=thyristor+SCR+tutorial

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the gate is about 0.7V and needs 10mA. At 5V this is (5-0.7) / 0.01 = 4300 Ohms. Make that 3k3 just to be sure.
If you're making something like a CDI unit, you want an scr like a C106, not a triac

Last Edited: Tue. Jul 21, 2015 - 08:04 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I know I can't switch the thyristor via the avr. I "switch it off" with the help of a resistor between gnd and the gate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you! If you divide 4.3 with 0.01 the result is 430 Ohm so the formula or the result is wrong?  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yoman91 wrote:
I know I can't switch the thyristor via the avr.

Yes, you can switch it ON - or "trigger" it!

 

But, once a thyristor (aka "SCR") is ON (or "triggered") the gate no longer has any control - so you can not "switch" it OFF!

 

I "switch it off" with the help of a resistor between gnd and the gate.

No - that won't work.

 

https://en.wikipedia.org/wiki/Th...

 

https://en.wikipedia.org/wiki/Si...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Jul 21, 2015 - 08:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks your remark, you are right. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As for my dodgy calculation, i was on a train and it must've bumped when i was tapping it on the iphone. Honest! Yes, 430 is the correct answer. Note that the AVR output is less than 5V and there's a couple of other tolerances, so go a bit lower on the resistance.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you! Does these parameters are actually in the datasheet as like gate trigger voltage and gate trigger current? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes! I read the tic106 datasheet.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yoman91 wrote:
Does these parameters are actually in the datasheet

You mean you haven't looked ??

 

surprise

 

But, yes - I looked in the BT151 datasheet.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

UPDATE! I tested my circuit with TIC106M SCR. The AVR supply voltage is 4.39V. The voltage on the I/O pin, which "fires" the SCR is 2.7V. Refer to the datasheet (Igt=60-200uA, Vgt=0.4-1V), I calculated the gate-resistor value with the following formula: (2.7-0.7)/0.0001=20kOhm. I tried it first with 10kOhm and 4.7 kOhm, but nothing happened. With 100Ohm gate-resistor the SCR works. Can somebody explain it why is this big difference? The AVR I/O port is connected to the SCR through the gate resistor and a diode (to protect the AVR), and the I/O pin also connected to the ground with a 10k resistor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you switching an AC voltage?  120/240 V Mains?

 

Can you post a schematic of your circuit?

 

Many old SCR circuits used a full wave bridge rectifier to convert an AC voltage to a voltage with all positive sin wave half periods, with no negative going half sin waves.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I attached a schematic from the SCR. The big question from me, that how to calculate the value for the gate resistor in this form? (On the schematic I marked it with "100??").

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It makes life a lot easier for others if you place the image in your post - so that everyone can see it in the thread:

 

 

The instructions are here: https://www.avrfreaks.net/wiki/em...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I dare say you trigger the scr at mains zero crossing otherwise there might be some smoke.
Scrs need current flowing through them to latch. With no load on the out terminal, there won't be much current flowing so it can't latch. If there was a transformer or something providing a load, then it has a better chance of working.
You also need to watch the i2t when the scr fires, if the current rises too rapidly, the scr will melt. So you need some inductance to ensure this spec is met.

Last Edited: Thu. Jul 23, 2015 - 08:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The out pin goes to a transformer, which amplify the voltage to make spark. I think I forgot to say that I want to use this circuit as a CDI.

 

I forgot, that I supply my AVr with 3.3V. In that case 1.76V can "open" the thyristor. The AVR is an ATMEGA328P, but in the circuit editor I couldn't found it. Maybe the 10k resistor makes my calculation incorrect? 

 

Last Edited: Thu. Jul 23, 2015 - 09:45 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It should basically work. Your circuit does not show avcc connected or the other gnd pin. It would be wise to connect these. You haven't told us what the source of the high voltage is or how long you pulse the scr for.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks your reply Kartman! I edited the above circuit cause I totally forgot that I supply my device with 3.3V. So to sum:  My uC is an ATMEGA328P. I fires the scr with the PC1 I/O pin. AVCC is not connected to the VCC, but I don' use the ADC converter. I receive the pickup signal on an external interrupt pin (INT1). Please read again the #17 post, cause I added in it some more information.

Last Edited: Thu. Jul 23, 2015 - 10:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you might find that AVCC powers the port. I would suggest you connect it. We've had a few people that have thought not to connect AVCC because they don't use the adc - the datasheet tells you to connect it. Also, you should have bypass capacitors as well.

You might want to use the capture feature for your pickup - it gives more precise timing compared to using an external interrupt.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How is the ATTiny26 detecting the zero crossing of the 100-200VAC?

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ross, i do hope the ac source is impedance limited. I'm guessing it is an alternator on a motorbike. You rarely see CDI on anything but a two stroke engine these days.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Agreed. But I don't see where the Tiny26 is monitoring the high voltage.... unless it is at the "pickup"

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is not a Tiny26, but a Mega328P. I wrote it in a post before, in my schematic editor there were no mega328p. The pickup contains voltage regulator and some other part, to convert the pickup signal to a measureable signal to the avr.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your intuition is right, it is an alternator from my bike. What do you think? The resistor value is good and the problem is with the AVR hookup? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Its been a long time since I did any SCR projects...

 

But isn't the SCR going to just short the 200 V source to ground when it is on?

How much current can the SCR handle?

 

As already mentioned, AVcc Must be tied to Vcc, either directly, or through an LC filter.

The uC will definitely need By-Pass caps.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Finally I solved the problem. I replaced the TIC106 SCR to a BT151 one, and works perfectly in the range of the parameters the datasheet mention. Thanks the tip for the AVcc