0
\$\begingroup\$

I am building a small GPS tracker for my car using a Raspberry PI Zero plus some additional components.

I would like to keep it off unless the car is turned on or it's moved forcefully.

To do that I am planning to use an:

  • SW18020P
  • NE555
  • an NPN transistor

Because car alternator can produce more than 12v I am planning to add an LDO or a Switching Regulator to bring down the voltage to 12v roughly. Even if the voltage will be below the 12v it's ok anyway, both the SW18020P and the NE555 can work with smaller voltage.

The raspberry pi zero w + additional components (gps / gprs modem) will consume roughly - rpi zero w 120ma - 3g modem 230ma peak (the 230ma peak was reached during the upload test with speedtest, 150ma when connected with a low load like ping, 0.05 when not connected to internet) - the gps is a NEO M8N, I didn't measure the consumption of the board I am using but the spec of the module states that it should consume at max 67ma (I am planning to use it in power save mode so it will consume roughly 5ma after the acquisition that for my model is stated being 20ma roughly)

Even if I need the current at 5v and I will add an LDO or a switching regulator after the transistor (which one? I will ask later :)), for the sake of simplicity I will ignore that and consider that the current will be at 12v.

In total the npn transistor will need to handle at least 120 + 230 + 70 = 420ma.

Online I found this schematic schematic

that pretty much does what I need.

The idea is to keep the output pin of the NE555 high for a few minutes (ie 3 minutes, I will change the size of the resistor to increase the time) and then after the software on the rpi will finish to start it will use a pin on the board to drive another NPN transistor (I will add a resistor to control the amount of mamps it will absorb) to keep the rpi running even after the timer will stop to keep the output high and the rpi will use that to turn it off. Of course the rpi will not turn off if the timer will keep output high but in that case the software will realize that it is still running, enable the power again and try to keep tracking for X minutes until it will detect that it can be turned off again (a nice while true loop ;))

I potentially can add something like this http://www.hobbytronics.co.uk/mosfet-voltage-level-converter to try to detect if the output is high before trying to shutdown but from an application point of view there isn't any real advantage (the SO on the SD will be mounted in RO and only a partition of the SD will be RW with the noatime and sync options enabled, it will use a very simple approach to write in an uniform way on the partition but that is for another topic)

Questions:

  • can I use the transistor contained in that schematic? The BC546 ( https://www.sparkfun.com/datasheets/Components/BC546.pdf ) looks like being a cut off type so the emitted voltage will be reduced, it should still be fine because on the other end of the transistor the will be the transformer (ldo / switching regulator) to bring down the voltage to 5v, and it looks like it accept a maximum of 100ma so in the schematic there is R2 to reduce the current to 50ma, the ne555 should be able to provide more than 200ma.
    • From the schematics it looks like the collector needs more than 50ma to emit 12v, roughly 62/63 ma, but I cannot provide more than that otherwise it will provide less current, did I read the graph at the end correctly? something sounds off (ie. I misinterpreted)
    • As alternative, can I use a TIP120? it looks like it works with 12v, can handle up to 5a and that 50ma are good for it to work with 12v
  • The gps tracker will need roughly 0.5a to run at full load (at 5v but let's consider 12v, it is safer anyway), how much bigger the transistor needs to be? Five times more? I will add an heatsink anyway because it will be in the circuit in the car and, especially during the summer, it will be HOT
  • The circuit is built to work with 5V, I will use it with 12V, it means that I will need to change the watt ratings of the resistors and capacitors, but I totally have no of how to size them :/
    • As far I understand, I cannot keep using resistances of the same size because I am using a greater voltage, I ran a few calculations, can you tell me if the new sizing are fit for the schematics? I tried to keep the amount of Amps (I used this online calculator https://www.rapidtables.com/calc/electric/ohms-law-calculator.html)
      • R1 (as far I understand I need to check the voltage drop of the led and the amount of ma I want to use to calculate it properly, I will do it later but with a voltage drop of 1.8v and 25ma I would need roughly 400ohm)
      • R2 ?ohm (see question above related to the transistor)
      • R3 2.4Kohm
      • R4 2.4Mohm
      • I am also planning to switch to 1w resistors, is that fine?
    • C2 is used together with R3 to control the amount of time in which the NE555 will power the trigger pin, I guess I need to keep the same amount of power in C2 and, after a few calculations it looks like I should use a 20uF capacitor (the exact number is 17.36 but 20 is close enough), while C1 is used to stabilise the control volt pint of the ne555 so 0.01uf should still be fine
  • As I stated before, I need to bring down the voltage from 12v to 5v, considering the delta in the voltage and considering the amount of current that needs to be handled, a switch regulator would be a better fit, can you point me out to which one should I use? And which additional circuits / components do I need?
  • I guess it would be better to add a fuse somewhere before/after the switching regulator, is that true? If yes can you point me out on how should I do that?

Sorry for this VERY LONG post, I am a soft eng and my experience with electronics is close to nothing, I barely know how to read a schematic or a ic sheet, so I have a lot of questions :)

\$\endgroup\$
4
  • \$\begingroup\$ Note that a continuous 120 mA draw will flatten a 60 Ah battery in 20 days, so you might want to think about ways to reduce the power consumption, e.g. with a lower-power controller chip, a low quiescent current regulator made for automotive use, a CMOS 555 chip, etc. \$\endgroup\$ Commented Feb 3, 2018 at 17:15
  • \$\begingroup\$ @AndrewMorton thanks for the hint but which is the component that would draw 120ma continuously? Are you talking about the NE555? From my (limited) understanding the switch consumption should be as follow: roughly +/- 15ma ne555 + 5ma the vibration sensor when it is off and roughly that + 50ma transistor + 30ma led when it is on that is 100ma. The purpose of the switch is to be "on" when there is an intense vibration so it should (magic word) never be on "continuously" but only up to 3 minutes consecutively and even if 9 of 10 times it would start without the car being ... continue after ... \$\endgroup\$ Commented Feb 3, 2018 at 17:51
  • \$\begingroup\$ ... on should still be fine because it would consume continuously 34ma in 3 minutes and 20ma when off. However, I really like the idea to lower the consumption and using a low power led (5/10 ma), using as you said, a LMC555 or a TS555 (their consume is negligible, it is below 1ma) and using a NPN transistor that needs less than 50ma would improve the whole situation ... but still, which kind of npn transistor can I use? \$\endgroup\$ Commented Feb 3, 2018 at 17:56
  • 1
    \$\begingroup\$ My apologies, I missed the first half of the second sentence in the question. You might be able to find an automotive regulator with an output-enable pin, so one small regulator for the sensor circuit and another for the rest of the circuitry. Something from the PIC10 microcontroller range would give you much more versatility for the sensor, and a very low current usage. \$\endgroup\$ Commented Feb 3, 2018 at 18:26

1 Answer 1

1
\$\begingroup\$

Just to update, I decided to place an USB adapter for the car with multiple outputs, looking at the specs of the IC it looks like it will lose less than 1 ma in the conversion making it safe enough to be used to power the circuit above.

In addition I will change the NE555 as suggested by @AndrewMorton to reduce the power consumption and I will look for an alternative to SW18020P to reduce the consumption further.

Anyway, I did a few tests adding an amperometer at the 5v end and supplying 12v to the usb adapter for the car using a dc power station to measure the provided current and it looks like the when the amperometer at 5v reports roughly 0.2 amp the station reports roughly 0.09 amp (it makes sense, A = W / V).

It means that if the switch will consume 15 ma at 5v the load on the battery will be roughly 7ma and it means that to discharge the battery to the half it will take roughly 130 days.

If the GPS tracker will stay all the time on (let's consider that it will consume the maximum consumable power all the time -> peak), it will use half of the battery in roughly 5 days that is acceptable to me.

I still have to figure out with which component I should replace the SW18020P.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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