View Single Post
Posts: 1,417 | Thanked: 2,619 times | Joined on Jan 2011 @ Touring
#1
If you find an add-on Qi charger which fits the N900 and has shorted data pins please post your source to this thread!!
A description of how to modify an inexpensive Qi universal microUSB type B plug equipped wireless inductive charge receiver's data pins to interface with N900 charging circuitry(and also how to install Pali's new BME to avoid the hardware mod, additionally a pair of script based module driver swap and return to normal as a software work around the need for shorted pins or the need to install KernelPower or CSSU) and installation of the receiver into or onto a Mugen cover/double-Scud battery equipped N900, this should also work with stock N900 battery cover.
This is a comprehensive way to safely charge without worrying that you phone will fall and snap off the fragile N900 USB port.
Read warning at bottom and whole post before proceeding, this could destroy your phone, Qi charger, or burn down your house, may contain peanuts and gluten.
see also:
http://talk.maemo.org/showthread.php?t=72753
http://talk.maemo.org/showthread.php?p=1253353
http://talk.maemo.org/showthread.php?t=93289

I ordered one of the very inexpensive ($6US) universal Qi chargers from ebay, they are also available from most of the Asian import web stores. This is an example with several fits available the correct one seems to be "Middle/Narrow Interface Up" with a micro-B-USB or microUSB type B plug http://www.amazon.com/Universal-Wire.../dp/B00I1D4DWO
When the charger arrived the USB plug was the wrong direction, upside down, this could have been my error in ordering the first time. It was actually not important to me because I ended up rebuilding the plug, it will be very important to you if use the no-solder methods, non-BME charging module, or the BME replacement upgrade.


Best solution: 100% compatible USB data pin-short mod and external install!
The main problem with all of the Qi add on adapters we have reviewed so far, is that they lack the shorted data pins required for the stock N900 to start the charging cycle, in this charger though there are empty spaces which we can use to add the missing data pins. I had to find some compatible pins and short them in the space available. In my opinion finding a source for a Qi charger with shorted pins or doing the add-pins mod is the best solution as it communicates the presence of a high draw charger to the system that is ready to deliver over standard 500mA vs say having a data cable inserted.

I bent the tiny metal tabs on the ribbon side to remove the metal back cap from the USB plug and carefully removed the two power pins from slots number one(+5v) and five(ground) by the microUSB pinout. I desoldered both of the existing pins from the ribbon cable as they were upside down for use with the N900. Next I went into my parts box where I had some DIY microUSB plugs, removing the metal outside I was able to remove the internal pins out the back of the port by grasping the solder tabs with a small forceps. To make the shorted pins I measured the length of the two power pins and the gap between. I bent one of the pins to the right the .5mm distance between the pin spaces and then straight again. I used a locking forceps with smooth jaws to clamp another pin I had removed to the pre-bent one; I then made a sloder joint at the point where the two pins came together at the bends I had made. Once cool I clipped the extra leaving about .5mm of joint and inserted them into slots two and three of the microUSB pinout.

I reattached the power pins to the ribbon cable turned for the correct direction, I tested the ribbon cable connection which soldered to the number one pin to be sure it was not shorted to the data pins. To be sure assembly was correct I inserted the plug into a small bluetooth keyboard, fit was good.

I had seperated the plastic charger cover which is covered on the inside with 'sticky' adhesive and removed the coil and PCB to work on them. I had desoldered the ribbon cable from the charging pad PCB so I put the receiver pad onto the transmitter pad until the blue charging light on the transmitter pad came on, I tested the power output solder pads and soldered down the ribbon cable to the appropriate pads.
The Qi charger has a black pad which blocks the signal and makes the receiver only work from one direction, this is required as assembly without somehow made my receiver pad not work when installed internally against the battery, some reports also have it heating the N900 to rather high temperatures through inductive heating.

As a final test I put the reassembled Mugen battery door onto the charge sender pad, then I connected to the microUSB port on the BT keyboard, red charge light and no smoke. I added a bit of tape on the inside of the metal back side USB plug cap, then replaced the cap and bent down the tabs, tested again on the BT keyboard with good charging, the plug also inserted cleanly and flush into my N900 for the first time offering a charging solution that protected the vulnerable USB port. I had already cut away the unneeded plastic charger cover tabs meant to protect the ribbon cable(the extra plastic tabs block the camera opening) and re-folded the ribbon cable so it makes a 90 degree turn to correctly pass the camera window and then on to the phone's USB port without slack.

I used several parallel strips of good electrical tape terminating under the battery cover, another trimmed strip looping through the Mugen battery cover camera window to secure the ribbon cable, the tape doesn't snag on my pocket or phone pouch. Some people have successfully installed under the battery cover with a stock N900 battery cover and standard single battery. Since I broke one of the tiny metal tabs on my USB plug cap I potted my Qi chargers USB plug with (boiling water softening) Polymorph plastic, including for about 3mm around the ribbon cable as a stress relief to the solder joints. http://www.amazon.com/InstaMorph-Mol...dp/B004MFLU4Y/

Finally we have industry standard integrated N900 Qi wireless inductive charging that works correctly with Maemo and internal charging circuitry, though Pali's BME replacement make all of this hardware work mostly unnecessary. It is too bad they couldn't add shorted data pins at the factory where it would be easy, post if you find a universal Qi that has the shorted pins. Ribbon cable and plug are flush with just enough slack to remove when I need the port for host mode. I much prefer this system with a ribbon cable and flush fit protective USB plug to my previous Touchstone wireless charger which required bypassing the internal charging circuitry and stuffing a Li-ion charge regulator to directly charge the battery which confused the Maemo charge monitoring circuitry and software. Read below for a hacked way to charge without installing data pins.

No solder software hack, BME stays active!
Warning, might result in an unbootable system or worse, though most likely problem is you could be stuck with a non-working BME and charge meter. I recommend using backup manager app to have a restore ready if you mess up. Failure to switch back to normal charge mode might cause permanent damage to a computer or other USB port if you plug in your N900 in Qi no-short charge mode. If you use this method and leave the Qi charger in as a semi-permanent protection for your USB port comment out the sleep and return to normal mode lines, then you only need to click the Qi charge button once after reboot, using USB host mode or the required switching back to 'auto' or normal for using USB mass storage require switching back to Qi or 'dedicated' BME mode to Qi charge again.
The downside is that you must callibrate your battery using a full discharge cycle, this could take a few long and tricky tries.
These scripted buttons can also be used by people wishing to hard wire install an charger to their USB 5V+ pad and ground for either an inductive charger which leaves the USB port free and open or for cases where the USB port has been destroyed and the data pin pads can't be repaired.

1-install(or have) up to date Kernel Power and CSSU testing
2-add Pali's BME replacement repo
web address - http://maemo.merlin1991.at/cssu/bme-replacement/
distribution - fremantle
Components - free
3-apt-get update and upgrade(this will install the new upgraded BME)
4.run this command in command line

Code:
gconftool-2 -s -t int /apps/osso/status-area-applet-battery/use_design_capacity 0
Above saves lot of frustration with getting completely BS values posing as correct, when battery gauge is not calibrated (at all 0 like, lost calibration data due to battery out of device for too long and dead bupbat).

5. Reboot
6. charge to green light
7. let run until battery dies(battery is now calibrated, dont rush or you will end up having to redo, last few hundred mA should be spent with backlight , CPU, and things like WiFi off)
8. enter command to BME for unshorted charging
Code:
echo dedicated > cat /sys/class/power_supply/bq24150a-0/mode
9. if you need to plug into your computer rather than Qi charge enter command to BME for normal mode charging
Code:
echo auto > cat /sys/class/power_supply/bq24150a-0/mode
Once you have done the above then you can enter the below to create two toggle buttons which can be placed in your desktop apps to switch between a timed charging via your unmodded Qi charger and quick return to normal charge button so you can plug into normal computers

Make a file named qi_charge and keep it in /usr/local/bin
Code:
#! /bin/sh
sudo echo dedicated > cat /sys/class/power_supply/bq24150a-0/mode
# edit unshorted charge mode time below in seconds 21600=6 hours
sleep 21600
sudo echo auto > cat /sys/class/power_supply/bq24150a-0/mode
exit
make a file in /usr/local/bin called normal_charge to kill the timed charge early
Code:
#! /bin/sh
#Does not kill Qi charge script which will continue to run, only reverts BME state to auto mode early
sudo echo auto > cat /sys/class/power_supply/bq24150a-0/mode
make them executable
Code:
sudo chmod +x /usr/local/bin/qi_charge
Code:
sudo chmod +x /usr/local/bin/normal_charge
.desktop file to get app buttons to start and stop qi_charge
create /usr/share/applications/hildon/qi_charge.desktop
Code:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=Exec=/usr/local/bin/qi_charge
Icon=make a PNG and put the path here
create /usr/share/applications/hildon/normal_charge.desktop
Code:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=early reload BME to get battery meter back(does not kill first Qi script)
Exec=Exec=/usr/local/bin/normal_charge
Icon=make a PNG and put the path here
The timed Qi charge scripts will continue to run even after the revert button is clicked returning the system to standard charging, this can be a problem requiring you to kill the instances of scripts found by running ps -e if you toggle charge modes back and forth a few times.

Easy no calibration - no solder software hack.
Not as seamless an integration into Maemo as the shorted data pins but is allows the common unshorted Qi charge adapter and N900 to be used 'out of the box'
This keeps the old BME which requires no long and sometimes repeated battery calibration steps, this is perfect for the average user who charges overnight.
Tested and enters desired mode from these toggle scripts. This is less invasive and more stable than Pali's new BME replacement above but lacks a fully functional battery manager.
make a file in /usr/local/bin called qi_charge
Code:
#!/bin/sh
sudo stop bme
sudo modprobe bq2415x_charger
# edit dumb mode charge mode time below in seconds
sleep 21600
sudo rmmod bq2415x_charger
sudo start bme
exit
make a file in /usr/local/bin called bme_charge to turn off Qi charging mode early
Code:
#! /bin/sh
sudo rmmod bq2415x_charger
sudo start bme
make them executable
Code:
sudo chmod +x /usr/local/bin/qi_charge
Code:
sudo chmod +x /usr/local/bin/bme_charge
.desktop file to get app buttons to start and stop qi_charge
create /usr/share/applications/hildon/qi_charge.desktop
Code:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=/usr/local/bin/qi_charge
Icon=make a PNG and put the path here
create /usr/share/applications/hildon/bme_charge.desktop
Code:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=/usr/local/bin/bme_charge
Icon=make a PNG and put the path here
In order for these buttons to show up among your other apps place qi_charge.desktop and bme.charge.desktop files in /usr/share/applications/hildon/ you can stick the app toggle buttons on your desktop for convenience.

On a non-CSSU system you will need to edit as sudo or root /etc/sudoers.d/qicharger1.sudoers with these files so the scripts will work.
Code:
cat <<ETX >/etc/sudoers.d/qicharger1.sudoers:
user ALL = NOPASSWD: /sbin/stop bme
user ALL = NOPASSWD: /sbin/modprobe bq2415x_charger
user ALL = NOPASSWD: /sbin/rmmod bq2415x_charger
user ALL = NOPASSWD: /sbin/start bme
ETX
then do this as root or sudo
Code:
update-sudoers
The timed Qi charge script will continue to run even when the revert button is clicked returning the system to standard charging, this can be a problem requiring you to kill the scripts found by running ps -e if you toggle back and forth a few times.

Always remove data and power pins from the plug for soldering so you do not melt the plastic plug housing. Once you have everything assembled use a cheap USB charged device to give a final test of your work, you do not want to fry your N900's USB port. Test polarity constantly and refer back to the microUSB pinout so you are 100% sure you have installed everything correctly and in the right direction and power polarity, also be sure to check for shorting.

Last edited by biketool; 2016-12-19 at 09:48.
 

The Following 10 Users Say Thank You to biketool For This Useful Post: