Advertisements

She Lives! 8-Bit CCD Driver Circuit TCD1304DG…

Update#6

Time: 3:43:PM 07/17/2017

Description of operational aspects of the 3D Printable Raman Spectrometer
Operational Manual Part I

PNG interface PCB july17 pic 2

I am including this brief explanation for some of the operational aspects of this project, so it’s functions and interconnectivity is less ambiguous.

There are 2 MCU’s that control the units overall functions;

This was necessary in order to operate the turret grating mount system, by using 3 holographic diffraction grating of various line resolutions ranging from 1200 ln’s to 2400 ln/mm, a wide range of wavelengths can be achieved on the “fly” so to speak, without having to physically open the unit up and change it, who would ever want to do that?

The Mega 2560 was chosen because it is a low cost and efficient MCU with sufficient PWM and digital int pins that fit well with the design of this project.
Second, I could not drive the CCD and MTR control all with the
Atmega 1284.

This was chosen for good reasons, the ATmega1284P is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture by executing powerful instructions in a single clock cycle, the ATmega1284P achieves throughputs approaching 1 MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.

The ATmega1284P provides the following features: 128K bytes of In-System Programmable Flash with Read-While-Write capabilities, 4K bytes EEPROM, 16K bytes SRAM, 32 general purpose I/O lines, 32 general purpose working registers, Real Time Counter (RTC), three flexibleTimer/Counters with compare modes and PWM, 2 USARTs, a byte oriented 2-wire Serial Interface, a 8-channel, 10-bit ADC with optional differential input stage with programmable gain, programmable Watchdog Timer with Internal Oscillator, an SPI serial port, IEEE std. 1149.1 compliant JTAG test interface, also used for accessing the On-chip Debug system and programming and six software selectable power saving modes.

Ok, these are the brains behind the brawn of the system, in the examples below I will illustrate that the LED is not on the PCB, but routed to the front panel PWR indicator LED (yellow,) nor are the pwr plugs required on the PCB’s unless you want them there, because there connections are also routed to main power.(UR only saving 0.60 cents per board?) Figure. 1 below

figure 1 Y LED PWR route

The 4 Indicator LED’s to the left, are routed to the LCD control interface panel

figure 2 4 LED routing

Both MCU’s are routed to main PWR (12vdc 1.5A), as seen in figure. 3

figure 3 PWR routing

The power supply may look a little odd, (it is a pwr supply from Vonage,) I had an extra one and metered it out and it was exactly 12.13 vdc, pretty darn good, and it has been operating very well for awhile now, so I trust it!

You would be surprised how many plug-in power supplies you can meter out and 99 percent of them are no where near the voltages they claim to be, (so much for the “UL” ratings…Ha ha)
Well, this concludes part I of this operation manual, I am at 95 percent project ready test mode, where the rubber really needs to hit the road…its called data!

12vdc pwr supply

Part II of the operations manual will be very in depth, because it deals with the optical aspects of the design, and how there are no work around’s with the quality of optical equipment used. All this will be discussed in detail in my next posting.

The proof will be in the proverbial pudding 🙂


Well, after careful consideration and inspection of my design I took the advice I was given and re-designed the entire circuit, I had to manually place the components on the board instead of using the auto placement feature in DesignSpark.

This may have been the problem, it arranges the components in the most optimal way yes, but does not take into account any analog to digital cross talk situations, if it does, I haven’t found it, anyway’s I finally got it done and did a 3D rendering also, which actually helped a lot in recognizing some further mistakes that I was able to rectify quickly.

So here it is:

3D PCB view 1A

( The blue lines represent bottom copper and the red lines are top copper in the image below)

3D PCB view 1B

I re-checked and updated the schematic for the 8 bit driver just to be doubly sure this time that there will be no further problems. So I am uploading the updated schematics today, the PCB is still the same so it’s gerber files are fine and no further changes are needed.

8Bit schematic july15 PNG new

Please check out my picture gallery to view these images in their full size 🙂


Update#3 Early this morning I fitted my entrance slit with a #3 variable adjusting Polarizing filter (30 mm diameter,) which I can turn from 0 deg to 360 deg open or closed depending on how much light I want to enter.

These two spectral images are the results from those tests this morning:

NEW spectral pics july 15 2

I used another CFL lamp with the same rating as the overhead lamp from before, only this one is portable, and as you can see from the data description it is only 8 cm from the slit, but now I can adjust the polarizing lens to let only a certain amount of light through.

Keep in mind now, that the spectral image is is not bounced off of any diffraction grating, just straight through the monochromator, this is just fine though because the slit length is only 2 mm in length and a width of only 0.1mm, so the peaks are sharp and well defined.

The SNR (signal to noise ratio is well within the expected range I thought it should be in,) I will be making another post soon explaining how the SNR works and how to calculate it, it is crucial, and you need to know it 🙂

This spectral image was taken with a factor of 075 deg aperture opening.

The next spectral image panel has an aperture opening of 025 degrees;

NEW spectral pics july 15 1

 

