So I'm putting an Arduino in my car as an alarm system, and figured I'd make an audio system as well.
I was thinking of using a raspberry Pi, but then I figured if I used an Android phone, I'd have GPS tracking, maps, and voice commands using the software already on the phone, and it won't cost much more, in fact, it's almost the same price as a pi with a small LCD screen and a battery pack.
What does Jow Forums think? Raspberry Pi, or an el-cheapo tablet? If I used the android thing though, I'd have to program it to stop charging when the battery is full, and start when it's down to like 20%, whereas if I used the pi, I'd get a deep cycle lead acid battery that can run on constant charge
spend an extra $1 or so on a TP4056 to stop it from overcharging if you don't already plan on it
Cooper Morales
The problem is that Lithium batteries are designed to be charged and discharged regularly. If it holds a charge too long, it starts swelling, and if it's discharged too far, it'll lose cycles regularly too. Never had one of those. It says "charge/discharge protection" so does that mean it'll charge and discharge at regular intervals, or just keep charging until full then trickle charge once full?
Joshua White
Trickle charge I think. I'm not entirely certain
Angel Turner
Ah well. If it's trickle charge, I can just use a voltage regulator with the Arduino and the cars battery to step down from 12v to 5v, and use that to charge using the things existing USB port. They usually have built in trickle charge components for those people who leave their phones on charge while they sleep
Jace Mitchell
Why aren't you just hooking up your tablet to the car's battery? Or are you planning on having it replace your Arduino, and running all the time?
Eli Campbell
I wanna have it running all the time, so that if the car is stolen, I can track it using the GPS in the car even when it's turned off.
Jose Lee
When the car is off, that is
Christopher Evans
Then you need it to have mobile internet too?
Gabriel Jenkins
Yeah, but if it's an Android phone or tablet, that won't be much of a problem. 1 gig a month at most should be enough, and that's not much of a monthly cost (think it'll work out to like 10 dollars a month in my country)
Wyatt Baker
You might need an arduino or similar for your alarm requirements and other cool stuff to add later
Gabriel Perry
With both options, android mobile or raspberry pi
Ryder Johnson
RaspPi allows you to do low level shit directly.
There's a few tricks you could do with the Android tablet and its audio jack but that's of course much more limited.
Liam Edwards
Well in theory you could write an Android app to interface with the Arduino via USB com port, couldn't you?
Christian Williams
As far as I know you should not rely entirely in GPIO pins in the rbpi due to its current limit per pin. If you are fine with adding these extra circuits and protections, go ahead. The same for android.
Kevin Gray
The same is true for an Arduino.
Mason Bailey
Yes as a usb host. Even bluetooth...
Liam Brown
>The same is true for an Arduino. The raspberry pi still being more fragile tha the arduino.
Brandon Lewis
But why not just use relays? Both Arduino and Pi output pins are meant more for signal rather than full application anyway
Jordan Jenkins
Well also consider that some module might need 5V, which is the logic voltage of most arduino, raspberry uses 3.3V, you might need a logical voltage converter. Aka. Extra hardware.
Jeremiah Walker
Well yeah, but dirt cheap hardware. Use the standard 5v or 3.3v output from the Arduino or Pi as a signal for the voltage regulator, which literally costs like 5 cents
Juan Thomas
In general, it's not a good idea to run the Arduino directly on bigger hardware, it's always better to just run it as a signal control center to keep it from blowing
Jace Bell
Indeed, I'm just suggesting a way of setup that can be robust for OP's project as I learned studying Mechatronics.
Thomas Torres
Wow, lots of replies...
Ok so here's my plan: spend 100 dollars on the whole project. Right now, I have an Arduino r3, and a couple of Arduino mini 3.3v. I'll only be using the r3 though, because it can take a 12v input, so I can just plug it straight into the cars battery and have it on constantly that way (also, it takes very little power, so I don't need to worry about having a dead battery if I don't drive for a couple of days).
I can get an android tablet with 3g for around 90 dollars, but it's very basic and I don't know if it'll do the job. Or I can get a raspberry pi with an LCD and a 12v lead acid battery, and a 3g/GPS module for around 110 dollars total.
In both cases, I'd still have to get a mobile internet package, and in both cases, I'd need to write some code to get it to do everything I want it to do.
My issue is, if I have the android tablet, I'd need to somehow get it to keep discharging and charging. What I was thinking of doing was having the 5v and ground pins from the USB cable on a dpdt relay that's activated by the Arduino, and have the phone send the Arduino a signal to say "hey, my battery is low or full" then the Arduino activates or deactivates the relay. But again, I don't know if that will work or not.
Sebastian Evans
Anyone know if the USB will work without the 5v and ground connections? Just to send data from the android to the Arduino
Christian Nelson
You need at least a common ground.
Ryder Price
Ok so then if I just exclude the 5v pin, and have that on a relay, the phone shouldn't charge... But will it still allow the USB to communicate? Preferably without blowing the USB port
Carson Thomas
Just get a tablet with a sim slot and call it a day. You can also take it out when you leave your car so there is less reason for it to be stolen. Not that anyone is going to steal your shitbox anyways.
Leo Wood
Why do you want to stop your phone from charging? Phones already have smart charge control.
Aaron Edwards
Ah sorry, you probably don't want to drain the starter battery
Evan White
Having a LiPo battery on high charge constantly (above 90%) is a fire hazard, it swells up over time and eventually explodes.
Landon Nelson
That too yeah, but it'll take so little power, that won't be much of a problem either. In general, it'll take about 2-3% of a 12v45ah car battery over 24 hours.
Owen Lee
Surely there would be some sort of standalone GPS unit that you could get (i.e. a pet tracker) that you could use if you want to know where your car is?
Ryan Ward
It's not only about tracking the car, it's also having a GPS map system so I don't have to use my cellphone and drain my phone's battery
Easton Williams
Make a tutorial please once you are done. I'd be interested in doing somethibg like that but I'm a brainlet.