Engine Cylinder - Internal Photography

I got my hands on a project where I need to design a standardized way to secure and take pictures of the insides (exhaust/intake ports) of some 2-stroke engine cylinder.
I have SEVERAL engine models with different design and sizes, which I'm going to choose one for a tryout.

The product shall have the following requirements:

  • It needs to be as autonomous possible, so, the operator only places the cylinder on the apparatus and It captures and save the pictures without intervention.
  • The pictures must be standardized, taken from the same place, lighting, and FOV
  • Pictures must have enough data to use as input for machine/deep learning neural networks.

So, for the first requirement, I'll mill a Nylon negative of my cylinder, so it will be held in place in a secure way, then use a servo controled shaft that will be able to move and rotate in the Z-axis to descend into the cylinder cavity and stop at the height for the first opening, take the picture, then descend and rotate to capture the next opening. After finishing all preconfigured image captures, it will rise and wait for the next cylinder.
So, this part is fairly well designed, although, I'm open for suggestions.

The next step Is my issue. I need to have a camera that is small enough to go into the cylinder, is free to rotate and able to focus at the openings. The internal diameter of my smallest cylinder is about 30mm and the largest opening is 20mm x 15mm (on the perimeter), so, I might need a large FOV and be able to focus in a really short distance. Also, the cylinder insides are chrome-coated, thus, really reflective.

So, my Inquire is, what kind of sensor/lens should I use, and some hints on how to capture and save/export the images for further analyse.

Also, I attached some images taken using the actual technique.

Imagem1.jpg

Imagem2.jpg

Imagem3.jpg

Imagem4.jpg

Imagem1.jpg

Imagem2.jpg

Imagem3.jpg

Imagem4.jpg

There are lots of experienced and knowing helpers answering without being payed but the main goal is to help beginners in their attempts to build stuff. You can say it's a Forum for newbies and hobbyists.

What You ask for is advice on the highest possible level regarding petrol engine development. Try to connect to motor designers available, Chrysler, Ford, Rolls Royce, BMW.... You name them.

Don't ever tell You asked questions in an amateur forum if You want to have any future in Your business.

Well, In fact It's for my final thesis as prerequisite to graduate in mechanical engineering.
My area of expertise is on machine learning/deep learning and I'm seeking help to aquire data for it.

So I'm asking in a begginer/hobbyist way, how to take such close pictures in a reflective environment using Arduino. Is it possible?

Have you considered using a Raspberry Pi for this? These come standard with a ready-to-go camera connector, and the cameras are small and readily available. They have a fairly wide field of view which will generally translate to greater depth of field. If I were doing this project, that is definitely the direction I'd try first. A lot depends on the focal length and level of detail that you want.
S.

Forget about the usual Arduinos. They are not fit for handling pictures. A picture is built from a lot more pixels then the memory of a "toy Arduino" can handle.

Why not connect the camera to the PC for further processing?

I don't know about Arduino programming (and doubt it can be done with Arduino, at least the image management part) ... but about the camera itself, you say it must rotate, this exclude the bare camera modules from cellphones (too much wires), but there is some 8mm dia boroscope / endoscope 1080p cameras with 8 leds around with USB interface, and a piece of surface-coated mirror will turn 90 degrees the direction of sigh, and havin only 4 wires you can made the support in a way that it contain enough cable for rotate without rip ... or as alternative, use a slipring unit for transfer the signal , this way the camea can rotate all the turns you want ... just use a slipring unit with 8 or 12 contacts (so you can use 2 or 3 contacts for each cable ... redundance is always a good thing, and multiple contacts in parallel reduces the risk of disturbs too :wink: )

You do not mean a real combustion engine in action, do you? Then you can make the engine move a bit for each single exposure, and move the camera to whatever place at whatever route. Have a left half and a right half of the cylinder with no obstacle between the camera and the hardware.

Wouldn't it be easier then to use a CAD program for the construction of the views to take?

srturner:
Have you considered using a Raspberry Pi for this? These come standard with a ready-to-go camera connector, and the cameras are small and readily available. They have a fairly wide field of view which will generally translate to greater depth of field. If I were doing this project, that is definitely the direction I'd try first. A lot depends on the focal length and level of detail that you want.
S.

The original Idea was to use Arduino to control the servos and a Raspberry Pi to detect the images. But, before detecting, It's necessary to train my neural network which needs a really powerfull PC, which needs at least some hundreds of pictures.
I've never considered using the Raspberry Pi for both servo control and data analyse, does the Raspberry capable of controlling two servos at once? I had the impression that it is way more "fragile" than the Arduino and servo-controlling was quite demanding. If possible, it would be easier as I wouldn't need to make them work together.

