loading

I'm working outside my country and laptop is a great help for me to connect to my family and friends and do all my computing stuffs as well, but I always came across of running low battery and even worst onto critical level or reserved mode when I forgot to plug in the charger, but the problem is when I keep my charger plug in the battery suffer and left me with no choice to replace and buy a new one because it became weak and drain very fast and not only that I got my system hot when I do multi-tasking while charging.

I never tried removing battery pack and keep the laptop plugged in because it's useless and unreasonable way, laptop is made with a battery so user can use it anywhere and anytime unless the battery is completely dead or missing.

A year ago, I got my Arduino Mega and this is my first project to automate charging of my laptop battery and avoid the risk in keeping the charger plugged in, save money, preserve my battery and save my life to worst scenario.

Thanks to Autodesk's Instructables I find a way to share it to others, let's get started.

Step 1: Parts for Arduino

Mega 2560 or any board - 1

Dragino Yun Shield - 1

Relay Module - 1

Jumper Wires - 3

At first, I used only Arduino mega alone to automate laptop battery charging system by sending serial data via usb com port, followed by using Bluetooth serial connection and finally using the Dragino Yun Shield for Wi-Fi communication.

The Yun Shield is one of the most powerful shields for Arduino Boards. The Yun Shield is designed to solve the Internet connectivity and storage issue for Arduino Board.


The Yun Shield runs the Open Source OpenWrt system (Same system as runs in Arduino Yun) and it is fully compatible with the Arduino IDE v1.5.4 or later. The Yun Shield is the ideal choice for Arduino Projects which require various internet connections and more storage.

Reference

Below are the links for Dragino Yun Shield How-to

YouTube Tutorial Part 1

YouTube Tutorial Part 2

Helpful Instructable

Step 2: Arduino Schematic

Jumper wires are connected to yun shield headers since it's on the top of the Arduino

Relay IN1 is connected to yun shield Pin 13

Relay GND is connected to yun shield GND

Relay VCC is connected to yun shield 5V

Step 3: Arduino and Yun Shield Code

Updated Arduino file

Step 4: Parts for ESP8266

Esp8266 - 1

Relay Module - 1
Jumper Wires - 5

LM2596 DC TO DC converter from 5v to 3.3v

End of year 2015, I got my ESP8266 Wi-Fi module and perfectly fit it's small size to use only for this auto charging system alone because I wanted to use Arduino Mega for bigger project.

Helpful Instructable

Step 5: ESP8266 PinOut & Connection Guide

Connect Esp8266 VCC & CH_PD (short) to LM2596 OUT 3.3V

Connect Esp8266 GND to LM2596 OUT GND

Connect Esp8266 GPIO0 to RELAY IN1

Connect RELAY VCC to LM2596 IN 5V

Connect RELAY GND to LM2596 IN GND

Step 7: Laptop Software

Power Notification programs is not need to install just paste it anywhere then run and change the URL path of your Yun shield/ESP8266 web address.

You can select and change the battery level you want the charging start and stop.

You can select communication interfaces between WiFi, USB and Bluetooth port in the latest version of windows app.

The program will timely monitoring the battery level of laptop. It has voice enabled for notifications but I think some laptop don't have louder speakers so I added features of popup in the lower corner of desktop screen at the top of clock and date it will remain there until the laptop charger is connected to power outlet and start charging, if it is not, you can check either the web address [example: http://192.168.1.100/?pin=ON] is correct or the charger is not plugin to your laptop.


This was adopted to my JARVIS software back in 2010 i wrote a c# applications for computer that requires speech recognition like in IRON MAN film, i need JARVIS to check and remind about my laptop battery percentage but that time i haven't created this automation for charging.

Software update as of Nov.22 2016. I'll be keep updating this article every now then whenever I personally encountered errors or something come to my mind for improvements.

The software requires NET framework installed in your machine here's the link

Step 8: Finished

No more worries to low battery and over charging. This project is very helpful for me it never let my laptop out of power even I leave my laptop open 24/7 or waiting for my downloads. It's proven effective, the computer software is last thing that will this project works perfectly for battery level monitoring. I hope you enjoy, Thanks for your time and appreciation. Cheers!

Helpful tips on how to take care the laptop battery


Next Instructable is for Smartphone Auto Charging very soon!

<p>Hi Jiefu, if I only wanted to use bluetooth, do I need the yun shield? It seems the yun shield only provides wifi.. </p><p>https://www.amazon.com/Dragino-Ethernet-Compatible-Duemilanove-Diecimila/dp/B01HZUZ8R2/</p>
I really need something like this! I gotta have my fiance set it up for me. Thanks!
<p>welcome, did your fiance set it up for you?</p>
<p>this perfect!!</p><p>Hi, i tried use this method but i have a problem with the app battery information, when battery drain and it should be charge but, error happened with net.framework like this </p><p>Why it happend? fyi i already install net.framework from that link. Thank you</p>
<p>Hey dude, thanks for writing I updated the article and upload the new app battery for windows.</p>
<p>this is good project, thank you for sharing Jiefu</p>
<p>thanks pal</p>
<p>i use USB for connection arduino to laptop</p>
<p>Hey really liked the project.</p><p>But I am working with XBee. can you help me in that?</p>
<p>Hi,</p><p>I try with your ESP8266 Schematic but the relay wont trigger ? Why ?</p>
Hi, my apologies for your inconvenience I manage to update the Step 5: Esp8266 Connection guide to LM2596 and to Relay module with the inclusion of Esp8266 pinout, hope it helps.
Its ok . The GND pin on ESP have a mistake right :D ...<br><br>Anyway, thanks for this GOOD Intructables :D<br><br>If i ask for the source code of the program, will you share with me ?<br><br>Regards
its my mistake on the picture i uploaded but not the writing so i removed it, thr code is shared already, please check.
<p>I mean source code of the windows software :) . And last question, on the RELAY OUTPUT with pin you connect to triggger ON/OFF of the electric source ? Is it COM - NO or COM - NC ?</p><p>And my plug had some interferences, which means sometimes its wont trigger.</p>
COM &amp; NO
<p>I tried to install NET framework but it said it was already installed. I can only run the progam once on start up and after that it changes the .exe to a .exe.config Any reasons why? Thanks!</p>
Dialog message box said the the usb port or bluetooth port of your Arduino was not availableor blank, try to check again and then restart the app.
<p>That's odd. It is plugged in and restarted the app but I receive that error on restarting the app as well.</p>
click continue button, once i get back home i will fix the app
<p>This is the plug that i build :D. Thanks Jiefu</p>
very well good job bro
<p>Awesome project! If you find out a way to use USB or Bluetooth that would be great! Thank you!</p>
Thanks buddy, it has bluetooth and usb please check again.
<p>Man your quick! Haha, thank you very much!</p>
<p>can you share the windows apps and coding for arduino if using USB port instead of wifi or bluetooth for on/off the charger ?</p>
please check the updates
Thanks. :D
<p>I love it</p>
thanks
This is terrific! Thank you for sharing.
welcome
<p>why should we use an *Duino if we have ESP8266?</p>
thanks for your question, it's up to you and it depends which one do you have, this instructables provides the informations you need.

About This Instructable

3,984views

57favorites

License:

Bio: In my free time I used to write software in c# language and my long time application is for JARVIS a computer assistant like in ... More »
More by jiefu:Laptop Automatic Start/Stop Charging (using Arduino, Yun Shield and ESP8266) PC Apps Control Using Arduino 
Add instructable to: