• Choosing Components

    Ivan Vnucec3 days ago 0 comments

    Introduction

    Lets choose major hardware components for the Catchcam project. As I've written [before](https://ivanvnucec.github.io/tags/#catchcam), the idea is to have a plug and play device that alerts if the vehicle is approaching a speed camera both via sound and LED signal.

    Catchcam draws power from built in USB-C socket that is connected to a vehicle USB socket. As for the user interfaces, it has a small speaker, a volume potentiometer, System status LED, GPS signal status LED, Camera alert LED, and a Software update button (more on that later). In order to know the current position, Catchcam has GNSS module with an on-board Antenna. Moreover, to reproduce audio alerts, Catchcam incorporates DAC, Low-pass anti aliasing/reconstruction filter, and an Audio amplifier.

    Lets go through the components one by one.

    Components

    Microcontroller and Flash

    First we will choose the microcontroller. Initially, I was thinking about choosing one of the STM32F microcontrollers such as STM32F407 for example, with the hardware FPU, but the prices are astronomical, and in my opinion, there are better and cheaper alternatives. Futhermore, the STM onboard Flash memory is around 1MB max., which might be too low for us in order to store more than all the camera positions along with audio samples. In order to incorporate all of that, I would certainly need additional external flash which would increase the cost and complexity of the design.

    The decision has been made on the popular [rp2040](https://www.raspberrypi.com/products/rp2040/specifications/) microcontroller from Raspberry Pi Ltd. I've really liked this option because it features flexible I/O with dual-core Arm Cortex-M0+ processor, 264 on-chip SRAM, and best of all - Drag-and-drop programming using mass storage over USB. I love the idea that you can simply update the software by just drag-and-dropping already built firmware, which is ideal for project because an ease of updating camera positions is a must! You don't need any external hardware or software to update, nor you need any special computer knowledge. It's as simple as using an USB drive stick.

    The software resides on the `W25Q128JVSIQ` external 16MB flash chip, which is a plenty of storage for all the camera positions and audio samples (which populates most of the flash) along the software.

    GNSS Module and Antenna

    The second major part of the project is a GNSS module. I've searched for a low cost solution and stumbled on the `SIM68M` module from SIMCom Wireless Solutions Co.,Ltd. I've also seen u-blox ones, but I havent taken them into consideration because I've had good experiences with the SIMCom modules in the past. SIM68M features an in-built LNA amplifier with support for the active GNSS antenna. Futhermore, SIM68M supports all of the major GNSS satellite constellations so the device can work across the globe.

    The second important factor is the GNSS antenna. I've spent great deal of time searching one. The idea is that the Catchcam would reside on the vehicle's dashboard with the clear view of the sky in order to achieve best signal reception.

    There are several antenna options to choose. There are two major divisions of the GNSS antenna types: active and passive. The difference is that the active antenna has build in LNA amplifier with the SAW filter in order to amplify and filter signal. Passive antennas lack those features. In the high-noise/low-signal scenarios, the active antenna is recommended. In my case, with the clear wive of the sky, and with the GNSS module build-in LNA amplifier, I've chosen the passive antenna type. Moreover, I've heard that there might be a problem if you use both the active antenna and in-built LNA because there might be an over-saturation of the signal, but I'm unsure of the claims because GNSS signal is rather weak anyway.

    Besides active and passive ones, GNSS antennas comes in different packages and I will name a few. There are PCB Patch antennas, Ceramic Chip antennas, Ceramic...

    Read more »