A side by side comparison of the difference between the two spectrum’s and the effect that time has photonic accumulation on the CCD’s substrate.

UPDATE#2 I uploaded the fixed gerber files for PCB manufacturing.

UPDATE: I almost forgot to tell everyone, the spectral images are inverted but not to worry, this is the formula that will turn it right side up:

(10ᶺ(-B2))*100

The “-B2” is just the cell# in the second column in Excel, you would input this in that cell# and copy it down the entire path of data in that column, and it will transform the inversion to Transmission data.

Well, it..is…ALIVE! I had to de-construct the PCB files, I made a terrible mistake that was costly, so I rebuilt the circuit on my breadboard and she runs beautifully 🙂 I have fixed all the gerber files and will upload the updates. 1st things 1st…here are the first test spectra using a CFL lamp at 7.5ft (228.59cm) overhead room lamp:

CCD pic 1

This was done with an integration time of 0.25 sec

CCD pic 2

This is an integration time of 0.5 sec, since this is the first time I have ever worked with a CCD chip, I was pleased with how the longer integration times brought about a higher resolution factor to the spectral image.

Which was exactly what I was hoping for. I just didn’t realize just how photo sensitive the actual TCD1304 chip really was.

The next set of images are of the circuit build on the breadboard, and I’ll discuss each panel;

CCD pic 3 This is the breadboard setup, I had to do this because when I got the PCB’s in and put one together, I immediately knew something was wrong! I traced every line on the pcb itself for any manufacturing errors, but upon closer inspection of my design spark schematic, I saw what happened.

Not paying attention…to detail 😦 Lesson learned, actually I’m happy that I did it this way because I was able to make a couple of design tweaks that helped settle some noise issues that I fixed on the new design. I moved the 0.1uf caps closer to pin’s 11 and 12 of the ADC0820 and brought the LM324J closer to the ADC to eliminate any ringing.

On the new PCB design I rearranged the components a lot closer to each other. So the new board dimensions are now; 88.99 x 80.01 mm, pretty compact and it fits nicely in the slot designed for it in the spectrometer’s enclosure.

CCD pic 4

Here is a close up of the LM324J and the ADC0820CNN+ chips.

CCD pic 5

Here is the FTDI serial communications device that will be used (compliments of SparkFun’s basic breakout kit.)

Now, below is the schematic I made on DesignSpark and a full operation explanation;

8BIT schematic PNG2

Now here is the meat and potatoes of the whole setup, this is a quote from Dave Allmon, the original designer of this circuit, I have been working with him for some months now on this particular circuit, for my spectrometer project and this is how the hardware and software aspect work;

“This unit captures all of the TCD1304’s 3648 pixels using the ADC0820 8-bit half-flash converter. The time to digitize a frame is 32mS. At 115.2kBaud it takes a couple of seconds to download a frame.

Hardware
An ATmega1284 was chosen as the microcontroller. It has 16kB of RAM, which is double the Arduino Mega2560. The sensor is the Toshiba TCD1304AP, a 3648 pixel linear CCD sensor which operates on a single voltage (3.0V to 5.5V). The sensor is driven directly by the microcontroller, and the analog output is buffered by a transistor and an op-amp. The signal is digitized by an AD0820 analog to digital converter.

The ADC0820 has + and – reference inputs, and this design takes advantage of them. A pot is used to set the maximum range of the ADC, and another pot sets the minimum range. In this way you can tune out the unused portion of the range and get all 256 values from the ADC.
The things that set this spectrograph apart from the last one are its ability to read all 3648 pixels from the CCD, and read them faster than the previous version. Because the AD0820 is so fast, I was able to tighten the code up and get all of the pixels read in 32mS. It reads 3694 pixels, but the first 30 and the last 16 are dark reference or dummy pixels and are discarded.

The Mclk signal has increased from 380kHz to 470kHz on this version.”

8 bit PCB pic 1 july 13Above is the updated PCB for the 8 Bit driver circuit board and at the top of this page is a link that will take you directly to my spectrometer project at Hackaday, where you can download all project files including codes and all pcb gerber files.

References:

http://davidallmon.com/pages/adc0820-spectrograph

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

El sabañon

Blog de Adrián Gastón Fares, director de cine y escritor argentino (nacido en Buenos Aires, Lanús)

TheKushOfficial

Thoughts Explorer

Sara in LaLaLand

Welcome to my world.

Happiness Between Tails by da-AL

Arts + Cooking + Dancing + Joy + Writing + Tales + Tails

Servants of Charity

The Whole World is Your Homeland

thinkinkadia

Challenging ideas are explored to see new actionable perspectives on relevant social issues, in this traveler space.

Bozziy

Reviews, recipes and photography...

Travel to Russia

Alex Markovich, 39 y.o. male living in Russia. A photographer, writer, and lecturer, as well as translator. A regular guest on “Radio of Russia” and other radio stations. Main subjects of the programs: “Traveling through Russia” and “Photo Art” (Alex arranges photo exhibitions in various Russian towns and cities, as well as abroad). E-mail: travel.with.markovich AT gmail.com

%d bloggers like this: