By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Forum House Ad Zone

Is there as Raspberry Pi expert in the house ?

Grateful for some hints ...

All Topics | Latest Posts

Search for:  in Thread Title in  
Michael Gilligan07/02/2020 11:10:28
avatar
20183 forum posts
1053 photos

I have ordered a new Raspberry Pi 4 with the intention of using it as an ‘adapter’ between a microscope camera and my ageing MacBook Pro.

  • The Pi 4 has USB3 ports, but the Mac does not !!
  • Both have Gigabit Ethernet connections.

The plan [such as it is] is to connect a USB3 camera to the Pi and output it as a ‘GigE Vision’ stream to the Mac. ... Very cost-effective if I can get it to work.

I would want minimum latency in the process, so am looking to the forum for some clues as to the best way of coding this.

Thanks in advance

MichaelG.

Rockingdodge07/02/2020 11:32:31
avatar
315 forum posts
72 photos

Even the 2012 version had usb3 so just how old is your Macbook? Does it have HDMI? Otherwise how about a usb3 to usb2 converter lead?

Roger

Speedy Builder507/02/2020 11:50:48
2613 forum posts
212 photos

Or follow this link

**LINK**

SillyOldDuffer07/02/2020 12:54:46
Moderator
8694 forum posts
1967 photos

All MacBooks and the RaspberryPi 4 support GigaByte Ethernet which eliminates a shower of compatibility and version problems. Ethernet is faster than USB2.0 provided the network isn't shared with other folk. It's where I'd start.

Early USB2.0 has a top speed of 12Mb/s, which might be fast enough. Later versions do 480Mb/s . The MacBook might be OK - try and see!

The software may decide the best way forward. What's on the camera and the MacBook?

Dave

John Haine07/02/2020 13:08:24
4675 forum posts
273 photos

Michael, I'm fairly near the bottom of my RPi learning curve but maybe I could make some suggestions?

First, in order to set up the Pi and program it "ab initio", you will need a keyboard, mouse and display - I bought the "official" keyboard from the Pi Shop in Cambridge, and used my laptop "extension"display. You also need a memory card with Raspbian on it - or you can download the latter and load it on to your own card, but you probably don't have an SD slot either? I found the whole process of setting up the Pi initially really easy, a great tribute to them.

After that you could (possibly) use your Mac as a terminal by "VNCing" into the Pi over WiFi, but given you'd have to use a screen with the Pi anyway why would you want to do that?This would also assume that VNC is supported on your older Mac. Just connect the camera to the Pi and display on its screen (by the way it needs an HDMI screen). If you want to record video or stills through the 'scope, do it on the Pi and transfer to your Mac. I use my Pi to record large files of clock measurements, and I get them on to my PC by using VNC to log into the Pi "remotely" (well, about 8 feet away) via WiFi and then transferring the files on to Google Drive.

You might just find that actually the Pi becomes your preferred computer - it is great for web browsing with Chromium, comes with LibreOffice and a load of other useful software including VNC Server. It's fast, the only thing it doesn't have is Gbytes of storage, but you can always use Drive, or I'm sure there's a real hard drive (or SSD) available for it.

I hope this is useful!

Michael Gilligan07/02/2020 13:55:35
avatar
20183 forum posts
1053 photos
Posted by Rockingdodge on 07/02/2020 11:32:31:

Even the 2012 version had usb3 so just how old is your Macbook? Does it have HDMI? Otherwise how about a usb3 to usb2 converter lead?

Roger

.

1. almost 11 years ... does that make me unfit to ask a question ?

2. No

3. It’s the slow speed of the USB2 bus that is the underlying problem.

MichaelG.

Michael Gilligan07/02/2020 13:59:19
avatar
20183 forum posts
1053 photos
Posted by Speedy Builder5 on 07/02/2020 11:50:48:

Or follow this link

**LINK**

.

Thanks for nothing

The computer is still capable of doing what I need for this job ... except for the limitations of the USB2 bus.

I asked a simple, and quite specific, question.

MichaelG.

Rockingdodge07/02/2020 14:02:21
avatar
315 forum posts
72 photos

