2
\$\begingroup\$

I'm going to use my Rasp as a GPS tracking and it should be running even if the car is off; however, I don't want run out the car battery.

To make it happens I added a battery controller (https://www.adafruit.com/products/1944) that receives power from the car DC "car battery" (only when the car is on) to charge the rasp battery and keep it running; nonetheless, when the vehicle is off the rasp uses the backup battery.

To avoid unexpected shut down when the battery is low I'm using a GPIO pin and the output pin "Low battery" of the battery controller to halt the device; however, even if the device is off and the battery is low, the device will still receive sort of voltage (~4v) from the battery.

The issue is, when the car switches on, the raspberry doesn't turn on as the battery keeps supplying voltage to the raspberry, so I need a circuit that detects when the raspberry is off and the car is on to reset the device or at least disconnect and connect the power supply of the rasp and makes it turn on.

I'm not good at electronics, but I'm trying to develop the circuit below, please could someone help me to see if I'm going to the right direction?

I've built a circuit below that disconnect and connect the rasp power supply when the "GPIO 18" is 0 (it will be 1 when the raspberry is running) and the car is supplying voltage (consider the car voltage as 5v regulated for a while).

What I'm planning to do are:

The gate "AND" will charge the capacitors C1 and C2 when the raspberry is off (GPIO 18 = 0) and the capacitor C1 is empty. Once the capacitors are charged, the gate "AND" will be 0 as the C1 will make the NOR output 0 and consequently make the "AND" as 0. The C2 will momently open the relay and reset the rasp.

Capacitors: A) C1 should discharge in ~2 mins, so it is going to allow the raspberry turn on and change the GPIO 18 to 1 B) C2 should discharge in 3 secs and let the relay open and close the circuit (reset the raspberry) .

Sorry but it is hard to explain and I'm not good at circuits.

Power supply

\$\endgroup\$
  • \$\begingroup\$ somewhat off-topic, but the intel edison sounds like a better fit for what you're trying to do than an RPi \$\endgroup\$ – kolosy Dec 22 '14 at 4:59
1
\$\begingroup\$

I am not quite sure if it suits all your needs but the P6 header(http://elinux.org/RPi_Low-level_peripherals#P6_header) on your raspberry is probably what are you searching for. You can simply reset the raspberry by connecting ground to pin 1 on p6.

\$\endgroup\$
0
\$\begingroup\$

If it helps, was looking into doing something similar and found this: http://www.mausberrycircuits.com/products/shutdown-circuit-use-your-own-switch

\$\endgroup\$
  • \$\begingroup\$ Can you provide a summary of the article here? If that link ever breaks, than your answer becomes worthless. Refer to paragraph 4 \$\endgroup\$ – Adam Head Dec 22 '14 at 14:28
0
\$\begingroup\$

Assuming the usb supply is on a keyed, accessory, or ignition switched circuit, this could easily be resolved with a microcontroller. Three inputs, one from the usb supply, one from the rpi, and one from the battery low. A single output to the RPI reset pin. Minimal parts, simple code, and with low power modes in the micro amps it's the best solution.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.