Offline speed camera detector designed for a hassle-free driving experience, while respecting your privacy.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
After an extensive search for a suitable off-the-shelf enclosure, I decided to design and 3D print a custom enclosure for my Catchcam project. My requirements were specific: a small and easy-to-assemble enclosure. I wanted to avoid the hassle of modifying a generic enclosure by drilling holes and cutting openings. By designing my own enclosure, I could ensure a perfect fit for my project’s needs.
Note: If you’re interested, you can pre-order a sample at vnucec.ivan@gmail.com.
The main inspiration for the enclosure design came from the Digilent Analog Discovery 3 device. I really liked the look and feel of that enclosure, especially the rounded edges and the overall simplicity of the design. I’ve decided to go with a similar design for my Catchcam project.
The enclosure is designed in FreeCAD which is a free and open-source parametric 3D CAD software. It took me a while to get used to the software, but I’m quite happy with the results. Although I have some experience with CATIA, I’ve decided to go with FreeCAD because it’s free and open-source. The journey was quite challenging because FreeCAD has a few quirks and you need to get used to the way it works. Also, FreeCAD was crashing quite often without any warning, so I had to save my work every time I’ve made some significant changes. Actually, the main frustration was that they had published a first major release v1.0 which implies that the software is stable, but it’s far from it. I’ve also tried OpenSCAD which is a script-based 3D CAD software because I love the idea that you can create 3D models using code, however, for complex shapes like the enclosure, the OpenSCAD code would be too complex to manage.
Catchcam enclosure dimensions are 65x65x18 mm. The enclosure is designed to be 3D printed in two parts: the top and the bottom part. The top and bottom dividing plane cuts trough the middle of th e USB-C, LEDs and the Volume rotary knob because those parts are sticking out of the PCB and I wanted to make assembly as easy as possible. The bottom part of the enclosure has a circular cutout for the speaker while the top part is solid. The two parts are held together with four ISO7046 M3x14 screws located in the corners of the enclosure. The enclosure will be printed in PLA, but I might try printing it in ABS or PETG for better durability.
The first prototype of the enclosure had screws located at the top of the enclosure, but I’ve decided to move them to the bottom because I wanted to make the top part as clean as possible. The screw holes are designed to be self-tapping so the screws can be screwed directly into the plastic without the need for a nut. I’ve also added a small chamfer to the screw holes so the screws can be easily screwed in. For the next iteration of the enclosure, I would like to avoid using screws for assembly and try to design a snap-fit mechanism.
I’ve also added circular cutouts for the LEDs in order to include small plastic light diffuser pipes in order to make the LEDs more visible. The diffuser pipes are glued to the enclosure with a small amount of super glue.
As you saw in the image above, the diffuser pipes holes are splitted in half for easier assembly, however, I would like to experiment with a solid hole in the future so the diffuser pipes can be pressed in without the need for glue. Moreover, I have a problem with the diffuser pipes because they are not the right length and they are interfering with the LEDs so I need to grind them down a bit in order to make them fit nicely.
I’ve especially paid attention to the distance between the PCB and the top part of the enclosure because of findings in the Molex GPS Ceramic...
Read more »In this post, I will discuss the design and implementation of the GNSS circuitry for my Catchcam project.
If you haven’t already, I recommend reading my previous post on Catchcam: Choosing Components to get some background on the component selection process. In that post, I discussed my decision to use the SIM68M
GNSS module and the KH-GPS252504-WY
Ceramic Patch antenna for my project. In this post, I’ll dive deeper into the design and implementation of the GNSS circuitry.
Note: If you’re interested, you can pre-order a sample at vnucec.ivan@gmail.com.
SIM68M
is quite a simple GNSS module. It is powered by a 3.3V supply, has a built-in LNA, supports both active and passive antennas, and communicates over UART using the NMEA protocol.
However, I’ve encountered a couple of issues during implementation.
The datasheet specified a baud rate of 115200 (see the image below), but in reality, the module operated at 9200 baud. However, this was not a big issue, because the baud rate can be easily configured by sending the appropriate AT command over UART.
Additionally, the datasheet lacked information about the part orientation in the reel, leading to assembly problems at JLCPCB. I’ve had to opt for manual inspection option, which added a small extra cost. Other than that, I am quite pleased with the performance of the module.
I’ve decided to go with the 25x25 mm KH-GPS252504-WY
GNSS antenna.
It was really cheap one, although the datasheet is a bit lacking when it comes to the recommended ground plane size (more on that later). I reached out to the manufacturer for some clarity, and their customer support was surprisingly helpful. They told me a 60x60 mm ground plane would do the trick, but they didn’t really explain why. Still, they were generous enough to offer 10 free samples for our project, which was a nice gesture.
I’ve chosen GND - SIG/PWR - SIG/PWR - GND
stackup for my 4-layer PCB because the GNSS Antenna needs a solid ground plane beneath it to work properly. Antenna is placed on the top side, while the GNSS module and the rest of the system circuitry is placed on the bottom side. This way, the antenna feed pin is as close as possible to the module in order to minimize PCB signal loss and interference. The stackup I’ve chosen is not ideal because the inner signals are not shielded by the ground planes as they would be in a more popular SIG/PWR - GND - GND -SIG/PWR
stackup. The ground size is set to 60x60 mm, as recommended by the antenna manufacturer.
I couldn’t manage to get 50 Ohm impedance on the GNSS signal trace with the chosen stackup (they were exceeding 1 mm in width), but I’m not too worried about it because the trace lengths are much shorter than the GNSS signal wavelength. I’ve also added a Pi matching network footprints to the PCB, and added 0 Ohm resistor so I can to tune the signal trace later.
I’ve spaced out any other trace or component that might potentially interfere with the GNSS signal. I’ve surrounded the GNSS signal trace with lots of ground stitching vias to create a signal waveguide in order to minimize interference.
Note that the antenna resonant frequency (and efficiency) shifts with different ground plane sizes as shown in this Application specification, and depending on the size of the antenna and the PCB, there is a sweet spot where the antenna efficiency is the highest. In my case, I had to guess because the datasheet didn’t provide any information on the ground plane size.
I would like to mention...
Read more »Making progress on my #Catchcam project - a speed camera detector.
Just started writing the first software for it and now debugging using Raspberry Pi Pico and VS Code.
If you're interested in trying out a sample, send me an email at vnucec.ivan@gmail.com.
After weeks of waiting, Catchcam boards have finally arrived!
I've ordered 10 boards with components assembly included. The quality of the boards is exceptional.
The boards are quite clean and the components are well soldered.
I've powered up the board, and tested the power supply voltages. They all seem fine.
Next, I will try to flash and debug a simple program. Stay tuned!
(You can pre-order the Catchcam - Speed camera Detector sample at vnucec.ivan@gmail.com.)
In this post, I will be discussing the audio circuitry of the Catchcam. The audio circuitry is responsible for converting the digital audio data from the microcontroller into an analog signal that can be played through a speaker. Below is a block diagram of the audio circuitry of the Catchcam:
The audio circuitry consists of:
- power supply filtering,
- digital-to-analog converter (DAC),
- anti-aliasing (reconstruction) filter (AAF),
- audio amplifier, and
- speaker.
Let's discuss each of these components in detail.
## Power Supply Filtering
When designing an audio power supply, it's important to ensure a clean and stable power source. In this case, the power supply needs to be at 5 volts and will be sourced from the USB connector (VBUS), which is connected to a vehicle's USB port.
However, vehicle USB ports can be a bit noisy, so we need to filter out this noise before it reaches the audio circuitry. A common approach that I've seen on the internet is to use a PI filter.
### Avoiding Ferrite Beads
Many PI filter designs online utilize a ferrite beads to prevent digital power rail ripple. However, I've read here and here that ferrite beads can actually amplify noise at certain frequencies and are not recommended for new designs, regardless of how popular they are.
Instead, I decided to use a `MLP2012H2R2MT0S1`, 2.2 μH inductor in a small 0805 package rated at 1 amps.
### Calculating the Capacitor Values
I spent a lot of time finding the right capacitance values, but on the same post above it was written: "Overall, if the filter performance is not critical, don't spend your time overanalyzing it". This have had me realized that the exact values of the capacitors doesn't matter that much, as long as they're in the right ballpark.
One thing to be careful about is the USB bus input capacitance because it is restricted by the USB specification to maximal 10 uF. However, I've placed more than 10 uF in parallel in order to increase the filtering. It can be done in my case because I have added an inrush current limiting IC connected to the VBUS line (see my older blog post about choosing components).
### The Final PI Filter Design
So, here is the PI filter I ended up with:
This filter should effectively remove the noise from the vehicle's USB port, providing a clean 5V power supply for the audio circuitry. I've also added a test point to measure the voltage ripple but I haven't measured it yet.
You may ask why there are multiple 0.24 Ohm series resistors? The series resistors provide additional damping and help with stability of the filter because ceramic capacitors have quite low ESR values compared to the Electrolytic caps. Why two 0.24 Ohm in series and not one 0.58 Ohm you might ask? Because I want to reduce bill of materials. You will see it in other parts of the schematic as well.
Here is a video from MicroType Engineering that I've found useful. It explains the design of the PI filter on a real world example. Also, this document from Texas Instruments explains the damping in more detail.
I also want to mention this blog post from Andy Brown, where he explains the USB filtering in more detail with beautiful oscilloscope graphs.
## Digital-to-Analog Converter (DAC)
The DAC is responsible for converting the digital audio data from the microcontroller into an analog signal. I've chosen the `TM8211` DAC which is chinese version of `PT8211` DAC. It's a 16-bit two-channel DAC with I2S interface. Because it's R-2R type, the output voltage swing is from 0 to VDD/2 volts (as demonstrated here). So, in our case it's 2.5 volts. DAC sampling rate is set to 44.1 kHz, which is the standard audio sampling rate for CD-quality audio. The higher the sampling rate, the better the audio quality, but it also requires more memory (44.1 samples per second of audio) to store the audio data. We are using only one channel of the DAC because we have only one speaker.
I would like to mention this video from...
Read more »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,...
Read more »
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates