Amazon sells a set 18 Set Spectrum Discharge Tube s - but of course you'd need a special tube power supply for it - which is pricey. Good to see a project based off these surplus optical benches available on ebay. Thanks for the link to the TCD1304 sensor and for posting the board to PCBway - will try soldering one of these together.
Thank you! I have checked those tubes, but they are $300. It is way out of my budget unfortunately. But as I can see, I can buy those tubes individually. Buying 3 or 4 different tubes would be cheaper and also sufficient for fitting a more robust line for my calibration. I was also browsing Thorlabs' website and I found laser diodes for reasonable price. I will probably get those once I save up a little. I hope you will succeed with the soldering. I soldered a similar board manually when I first started to develop my own TCD1304 circuit and I managed to make it work. I am not at all good at manually soldering SMD parts, so if I could make it work, anyone can do it. All you need is patience and a lot of flux.
Thanks for sharing this project, I'm thinking of building one like it myself and it's so very helpful to see how others have gone about it and the problems they encounter and solutions they've found. I haven't watched all your videos on this subject yet but I have a couple thoughts to share... so, sorry if these are duplicate ideas 😋 - You could use a windowed op-amp arrangement to stretch & shift the analog signal to increase your dynamic range. Currently your readout is from about 500 to 3500 so you're leaving 20-25% of your range unused. Of course I haven't seen what the output looks like for other integration periods, they might look different. - If you want to reduce signal noise between the CCD and the micro you could use a differential pair between your CCD and micro boards with an op-amp on both sides. Basically leaving your CCD board the same but running a return ground tapped from the op-amp back to the micro board keeping the traces and wires in as close contact as possible the whole way. This would let you use longer wires between the boards without increasing EMF pickup and reducing EMF pickup overall. - Another big win in noise reduction would be to sample at the full 133Hz and use a moving average algorithm (FFT-MA, DTFT, etc.) then send data at a reduced frequency to the PC. - Look at the materials people use to blackout home theater TV projector rooms and maybe use it around the CCD and to capture the secondary diffraction rays, or to line as much of your box as possible 😁
Hi and thanks! As far as I know, there are not so many well-documented TCD1304 projects out there. That's why I decided to do everything my way and then publish everything. Nevertheless, any idea is more than welcome. I am also still in the learning process and since no one "proofreads" my work, other than my viewers, I am really happy when someone comes with ideas or constructive criticism. -I know that I lose range, but longer integration times easily oversaturate the sensor. The best would be some adaptive circuit, or a very fast 16 or 24-bit ADC where I can still keep a relatively large resolution (as compared to 12-bits) while not utilizing the whole range. The circuit I made was based on the expected range I am going to use for the CCD. So, it is a bit of a compromise. -I will definitely try the differential pair. It is very useful especially when I need to run wires between the MCU and the CCD. Thanks! -Unfortunately, I am not that experienced in the techniques you mentioned for reducing the noise. I know them but haven't used them. But hey, another opportunity to learn something new! But at the moment I do not need 133 Hz refresh rate anyway, so I am okay with the lower frequency of data transfer. Also, probably the USB communication could be written better by a more experienced programmer which could also help using a higher transfer rate. -I will try to look up that material, thanks! I have another project with this CCD where it would be particularly important to line the inside of the enclosure.
@Curious Scientist I'm in software by profession and I've dabbled with micros and electronics stuff since before Arduino was a thing (or at least before it was popular enough for me to hear about it LOL). I'm in no way an expert but I've used all the techniques above and below (except the advanced moving average algorithms) and can probably dig up my old spice simulations / schematics for windowed op-amps and differential pair layouts if it'd help - but you can probably find good guides online these days too. Re windowed op-amp. My point is you can use this architecture to fully utilize the ADC resolution when the device output isn't rail-to-rail. If the CCD outputs at the top rail when it saturates then you just stretch "down" and even clip off some of your noise floor, but I suspect the saturated output is read a good ways under 4091 - I'd be shocked if that laser doesn't saturate at any and all integration times. BUT if your going to implement differential pairs you probably won't need an explicit windowed amp. Re smoothing / averaging, start simple. Moving averages are most useful when you are nearing your max frame rate - most accurately the simple solutions stop being effective. Some STM32 chips support ADC ”oversampling" modes where they sum N samples then you can read out and divide by N. Also, you can just do it in software, sampling the CCD at the full 133Hz then average and transmit at your ~17Hz resetting your counts every cycle. ADC readout is subject to read noise from a lot of sources, many of which aren't actually from your input signal itself. Depending on your timing, layout, and op-amp choice you can easily lose a couple bits of precision. This can cause both noise and value drooping where even if the input is at the ADC rail you won't read max (or possibly min) value because the ADCs SnH (sample and hold) cap doesn't come all the way up in time. I haven't read over your code so IDK if the following will help, and isn't necessary unless you are really pushing the ADC architecture to its limit, but if your ADC sampling period needs to be significantly shorter than the CCD shift speed you can increase ADC accuracy by placing a capacitor on the ADC input right next to the micro coupled to your analog (not digital) ground. Choose a low ESR cap (X7R, C0G/NP0) with a value 100x -1000x the micros "sample and hold" capacitor. This will let the SnH cap come up to voltage quickly improving precision at short sample times. Of course the op-amp needs to have appropriate capacitive drive capability but SnH caps are very small. And don't try this until you are using differential pair - you want that cap close to both the ADC pin and the op-amp. This also helps overcome trace impedance and inductance but if done wrong can make things much worse. The micros datasheet should give you an idea of if you're pushing things to the limit or if you're well within high accuracy operation. Anyway, I'm looking forward to seeing what you achieve with this, and other line scan CCD projects 😁
Grinding is good. A little bit of grinding and a little bit of paint make me the welder I ain't 😁 (say those of us who do some welding). Really like the iterative approach you are demonstrating. And the plotter is so responsive!
Haha, yes, there is always some way to fix things! :D Thank you for the supportive words! I also prefer this iterative approach, because it is easier to make a little bit shorter (still quite long) videos, and I can always show some significant improvements. Hopefully, the next video in the series will be even more interesting.
Hello, I am a graduate student and I have found your work to be incredibly informative. Can you kindly let me know where did you purchase the optical bench, the diffraction grating, and the collimating mirror? Thank you.
Hi! I am glad to hear that my work is informative! I already wrote where I purchased the parts in one of my comments under the video. And the exact type of bench is also mentioned on my website.
I bought the whole assembly on ebay as it is, without the CCD. And I told in my videos, in my articles, and also in some comments already. Search "optical bench" on ebay.
@@CuriousScientist i am working to make a product out of this design , EBay has some Ocean Optics Used Optic bench , it is ok for prototyping but not suitable for production. Can u help me find some LONG term supplier for this item. Thank You
@@CoDBuffett Oh, you mean the stencil! You have to buy it separately, but it is really cheap. When you order the PCB from PCBWay, there is an option where you can select to add a stencil to the order. Make sure that you order the one _without_ the "framework". Otherwise, you'll get the stencil in a huge frame.
It's on my website, I measured a few LEDs in my previous video. Also, I need something more interesting to measure and at this point I don't have any other light sources than the lasers and LEDs. Plus, I need some more parts such as an optical fibre to make things work better.
@@CuriousScientist did you try any plasma lamp such as low pressure Sodium lamp or CFL lamp ? Thoes produce some nice and unusual spectrums (Na lamp produce two peaks fairly close one to the other. It's ideal for demonstrating the accuracy of your product) Love your work 😄
Hi! Thank you! :) I haven't tried them yet, but I definitely will! I am actually making a list of light sources and I will test all of them in a single video. As I said, I am also planning to buy an optical fibre, plus, I want to buy a few cuvettes, so I can also test liquids and their absorption. I also picked a few lasers to calibrate at more wavelengths from Thorlabs. I just need some time for it because I cannot afford buying everything at once.
Amazon sells a set 18 Set Spectrum Discharge Tube s - but of course you'd need a special tube power supply for it - which is pricey. Good to see a project based off these surplus optical benches available on ebay. Thanks for the link to the TCD1304 sensor and for posting the board to PCBway - will try soldering one of these together.
Thank you! I have checked those tubes, but they are $300. It is way out of my budget unfortunately. But as I can see, I can buy those tubes individually. Buying 3 or 4 different tubes would be cheaper and also sufficient for fitting a more robust line for my calibration. I was also browsing Thorlabs' website and I found laser diodes for reasonable price. I will probably get those once I save up a little.
I hope you will succeed with the soldering. I soldered a similar board manually when I first started to develop my own TCD1304 circuit and I managed to make it work. I am not at all good at manually soldering SMD parts, so if I could make it work, anyone can do it. All you need is patience and a lot of flux.
Thanks for sharing this project, I'm thinking of building one like it myself and it's so very helpful to see how others have gone about it and the problems they encounter and solutions they've found. I haven't watched all your videos on this subject yet but I have a couple thoughts to share... so, sorry if these are duplicate ideas 😋
- You could use a windowed op-amp arrangement to stretch & shift the analog signal to increase your dynamic range. Currently your readout is from about 500 to 3500 so you're leaving 20-25% of your range unused. Of course I haven't seen what the output looks like for other integration periods, they might look different.
- If you want to reduce signal noise between the CCD and the micro you could use a differential pair between your CCD and micro boards with an op-amp on both sides. Basically leaving your CCD board the same but running a return ground tapped from the op-amp back to the micro board keeping the traces and wires in as close contact as possible the whole way. This would let you use longer wires between the boards without increasing EMF pickup and reducing EMF pickup overall.
- Another big win in noise reduction would be to sample at the full 133Hz and use a moving average algorithm (FFT-MA, DTFT, etc.) then send data at a reduced frequency to the PC.
- Look at the materials people use to blackout home theater TV projector rooms and maybe use it around the CCD and to capture the secondary diffraction rays, or to line as much of your box as possible 😁
Hi and thanks!
As far as I know, there are not so many well-documented TCD1304 projects out there. That's why I decided to do everything my way and then publish everything. Nevertheless, any idea is more than welcome. I am also still in the learning process and since no one "proofreads" my work, other than my viewers, I am really happy when someone comes with ideas or constructive criticism.
-I know that I lose range, but longer integration times easily oversaturate the sensor. The best would be some adaptive circuit, or a very fast 16 or 24-bit ADC where I can still keep a relatively large resolution (as compared to 12-bits) while not utilizing the whole range. The circuit I made was based on the expected range I am going to use for the CCD. So, it is a bit of a compromise.
-I will definitely try the differential pair. It is very useful especially when I need to run wires between the MCU and the CCD. Thanks!
-Unfortunately, I am not that experienced in the techniques you mentioned for reducing the noise. I know them but haven't used them. But hey, another opportunity to learn something new! But at the moment I do not need 133 Hz refresh rate anyway, so I am okay with the lower frequency of data transfer. Also, probably the USB communication could be written better by a more experienced programmer which could also help using a higher transfer rate.
-I will try to look up that material, thanks! I have another project with this CCD where it would be particularly important to line the inside of the enclosure.
@Curious Scientist I'm in software by profession and I've dabbled with micros and electronics stuff since before Arduino was a thing (or at least before it was popular enough for me to hear about it LOL). I'm in no way an expert but I've used all the techniques above and below (except the advanced moving average algorithms) and can probably dig up my old spice simulations / schematics for windowed op-amps and differential pair layouts if it'd help - but you can probably find good guides online these days too.
Re windowed op-amp. My point is you can use this architecture to fully utilize the ADC resolution when the device output isn't rail-to-rail. If the CCD outputs at the top rail when it saturates then you just stretch "down" and even clip off some of your noise floor, but I suspect the saturated output is read a good ways under 4091 - I'd be shocked if that laser doesn't saturate at any and all integration times. BUT if your going to implement differential pairs you probably won't need an explicit windowed amp.
Re smoothing / averaging, start simple. Moving averages are most useful when you are nearing your max frame rate - most accurately the simple solutions stop being effective. Some STM32 chips support ADC ”oversampling" modes where they sum N samples then you can read out and divide by N. Also, you can just do it in software, sampling the CCD at the full 133Hz then average and transmit at your ~17Hz resetting your counts every cycle.
ADC readout is subject to read noise from a lot of sources, many of which aren't actually from your input signal itself. Depending on your timing, layout, and op-amp choice you can easily lose a couple bits of precision. This can cause both noise and value drooping where even if the input is at the ADC rail you won't read max (or possibly min) value because the ADCs SnH (sample and hold) cap doesn't come all the way up in time. I haven't read over your code so IDK if the following will help, and isn't necessary unless you are really pushing the ADC architecture to its limit, but if your ADC sampling period needs to be significantly shorter than the CCD shift speed you can increase ADC accuracy by placing a capacitor on the ADC input right next to the micro coupled to your analog (not digital) ground. Choose a low ESR cap (X7R, C0G/NP0) with a value 100x -1000x the micros "sample and hold" capacitor. This will let the SnH cap come up to voltage quickly improving precision at short sample times. Of course the op-amp needs to have appropriate capacitive drive capability but SnH caps are very small. And don't try this until you are using differential pair - you want that cap close to both the ADC pin and the op-amp. This also helps overcome trace impedance and inductance but if done wrong can make things much worse. The micros datasheet should give you an idea of if you're pushing things to the limit or if you're well within high accuracy operation.
Anyway, I'm looking forward to seeing what you achieve with this, and other line scan CCD projects 😁
Grinding is good. A little bit of grinding and a little bit of paint make me the welder I ain't 😁 (say those of us who do some welding).
Really like the iterative approach you are demonstrating.
And the plotter is so responsive!
Haha, yes, there is always some way to fix things! :D
Thank you for the supportive words! I also prefer this iterative approach, because it is easier to make a little bit shorter (still quite long) videos, and I can always show some significant improvements. Hopefully, the next video in the series will be even more interesting.
Hello, I am a graduate student and I have found your work to be incredibly informative. Can you kindly let me know where did you purchase the optical bench, the diffraction grating, and the collimating mirror? Thank you.
Hi! I am glad to hear that my work is informative! I already wrote where I purchased the parts in one of my comments under the video. And the exact type of bench is also mentioned on my website.
Where did you get the spectrometer bench? I'd certainly like to buy one, please.
eBay.
Where can we buy the spectroscope optics?
Or do we have to buy the entire optics assembled only?
I bought the whole assembly on ebay as it is, without the CCD. And I told in my videos, in my articles, and also in some comments already. Search "optical bench" on ebay.
@@CuriousScientist Thank you. I'll try and find it. Thanks for the video as well.
Hi, very cool project! Is your GUI available for patreon members? I tried to make my own interface but it's not working well now.
Hi and thanks! The GUI is very specific for the code I developed for the microcontroller therefore I did not make it available.
@@CuriousScientist okay I see! Also, i just want to say PCB way is awesome. I ordered 5 of ur pcbs and they gave me 11 (6 extra).
Great! Yes, they often add a few extra PCBs to my orders as well. It is very nice to have those extra boards.
Where To Buy The Optical Bench Box From ??
Could Not Find it
Why do you spam the same question at multiple videos? I got it from ebay.
@@CuriousScientist NOT spam......Only desperate to Get The Answer...........Sorry 🙏
Repeatedly sending the same message is considered spam. At least by me, on my channel. I answered nevertheless, I hope you'll find the device.
@@CuriousScientist i am working to make a product out of this design , EBay has some Ocean Optics Used Optic bench , it is ok for prototyping but not suitable for production. Can u help me find some LONG term supplier for this item. Thank You
Sorry, but if you are trying to copy my work to make a profit out of it, I won't help you for free. You can hire me for consulting.
Very informative
Kindly send link for purchase czerny Turner spectrometer
Thanks! Unfortunately, the seller on eBay I bought it from does not exist anymore.
really cool proyet
Thanks!
do the parts come with the pcb?
No. I designed the circuit and PCB myself and then bought the parts separately.
@@CuriousScientist How about the outline metal plate for soldering? I just bought it.
What do you mean by outline metal plate?
@@CuriousScientist The metal plate that has the cutout of where you place solder paste evenly.
@@CoDBuffett Oh, you mean the stencil! You have to buy it separately, but it is really cheap. When you order the PCB from PCBWay, there is an option where you can select to add a stencil to the order. Make sure that you order the one _without_ the "framework". Otherwise, you'll get the stencil in a huge frame.
Great thank you
No problem!
Why don't you show us some spectums ? Seems important 😅
It's on my website, I measured a few LEDs in my previous video. Also, I need something more interesting to measure and at this point I don't have any other light sources than the lasers and LEDs. Plus, I need some more parts such as an optical fibre to make things work better.
@@CuriousScientist did you try any plasma lamp such as low pressure Sodium lamp or CFL lamp ? Thoes produce some nice and unusual spectrums (Na lamp produce two peaks fairly close one to the other. It's ideal for demonstrating the accuracy of your product)
Love your work 😄
Hi! Thank you! :)
I haven't tried them yet, but I definitely will! I am actually making a list of light sources and I will test all of them in a single video. As I said, I am also planning to buy an optical fibre, plus, I want to buy a few cuvettes, so I can also test liquids and their absorption. I also picked a few lasers to calibrate at more wavelengths from Thorlabs. I just need some time for it because I cannot afford buying everything at once.