DrDiettrich:
Why not connect the camera to the PC for further processing?

The pictures shall be taken from the image capturing device and loaded into a PC for further processing, The neural network training is a really demanding process, but, after the model is trained, a raspberry PI model 3 can detect images with over 1 FPS which is way better than I need.

Etemenanki:
I don't know about Arduino programming (and doubt it can be done with Arduino, at least the image management part) ... but about the camera itself, you say it must rotate, this exclude the bare camera modules from cellphones (too much wires), but there is some 8mm dia boroscope / endoscope 1080p cameras with 8 leds around with USB interface, and a piece of surface-coated mirror will turn 90 degrees the direction of sigh, and havin only 4 wires you can made the support in a way that it contain enough cable for rotate without rip ... or as alternative, use a slipring unit for transfer the signal , this way the camea can rotate all the turns you want ... just use a slipring unit with 8 or 12 contacts (so you can use 2 or 3 contacts for each cable ... redundance is always a good thing, and multiple contacts in parallel reduces the risk of disturbs too :wink: )

We have an endoscope, It was able to take some good pictures but I couldnt padronize it, as It's a quite expensive equipament and I cant "modify" it.
I tought of having a hollow shaft with the camera on its end, "filled" with cable to not rip as the motion is 0-360 at most, there's no need for multiple revolutions. Maybe a Cellphone camera might be an option then, they have auto focus, doesn't they? The problem would be the FOV and If they are able to focus in a curved and reflective surface 20mm away.
The idea for the sliping unit is quite intersting for an final product, which isn't the case, I need only to capture some images to get to prove that my neural network "works". If it does work and (hopefully) someone notice it, I might suggest using this aproach for a more robust option.

DrDiettrich:
You do not mean a real combustion engine in action, do you? Then you can make the engine move a bit for each single exposure, and move the camera to whatever place at whatever route. Have a left half and a right half of the cylinder with no obstacle between the camera and the hardware.

Wouldn't it be easier then to use a CAD program for the construction of the views to take?

No, not at all. I got a bunch of engine cylinders that "Failed" at some point, and most of them are brand new, but due some manufacturing problems they didn't meet the standards for real usage. So, my undergrad final essay is to analyze the cylinder using a neural network to indentify potential manufacturing defects and classify them, so, with enough data, aprove or reprove a cylinder during the manufacture (If a company see potential on that).

Railroader:
Forget about the usual Arduinos. They are not fit for handling pictures. A picture is built from a lot more pixels then the memory of a "toy Arduino" can handle.

I had the impression we could attach a "camera shield" to it to be able to capture an save images on a SD card or smth. I might have gotten the wrong idea.

You can control servos from a Pi. Adafruit has some tutorials on the topic. Generally, the Pi can be problematic if you're controlling hardware that relies on precise timing because of its multitasking O/S. Those tutorials show you how to overcome this for servos.

valterfsj:
... but I couldnt padronize it, as It's a quite expensive equipament and I cant "modify" it...

Times ago, yes ... but actually they have decently lowered prices ... :wink: ... as example this one say 2MP 1080P ... this other, more big diameter, say 5MP and autofocus (but i really don't know if is true, anyway is a price that can be risked, if the project is important enough) ... these are only reference links, i'm sure you can find similar ones also more cheap in your country ... here in Italy prices are usually higher than in other countries, due to lot of taxes, taxes, taxes, and, yes, also taxes :slight_smile: ...

Maybe a Cellphone camera might be an option then, they have auto focus, doesn't they?

Some yes, some not, but usually they have a lot of connections from camera module to cellphone mainboard ... probably for some tests are better webcams from broken laptop (or found as spare parts for laptops built-in webcams), cause 90% of them have USB interface onboard (so just 4 wires, the ones from mic if present and separated from USB can be ignored) ... but they don't have usually built-in leds, need to add them, and also defocus for change the distance ... careful to do, cause most of these objectives are glued ...

valterfsj:
I've never considered using the Raspberry Pi for both servo control and data analyse, does the Raspberry capable of controlling two servos at once? I had the impression that it is way more "fragile" than the Arduino and servo-controlling was quite demanding. If possible, it would be easier as I wouldn't need to make them work together.

I'm not sure what you mean by "fragile," but this was not my impression. However, it does use 3.3v logic, which you need to translate to 5v for the majority of sensors. Annoying but not really a problem. You build a small board with an appropriate number of logic translators and be done with it.

I also find Python to be easier coding and ...somehow... less error prone than C. But that may just be me.

S.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.