Hello all
Again, thanks for the tips on chosing tools for my hobby!
I'm still working on the ESP8266 chip, and learning with the MAX7219 IC to control digits. As the ESP8266 output are 3.3V and the MAX7219 needs TTL-level inputs (that is, more than 3.3V for the high signal), I had to find a way to level up the voltage (with the elements I have)
I decided to use a very simple circuit, with a NPN transistor (2N2222), a 7.5k resistor to the base, a pullup resistor of 33k (5V) at the collector, and emitter to ground. Of course the signal is reversed, but whatever I'll just need to configure SPI differently to output inversed signals from the ESP8266.
Problem is, the transistor is claimed to have a switch time of 20ns, which is way sufficient for a clock cycle of 1MHz, but my measurements show a different result:
(Blue is chip select, purple is connected to the collector of the transistor, and yellow is unused)
Horizontal step is set to 2ms, so we have here a switch time of around 3.5ms (until 3.8V is reached).
If I look at the 2N2222 datasheet (at least one that I found), I see this graph:
With a 7.5k resistor, I shall have a base current of 0.34mA, which shall allow a collector current of 33.4mA max (approx) according to Beta. I will have to change the base resistor to a way lower value? That will increase the collector current, but cost more energy to the system...
Here is was I get with a 7.5k resistor :
That's better, but...
Shall I invest into a level shifter board instead, like the ones we see on aliexpress?
Again, thanks for the tips on chosing tools for my hobby!
I'm still working on the ESP8266 chip, and learning with the MAX7219 IC to control digits. As the ESP8266 output are 3.3V and the MAX7219 needs TTL-level inputs (that is, more than 3.3V for the high signal), I had to find a way to level up the voltage (with the elements I have)
I decided to use a very simple circuit, with a NPN transistor (2N2222), a 7.5k resistor to the base, a pullup resistor of 33k (5V) at the collector, and emitter to ground. Of course the signal is reversed, but whatever I'll just need to configure SPI differently to output inversed signals from the ESP8266.
Problem is, the transistor is claimed to have a switch time of 20ns, which is way sufficient for a clock cycle of 1MHz, but my measurements show a different result:
(Blue is chip select, purple is connected to the collector of the transistor, and yellow is unused)
Horizontal step is set to 2ms, so we have here a switch time of around 3.5ms (until 3.8V is reached).
If I look at the 2N2222 datasheet (at least one that I found), I see this graph:
With a 7.5k resistor, I shall have a base current of 0.34mA, which shall allow a collector current of 33.4mA max (approx) according to Beta. I will have to change the base resistor to a way lower value? That will increase the collector current, but cost more energy to the system...
Here is was I get with a 7.5k resistor :
That's better, but...
Shall I invest into a level shifter board instead, like the ones we see on aliexpress?