"Advanced Image Sensor Applications in Industrial Monitoring"

Mod edit:
@kimbomc and @psyar15 are father and son, so it is legitimate that they are both asking about the same thing in the same topic.

Hi all,

I'm looking for help/advise working with a S11108 is a CMOS linear image sensor. My son is studying computer science at university who has been helping. We are using the S11108 to scan a moving object which is a plastic tape like product that has a gap in the middle running down the length of the material. The gap changes changes size and we would like to monitor this. Please see my circuit design and arduino sketch attached. I believe the sensor is capable of doing the job. However we are doing something wrong with regards to the programming or maybe circuit design. For whatever reason we don’t seem to be getting anything on the video output line or end of signal line after S11108 sensor. Could anyone on here point me into the right direction as to what the problem may be? Any help would be much appreciated.

Regards

Christopher

Google drive link to schematic and sketch: [insert link]CMOS CCD design stuff - Google Drive

Attachment.png

The forum has many other poster who post their documentation and schematics, etc. right on the forum so everyone can see them. Why don't you try to do the same?

1 Like

I would guess that an Arduino Every would be hard pressed to do things at the 200kHz minimum clock speed of the S11108.

The code is essentially unreadable. For example, TCBn_init() describes every bit it sets in the peripheral registers, but not what the end result is supposed to be :frowning:

First, get the sensor working as intended. These are rather complex devices, and if the timing is not correct, you won't see anything useful. These intro projects to using the similar TCD1304 with Arduino might be helpful:

It looks like you are attempting to use the obsolete, slow, non-rail to rail LM358 op amp as a comparator. Very poor choice. It is barely useful as an audio amplifier.

Thank you for your reply, I’m really stumped with this. Do you have any recommendations on an op amp I could use? I’m by no means an electrical engineer and most of my experience lays in software development.
I also have seen some stuff online about the Arduino Nano ADC not being quick enough to keep up with the video rate of the ccd, do you know anything about this?

what is the width of this gap?
at what speeds does the plastic tape move?
It might be nescessary to use this S11108 20248 pixel image sensor
but what are your minimum-requirements for

In the sense of resolution in mm or micrometer that you like to detect
Do you just want to monitor the width of the gap
or
do you want to monitor the width and the length of this gap?
I haven't looked into the details of the image-sensor but they mention


So this means you have to create a minimum 200 kHz clock-signal
and I guess then read in the output of the OP-Amp each pixel
The datasheet provides an example circuit which uses an LT1818 as OP-Amp

As this 200 kHz mimium-clockfrequency is pretty high I would recommend using a raspberry pi or a teensy 4.0 as the microcontroller.

If you take a close look at this schematic you see that there is a 74HC451 at the clk and start-input

and they use the same for 74HC451 for the outputs Trig and EOS
image

I assume that your microcontroller has to create the signals for

  • the start-input
  • the clock-input

and has to read the

  • trig-output
  • and the EOS-output

So controlling this linear image-sensor seems not trivial.
This is the reason why I am asking for your requirements.
Maybe a less complex sensor would be sufficient.

The datasheet has a lot of diagrams for signal timing and output-wave-forms etc.

best regards Stefan

1 Like

It helps if you study the data sheet and understand what is needed to operate the device.

1 Like

Thank you for your incredibly helpful advice

Hi Stefan,

The size of the gap that I'm measuring ranges from 0.5mm to 6mm with +/-30um accuracy. We only want to use the linear sensor to measure the width of the gap as it is important that this gap remains within the mentioned tolerances.

I'm managing to generate the frequency and duty of the clock and start pulses but I think I'm having issues with the shape of the wave as it appears there's some kind of "bouncing" in the signal generated.

I've also checked the video and EOS line and both have no output. There is a very likely chance that either my timings are wrong or that I'm using the wrong circuit as I have noticed in the datasheet that both my opamp is different and I'm missing the non-inverting buffers from both my inputs and outputs.

Regards

Christopher

I assume you are being sarcastic.

The datasheet is your friend, and even a glance at it should have raised questions. Fortunately you have some eyes on this here who have noticed

1- You need to receive and at least minimally process 200000 pixel datas per second. This makes using the Nano Every a challenge. Without some work, I would say it is not likely to be up to the task.

The Nano Every is a poor choice for many things just now. Ppl think it's just another Nano, then are surprised to find it is enough different that projects are sidetracked by a certain kind of excitement that one doesn't need.

2- They used buffers on the example circuit inputs and outputs. It is not clear why, but it is foolish to deviate, without knowing what you are doing, from a manufacturer's reference design.

I would bet most ppl using the chip start by slavishly implementing anything they can find already working, and move on from a first success milestone. Even maybe especially real engineers.

3- the reference design uses an opamp. It is reasonable to assume they selected the one in the circuit according to the criteria for such an amplifier stated in the datasheet.

a7

1 Like

You can buy the op amp used in the recommended circuit. The LM358 is totally inappropriate for this application.

Start by building the recommended circuit, including all of the required decoupling capacitors (lacking from the circuit first posted) and STRICTLY follow all the signal timing restrictions.

1 Like

Thank you for your reply, I had originally spoken to a freelancer/electrical engineer about this project and he had recommended this opamp and circuit. As mentioned above I'm a software engineer and foolishly followed the advice to use the lm358.

I guarantee you that this person has no idea what he is talking about. You are getting better advice here.

very likely that he has a too low knowledge. Maybe his choice was based on too less informations especially not knowing what high frequencies are required in this project.

1 Like

Thank you for your reply, I do appreciate all the help. My sarcastic response earlier was to the assumption that I hadn't already tried to understand the datasheet. As previously mentioned I am not an electrical engineer and have no background in electronics or circuit design which should be evident by the fact that I am asking such simple questions.

In regards to the board, I have seen the teensy 4.x boards mentioned especially for high frequency work. Would this board be better suited to the sensor I am working with?

I deviated from the design as I had consulted with someone who claimed to be knowledgeable with circuit design and since I am not well informed I came here for help once the circuit they had designed didn't work. I will make the circuit mention in the datasheet and post an update once completed.

I have learnt a lot from these forums about electrical and low level software engineering.

Many thanks,

Christopher

Hi @kimbomc

sorry for posting details you seem to have managed already.
I did not lookup your code and did not analyse much of your circuit.
Your text sounded like real newcomer.

Do you have a 100 MHz 1 GS digital storage-oscillosope? This would be extremely helpful for analysing.
If you can afford $300 you should buy one.
If not you can afford to buy an oscillosope at least buy a 24 MHz 8 channel logic analyser

If you look on ebay you may find one at even $12 or $9.99

The digital storage oscilloscope (in short DSO) will have the advantage that it can show the voltage over time as the voltage is rising / falling. With the logic analyser you will only see LOW/HIGH but not how the signal is rising/falling.

Yeah, those run much faster, and I can only guess would make it easier or even possible to do the necessary processing.

It might still need to collect a full line before you loose your gap-spotting algorithm on it.

One note about the Teensy - it is a 3.3 volt Vcc device. The sensor is a 5 volt device, so you would need to convert logic levels betwixt the two main components of your system.

This might dovetail perfectly with their use of buffers - a single IC package could probably fix up all you logic level problem while simultaneously providing the (required?) buffering.


Now is plenty soon enough to worry in parallel about that processing.

You can simulate variously the computational tasks and get a feel for whether you are barking up the right tree or not.

Leave the sensor out of the circuit and see about clocking in a line full and processing it or storing it for subsequent processing.

There is still the question of different ways to solve your real problem. Some might be superior for a reason or two.

I think you or your father is the software guy, so maybe you've got that covered better. Nevertheless, this may be enough outside the wheelhouse that you continue to present progress here and seek advices.

Good luck! Although luck should not enter into it.


+1 for the inexpensive logic analyser @StefanL38 mentions. Do not be mislead by the stupidly low price. I have one and my "real" logic analyser is getting a bit of a rest as for most things I seem to be doing these days the cheap one is perfectly adequate.

a7

Thanks for your recommendations. I do in fact own a digital oscilloscope which goes up to 100MHz which has really come in handy with this project.

Hey a7,

Is there a maybe a recommended circuit example I can look at which shows two different logic levels as I would like to learn how to design circuits like this.

Thank you for your help with this at the moment, I will put a list of components together and assemble the recommended circuit and keep you guys posted.

Regards,

Christopher

Again, study the data sheet. The sensor will work with 3.3V logic levels.

The analog (video) output is 1.7V maximum, 0.5V minimum.

1 Like