ALeggeUp's Getting To Blinky Build Log

This is great information, I really appreciate your help here. I think I follow the logic choosing the resistor value, I was stuck on thinking that they had to match to get the 50/50 duty cycle, but the way you explained it makes sense although I still have a couple points to clarify:

I couldn’t find anything in the datasheet that specifically said anything about the discharge pin’s current capacity or sink current other than a graph that was labelled Discharge low output voltage versus discharge sink current. From the 470R value you came up with that gives me about 6.4mA current at the discharge pin, so it seems by the graph that you were keeping it under 10mA which also shows up as I_DIS in the characteristics table?

This really has me baffled, I think my concept of a transistor is overly simplified, I’m not exactly sure how you arrived at the ~0.7V (and presumably -0.7V) value or how to change it, but a little digging around has led me to Fixed base bias, is that what would help me here?

Thanks again

Correct, the discharge low voltage for a sink current of 15 ma and Vdd of 5V is typically 0.2V but if you look at the graph a sink current of 15 ma for a Vdd of 2V gives a much higher low voltage of 1V. To get it back to the 0.2V range we need to reduce the sink current to 8 ma or less. As you stated 470R would give around 6 ma. As you can see by the graph too much sink current increases the discharge low voltage which starts to affect your timing. You could probably increase Ra further to 1K or more but it will decrease the symmetry of your waveform. But even at 1K it changes the symmetry by less than a 1% in your case.

For silicon transistors the VBE(sat) or the base to emitter saturation voltage is around +/-0.6 to 0.7 volts. This varies with current and temperature but for most circuits, especially logic circuits, we can assume a value of +/-0.7 V. That means for a NPN transistor the base voltage needs to be 0.7V more positive than the emitter voltage for the transistor to turn on. For PNP transistors the base voltage needs to be 0.7 V more negative than the emitter voltage. Transistors are not a perfect switch, how much they turn on varies with base voltage/current, collector current, DC gain, temperature, … this is why there are usually so many graphs on a transistor datasheet.

Using your simulator you could simulate a circuit consisting only of the transistors as you’ve drawn them above and vary the voltage on the base from 0 to 3 V and see when each transistor turns on and off.

Correct me if I’m wrong, but as some of you seem to be doing these projects as part of a course I assume they are meant to be a learning experience so I am trying not to just give you all the answers but rather steer you down the path where you can discover them on your own. If I’m helping too much or not enough just let me know.

No, this is perfect. I am learning so much, thank you!

I was just working on exactly that and I think I’ve found a way to remove the overlap at least with the NPN so far. This is what I have, so at 1.5V the LED is not on, at 2.5V it’s almost fully bright and at 3V it’s just under 20mA where I want it.

Am I on the right track?

1 Like

Yes, exacty, voltage dividers are quite often used on the base of a transistor to control the threshold voltage. Just be careful that you have enough base current in order to get the desired collector current.

Note: As you can see in your simulation, 2.5 V gives you about 0.7 V at the base. A little ohms law shows that 0.7 / 470 * (1200 + 470) = 2.49 V.

1 Like

The 0.7V more positive is a revelation for me, my simplistic view was “apply voltage at the base and it allows more voltage to flow through”, I feel like this was an important lesson for me.

Thank you very much for guiding me down this path.

I was playing around with the falstad simulator again trying to make sure I had a handle on these transistors and after clicking edit and changing the voltage a couple hundred times I stumbled across the “variable voltage” source which made things so much easier. The bottom left scope is the voltage which I was sliding back and forth and on the right the current draw of the two LEDs stacked.

This is what I was aiming for, the current across one LED doesn’t start to rise until the other is almost at 0.

1 Like

Well done! A little math shows that the NPN transistor should turn on when the voltage rises to about 1.87V while the PNP should turn on when the voltage falls below about 1.13V. No more overlap! And you have almost 2ma of base current so you only need transistors with a beta of 10 or more to get your 20ma of drive current.

Now your LED drive currents are directly controlled by the transistors while putting only a small load on the output of the 555 and your timing control is completely independent. And more importantly, you learned a bit along the way. :slight_smile:

The the thing to remember about bipolar transistors is that they are current operated. A small current on the base-emitter junction controls a larger collector-emitter current once you have enough voltage to forward bias the base-emitter junction.

1 Like

Thanks Doc! (in my mind you are Doc Brown)

Absolutely, this was a great lesson for me, I can’t thank you enough.

Yes, something I will always remember now. Almost as simple as my mental model before, but the details that I had abstracted out make all the difference.

I couldn’t fit the new components in the same dimensions as before so I decided to try out a new layout and give a round board a try, I like the new look.

3 Likes

What do you mean? There was plenty of room on the other board. :wink: Looks good, I would trade in that switch for something a bit smaller though. And those transistors in your 3D view need to be rotated.

Looking forward to seeing the finished product.

Success! Getting To Blinky Rev C works great, exactly what we were hoping/expecting, both LEDs are the same brightness and the timing is consistent!

Thanks for all the extra help @1.21Gigawatts and of course @ChrisGammell for the videos.

6 Likes