sorry I spoke, I really didn't know which mac you had. If you have a rpi4 why do you need to access the mac for?

Michael Gilligan07/02/2020 14:09:13
avatar
20183 forum posts
1053 photos
Posted by SillyOldDuffer on 07/02/2020 12:54:46:

All MacBooks and the RaspberryPi 4 support GigaByte Ethernet which eliminates a shower of compatibility and version problems. Ethernet is faster than USB2.0 provided the network isn't shared with other folk. It's where I'd start.

Early USB2.0 has a top speed of 12Mb/s, which might be fast enough. Later versions do 480Mb/s . The MacBook might be OK - try and see!

The software may decide the best way forward. What's on the camera and the MacBook?

Dave

.

Thanks, Dave ... my 2009 15” MacBook Pro has 480Mb/s USB.

A 5MP camera therefore streams at less than three frames per second.

I need/want a camera which is capable of following focus with imperceptible latency.

... This will be a substantial investment, and I would prefer to continue using the MBP whilst I still can.

... Several £K on a new computer is not high on my wish-list, although I have wondered about buying a Mac mini.

MichaelG.

Michael Gilligan07/02/2020 14:12:39
avatar
20183 forum posts
1053 photos
Posted by Rockingdodge on 07/02/2020 14:02:21:

sorry I spoke, I really didn't know which mac you had. If you have a rpi4 why do you need to access the mac for?

.

1. Which Mac I have is really irrelevant, Roger ... I asked a very specific question

2. The image processing and analysis software.

MichaelG.

Michael Gilligan07/02/2020 14:23:37
avatar
20183 forum posts
1053 photos
Posted by John Haine on 07/02/2020 13:08:24:

Michael, I'm fairly near the bottom of my RPi learning curve but maybe I could make some suggestions?

[…]

I hope this is useful!

.

Thanks for your thoughts, John yes

Unfortunately, It does appear that I might be on my own with this one

MichaelG.

.

... all I ordered this particular RPi for was to try to make a standalone converter:

USB3 Vision IN >> GigE Vision OUT >> Cat5 cable >> Mac

John Haine07/02/2020 14:49:44
4675 forum posts
273 photos

Understood Michael. However it is still the case I think that by the time you are set up to install and configure he Pi to transfer the video data you might just as well use the Pi rather than the Mac - if the necessary image processing software is available for Linux it will almost certainly run quite happily on the Pi (which after all is based on a processor chip specifically designed for multimedia support), and someone has probably ported it over.

Rockingdodge07/02/2020 14:51:07
avatar
315 forum posts
72 photos

sorry once again for misunderstanding your needs, try googling this rpi 4 and GigE Vision, there are some forums that might help.

Roger

Edited By Rockingdodge on 07/02/2020 15:01:18

Nick Clarke 307/02/2020 14:53:31
avatar
1427 forum posts
63 photos

Never tried it myself, but these people seem to have done:-

**LINK**

An Other07/02/2020 15:03:20
260 forum posts
23 photos

There is some adverse press about the RPi 4 suffering from overheating under some conditions. I can confirm that the earlier versions of PI do not have this problem. Various heatsinks/cooling fins are on sale to deal with this problem.

These might be a help - not all Rpi4, but might get you started - hope it helps.

Camera LInk

Camera RPi3

GigE vision on RPi

RPi3/4 SSD or Flash Drive

RPi3/4 Specs and comparison

This last also makes some realistic comparisons, as opposed to a 'wishlist'

RPi4 USBC port problems

Updated RPi4 (overheating, etc)

Theres lots of other stuff around. It would seem that you need to be sure you have the latest RPi4 to be sure it will work as it says on the tin.

SillyOldDuffer07/02/2020 15:22:42
Moderator
8694 forum posts
1967 photos
Posted by Michael Gilligan on 07/02/2020 14:23:37:
Posted by John Haine on 07/02/2020 13:08:24:
...

.

Unfortunately, It does appear that I might be on my own with this one

MichaelG.

.

... all I ordered this particular RPi for was to try to make a standalone converter:

USB3 Vision IN >> GigE Vision OUT >> Cat5 cable >> Mac

Not necessarily, it's the sort of thing I'm interested in! Expecting loads of spare time when I retired (silly me) I bought a Far Eastern microscope and a Canon EOS600D to mount on it. The 600D was picked because the mirror can be locked and it comes with a Windows Program called EOS Utility which puts the camera image on screen in real-time, and allows the camera to be controlled from the computer over USB. I seem to remember focussing was slow, but that may be a feature of Canon's software. May not matter if the Raspberry is just a bridge between existing software, ie Camera thinks Raspberry is your computer while the computer believes the Raspberry is the camera. Should be possible, though I'm not sure of the practicalities.

I have Pi2s and 3s already and was about to order a Pi4 for another project. Also, I've just swiped my daughter's surplus A1418 iMac, so it appears I have most of the wherewithal to look at this. Plus I already owe you a favour.

Although it's a naughty distraction from urgent domestic duties, I'm happy to help.

Perhaps we should PM.

Dave

Michael Gilligan07/02/2020 15:42:53
avatar
20183 forum posts
1053 photos
Posted by An Other on 07/02/2020 15:03:20:

.

There is some adverse press about the RPi 4 suffering from overheating under some conditions. I can confirm that the earlier versions of PI do not have this problem. Various heatsinks/cooling fins are on sale to deal with this problem.

[…]

Theres lots of other stuff around. It would seem that you need to be sure you have the latest RPi4 to be sure it will work as it says on the tin.

.

Many thanks for the links

I ordered from RS Components, and it was delivered today ... so hopefully it’s a good ‘un

We shall see !!

MichaelG.

Michael Gilligan07/02/2020 15:50:37
avatar
20183 forum posts
1053 photos
Posted by SillyOldDuffer on 07/02/2020 15:22:42:
Posted by Michael Gilligan on 07/02/2020 14:23:37:

USB3 Vision IN >> GigE Vision OUT >> Cat5 cable >> Mac

.

[…] it's the sort of thing I'm interested in!


[…]
May not matter if the Raspberry is just a bridge between existing software, ie Camera thinks Raspberry is your computer while the computer believes the Raspberry is the camera. Should be possible, though I'm not sure of the practicalities.

[…]

Although it's a naughty distraction from urgent domestic duties, I'm happy to help.

Perhaps we should PM.

Dave

.

Brilliant, Dave ... much appreciated.

I will be in touch.

MichaelG.

Neil Wyatt07/02/2020 16:08:56
avatar
Moderator
19033 forum posts
734 photos
80 articles

Hi Michael,

I guess you have treated yourself to a high spec microscopy camera and want to be able to manipulate slides in real time while still being able to capture high resolution stills and video.

If you want low latency imaging direct to the Mac, have a look here:

www.cloudmakers.eu/

The reason I suggest this is that planetary imaging poses many of the same issues, namely capturing huge amounts of video data in real time, typically with USB2.

Most 'HD' resolution cameras can handle full frame at 15-30 fps in real time over USB2.

If you want faster, astro software allows good access to the camera controls, and can often support things like reduced resolution, region of interest and choice of data format (which can speed things up if you choose a compressed format).

This might allow you to achieve what you want using USB2.

I don't know the details of the applications at that website, but if you had a PC I'd be recommending Sharpcap.

Another possibility is astro imaging software on the RPi (get a used monitor for £30 off eBay or use your TV), and then just port the captures to the Mac for processing. Typically you can pre-process the view for gamma, histogram stretch, contrast, white balance, sharpness etc.in real time while still saving the data as full bit depth RAW for processing.

(Note - most astro capture software has vastly more capability than medical capture software, and it tends to be free. Other advantages are saving stills as FITS and raw video as SER).

Neil

Neil Wyatt07/02/2020 17:31:41
avatar
Moderator
19033 forum posts
734 photos
80 articles

Or... can you set up some sort of remote desktop, to the Mac effectively becomes keyboard and monitor for the RPi, but the image manipulation stays on the Pi?

All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Latest Forum Posts
Support Our Partners
Eccentric July 5 2018
cowells
Dreweatts
Rapid RC
Eccentric Engineering
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest