Cameras and Lighting

541 views
Skip to first unread message

Wayne Black

unread,
Feb 12, 2022, 11:05:29 PM2/12/22
to OpenPnP
I have a converted CHMT36 using new digital cameras and controller board. Things are working ok, but a limitation I'm running into is the poor lighting for the top camera. It manifests as not detecting tape holes intermittently.

As I've been looking into camera/lighting options I have found a couple cameras that offer color and global shutter + triggering. Would triggering essentially eliminate the USB bandwidth issue when using color, high megapixel/fps cameras? Am I understanding correctly that at triggered camera will only capture on command if set to do so?

Is color preferred for the top camera vs monochrome?

For color camera lighting is RGB or RGBW preferable to 'white' LEDs? Is it the same for monochrome cameras?

mark maker

unread,
Feb 13, 2022, 4:02:02 AM2/13/22
to ope...@googlegroups.com

> As I've been looking into camera/lighting options I have found a couple cameras that offer color and global shutter + triggering. Would triggering essentially eliminate the USB bandwidth issue when using color, high megapixel/fps cameras? Am I understanding correctly that at triggered camera will only capture on command if set to do so?

Theoretically perhaps, but I'm not sure this can be done practically. OpenPnP can currently only capture video streams, so if the camera was "streaming" only triggered images, it could perhaps be done, perhaps not (OpenPnP assumes a high FPS video stream, so it is not particularly careful, never to waste a single frame). Triggering also brings other problems/questions, like how camera settling is supposed to work.

https://github.com/openpnp/openpnp/wiki/Camera-Settling

> Is color preferred for the top camera vs monochrome?

If you want to use some of the advanced feeders, yes. Some of them work with color-keying. Plus I think the days are gone when monochrome cameras had any great advantages.


> For color camera lighting is RGB or RGBW preferable to 'white' LEDs? Is it the same for monochrome cameras?

RGB/RGBW leds are usually high frequency PWM'd, AFAIK without any current smoothing applied, so there might be problems with brightness stability, even/or especially with global shutter. But there are different frequencies used by different RGB driver ICs, very high frequencies ones might be OK. I think there are some OpenPnP users having them, so they should speak up.

Given a color camera, any color cast you could create using RGB control, can also be applied in the captured image, in software. I've learned a lot about that when I implemented OpenPnP side White Balance:

https://github.com/openpnp/openpnp/wiki/Camera-White-Balance

So I would prefer color camera + high CRI LEDS.

_Mark

--
You received this message because you are subscribed to the Google Groups "OpenPnP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/57cf75de-8c09-4baf-bb7a-7567d4ff5199n%40googlegroups.com.

Ian Arkver

unread,
Feb 13, 2022, 4:38:53 AM2/13/22
to OpenPnP
I use a couple of RGB LED rings, mostly because they were cheap and simple to mount. I used to have RGB control of them but subsequently simplified it to an on/off (0,0,0 -> 255,255,255). It was unclear to me there was any advantage in coloured illumination, but then I didn't do a lot of tests on it.

Since the RGB LEDs are full-on, I don't see any PWM artefacts. The illumination I'm seeing from frame to frame is constant. My cameras are both rolling shutter, but I also don't notice any variation in illumination across a single frame. I don't use auto-exposure.

I'm not convinced about the need for high-CRI illumination. This is basically the evenness of the spectrum, with wideband energy rather than a few peaks. RGB LEDs are obviously not high-CRI. However the sensors we use have RGB Bayer pattern filters, so themselves are only sensitive to three peaks. This is machine vision, not art restoration by human eye.

Regards,
Ian

Wayne Black

unread,
Feb 13, 2022, 11:48:09 AM2/13/22
to OpenPnP
Thanks to you both.

@Mark, I found two industrial camera makes with color/global/triggering. By no means 'cheap' but very interesting in that they appear configurable via python/opencv and propriety SDKs. 

MSHiWi "One computer to connect multiple cameras. It only needs one ordinary USB3.0 HUB to realize four 5MP cameras to 15FPS frame rate at the same time". This interested me as I'm currently consuming x2 3.0 USB ports for both cameras I use.

