Saturday, April 25, 2015

3R power bank by Recycling Reusing and Repurposing

3R power bank by Recycling Reusing and Repurposing

Always wanted a 5v 1A mobile power bank to supply projects or to charge mobile devices?

In this post, let's recycle li-ion batteries (18650 cells) from an old Laptop's battery pack into mobile power banks.

WARNING: take extra precautions not to short the VCC and GND of the circuity that wired up the 18650 cells in the laptop battery back. One the casing of the battery pack, there are warnings and cautions.

Remember the Fujitsu E8410 that was broken down to retrieve the tasty bits ?

Remember the LCD panel of the Fujitsu E8410 laptop what was revived as a secondary monitor ?

Yours truly is a hoarder. having break down the E8410 into tasty bits, nothing was wasted, including the battery packs. The battery pack's plastic cover will be pry open carefully to reveal the goodies: 18650 li-ion cells.

please note the each of the 18650 li-ion cells is 3.7v; detail writeup of li-ion battery cells to follow soon.

the objective is to harvest the 18650 li-ion cells from old laptop battery pack. The harvested cells than can be used as the reservoir with li-ion charging circuit that thats input from a renewable energy source such as solar, wind mill, hydro, or even a hamster wheel, and 5v dc booster circuit will provide constant 5V 1A output to power device such as arduino units or even mobile devices.

parts needed
1x old laptop battery pack
1x lithium battery charger circuit TP4056
1x DC-DC boost up circuit 5V BL8531

note: TP4056 and BL8531 circuits are bought from middle kingdom at 68cents and 80ctns respectively.

1. carefully remove the plastic cover of the battery pack. take extra precautions not to puncture or damage the 18650 cells.

2. make sure the work area is free of conductors, eg small metal screws, paper clips etc. carefully remove the 18650 cells from the plastic enclosure

3. At the point of writing, there is a plan for the 18650 cells (in red) above. hence, it is not thoroughly broken down into individual pieces. A detailed step by step guide to break it down will follow in future post.
A regular 18650 cell (in blue) bought from stores will be used as a demo in the following steps.

4. Solder multicore wires preferably AWG10 as leads.
the PCB on the left is TP4056, PCB on the right is BL8531.
A terminal block is used to allow for connection from a variety of clean energy sources eg solar cells, wind mills, hydro, or even human powered hamster wheel. the red and black wires exposed are meant to be connected to the li-ion battery made up of 18650 cells. the regular USB port is the output port.

5. testing of the charging of 18650 li-ion battery cell from a usb source

6. testing of powering up and arduino using the 18650 li-ion cell as supply. note the usb port to charge the li-ion battery is disconnected.

7. testing of charging the 18650 li-ion cell with solar panel rated at 6V and max output of 6.5W. Solar panel courtesy of Mr.Nalpon's stash at T1016 (before he retired).

So, what can you do with it? have an idea on what to make with this setup? ping yours truly.

Monday, March 30, 2015

Seal the Deal: digitally fabricated personal seal using 3D printing, laser cutter, and CNC milling

Seal the Deal: digitally fabricated personal seal using 3D printing, laser cutter, and CNC milling

since young, yours truly always wanted a personal seal. The reasons for a personal seal? it looks cool to "chop" (native colloquial for stamping) a document.

A personal seal consist of 2 parts, the structure of the personal seal aka the body, and the calligraphy used as the seal's signage.

the cost of owning a traditional personal seal is exorbitantly prohibitive. Firstly, the cost of the material for the personal seal. Usually semi precious stones such as jade is used. the choice of materials do affect the cost of the personal seal. Artistic impression on the body of seal. from blanks to simple engraving of philosophy quotes , and some went all out to have complicated sculptures carved on the body of the personal seal. Well, the cost will escalate accordingly too. Lastly, the calligraphy for the signage used in the personal seal.

Luckily, yours truly have access to FabLab@SP, an arsenal of digital fabrication machines to choose from. Designing and fabricating a personal seal is a breeze with the availability of machines, tools, software, and expertise.

equipment needed
1. 3D printers
1a. CNC milling machine
2. laser cutters

software needed
1. inkscape
2. tinkercad
3. cura

parts needed
1. stl file of the personal seal structure
2. dxf file of the caligraphy
3. basswood (balsawood is too soft; after several stamps, the engraving gave way)

the methodologies to digitally fabricate a personal seal:
1. download a model of choice from thingiverse as the body of the personal seal.
2. edit the model using simple cad modelling tools such as tinkercad. Here, a hallowed out base is created. This area hallowed out is to be inserted with the signage

3. send the edited STL file to be 3D printer. we have the stl file 3D printed using ultimaker2 at the highest resolution eg 20microns. Perform some final finishing moves such as acetone bath (if using ABS filament) or THF (if using PLA filament) on the 3D printed parts if desired.

3a. the STL file can be used for CNC milling too. more about that in a future post.

4. engrave the calligraphy on basswood with a laser cutter. several passes are needed to achieve atleast a 3mm deep engraving. note that there are 2 styles, the positive engraving (阳刻) on the surrounding of the calligraphy, and the negative engraving (阴刻) on the calligraphy itself.

5. insert the engraved basswood into the hallowed out spacer of the 3D printed part.

6. the final outcome

next up: cnc milling of the personal seal on aluminium!

Saturday, February 14, 2015

Auto hot dater for Singles Appreciation Day (SAD)

Out of luck, out of love, but definitely not out of job! On this fateful day (14feb15), yours truly come to realized one by one the brethren have left to join the dark side. Rather unfortunately, there is still one last man standing, holding the ground resisting the "social norms" to sign on the dotted line.

In certain parts of the world with chinese populations 光棍节 (guang1 kun2 jie1) aka singles day is celebrated every 11november (11.11) of the year. However, in the other part of the world, it seems to yours truly singles are not celebrated. Yours truly celebrate Singles Appreciation Day aka S.A.D on 14Feb by making auto hot dater powered by arduino!!

So, how do singles mingle??? What are the laws of attraction between male and female humans? What are the grounds two humans decided to stay together and till death do us part?? These are questions yours truly ponder upon but yet to have answers to them. Until recently, one of the "bro"was acquainted with a girl via dating apps on social media (tinder, paktor, and so many more. Yeah, he is a trawler). Quickly they become an item and subject to much gossip; which unfortunately yours truly is in the party and have to GIGO (Garbage In Garbage Out). Having heard the experience of him using dating apps, perhaps there is a way to quantify how human hookup. The biggest face palm moment is when "bro" mentioned he "swiped right" at every single female profile.

From the above conversation, yours truly assumed other parameters such as profile picture on dating app, human attributes are held equal and have formulated some hypotheses. These hypotheses are: male have to swipe right more often [1] and be less selective of the female profiles [2] in hope of getting a higher count of "matched" (both male and female swiped right at the other's profile);  a set of preferred female pictures of the said male subject can be trained into a mathematical model, then feed into image recognition system via openCV where test data is acquired from the dating app's female profile picture; automated decision making is done within openCV and then instruction to swipe left or right is achieved with an arduino.

To answer the above hypotheses, an experiment has to be setup. The following parts needed are part1 of the experiments: swiping left or right using arduino with random 50-50 chance, and increased swiping frequency per hour in hope for a higher count of "matched".

parts list
1. Arduino (an uno is used here)
2. Regular servo motor
3. smart phone with a stylus (note3 is used out of convenience) or without a stylus.
3a. Stylus can be made by referring to this URL
4. dating app of choice (tinder is used out of popularity with "bro")
5. jig to hold the smart phone, and servo with stylus. (a 3D printed PCB vice is inverted out of convenience)

Step1: stylus and servo

1. assemble the stylus on the "zero" position of the servo motor. Servo will be moving from 0 to 90deg, or 0 to -90deg
2. an apparatus to hold the stylus. Being cheap, yours truly have used some blue-tac, but the effect is not good. Will elaborate more at observation.

Step2: Arduino programming
0. pin7 of arduino is wired to the servo.
1. random 50-50 to swipe left or right.
2. servo to rotate L or R depending on the random value 0 or 1
code here: 

Step3: Setting up the jig
1. align the smartphone with the stylus on servo contraption at the apex of the servo rotation.

The final setup is in the following picture

Step4: Enjoy!

The cheapo contraption of stylus on servo needs a rework, e.g with a L-R clicker type of setup. If the alignment for the current setup is not aligned properly or out of the way as observed from the video above, it will swipe left irregardless of the random value calculated within the program.

Final Note: Ego might be dented, but NO humans are harmed in this setup. The profile on dating apps are fictitious, and deleted after this experiment.

Thursday, February 5, 2015

setting up IoT server with ThingSpeak on Ubuntu 12.04

installing IoT server with thingspeak on ubuntu 12.04.

some time back yours truly has did some IoT inspired device, by streaming temperature sensor data using ESP8266 to the Internet; the receiving side of the sensor data is the FREE ThingSpeak server, courtesy of iobridge. details of the IoT streaming data setup here

The ability to display IoT sensor data in a chart on the Internet is extremely useful. The following screenshot depicts the "public view" of my thingspeak sensor data chart that can be shared on web presence eg a blog or website; data collected can be used for processing/detecting/predicting. Note the LHS of the chart as compared to the "pattern" on the RHS. analyzing outliers, yummsss.

The free thingspeak server allows for sensor update once very 15sec per channel ref here: ; in other words, if a sensor (or many sensors) is required to send data at shorter interval eg every second, the free thingspeak server is not able to accommodate. thanks to open source software by iobridge, humans now can install thingspeak on their own computing resources, and customize according to their requirements.

picture above depict thingspeak server running off a VM on my "server" behind a simple network in my office. It is not publicly accessible.

picture above depict thingspeak server running off a VM on the R&D cloud in T931 behind a myriad of ACLs. It is not publicly accessible.

The step by step guide from the source repo is available here

The major software components needed on ubuntu 12.04 to use with thingspeak are mysql, ruby, rails, and major pkg updates. Assuming the server is behind a simple network with only a router-to-internet, setting up thingspeak is a breeze. There are open source bash scripts, eg to help to manage the installation, originated from this blog post Don't you just love open source software??

The complexity comes when 
1. installing on a VM that sits in the cloud that is behind a myriad of ACLs
2. scaling up the thingspeak server in the cloud as a PAAS, and clustering the resources.

your truly had his fair share of frustrating after office hours trying to fix some of the installation issues due to the complexity of the network and also the unfamiliarity with ruby, gems, and rails (first time installing it). nonetheless, the main gripe is documented in the gist below which address BADSIG from apt-get update, git to use https, gpgkeys: HTTP fetch error 7: couldn't connect: Network is unreachable, packages cannot be authenticated!, etc.

the screenshot of thingspeak server is running

the expanded installation bash from the user mentioned above is available here

now, let's start to do some IoT inspired stuff by streaming some data to thingspeak

Wednesday, February 4, 2015

3D printer with Cloud computing for one touch 3D printing over the cloud

3D printer with Cloud computing for one touch 3D printing over the cloud

Some time back, yours truly wrote about how to prepare a rep rap 3D printer for 3D printing over the cloud computing infrastructure. the  details of cloudify the rep rap 3D printer url here:

"The process to 3D print a 3D model can be quite an obstacle, i.e need to have physical access to the 3D printer and a SD card handy, power hog, heat emission, UFP emission. What if we can remotely send a 3D model (in *.STL) to be 3D printed on a 3D printer and also observe the 3D printing process over the Internet? Definitely it is going to be convenient as everything can be done at the fingertips; godsend piece of technology for those can’t wait for the 3D printers to be locked down in a facility equipped with exhaust and medical grade filter that is capable of filtering Ultra Fine Particles (UFP) in the range of 100 nanomether that is much finer than PM2.5. The purpose of this article is to share a step by step guide of setting up 3D printer to print remotely."

The process mentioned in the earlier post of using octoprint and slic3r is still not transparent to the end user details here:
user still have to process the gcode and submit it via octoprint.

 thanks to the good work rendered by FEW cloud FYP members Fahadh, Ehan, Wei quan, now we can 3D print over the cloud with a single click. Check out the youtube video. For best effect, please choose HD for video settings.