Nazo
Posts: 18
Joined: Sun Jul 29, 2012 12:01 pm

How good is the camera? Wondering about viability for car multi-purpose device.

Sat Sep 01, 2018 7:43 am

So I'm sort of wondering about the viability of using a Raspberry Pi (3 I guess? I presume a Zero couldn't handle this -- I have a 3 I can spare right now and a Zero W I can spare soon-ish) in my car. I'm sure you see a lot of that sort of thing here. IF I went that route I will of course have to figure out how to get it to do the other stuff I want (the main thing being of course some sort of decent quality music setup) but before I even discuss stuff like that I'd like to ask how its camera quality is. I currently have a dashcam that has been making itself pretty close to useless. Even if I set the maximum recording resolution the video is still too low quality to get things like people's tags even up close (it's not even a problem of resolution so much as general quality I think) plus for some reason every single one I've ever had fails to properly loop record so they fill up the memory card then quit recording until I manually free up space (which means I have to just format because there is no way I would dare try to go through individual videos and delete while I'm driving, but sometimes I'd rather keep something from earlier in the day until later.) But I don't know if a RPi could really handle it any better (though I do assume it would at least handle loop recording properly which almost might be worth it just on its own if it's no worse.) Ultimately it would be ideal if it could actually even keep recording while the car is off, but I don't think I want to run it straight off the main battery and I don't know if battery packs could reasonably hold out for that long. (I do have a little power supply thing for the RPi that uses a LiPo battery and I could even connect in a bigger battery/pack to it if it came to that, but the car goes through insane amounts of heat in the summer and at least cold enough to be rough on lithium ion batteries in the winter even if winters here are certainly quite mild overall.)

I've been debating several different ways of doing all this, including maybe setting up something with some sort of cellphone, but a RPi would be the cheapest and most controllable way of doing it, plus it can't look worth breaking in to steal and with the RPi I can actually put it right inside the part where the clock used to be on top of my dashboard (which would also make it really easy to just run the camera straight up to the front and pull power from the cigarette lighter slot below -- I actually already ran a wire to that for one of the many clocks I've tried in there that died, so no work needed there even. (Though of course this serves as a reminder of my curiosity of if it could handle the heat -- that's what killed all those clocks I guess. Unless it was just plain cheapness which is also a distinct possibility...)

wh7qq
Posts: 1085
Joined: Thu Oct 09, 2014 2:50 am

Re: How good is the camera? Wondering about viability for car multi-purpose device.

Sat Sep 01, 2018 7:19 pm

The new RPi cameras are reasonably sharp and will probably provide the resolution you require but heat is the big enemy and there is no way to account for that. The air temp in a closed car parked in the sun can easily exceed 60 C. The throttling that occurs at high temps with the RPi could be a problem when you first start on a hot day...if it survives at all. A USB connected solid state disk could easily hold all your video content but again, heat is a factor. If you set up the RPi to boot from the SSD (see instructions in this forum) it might survive the abrupt loss of power when you turn off the ignition. You can get longer camera cables for the RPi camera so it can be mounted anywhere, remote from the RPi. Another factor is the car's "dirty" power...your 5V reducer must be able to absorb the voltage spikes that often happen when the starter motor/solenoid are engaged and turned off.

You still might be better off financially to invest in a better quality dashcam that was designed for the environmental hostility of a car.

Nazo
Posts: 18
Joined: Sun Jul 29, 2012 12:01 pm

Re: How good is the camera? Wondering about viability for car multi-purpose device.

Sat Sep 01, 2018 11:38 pm

Well, remember part of the consideration here is whether it could be a single device to manage multiple tasks. The video recording would be the most demanding by far (I don't intend to do voice control things or anything like that) but not the only task. It might be possible to move it to a somewhat more favorable position now that I think about it. At least out of the direct effects of the sun anyway. I'm not sure just how hot it really gets in my car, but I think 60 seems a bit much (still bad though.) If I can get it further down somewhere or something then it will be in the shaded areas which are at least slightly less extreme than the direct sunlight areas obviously. I don't need anything like an external drive though. It's ok if it just loops some gigabytes worth like my current dashcam is supposed to be doing. So internal storage is sufficient to my needs -- or very minimal external. I also don't need 4K video or anything like that. Just enough clarity and quality that tags up close are readable. Which for some reason even the best dashcams don't seem to have (I suspect they're all a fairly low internal resolution to begin with and of course encode with very lossy settings -- you have absolutely no control over that much really.)

The problem with investing in something better (besides the fact that it would only achieve one purpose anyway) is that that gets quite costly. They can easily exceed my current budget. What's more, a lot of them still look like they may make some of the same mistakes. For instance, I think the reason it's not looping is because vibrations in the car (even set to the lowest sensitivity) are enough to trigger "crash detection" and it's locking the files. (Just my best guess.) I do like the idea of a RPi in this respect because I'd have quite a lot more control such as over those encoding settings. And as great as it may sound to do a file lock on a crash detection, it's basically unnecessary anyway (chances are I'll be turning the car off at that point, but even if I don't -- eg if it's a super minor crash -- if for some reason I think I need to save that video ASAP my intent is to set it up where I can connect in and do things via terminal perhaps through adhoc WiFi or something. But all that is in the "to figure out later pile.")

As far as power spikes go, my car shuts off the accessory slots while starting so it's spikes are at least less extreme than you might think, but if I do this I'll run it through a power pack thing that runs it from a battery probably. If I do allow it to have sudden shutoffs I'll take steps to make the main OS go read-only. I've done this before recently on that RPi Zero for another unrelated task and it actually worked out to be generally easier than I thought it would. I've had the idea to make this a bit less extreme in this case and just make multiple partitions with simpler read-write stuff just for things like logging (if it does write logs at all -- haven't decided) and of course for the video recording.


I know I'm not the first to consider putting a RPi in a car. I was sort of hoping that someone else who might have done so might be able to comment on this as to how well it works out. Heat is indeed the biggest thing I worry about, but it does seem hard to believe it wouldn't handle it at all.

wh7qq
Posts: 1085
Joined: Thu Oct 09, 2014 2:50 am

Re: How good is the camera? Wondering about viability for car multi-purpose device.

Sun Sep 02, 2018 2:24 am

Nazo wrote:
Sat Sep 01, 2018 11:38 pm
The problem with investing in something better (besides the fact that it would only achieve one purpose anyway) is that that gets quite costly. They can easily exceed my current budget.
Fine, so long as replacement costs don't build up on you. 60 C is not over the top for a 3B although I hear you will need to change some settings for the 3B+. Still, if 60 C is your hardware starting point, the temp will rise as soon as you start making computer cycles. If you are not running X11, you might be okay on the heat...mine is worst on heavy graphics/java/etc in a browser window. My 3B starts around 30 C and will go up to just over 60 with heat sinks installed with arctic silver epoxy replacing the junk heat sink tape/goop many ship with.

In addition to the start-up issue, every time a motor or a relay fires and turns off, there is a potential for a spike. Cars are a noisy environment. Filtering as for high end audio systems is in order.

epoch1970
Posts: 2018
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: How good is the camera? Wondering about viability for car multi-purpose device.

Sun Sep 02, 2018 8:36 am

My impression, for a 3b (not plus) is that the CPU on light load measures at about 20ºC above ambient temperature.

60ºC ambient seems a lot to me. Can you check with an IR thermometer the temp in various locations in the car?
(I’ve tested 50ºC ambient with a Pi inside a closed box, light load, no CPU heatsink but Pi bolted to a large alu chassis: no problem at all)
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Nazo
Posts: 18
Joined: Sun Jul 29, 2012 12:01 pm

Re: How good is the camera? Wondering about viability for car multi-purpose device.

Sun Sep 02, 2018 8:06 pm

I don't have an IR thermometer no. It gets really hot here in the summers (34 outside at a time like this) so it definitely gets very hot inside my car even though I usually remember to put covers up in my windshield to at least help (definitely drops it several degrees.) It absolutely gets hot in the car, but I just don't think 60 sounds right at all. 40-50 seems a much more believable range. I plan to put it inside or under things, so it will not be in the sun even indirectly, so it's only ambient temperature to worry about.

I suppose active cooling is not an unreasonable possibility too. Then it shouldn't rise far above ambient even during that first bit of time. It doesn't take much with the RPi anyway. I actually have a metal enclosure that came with a little 5V fan powered from the RPi itself that I was planning to use for something else that could be dedicated to this instead.

EDIT: BTW, for the sound I was thinking of probably going with a USB DAC. Not perfect, but it should be better. The RPi's own audio output is less than great.

epoch1970
Posts: 2018
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: How good is the camera? Wondering about viability for car multi-purpose device.

Mon Sep 03, 2018 7:06 pm

The audio output of Pi is quite good if you set audio_pwm_mode=2
And the driver for the built-in card has the advantage of being able to handle multiple streams in parallel (check the end of the thread, a recent bug may be still lingering). With an i2s DAC you'd need to come up with a software mixer (alsa, pulse, ...) With an USB DAC you'll have to deal with USB and most probably the lack of hw mixer as well.

In any case an add-on DAC shouldn't suffer much from the heat and shouldn't need much extra power.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Nazo
Posts: 18
Joined: Sun Jul 29, 2012 12:01 pm

Re: How good is the camera? Wondering about viability for car multi-purpose device.

Wed Sep 05, 2018 4:54 am

Now that is very interesting to hear. I think in general I prefer USB DACs and I may still do it in this case just so there's that much more actual physical filtering of everything before it actually gets to the final output stage since, as others have stated, the power in a car is a bit of a mess. Plus I think I still have an extra really simple (but sufficiently effective) one around somewhere.

I think what I'll do is once I have the funds go ahead and order the camera (it's not super expensive anyway, but kind of between things here) and just manually set it up and run it for a bit and see how it does. If it doesn't work out all I'll lose is the cost of the camera anyway. I think I'll also see if I can track down a thermometer (I sort of went all online on this and just go by wunderground or whatever these days) and see what it actually reaches in the general area where it will ultimately go. Meanwhile, is there anything specific I need to know about setting it up to automatically record? Specifically I need it to loop like what my dashcam was supposed to actually be doing. I don't need it to do any sort of "crash detection." Provided I have an at all reasonable amount of space for it, it should be fine anyway. My biggest concern was that the CPU would not be able to handle actually encoding high resolution video with a decent enough quality to be usable, but I'm guessing people are saying that it can.

I think I do ultimately want to setup something really simple with a simple small touchscreen, but that will come later rather than sooner.

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 23 guests