I wound up ordering the See3CAM_24CUG to more or less play around and learn more about machine vision. This one appears to have a more comprehensive documentation. If I read correctly, streaming and still can be triggered via IO. Again using a single USB port vs tying up 2 for vison is very appealing to me.

Ian Arkver

unread,
Feb 13, 2022, 12:54:32 PM2/13/22
to OpenPnP
I have (at the moment) got that the same AR0234 camera module, though I have the MIPI version, not the USB3 version. It seems like a nice sensor.

Note that with MJPEG you can stream two cameras over USB2 without issue (I believe). Since this is a USB3 camera then MJPEG streaming will be trivial and even raw YUV should work with multiple cameras.

Regards,
Ian

mark maker

unread,
Feb 13, 2022, 2:02:55 PM2/13/22
to ope...@googlegroups.com

> Note that with MJPEG you can stream two cameras over USB2 without issue (I believe).

In case of the recommended ELP cameras, that's true for the 720p model, but not for the 1080p model, which has double the resolution or double the fps and therefore logically need double the bandwidth.

https://github.com/openpnp/openpnp/wiki/USB-Camera-Troubleshooting-FAQ

_Mark

Jan

unread,
Feb 14, 2022, 4:17:01 AM2/14/22
to ope...@googlegroups.com
Hi Wayne!
I've the same issues and designed a ring light that shall fit into the
tube of the camera. My fov is a little bit narrow (with the default 8mm
lens) so lifting the camera up to make space for the light will be ok.
The PCBs are in the mail. If you like, I can share the design (it
consists of 8 white leds on a 2.5mm wide ring with 26mm outer diameter.
I can provide Altium and paneled Gerber data).
Btw: is there a space wire going all the way up to the head I can use
for the lights? I know that there are space wires through the first drag
chain (Y-Axis), but unsure if any is soldered to the X axis?

Jan
> --
> You received this message because you are subscribed to the Google
> Groups "OpenPnP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openpnp+u...@googlegroups.com
> <mailto:openpnp+u...@googlegroups.com>.
> <https://groups.google.com/d/msgid/openpnp/57cf75de-8c09-4baf-bb7a-7567d4ff5199n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Wayne Black

unread,
Feb 14, 2022, 11:47:04 AM2/14/22
to OpenPnP
Thanks Jan! 
RE cameras, lights
Id be interested for sure in the PCB. I went digital w the cameras and opted for this one for the top/down camera. The aluminum housing is pretty robust and mounts very sturdy to the CHMT head, but its not perfectly perpendicular to the machine bed. I played around with taping an endoscope with variable lighting to it, but the direct angle of the light casts hotspots all over the PCB being worked. I ordered some flexible white LED strips where Im going to attempt to make a 'cone' around the lens.
20220214_081215.jpg

RE Spare Wires
Yes, IIRC there is actually two spare conductors within the wire bundling running from the control board all the way to the head. At least this is the case of mine. They are cut short and may not be exposed without cutting/peeling the bundle cover back a bit. To use them you will definitely need to butt splice addl wire to them to use them. IIRC the individual conductors are 24awg. 

Heres the last last schematic I did for my current setup, it doesnt show the spare conductors, but Im pretty sure they're there. I can confirm this for you later in the week if needed.
Schematic_36VA_2022-02-14.png

bert shivaan

unread,
Feb 14, 2022, 12:27:49 PM2/14/22
to OpenPnP
That is an AWESOME schematic Wayne, WOuld you be willing to post all your config here as well? I am going to try and get the Wikii up to speed for Duet and this would help tremendously

To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openpnp/b2abbb8b-99fd-4375-aec0-8ff095a1bed2n%40googlegroups.com.

Wayne Black

unread,
Feb 14, 2022, 12:54:09 PM2/14/22
to OpenPnP
RE duet config
Sure, but let me clean it up a bit. I originally did the config for a Duet min 5+, then did it for a 6HC using only onboard drivers, then did it for the 6HC with CAN expanders... Point being I have a ton copy pasted personal comments that aren't accurate. All that said, the Duet/RRF3.3 all works very well with Openpnp. Let me me distill it down to the basic config wo my personal notes.

Lastly, the schematic I posted above, I just copied the essential schematic without a bunch of notes I had on it. In doing so the schematic software updated some of the 6HC numbering which is not accurate. If this is going to be passed around I should probably clean of that too. I used this to do my initial hook up and it may not be fully updated to my config

Again, use/verify the info here at your on discretion.

Wayne Black

unread,
Feb 16, 2022, 11:05:59 PM2/16/22
to OpenPnP
I rec'd following email from ECON. They appear pretty proactive to promote/support their product;

Hi Wayne,

Good day!! Hope you are doing great.

I tried reaching you at #-###-###-#### but couldn’t connect.

Firstly, I would like to thank you for purchasing e-con’s 1 # See3CAM_24CUG_CHL_TC_BX . Your product will be shipped at the earliest. You will get the shipping/tracking information from my logistics team soon.

Secondly, I visited your website and I’m impressed with Blackbox’s range of products.

I feel there is a good opportunity for e-con to work on Blackbox’s camera/vision needs. And I’m sure it’s going to be a win-win for both our companies, as we can help you with our 18+ years of camera expertise (camera design, sensor expertise, hardware customization, software development, integration, etc) and in turn, we get to work with a client like you.

In addition, we offer 2 weeks of technical support to all our clients by assigning a dedicated technical resource who would support all the camera technicalities. Please let me know if you want me to introduce the technical resource.

It would be great if we could get on a quick introductory call so I can understand your application better and align e-con’s support system accordingly.

I’m open for a call any day, in the morning PST. Let me know your convenience. Once confirmed, I’ll share the meeting invite.

Looking forward to hearing from you.


I also rec'd a passcode for the dev suite. Ship date is quoted 2/28 and is coming to US from India so well see how shipping goes. 


Jan

unread,
Feb 23, 2022, 5:55:14 AM2/23/22
to ope...@googlegroups.com
Hi Wayne!
Many thanks for your schematic on the wiring. I've now installed a
ring-light on my camera using the two spare wires (wire/purple and
yellow) (Just for reference: this two are cut short in the split between
the wires going to the dragpin and thus for the vacuum at the head). I'm
still using the original camera mount with the digital camera that Eric
suggested
(https://mcuoneclipse.com/2020/05/03/retrofitting-a-charmhigh-chm-t36va-machine-with-openpnp/)
The camera is a bit noisy compared the to ELP I'm using as up-looking
camera, but ok.
I've pushed my ring-light at https://github.com/janm012012/Ringlight.

Jan

On 14.02.2022 17:47, Wayne Black wrote:
> Thanks Jan!
> RE cameras, lights
> Id be interested for sure in the PCB. I went digital w the cameras and
> opted for this one for the top/down camera
> <https://www.amazon.com/gp/product/B08FHB9HM8/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1>.
> The aluminum housing is pretty robust and mounts very sturdy to the CHMT
> head, but its not perfectly perpendicular to the machine bed. I played
> around with taping an endoscope with variable lighting to it, but the
> direct angle of the light casts hotspots all over the PCB being worked.
> I ordered some flexible white LED strips where Im going to attempt to
> make a 'cone' around the lens.
> 20220214_081215.jpg
>
> RE Spare Wires
> Yes, IIRC there is actually two spare conductors within the wire
> bundling running from the control board all the way to the head. At
> least this is the case of mine. They are cut short and may not be
> exposed without cutting/peeling the bundle cover back a bit. To use them
> you will definitely need to butt splice addl wire to them to use them.
> IIRC the individual conductors are 24awg.
>
> Heres the last last schematic I did for my current setup, it doesnt show
> the spare conductors, but Im pretty sure they're there. I can confirm
> this for you later in the week if needed.
> <https://groups.google.com/d/msgid/openpnp/57cf75de-8c09-4baf-bb7a-7567d4ff5199n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/openpnp/57cf75de-8c09-4baf-bb7a-7567d4ff5199n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenPnP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openpnp+u...@googlegroups.com
> <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/b2abbb8b-99fd-4375-aec0-8ff095a1bed2n%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/b2abbb8b-99fd-4375-aec0-8ff095a1bed2n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Wayne Black

unread,
Feb 23, 2022, 2:05:03 PM2/23/22
to OpenPnP
Awesome Jan,
How does the light work in terms of lighting the pcb? Are you using any kind of diffuser? I trided using a LED strip at varying angles still produces hot spot on the pcb. I ordered some diffusion plastic but its too cloth like. Instead Im going to try and fab a diffuser out of old Iso Alcohol bottles. Thes plastic used looks to be perfect transparency.

Ian Arkver

unread,
Feb 23, 2022, 2:25:10 PM2/23/22
to OpenPnP
Cloth-like diffusion plastic? Sounds odd. I bought a small sheet of Perspex Opal for my coax light experiments, which seemed to work well. Minimum thickness is 3mm which is quite chunky. It's designed for lightboxes.

On the actual machine I've also got LED ring lights and yeah, they produce bright spots. I might try retrofitting some of the Perspex to that too but haven't yet.

Wayne Black

unread,
Feb 23, 2022, 4:16:00 PM2/23/22
to OpenPnP
This is the Stuff. I thought it would be formable but it is not.

Ian Arkver

unread,
Feb 23, 2022, 4:27:34 PM2/23/22
to OpenPnP
OK, got it. Great for photo studios, not so much for nailing to a machine.

This is The Other Stuff, but no idea what the equivalent would be on your side of the pond.

Jan

unread,
Feb 24, 2022, 4:32:39 AM2/24/22
to ope...@googlegroups.com
Hi Wayne!
I'm using a cone made out of paper. I've updated the repository with
the details. I found - like others before - that paper works well as
diffuser. However, it has to be placed with some distance with respect
to the LEDs and back reflection into the camera have to be avoided. The
result is the cone that fits into the original camera mount with the
LEDs pushed back by about 8mm (to the recess). I'm operating the LEDs
using PWM to control there brightness. The paper works good for fiducial
detection but the sprocket hole detection on the drag feeders is not
perfect yet. I've some trouble with black tape and the fact, that the
background behind the hole has a certain distance. The hole seems to
cast a shadow on the background forming a small dark spot in the center.
This seems to distort even the DetectCircularSymmetry stage. I'll keep
trying...
There is also a second recess on the original camera mount with about
26.6mm diameter and about 3mm depth. This was likely intended to hold
some acrylic diffuser like the one you mentioned. If combined with a
tube in the center to prevents back reflections, it is probably an even
best solution. (larger distance to the LEDs, less loss of brightness,
parallel light emitting plane, ...)

Jan

On 23.02.2022 20:05, Wayne Black wrote:
> Awesome Jan,
> How does the light work in terms of lighting the pcb? Are you using any
> kind of diffuser? I trided using a LED strip at varying angles still
> produces hot spot on the pcb. I ordered some diffusion plastic but its
> too cloth like. Instead Im going to try and fab a diffuser out of old
> Iso Alcohol bottles. Thes plastic used looks to be perfect transparency.
>
> On Wednesday, February 23, 2022 at 2:55:14 AM UTC-8 Jan wrote:
>
> Hi Wayne!
> Many thanks for your schematic on the wiring. I've now installed a
> ring-light on my camera using the two spare wires (wire/purple and
> yellow) (Just for reference: this two are cut short in the split
> between
> the wires going to the dragpin and thus for the vacuum at the head).
> I'm
> still using the original camera mount with the digital camera that Eric
> suggested
> (https://mcuoneclipse.com/2020/05/03/retrofitting-a-charmhigh-chm-t36va-machine-with-openpnp/
> <https://mcuoneclipse.com/2020/05/03/retrofitting-a-charmhigh-chm-t36va-machine-with-openpnp/>)
>
> The camera is a bit noisy compared the to ELP I'm using as up-looking
> camera, but ok.
> I've pushed my ring-light at https://github.com/janm012012/Ringlight
> <https://github.com/janm012012/Ringlight>.
> <https://groups.google.com/d/msgid/openpnp/b2abbb8b-99fd-4375-aec0-8ff095a1bed2n%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/openpnp/b2abbb8b-99fd-4375-aec0-8ff095a1bed2n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenPnP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openpnp+u...@googlegroups.com
> <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/openpnp/afc36654-7080-4262-b4cc-f48afb16f40an%40googlegroups.com
> <https://groups.google.com/d/msgid/openpnp/afc36654-7080-4262-b4cc-f48afb16f40an%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages