Raspberry Pi smart dashcam / sentrymode

Fed up with door dingers damaging your car? How about a dashcam that captures video of them doing it?

Tesla has a feature called “sentry mode” that does this, but it’s got issues and you need to buy a Tesla. But maybe something similar/better can be made with a Raspberry Pi.

Connect 4 USB cameras, front, rear and both sides of the car. Write some software to capture video to SD card.

Main problem is power consumption. In sentry mode you need to capture images at say 1 fps, and switch to proper recording mode when some activity takes place. Maybe there is a better way, like using an accelerator to detect stuff hitting the car, but would it be good enough to notice door dings and scrapes from keys etc?

Can’t just throw bigger and bigger batteries at the problem, because they have to be recharged. If your commute is only 15 minutes then you need to charge enough in 15 minutes to run for 8+ hours.

Any ideas or comments welcome!


Batteries and super capacitors. I have a couple of dash cams. They use super capacitors instead of batteries.

Rpi and like sbcs do not use a lot of power. I have a first gen rpi B and it uses about 600ma at 1 watt @ 5 volts full load.

I have an Odroid N2 and it uses 5-7 watts at 1.2 amps at full load @ 2 volts.

You could program to go into deep sleep after a certain amount of time or in certain locations to save on battery.

solar trickle charger on the rear deck lid perhaps


Mastic_Warrior, I think you are under-estimating the power requirements. I did a quick calculation and say you are pulling 5W average (1A@5V), if you bought 3 massive 3500F supercaps you could run for about an hour. They cost €75 each, by the way.

cdoublejj, your idea seems more practical, although with a hatchback and tinted windows it will need a creative way to install it.

Need to make use of the traction battery really, but there is no easy way to do that.

Maybe the Pi is just too high power. What you really need is an ultra low power system just monitoring an accelerometer for dings, which then wakes up the recording. Problem again is that the Pi won’t wake up fast enough to capture anything useful.

Record everything and make that work :man_shrugging:t2:

As cam that MIT car stuff did use logitech webcam with custom case so it can do lens

I have two rpis in my car. One for multimedia and dashcam and the other is for rear view and engine reading(not finished yet), so I have experience with HATs and configurations.

If it has to be on 24/7 then connect the pi directly to the car battery. (this shouldn’t be that hard)

For powering, use one of these (I am using the first one and it’s good, no undervoltage problems):


You could even go overboard and buy besides that a UPS HAT and get a 4400mAh battery for extreme cases when the car battery would die. Also alot of UPS HATs have the feature to shutdown the rpi if main power goes out. On top of that it’s gonna ensure no footage will be corrupted because of power outage.

The rpi Zero is the best for single camera but you could buy a rpi 3 and use the USB for additional USB cameras to cover all the angles. Maybe a rpi zero with a USB HUB could also work? I don’t know.

1 Like

Thanks alphazero1990. I’m wondering how fast I can charge a lipo battery pack. Problem is when you search for ones with fast charge capability they all mean on the output, not to charge the pack. Typically 1C is the maximum rate but of course it’s 1C per cell, so with a massive 20Ah battery and sufficient cooling you could probably charge enough to get decent run-time.

What did you use for dashcam software? I should look at what is out there. I was thinking of just writing something myself.

Do you have a have some system in place to detect when the ignition is on?

Doing a little research it seems like you can actually get the power consumption of a 3B down to a little under 400mA idle. You can also put the USB into suspend, maybe even cut power with a FET but suspend is supposed to be sub 10mA consumption, so if only grabbing one frame per second maybe the cameras can sleep most of the time.

Well for the software I am using Kodi 17.6 with a plugin Dashcam. Sadly it doesn’t work on Kodi 18 and the maintainer doesn’t reply anymore.

The skin I use:
The plugin:

There is a thing for ignition detection actually, it’s a power supply/converter like the ones I have posted with that feature.

But for what I suggested Car Battery > Converter > UPS > RPI you wouldn’t need an ignition detection if it would run 24/7. Maybe add a button where you can shutdown and startup the pi when you come home.

Ofcourse there are many options to solve this problem : D I am just brain storming here xD.


home made car battery sized 18650 battery pack out of used 18650s and put it in the trunk :grinning: or just buy an AGM battery and stick that in trunk, charge off the alternator but, idk if the alternator would need upgraded.

On average a Raspberry Pi 3 is fairly low power even with two USB devices plugged in, you’d have to tweak the sensitivity–also if you have an old phone, sometimes you can unplug the flex-cable and reuse the accelerometer & camera modules. If you want to be creative with off-the-shelf battery packs, calculate your power requirements and buy or custom build your own power solution(there are kits out there which can scale to support for charging while driving similar to a phone charger). Depending upon were you live if the weather is “warm to hot” the batteries are less likely to lose charge vs colder environments which a battery can easily go from 99% to 50% in a jiffy.

In my opinion if you downscale to just a Pi Zero the power usage will be much lower and realistic usage shouldn’t need more than two cameras. If you’re paranoid there are 360 degree camera solutions which uses a mirror–I no longer have a link but I once found a YouTuber who modified a Sony blog/action camera 360 attachment on a webcam.

I think it’s going to need to have some smart features to limit power consumption. You can add a bigger battery, but you can’t charge it in the available time when the ignition is on.

I’m thinking it should only run when the car is parked away from home and work, because those locations already have CCTV.

PaintChips, there are commercial dashcams with 4 channels. They are very new so no reviews yet. The side cameras are supposed to clip on the wing mirrors, I guess mostly designed for trucks.

For power stay away from batteries. You can get a cheap OBD2 to USB A adapter. This would power from the 12V battery for 5v for the Pi. On my Bolt EV the 12v battery is charged by the traction battery even when off. So the Pi could run all the time. Would be nice to see the Pi access the cam bus to get the car cameras video feeds. But not sure if this is possible?

Max power consumption of a raspberry pi 4 is 9 watts. A car battery holds around 1000 watts hours of energy. An average compact car alternator is 2000 watts. As long as you drive half an hour a week, your car battery is sufficient.

Easiest is to get an automotive usb adapter with a low voltage cutoff, so the car will always be able to start.

i seem most run time and battery capacity in amp hours and mechanics often measure draw in miliamp hours. apparent even half an amp in draw from the ECU is enough to kill a batter in a week. to bad i don’t know how many watts 0.5amp @ 12 volts is…

oh wow thats 6 watts. so yes you’d up your wattage. car should settle down to 250ish miliamps, aka 0.25amp some cars still draw more even after sitting a good long while

Do you have a have some system in place to detect when the ignition is on?

Whats the age of your vehicle?
Anything past 2000ish and you should be able to detect when the CAN bus turns on

As @Mastic_Warrior stated dash cams use super capacitors and they do so for a good reason. You wouldn’t want to be subjecting a battery (especially a Li-Po) to the internal temperatures that cars get to in places like Texas in the summer or Alaska in the winter. Keeping your battery from becoming a brick or even worse a spicy pillow might be the biggest issue you face with this project depending on your local climate.

Dash cams also have cameras that use Sony STARVIS/STARVIS 2 CMOS sensors due to the dynamic range that they’re subjected to during sunrise or dark which makes capturing a good usable image difficult. You may be able to combat this to an extent with the right polarizing filters and some infrared but there will be times where the image is just unusable.

As far as powering your PI you may be able to get away with using something like a battery bank as they normally have a built in protection circuit. If I were doing this I would use a fuse tap or battery block terminal to a Low voltage disconnect that way I’m not completely draining the car battery while it isn’t running. I would run a 12v to 5v buck converter to the battery bank that way its charging any time that low voltage disconnect hasn’t cut power.

Battery Bank: https://www.amazon.com/ROMOSS-Portable-Charger-Outputs-Compatible/dp/B07H5T9J4L
Terminal Block: Amazon.com : battery terminal block
Fuse Tap: Amazon.com : fuse tap
Low Voltage Disconnect: Amazon.com : low voltage disconnect
Buck Converter: Amazon.com : buck converter 12v to 5v

1 Like

Lithium would be overkill for small dashcams and with a single day runtime IMO.

An extra run of the mill Lead Acid battery (AGM even) with a universal battery hold down kit from an automotive parts store could suffice as long as you connect the two systems properly with a relay so that the car battery is seperate from the camera battery while off, and while running allows for Trickle Charging.

The default relay state would be Normally Open in this case, and you would activate it with the PI which is powered by the car battery circuit.
(Does the isolation make sense?)

Follow a Direct Current wire ampacitcy gauge chart, short distances are key the higher the amperage.

Fusing is likely to be a bit difficult if you need like a 00 gauge (half inch diameter ish) sized cable so keep in mind that you can do the math on what current would be needed to re-charge the accessory system after it has been used and then choose an appropriate conductor size and fuse setup accordingly.

For a really small system you could possibly even get away with a small 12V sealed lead acid battery
(think Power Wheels) style of battery. This also lets you work with easy to find connectors.

All in my opinion of course.

If you want a less DIY product to work with maybe look into these options. (From a former work life no afilliation otherwise; some maybe closed sourced or require you to be authorized to buy as well).