In today's episode we're exploring the new Raspberry Pi HQ Camera along with the 6mm Wide CS-Mount & 16mm C-Mount Telephoto lens.

Transcript

G'day, welcome to episode 3 of Core Electronics Live. Today, it's May the 4th, and I've seen lots of Star Wars stuff getting around, which is great. But today, we're talking about something else: Raspberry Pi's recent release of their HQ camera. I've got one here on the bench, along with the 6mm wide and the 16mm telephoto lenses, and we'll have a bit of a look-see. I first saw this camera a few months ago in the UK when visiting Raspberry Pi. I wasn't allowed to talk about it then, but today I can. Better still, I've got it on the bench, and I've changed a few things around here so we can do some practical tests with it. I'll show you how to set it up, adjust the focus, and the aperture, and we'll get hands-on with it. Before we do, though, it's worth mentioning that there's a great video by the Pi Foundation that I absolutely have to show you. I'll just prepare it over here, and while I do, I'll make sure that things are working fine with the stream. If you're on Facebook, YouTube, Twitter, or Periscope, feel free to say hello. I'll do my best to include you in the live stream. Last time, I had a bit of a glitch getting those comments working. Hopefully, it's on today, but the YouTube API for comments is not as good as it used to be because it seems to be a little bit under pressure with all the live streams going on. So, yeah, if I see a comment come through, I'll do my best to share it.

Let's head over to the Core Electronics website. If you're familiar with the homepage, you'll see something new load just about here: the video for the new camera. Let's have a look because it is great. How good does that look? Nice. So really excited to see this. That's the intro video, and they sort of touch on a couple of features that are a part of the Pi camera. I'll just head over here and prep this next part of the video. Great. Again, welcome if you just joined in; you're listening to and watching Core Electronics Live. So here it is. This is the Raspberry Pi camera. It comes in this little box, and I'll switch over to the top-down camera. Let's get that in focus, shall we? The box itself is more of a tall rectangular shape. Inside, this is exactly what you'll get all going well: the camera itself. I'll put that down on the bench there. Don't forget there's a little paper envelope here. The paper envelope has a tiny little screw and a little screwdriver. You'll need this if you're tightening things up and sort of leaving the camera in more of a finished configuration. Today, we'll just do a little bit of light experimentation. Normally, that little screw would go on the top here. To help out those who might run into any problems following what I'm explaining today, just go to the product page, scroll down, and download the Getting Started Guide. It'll cover off on what screws go where and how to use each of these lenses together with the camera itself.

Let's have a little chat about this camera. It's 12 megapixels—well, 12.3. Let's not forget the.3. That's a big deal because while it's a high resolution, there's also twice the amount of pixel area for every pixel. It's a much larger sensor, providing better quality data, so you're dealing with something that has much better output. It's got focus—well, the lenses have focus. You can mount both C and CS mount lenses. It also has an infrared cut filter and a ribbon cable attached. It has a tripod mount on the bottom here. I'll just try and get the light there. There we go. This can be mounted on standard 1.25 inch 20 per thread tripod mounts like this little guy here, which we'll have a muck around with shortly. Right. I'll just double-check these comments because if you're on Facebook or YouTube, give us a yell. Let us know that you can hear the audio coming through OK. I'll just double-check that this is linked up properly. Right. Just going into these settings. I had to fix something on the YouTube one. There we go. And the Facebook. That should help. OK, that setting should help with getting Facebook in the mix as well. Hopefully, everyone can hear me OK. Let's kick on with this hands-on little exploration with the new HQ camera.

C and CS mount lenses are something that you may not have seen all the time or much before. Basically, it's a type of lens that will fit into a much larger metallic sort of thread insert. If I switch over to the monitor here, I'll show you the difference between them mechanically. I've just Googled C vs CS mount, and this is a great example. You can see here on the right-hand side, the CS mount, and you might just be able to read it, is 12.5 millimetres from the back of the lens to the sensor. The C mount is a little bit longer between those two, so it's five millimetres longer. That's basically coming back to the top down. Thanks, guys, on YouTube. Ted, loud and clear. Good to hear. I'll just untwist this C mount adapter. With this ring removed, this is now ready for CS mount, so it's five millimetres shorter into where the sensor is. Fitting this adapter will turn the camera into a C mount fitting. That's quite important because, first of all, there are two different types of lenses out of the box. Let's have a look at those. I'll just put that back on there so I can put my dust cap on. The first one here comes in a box like this. This is the 6mm lens. Inside, we have the lens itself. Nifty looking thing. Really sturdy. It's got some weight to it. A nice little cap on the front and the back. But this one here, the smaller 6mm one, is the CS mount. You'll want to have removed that ring to fit this device. I'll put that guy over there. Then here we have the telephoto. We'll power these up in a moment and go through the settings and how you adjust them. Just coax that out of the container. Here we go. The front cap I just took off while I was taking it out. That's the 16mm telephoto. Look at this thing. It's a juggernaut of a lens compared to what we've traditionally seen for the Raspberry Pi camera line-up. Coming from the version 2 camera, which had the infinite focus, which is cool, but you've got far less control. You can't focus on things that are very close. You have to deal with it. It was about 40, 50, 60cm—somewhere around there was the minimum focal distance to infinity. You're just locked in. You have to use what you've got. Whereas both of these lenses have a dial to control the aperture and the focus separately. I'll show you how to do that in just a moment.

Before I jump too far into this, I'm going to show you the setup. This is my setup. I took a photo of it a moment ago, and I'll just switch the screen over. You've got the tripod on one side of my bench, which is about here. Then 600mm away, so 60cm away, which is why I've got that ruler, is the little Lego town that I've reused. I made this for a different video way back when, and I'm reusing it for this because there's lots of color. It is a little bit of a stress test. Granted, it's not going to be—I'm not out in a park. I don't have lots of sunlight or anything. I'm inside a room with fluorescent bulbs, but we'll still put it through its paces.

I imagine that a lot of the initial experimentation and use of these lenses and the camera would occur in a controlled environment, such as on a bench, to understand how the focal and aperture rings function. Let's prepare this setup and get it operational. I'll begin by attaching the tripod to the bottom part of the camera. It's wise to keep the dust cap on while handling it to avoid touching the sensor or letting any debris inside. Although it's less expensive than a digital SLR, it should still be treated with care. The first lens we'll test is the 6mm, which requires a CS adapter. I'll remove the C to CS adapter and attach the 6mm lens, which, like the telephoto lens, has two adjustment rings for aperture and focus. After removing the back cover, I'll fit it directly. A tip for beginners: ensure the C to CS adapter is removed. The assembly has some play, which can be eliminated by fitting a small screw with a screwdriver, but for today, I'll keep it simple for quick bench experiments. I'll secure it hand-tight without over-tightening. If using a tripod, align one of the long edges with the lens to balance the weight. I'll set this up at the end of a ruler to determine the closest focus distance for each lens, an important feature.

We have a ribbon cable that was fitted to the Raspberry Pi. One side of the ribbon cable is blue, and the other has tin pads. If you need to plug it back in, ensure the pads face down. You can verify this by checking the shiny surfaces of the pads in the connector under light. It's easy to insert it incorrectly, which can cause malfunctions. I'll move the camera forward to bring the Raspberry Pi into view. The Raspberry Pi has pads on one edge, and looking into the connector, I see shiny parts on the left side. This is the camera connector, so only use this one, even though it fits both. The Raspberry Pi Foundation once photographed the board with the camera connected incorrectly, but Twitter users quickly corrected them. I'll reposition this carefully; the connectors are fragile and shouldn't be forced. If there's resistance, reconsider your approach or reseat it. With the camera setup complete, I'll remove the front lens and prepare the Raspberry Pi, clearing space on my bench. I forgot to play the on-the-bench intro for this segment. Today, we only have on-the-bench and Ask a Maker due to the camera's complexity. I'll plug in the USB-C power and remove a small screw to avoid shorting the Raspberry Pi, then turn it on. The Raspberry Pi will display a rainbow screen and boot sequence. I've downloaded a fresh copy of Raspbian, and the torrent is faster for first-time downloads.

A message from Ian asks about a UV filter to prevent scratching. Typically, UV filters attach to the lens's outer edge. Currently, there aren't any available for these lenses, but the thread might allow a lens filter cover similar to a DSLR. However, no additional modifications or accessories are available at this time. These are C and CS mount lenses, so there are likely many options beyond the two launched by the Raspberry Pi Foundation. I hope this helps, Ian. Raspbian has booted, and I'll navigate to the terminal. For those unfamiliar, the terminal is an easy way to experiment on the Raspberry Pi. I'll use the raspistill command, a standard feature for working with the camera. The newer camera is fully supported. I'll enlarge the font for visibility. I'll add an argument to extend the preview time, setting it to 120,000 milliseconds (2 minutes), and save the image as cam.jpg in my home directory. This is a straightforward way to start. There are many ways to use the camera, including video streaming and time-lapse. I'll share links for various projects after the livestream. For now, I'll hit Enter to preview the setup. With a 6mm lens, there's less zoom, so I'll move the camera closer for a natural view, adjusting it to include more Lego in the frame. The lens is about 300mm from the Lego set. This setup photo shows the camera within 30cm of the setup. I recommend loosening the grub screws, leaving the rear one tight, and adjusting one at a time. I'll adjust the aperture to control light intake, aiming for a suitable setting for this experiment. It's not perfect, so I'll loosen the back one and adjust both front parts to focus. Watching the monitor, I'll find the best focus and lock it. I'll tweak the aperture, rerunning the script as my two minutes have expired.

I'll just make a small adjustment to the aperture here to bring a little more light in. Let's fix that focus. There we go. Not too bad. For live streaming, this is going okay. Lots of moving parts, lots of videography, inputs going everywhere. But there we have it, our little Lego scene. I'll focus the 6mm lens. I've had to physically move it a bit closer because it is a very wide lens. Let's see how close we can get a subject in front of that lens. Ian mentioned it's a copy from the Pi Foundation, expecting people to use a wide variety of lenses. For starters, they're launching with the 6mm and the 16mm telephoto. Spot on, Ian. Nice find. Let's bring our Lego guy right up here. I had to play with this before, so I'll jump straight to it. I know it can go fairly close. I'll find out how to get this as close as possible. Jeez, that's not too bad. The light is also quite good. I'll loosen off the focal ring and adjust the focus. I need to bring this closer in. That's going further away. I could focus from basically out to infinity, but what's the closest I can do, which is a bit of a stress test for lenses? I know it goes closer. I had this within, like, 4mm or so, and I could basically get right in on the whiskers.

This 6mm wide is the way to go if you want to experiment with macro, if you want to get up really close to get as many pixels as possible worth of data onto your Raspberry Pi, into your Python script, whether you're running CV or other projects, computer vision, that is, and you're going to get as many pixels as possible into that lens, into that sensor. So that's great for macro and also good for wide. You think more, like, traditional wide-area views of people moving back and forth, workplace, you might find that... Or you want, like, landscape-type images. This is a nice little lens to experiment with. OK, well, if you've got any questions about the 6mm lens, give us a yell. If not, I'm going to jump over to the 16 telephoto. So I'll remove this lens. Oh, Ian's got a comment. I'll just share that. Ian says, Holy moly, that's awesome for macro underwater photography. Yeah, you will need an underwater enclosure, but, yeah, why not? It definitely lets a lot of light in, which is nice, and I think it would work quite well underwater for getting that wide angle.

It'll be interesting to see how people go about building, like, what the Makey community does, building different enclosures, cases, using this device in all sorts of unique and interesting ways. It's exciting to see what happens with this. But, yeah, so thanks for sharing that, Ian. Good point. Definitely put on your caps afterwards because these are optics, so you don't want dust and stuff getting inside. A trick for new players, when you're putting this back inside, just make sure that you, with these screws, make sure they're opposing so they're on opposite sides, or they can be both on the same side, but this particular one works best when they're opposing, and I'll just tighten this back up because I did do a bit of a stress test there with the focus. That way, when you put them inside the case, they're going to make their way into either side. Oh, this is obviously the larger case. I thought that wasn't very snug. It's this one. There we go. So, great little case to keep it in, safe for transit and just throwing into your backpack.

Let's grab the 16mm. This guy's a lot bigger. This is the one that you saw on that video way at the beginning. For those that have just joined us, welcome. You're watching Core Electronics Live, and this lens that I'm about to demo is the one inside the Raspberry Pi feature video. The 16mm telephoto, which means you can essentially zoom into that shot. As you adjust that, you are going to change the aperture. Pretty cool lens because this is the sort of thing you'd use for outdoor photography, landscape photography. Of course, we're talking about a little lens here. It's nothing like a big Canon or Nikon lens, but still a whole lot of fun. More importantly, it makes it very useful for computing projects that need vision because now you have a much better optic system that's going to a much better high-quality camera with a 12.8 megapixel sensor and a big sensor as well. So there's twice as much data hitting that sensor itself.

This guy is going to need the C to CS adapter. When you're fitting this, essentially this adds an extra 5mm of distance between the lens and the sensor itself. Just going to put that on there finger-tight. Now to fit it to the camera itself. Taking the front cover off. This one's much more important that you have the front of this tripod going in the direction of the lens because it is actually quite heavy. Let me just demo this. It is definitely a real problem. Without that, it just wants to topple. So that's how you can add a little bit of safety. But it is a very small tripod, so the centre of gravity is not very well balanced. But it's definitely good enough for a bench guide today. So that's the lens setup. Now let's head over to the Raspberry Pi. I think I've actually set this up for macro. I think that was the last thing that I... Oh no, I have changed the focus on this. We'll start with the same test, shall we? I'll put the firetruck way back there.

Let's adjust the back one first and then the front. The front is basically the telephoto part of this lens. I'm able to zoom in or zoom out. Obviously, that's not going to make a whole lot of difference on such a small lens. But I can also change the aperture here. I'll lock that off. Let's get that zoom, that focus looking good. Not too bad. Let's open up that lens a little bit. A bit more aperture to increase the amount of light going into the lens and to the sensor. I'm sure the live stream doesn't give this the justice. But this is definitely a little bit... It's a higher quality than the 6mm, that's for sure. To give you an idea of the zoom on this, I'm going to move this right up to where I had the 6mm. Before we had the 6mm, that whole scene in shot. Again, I'm about 30cm away. Now you can see what the effect of that zoom does with the 16mm lens. I'll move it right back to the 60cm point. I'll just adjust this a little bit and refocus that.

Now, if you can't get your focus to work, it's probably because you don't have the C-to-C-S mount fitted. It's just going to change the optics entirely and you're in for a ride. So that's basically what it looks like for the 16mm lens. We'll bring in for a macro test what the closest possible distance is that we can get something to the lens itself. It will not be anywhere near as macro as the other lens. But we'll give it a fair go. I'm going to zoom this right in as close as I can. Basically, where does this guy appear in focus? I guess that it's about there. As I look at this, and I'll just remind you of the setup, I've got the ruler there, so I can actually see how far away it is. That is about 290mm. I'll find what the exact distance is, the closest that we can focus this.

But I'm not surprised. This is certainly not a macro lens. It's more for outdoor landscapes and lots of light. However, it does offer a bit more zoom, which might be handy for a range of projects. So that's both of the lenses and the camera itself. Again, if you have any questions, feel free to ask them on Facebook, Twitter, YouTube, or Periscope, and I'll do my best to help out. Now, let's switch over to the next segment. Oh, nearly dropped it. And that is... Righto, so ask a maker. I'll just balance this camera so it doesn't drop during the next part. First, a big shout-out to a couple of makers who have been helping out a lot on our community forum. Abraham, I've really enjoyed reading your perspective and the support you've been providing, along with Wayne. Welcome, Wayne, and thanks for your great insights. And of course, Robin, thanks again. We all appreciate your support. It's great to see other makers working together to solve problems and build projects.

The first question I'll address is from David. He's been trying to fix a Bluetooth headset that gets a lot of noise, which disappears when he touches the wire. He suspects a grounding issue. Indeed, it likely is a grounding issue. My advice is to use shielded audio cable. You have different types of audio cables, and I'm not sure which version you're using, but you might be using something like the example of combined or separate sheets. The best approach is to shield the audio cabling and ground the shield on both sides. Ensure the ground is connected to a good ground plane, avoiding spots where noise and harmonics might interfere. It would be interesting to know if you've done this already and how you've grounded both sides of the cable. Now, a question from Angus. Oh, sorry, this isn't from Angus. It's a comment at the bottom of this project post. Alyssa asks about the 10250 values and how to adjust them to make them louder. Angus shared a project on building a cooking thermometer system with a readout and a buzzer. In the project, which is a great write-up, thanks for sharing, Angus, the schematic is included. In the code, he's using the tone function, setting parameters from the Arduino. Alyssa's question is about these parameters.

Good question, Alyssa. When copying and pasting code, it's easy to overlook the original purpose. If you Google Arduino reference, you'll find the Arduino reference website. Navigate to the commands available natively with Arduino, and search for tone. The tone function has at least two arguments: one for pin and one for frequency, with an alternate syntax for pin frequency and duration. In Angus's project, the pin is defined as a buzzer, linked to a pin number, with a frequency of 1,000 and a duration of 250 milliseconds, creating a 1 kHz beep for 250 milliseconds. I hope that helps, and I'll share this in the forum afterwards. Eric is using a PyCon FirePy and is having trouble connecting or updating the real-time clock. He shared some source code, which is great. The result shows it connects, but never connects to RTC. It's a tricky one, but try pinging something to test the Internet. Ping a direct IP address like Google's 8.8.8.8, or something relative to your region. If that works, there might be a network issue accessing the time server. If not, the SIM card or telco might not support the device yet. Reach out to PyCon for help, as they are the original equipment manufacturers.

Pavel asks about a Pololu G2 power motor driver, an 18V25, and the performance impact of adding a heatsink. For those unfamiliar, this motor driver is designed for mid- to high-range power for motor control. It has capacitors and other devices on top, with MOSFETs and control devices underneath. The PCB has planes to help dissipate heat. In the overview, there's a section on managing power, which I'll link in the forum. You won't find strict guidance on using a heatsink because of two variables: the current through the MOSFET and the switching speed. These cause temperature fluctuations, so you won't find firm advice on when to use a heatsink. If you're below a 25-amp continuous, it should be manageable. Switching the MOSFET generates heat during the ramp from infinite resistance to nearly nothing. Consider thermal monitoring to ensure stability. If you're running near specs or using fast PWM, a big heatsink is advisable. Experimentation and a sweat test on the bench can help ensure stability and safety. Remember, MOSFETs' heat failure is permanent.

But you've found where that failure point is. If you're unsure, just throw a heatsink on and use the double-sided thermal tape to do that. I hope that helps. Tony asks if the ArchMix SBC comes with the secure JTAG fuses set. The ArchMix SBC is a dev board by Seed Studio, and I'm not sure, to be honest. If somebody else knows, please jump in and help out. That'd be great. I'll have a look around, Tony, and let you know what I can come up with. Evan is working on a project using RS-485 for a soil moisture sensor instead of UART. RS-485 is similar to RS-232, but allows multiple devices on the same bus rather than just a master-slave arrangement. It's a great conversation, and Evan has shared his update. Good on you, Evan, for sticking in there. You've given the DFRobot wiki page a fair go, but you're still unsure if your shield is operating correctly. Everyone's been there before. When working with serial communication, it's difficult to tell if something's working as it should. There are products that can help. While you could build your own debugging platform with an Arduino and a shield, you're already there and not getting it working as you want. A handy piece of test equipment for this would be a 4S, RS-422, or 485 cable to USB adapter. This cable, along with its adapter, breaks out the RS-485 wires, which should be useful if you can't see what's going on. It allows you to monitor the system and use software to drive comms back and forth, witnessing what's happening on that bus. I hope that helps, Evan, and I'll share that link in the forum soon.

Donald has asked for recommendations to cut off the legs of SOP packages. He worked on a PCB yesterday with SND and through-hole caps and had to cut off the SOP8 op-amp package and then desolder. That's definitely one way to go about SND rework. I imagine you're cutting the SMD pins around the device and using a desolder or solder wick to remove the solder from each leg. I would consider using a hot air gun, but if you don't have one, what you're doing is fine. It will work because you heat things up after cutting them and push them off. It's probably about the same amount of time either way, considering the finicky nature of hot air rework. You'll need good flush cutters, which you can search for on our website. Flush cutters have a sharp edge that goes down and is flat on the back, allowing for a clean and flat cut on each point. They have pointed ends to make little snips, but they're only as good as they are sharp. While you can rework them, a good pair of flush cutters will last long. They're a handy tool for repairs and bench work, beating the cutter on pliers that have a chisel or triangle-type cut, which can press and swell out the component being cut. Clearly, Donald, you haven't been down this road before, and I hope that information helps.

Lastly, on Ask a Maker, I've been enjoying this forum thread. Don reached out a while ago, and I talked about it on Episode 2. Here I am on Episode 3 with an update. He's still figuring out what servo, pneumatic, or linear drive system to use to change gears on the bike he's building. Good on you, Don, for sharing this. This is Don's build from last year, and I've read the write-up. Great build, great project. Thanks for sharing that, Don. I hope you gain value and insight from the forum discussion. I look forward to seeing what happens with this part of the journey, getting that shifter in place. Thanks for sharing that update, Don, and please keep us in the loop. A reminder to everyone: if you're building a project, click on Projects and Share the Project. Fill out a form, and we'll give you store credit to help with your next build. We want to see and share your projects. If you have something in the works, take photos and share them with us.

That about covers it, everybody. We've looked at the new Raspberry Pi HQ camera, the 6mm lens, and the 16mm telephoto. We've hooked it up and run some commands. I'll share what I've done in the write-up soon. I'll do a guide for this camera and the commands I'm using to experiment with it. I'll also do a guide on how to stream video using it like a DIY security camera system, which will work with the second-generation camera with the 8-megapixel sensor. If you have any other questions, feel free to reach out on the forum. Until then, thanks for tuning in. This is Core Electronics Live. Enjoy the rest of your Monday. 

Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.