Hi Qar,
I assume you are talking about the TCD1304neg code for the 3.2 and not the ntyrell code for the 4.0. I have worked with the ntyrell code and have found that it works well (although not perfectly for my application). I dont have a Teensy 3.2, so I can't test this stuff out properly. If you are willing to switch to the Teensy 4.0 (or 4.1) I might be of more use to you.
I thought I might be able to modify the 3.2 code a little, put it on my teensy 4.0 and see what the scope says is happening. Unfortunately, I have not been able to get the code loaded.
Anyway, in my experience the TCD works fine on 3V3 power and no transistor. Seems to me that I have seen schematics were people put a logic inverter between the microcontroller and the tcd1304. I am not sure whether the code you are using is set up for that or not. I think one of the posts above had at least one of the pins going the wrong direction. If the logic is backwards (high when it is supposed to be low) then you are not going to get anything meaningful out.
The other thing I would point out is that someone above said that the sensor is really sensitive to light. I think that is the most likely source of your problem. If you have this thing working in a normal room level light, I think you need to run with something like 5 ms integration time or else all of the pixels will be saturated (relatively low voltage output. I think it is somewhere between 0.6 and 1.2 V). If you have the TCD1304 in total darkness, you should get a higher voltage reading on the output pin (like about 2.8 V). The integration time is the period of the SH pin. Looking at the TCD1304neg code, it looks like t_int is the integration time and it is set at 20000 us as a default. While you can cut the input value down, it looks like the user can't go below the ICG minimum, which is ~14 ms / fm where fm is the clock speed in MHz. Not sure what the clock speed is here, but if it is 2MHz then yoiur integration time is at least 7 ms. That is not a limitation of the TCD1304, it is just what the code says.
Good luck on this.
Jack
I assume you are talking about the TCD1304neg code for the 3.2 and not the ntyrell code for the 4.0. I have worked with the ntyrell code and have found that it works well (although not perfectly for my application). I dont have a Teensy 3.2, so I can't test this stuff out properly. If you are willing to switch to the Teensy 4.0 (or 4.1) I might be of more use to you.
I thought I might be able to modify the 3.2 code a little, put it on my teensy 4.0 and see what the scope says is happening. Unfortunately, I have not been able to get the code loaded.
Anyway, in my experience the TCD works fine on 3V3 power and no transistor. Seems to me that I have seen schematics were people put a logic inverter between the microcontroller and the tcd1304. I am not sure whether the code you are using is set up for that or not. I think one of the posts above had at least one of the pins going the wrong direction. If the logic is backwards (high when it is supposed to be low) then you are not going to get anything meaningful out.
The other thing I would point out is that someone above said that the sensor is really sensitive to light. I think that is the most likely source of your problem. If you have this thing working in a normal room level light, I think you need to run with something like 5 ms integration time or else all of the pixels will be saturated (relatively low voltage output. I think it is somewhere between 0.6 and 1.2 V). If you have the TCD1304 in total darkness, you should get a higher voltage reading on the output pin (like about 2.8 V). The integration time is the period of the SH pin. Looking at the TCD1304neg code, it looks like t_int is the integration time and it is set at 20000 us as a default. While you can cut the input value down, it looks like the user can't go below the ICG minimum, which is ~14 ms / fm where fm is the clock speed in MHz. Not sure what the clock speed is here, but if it is 2MHz then yoiur integration time is at least 7 ms. That is not a limitation of the TCD1304, it is just what the code says.
Good luck on this.
Jack