Advertisement
Advertisement

More Related Content

Similar to IotCeption - Energy Measurement of Android Things on Raspberry PI 3 with Arduino Uno(20)

Advertisement

IotCeption - Energy Measurement of Android Things on Raspberry PI 3 with Arduino Uno

  1. IotCeption Energy Measurement of Android Things on Raspberry PI 3 with Arduino Uno [Olivier Philippot - @simplygreenit]
  2. Who I am? CTO Greenspector @simplygreenit
  3. Why you need to measure energy ?
  4. In Classical Android import android.os.BatteryManager; import android.content.Context; BatteryManager mBatteryManager = (BatteryManager)Context.getSystemService(Context.BATTERY_SERVICE); Long energy = mBatteryManager.getLongProperty(BatteryManager.BATTERY_PROPERTY_ENERGY_COUNTER); Slog.i(TAG, "Remaining energy = " + energy + "nWh");
  5. Energy ...
  6. The project schema ... Shunt : INA219
  7. I2C Interface
  8. In real life
  9. Android Things
  10. The project under test 1 Raspberry Pi 3 1 Screen + 1 HDMI (Optional) 1 Ethernet 1 USB Cable for power (With some modifications) 1 micro SDCard 1 Rainbow Hat project
  11. Why so much hate? I2C can be read on Android Things ?
  12. Arduino to measure Arduino IDE + INA219 Library (C) shuntvoltage = ina219.getShuntVoltage_mV(); busvoltage = ina219.getBusVoltage_V(); current_uA = ina219.getCurrent_mA()*1000; loadvoltage = busvoltage + (shuntvoltage / 1000); poweruWh = loadvoltage * current_uA; Serial.println(poweruWh); delay(100);
  13. Serial reading on PC
  14. Serial reading in golang In Arduino program : Serial.begin(115200); Serial library in Go: github.com/goburrow/serial flag.StringVar(&address, "a", "/dev/ttyACM0", "address") flag.IntVar(&baudrate, "b", 115200, "baud rate") flag.IntVar(&databits, "d", 8, "data bits") flag.IntVar(&stopbits, "s", 2, "stop bits") flag.StringVar(&parity, "p", "N", "parity (N/E/O)")
  15. Making an computer oscillo Highchart which read the data : http://localhost:8000/
  16. Now we can play...
  17. Results
  18. Autonomy ? 1,4w in continuous / 5v = 280mAh 3000mAh battery ~ 11h of autonomy 2w in continuous / 5v = 400mAh 3000mAh battery ~ 7,5h of autonomy
  19. Conclusion : Measure, Measure and Measure For Energy questions : @simplygreenit
Advertisement