Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Utter beginner

  1. #1
    Junior Member
    Join Date
    Dec 2017
    Posts
    4

    Utter beginner

    Hello Guys

    Forgive my ignorance, and do please tell me if I'm barking up the wrong tree, but I have an issue that I wondered if one of these boards could solve. I have a problem keeping a GPS tracker charged on my Quad. The quad sits in a farmyard, miles from anywhere, and trying to keep the tracker charged from the quad's main battery has failed miserably because my buck device, used to power the tracker via USB, from the main quad battery, uses too much power at rest. Even when not charging, it uses some 55mA, I think I measured it, rendering the quad's battery flat in a matter of only a few days. What I would like to do is use one of these microcontroller boards to turn on the power to the buck device periodically, thus topping up the tracker's battery, and then turning off the buck device again. Two hours every 30 days should suffice, for example, and would do away with the 55mA constant drain. This is to keep the tracker alive all winter, when I don't use the quad at all. In summer I use it regularly, and I have no issue keeping everything topped up, simply by running it often.

    A more sophisticated solution would be to monitor the tracker's battery voltage, and turn on my buck device when required, and then off again when charged. On at say 3.5V and off again at 4.1V. It might also be nice to monitor the source voltage, and suspend operations if the main voltage dropped below a certain level, 11V for example, to prevent it killing off my quads small 14Ah lead acid battery completely. I know for winter I could use a seperate pack, of large capacity, and just keep that in storage during summer, but that lacks a certain amount of elegance in my opinion.

    Is this something that could be achieved by a complete and utter beginner with say the Teensy 3.2 board? In case you were wondering, I really do mean a beginner. I have no coding background, little to no knowledge of modern electronics, and can just about wield a soldering iron and work a PC. To give you an example, I read the term library earlier, and didn't even know what that was.

    Sorry to just arrive and ask a question, but I don't know how else to go about it, due to my lack of knowledge. If it's not the done thing, no problem, just let me know.

    I'll subscribe to the thread to monitor for any possible replies.

    Thanks in advance.

  2. #2
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    623
    Welcome, sutty! I think your chances of success are pretty good.

    How were you thinking about powering the microcontroller? I'm pretty sure you can buy a module with a solid state relay to perform the switching to your buck regulatory. You might not even need that if the regulator has an enable pin that the microcontroller could control directly. Can you tell us the model of the buck regulator?

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,069
    To keep the T_3.2 from burning off half the power savings while waiting to charge you can use the Snooze library https://github.com/duff2013/Snooze to Snooze the Teensy in a low power mode that would wake it from a sleep to check voltages to decide when to enable the charger.

  4. #4
    Junior Member
    Join Date
    Dec 2017
    Posts
    4
    Thanks guys. I was planning on powering it from the battery pack in the tracker, a single cell lipo, 3.7V, 5000mAh, and indeed I was hoping to make use of the snooze features, to reduce the power consumption to an absolute minimum, exactly as just described by defragster. As he mentioned, if I didn't, I would burn off a lot of the savings in operational mode, but as I understand it, when in snooze mode, the power use is very low, so I could save a lot.

    Sadly though, despite your confidence, I'm only capable of coming up with a high level overview, or plan, and do not have a prayer of implementing this without extreme hand holding. If I bought one now, I would just sit looking at it, thinking that's pretty. I barely understand the concept behind how these devices work, let alone putting something into practice.

    So, the plan.

    From power on, always run the program.
    Check T3.2 supply voltage (Tracker battery voltage, TBV) and check source battery voltage (Quad battery voltage, QBV)
    If TBV is less than 4.1V and QBV is greater than 11V then enable power to the buck regulator. (Might have to rethink this 4.1 voltage, due to load pulling it down a little. Tests would confirm required value.)
    Repeat above line regularly, until one of the conditions fails. (Every 1 minute?, 5 minutes?) (No danger of overcharge due to internal charge protection circuitry, but would be wasting power, if already charged and not checking it often enough. Trouble is, might have to take it off charge to read it. Anyway, could do, remove power to buck device, wait 10 seconds to equalise a little, read TBV, if less than 4.1 re-enable power.)
    If TBV is greater than 4.1V or QBV is less than 11V, then suspend activity, snooze, for 7 days.

    That's it. No need to suspend operations entirely on failing the QBV test, because if it wakes up for a short time, once per week, and just checks the QBV, it will still be less than 11V, if I haven't done anything about it, and it will quickly go back to low power mode for another week, so there will be no significant additional drain on the battery. I mean, a few uA when sleeping, and a few mA when running, once a week for a few seconds. It should be largely nothing. If I have done something about it, charged the quad's battery, then it will resume charging operations on the tracker battery.

    Now you see that I haven't ever done any coding, from my pitiful efforts to describe it above, but this is what I would want to be able to do, in words, sort of, though I'm sure I'll have missed something.

    So if practical, and I buy one, what would I do next? Simulate it, is there one? Additional components?

    So little knowledge I'm afraid.

    Thanks

    Sutty

  5. #5
    Junior Member
    Join Date
    Dec 2017
    Posts
    4
    Quote Originally Posted by pictographer View Post
    Welcome, sutty! I think your chances of success are pretty good.

    How were you thinking about powering the microcontroller? I'm pretty sure you can buy a module with a solid state relay to perform the switching to your buck regulatory. You might not even need that if the regulator has an enable pin that the microcontroller could control directly. Can you tell us the model of the buck regulator?
    Sorry I missed answering this earlier, and thanks for the warm welcome. Not sure I can tell you the model of the regulator. Should I take it apart do you think, and look at the chip? Is it that which would help? At the moment it is fitted and hidden inside the quad.

    Regards

    Sutty
    Last edited by sutty; 12-21-2017 at 08:12 PM.

  6. #6
    Junior Member
    Join Date
    Dec 2017
    Posts
    4
    Okay, I dug it out of the quad, and it says, HitCar 2003, DC/DC converter 12V to 5V 3A Max. If that helps. I tried to upload a photo, but it failed, for some unknown reason. Maybe I don't have the privileges yet.

  7. #7
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    6,069
    *Photo upload limits to 1MB and JPG or PNG works - may need to resize it down to pass the upload check

    >> Snooze seems easy to use - once you get the hard part done adding the Snooze should go easy. Should maybe be a sample even.

  8. #8
    Senior Member pictographer's Avatar
    Join Date
    May 2013
    Location
    San Jose, CA
    Posts
    623
    Is this the buck regulator? The fourth image in the listing has a group of pictures one of which is a yellow orange circuit board. There's an integrated circuit with eight pins labeled "1" in the photo.

    That part might have an enable pin. Someone skilled at modifying printed circuit board assembles could attach some wires.
    If you have the time and the budget, it helps to have a spare or two for experimenting.
    The process could go like this:
    1. Read the extremely fine print part label on the IC
    2. Search using the part label to find the data sheet
    3. Look up the pin assignments to find the enable pin
    4. Locate the ground trace for the
    5. Cut the trace leading to the enable pin
    6. Solder wires to the enable pin and to ground.
    7. Modify the blink code example in the Teensy to make the 'on' timer longer than the 'off' time.
    8. Connect the enable wire to the Teensy LED output pin (see the reference card)
    9. Connect the ground wire to the Teensy ground
    10. Attach your multimeter to the output of the regulator to measure the voltage
    11. Apply power to the Teensy and the regulator.
    12. The output of the regulator should pulse like the LED

    If this works, you've got a nice easy way to control the regulator without an additional SSR or relay circuit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •