Read battery state
#1
Hello, this is my first Forum post, so correct me if I do anything wrong, anyway:

I've purchased a Rock64, when it's delivered, I want to power it by battery (Power bank), yet I want the read the battery state. My Idea was to connect the Rock64 via USB right to the Power bank (as usual), but an additional cable directly from the 3,6V battery to a GPIO pin and read it using software.

I have no idea about GPIOs, so is it totally wrong, could it maybe bridge the undervoltage protection and therefore bring me into trouble, or can this actually work?

Another idea of mine would be to connect + and - of the 4 status LED's and provide its on/off state to the GPIO and then determine if the battery is at 100-75, 75-50 25-50 or 25-0% charge.

What is the best approach to get battery levels to a Rock64?

Greetings, Max
  Reply
#2
(10-24-2017, 07:04 AM)MaWalla Wrote: What is the best approach to get battery levels to a Rock64?


The Rock64 doesn't really have on-board battery support;  this is just one of the reasons the Rock64 is not really suitable for notebook application.

You may provide battery support yourself of course;  use a 12v SLA battery with a dc-dc converter with low-pass filter (PI filter) and then monitor the 12v input with ADC utilizing either I2C or SPI (good ADCs are available in both versions).
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
  Reply
#3
Well, as I plan to build a sort of big tablet, this unfortunately is not much of an option. However I thought, that maybe an Arduino nano could do the job of getting the Voltage level ( https://www.arduino.cc/en/Tutorial/ReadAnalogVoltage ) to then push it to the Rock64 via GPIO

Another problem I (probably) have is the overall providing of power to all components. I made a schematic ( http://www.directupload.net/file/d/4887/...s4_png.htm ) on how I plan to wire things (5V DC maybe provided by the GPIO's, dunno). Can the Rock64 even carry all of this or are there maybe circuits who can open/close the power supply to external components, when given the command by the Rock64, so that the overall load is outsourced?
  Reply
#4
(10-26-2017, 08:07 AM)MaWalla Wrote: Well, as I plan to build a sort of big tablet, this unfortunately is not much of an option. However I thought, that maybe an Arduino nano could do the job of getting the Voltage level ( https://www.arduino.cc/en/Tutorial/ReadAnalogVoltage ) to then push it to the Rock64 via GPIO

Caution, the Rock64's GPIO's run at 3.3V and the Arduino nano is 5v, so if you're going to connect them together you need to use a level shifter. Or you can do what I did, connect the Arduino via USB and then read the data over the serial port instead.
  Reply
#5
Well that's interesting as I thought, there were both pins for 3.3 and 5 volts, so then I'll probably do it serial and via USB, but I still don't have a clue how to handle the current for those external components, what would be the best idea there?
  Reply
#6
well, Its intresting.
Smile Smile
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  RTC backup battery max 0 1,704 05-14-2019, 09:35 AM
Last Post: max
  Adding battery and charging circuit advait 6 7,248 08-17-2017, 04:17 PM
Last Post: stuartiannaylor

Forum Jump:


Users browsing this thread: 1 Guest(s)