ALeggeUp's Getting To Blinky Build Log

First batch of boards shipped, can’t wait to try them out!

3 Likes

First batch of GTB’s arrived! Once the kids are in bed it’s solder time!

3 Likes

Pretty happy with my solder job

Popped in the battery and…
… didn’t work.

Turns out I reversed the pins on the battery connector and made the big pad positive even though it clearly had a + on the top of the battery connected to the outside.

Luckily I can just flip the battery over and as long as the sides of the battery don’t touch the holder I can reverse the polarity.

And then…

Success-ish!

One of the LEDs seems brighter than the other and the timing doesn’t seem to be consistent, but I’ll have to think about those later.

5 Likes

Congrats! Blinky achieved! Gotta take that as a win regardless :slight_smile:

Ya, there should be a badge for it… Oh wait, it is it’s own badge! :stuck_out_tongue:

1 Like

Not all 555 timers are equal. While the datasheet might say:

Exact equivalent in most cases for SE/NE 555/556 or TLC555/556

This is an example that is not one of the “most cases”. Intersil’s CMOS 555 timer cannot be used in some circuits that were designed for the bipolar 555. This is one of those circuits. Intersil had to make some compromises in order to get the 7555 to work at a supply voltage of only 2V. The sink and source capacity is one of them.

The parametric table in the datasheet is not of much use here as you are using a supply voltage of 3V. You need to refer to the charts below and even there they only give curves for 2V, 5V and 15V. But the 2V curve is close enough for your purpose. Looking at the sink and source current curves for Vdd = 2V you can see that you never going to sink or source 10ma for your LEDs. And as you try to sink/source current from the output you can see that the output voltage will increase/decrease. As a result it is complicated to work out exactly how much current you are currently supplying to your LEDs but it is obvious that you are sinking much more current than you are sourcing, hence the difference in brightness.

As a result of this the current available to charge/discharge the capacitor also varies greatly between states which is why you don’t get the expected 50/50 duty cycle.

The correct way to use this IC in this application would be to use the discharge pin to control the charging/discharging of the capacitor for more consistent timing. The output pin should instead be driving transistors to provide the necessary drive current for your LEDs.

Note: The reason people sometimes design 555 circuits using the output pin to charge/discharge the capacitor is to get a 50/50 duty cycle at high frequencies. At low frequencies, such as in your case, the discharge pin can be used to get close enough to a 50/50 duty cycle that it becomes irrelevant.

Hope this helps.

4 Likes

That is a huge help, thank you. I was really confused, but that totally makes sense now that you point that out. I am excited to try a Rev C and see the difference.

Thanks @1.21Gigawatts!

This is turning out to be much more complicated than I thought… I decided to give the falstad circuit simulator a shot which was a bit of a learning curve on its own. I have tried several times to get this right, but I’m stuck on getting the timing right, I’m not sure why I’m not getting 50/50 duty cycle in this circuit.

1 Like

I hinted at this earlier. Since the output pin can both sink and source current but the discharge pin can only sink current we need to add the pull up resistor, we’ll call it Ra, in order to charge the capacitor. You can see now that the capacitor will charge through Ra + Rb but discharge through Rb only. Therefore, unless Ra can be 0 we will never get a symmetric waveform. And since there isn’t an infinite amount of current available at the discharge pin Ra can never be 0. The trick is for Ra to be as small as possible relative to Rb without exceeding the discharge pin’s current capacity. In fact you want to stay well below the current capacity of the discharge pin. This way we can get very close to a symmetric waveform, especially at low frequencies. So in your case I would suggest making Ra about 470R while Rb should be 110K.

Also watch your transistor arrangement. As you have drawn it the NPN transistor will be on when the output is above ~0.7V while the PNP will be on when the output is below ~2.3V. As you can see there is a period of time when both are on which will briefly draw more current from your battery. But you are on the right track.

2 Likes

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