MyThinkPond

On Java, Python, Groovy, Grails, Spring, Node.js, Linux, Arduino, ARM, Embedded Devices & Web

Philips SlimStyle 60W LED bulb teardown

Posted by Venkatt Guhesan on September 28, 2014

While I was visiting Home Depot, I saw a Philips SlimStyle 60W LED bulb on clearance for two-dollars. I could not resist buying it for a tear-down to see how it’s built. I always wondered how they convert the 120VAC to a regulated DC voltage with high-current feed for lighting up those LED’s. So here is the first version of the tear-down showing you what’s inside the bulb. I will blog more about the current and voltage at the LED junction on a subsequent blog.

Picture of the bulb before the tear-down. You can see the unique flat shape.

Packaging front

Packaging back

What you expect to find is a custom version of what is called in Electrical Engineering as an LED Driver Circuit (and here). What makes this one interesting is how they made this all fit inside a tiny little base. And the flat design with the beveled plastic aids in efficient heat dissipation. So you don’t see the big metal base you find in other LED bulb models.

Plastic encasing removed (cut using a band-saw)

You can see the LED’s placed in a radial manner front and back. Although the placement allows you to distribute the light you still end up with a shadow effect. (I think the incandescent light was the perfect design)

Front face of the PCB board which makes up the base of the bulb:

Transformer……….. EE13302-162 B (KEE 1412) (closest neighbor to this transformer)

Black capacitor… S103

Orange rectangular piece bottom left (with Westinghouse logo) is a standard ceramic-fuse.

The black (labeled-N)  and white wires (labeled-L) gets soldered to the bulb metallic base (120VAC inputs)

Back of the PCB board:

D1300 is a standard NPN transitor.

More to come in the next blogs. Stay tuned.

Posted in Embedded Systems | Tagged: , , , , , , | Leave a Comment »

Pictures from the Royal Palace Museum in Piazza San Marco, Venice, Italy

Posted by Venkatt Guhesan on August 26, 2014

Here are some pictures I took from the Royal Palace Museum in Piazza San Marco, Venice, Italy [map]
Shows you some of the wonderful Christian relics and how the royal family in Venice, Italy was involved in exploration of the new world, seafaring and art.

 

Posted in General, Travels | Tagged: , , , | Leave a Comment »

Photos from Venice, Italy

Posted by Venkatt Guhesan on August 21, 2014

Here are a few photos I took while in Venice, Italy.

 

Posted in General, Travels | Tagged: , , | Leave a Comment »

Beautiful Island of Santorini, Greece

Posted by Venkatt Guhesan on August 20, 2014

Here are a few photographs I took on a clear sunny day in the island of Santorini, Greece.

Beautiful city carved out of a violent burst of volcano – shows the greatness of humanity and what we can overcome with endurance and strength!

 

Posted in Travels | Tagged: , , , | 1 Comment »

Hello World with SparkCore

Posted by Venkatt Guhesan on June 17, 2014

Finally got my SparkCore, an Arduino built with on-board WiFi (no need for a Arduino WiFi shield). This version is a different take on the “Internet of Things” and “Build internet-connected hardware”

Here’s a picture of the Spark connected to the WiFi running my first HelloWorld app downloaded directly from the Spark IDE to the core.

Spark Core

Looking forward to building some designs around it! To learn more about Arduino and SparkCore visit their corresponding sites.

Happy Blogging!

 

Posted in Embedded Systems, SparkCore - Arduino | Tagged: , , , | Leave a Comment »

Switching back to wordpress site

Posted by Venkatt Guhesan on June 17, 2014

For the past year, I’ve tried to use my own hosted WordPress blog but I’ve noticed that my hits seems to be much higher on WordPress hosted site than my personal site. So I’ve decided to make my switch back to the WordPress hosted blog.

So starting today, both MyThinkPond.com and MyThinkPond.wordpress.com link back to the same blog site.

 

Posted in Uncategorized | Leave a Comment »

Grails 2.3.5 – grails stop-app – does not stop the app running via run-app

Posted by Venkatt Guhesan on February 2, 2014

If you’re using Grails 2.3.X and you’re developing, most likely you’re running your app like this:

grails run-app
#in one command-prompt/shell-terminal and
grails stop-app
#in another command-prompt/shell-terminal

With the latest version of Grails (version 2.3.5), the stop-app say:

grails stop-app
| Server Stopped
# But nothing happens and the server-process continues to run#

Here’s an undocumented fix that can come in handy:

# On terminal/command-prompt #1
# Run the way you do today
grails run-app
# On terminal/command-prompt #2, change-directory (cd) to the root folder where you have your Grails project
# Create a file with a file-name ".kill-run-app"
# For Linux (*Nix) environments
touch .kill-run-app
# For Windows where you do not have 'touch' command do the following instead
echo hello > .kill-run-app
# Wait for a few seconds and Grails will kill the app that's running

Now you can resume with starting a new instance of “grails run-app”.

Cheers & Happy Coding!

Posted in Grails, Groovy, Java | Tagged: , , , , | Leave a Comment »

Grails – Adding JavaScript to bottom of page

Posted by Venkatt Guhesan on February 2, 2014

In Grails using the templating (Sitemesh) if you were to include per-page JavaScript resources then it shows up much earlier in the layout content as part of the <g:layoutBody>

Here is an example illustrating the problem:

SamplePage.gsp

<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="layoutPage"/>
<head>MyThinkPond.com Custom Page</head>
...
</head>
<body>
Some this page content
<script type="text/javascript" src="${request.contextPath}js/samplePage.js"></script>
</body>
</html>

and the layout page (layoutPage.gsp)

<!DOCTYPE html>
<html>
<head>
<title><g:layoutTitle default="MyThinkPond.com"/></title>
...
</head>
<body>
<div>
Some template (header) content
<g:layoutBody/>
</div>
<!-- Common JS Files -->
<script type="text/javascript" src="${request.contextPath}js/common.js"></script>
<!-- Begin: Custom Page JavaScript Should Go Here -->
<!-- End: Custom Page JavaScript Should Go Here -->
</body>
</html>

results in the following page in browser

<!DOCTYPE html>
<html>
<head>
<titleMyThinkPond.com Custom Page</title>
...
</head>
<body>

<div>
Some template (header) content
Some this page content
<script type="text/javascript" src="${request.contextPath}js/samplePage.js"></script>
</div>

<!-- Common JS Files -->
<script type="text/javascript" src="${request.contextPath}js/common.js"></script>
<!-- Begin: Custom Page JavaScript Should Go Here -->
<!-- End: Custom Page JavaScript Should Go Here -->
</body>
</html>

You can see that the JavaScript is included as part of the body and not at the bottom.

Here’s how you resolve this issue:

In your custom page, define a content block like this:

SamplePage.gsp

<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="layoutPage"/>
<head>MyThinkPond.com Custom Page</head>
...
</head>
<body>
Some this page content
<content tag="javascript">
<script type="text/javascript" src="${request.contextPath}js/samplePage.js"></script>
</content>
</body>
</html>

In your template layout page add the content block to the bottom as needed like this:
layoutPage.gsp

<!DOCTYPE html>
<html>
<head>
<title><g:layoutTitle default="MyThinkPond.com"/></title>
...
</head>
<body>
<div>
Some template (header) content
<g:layoutBody/>
</div>
<!-- Common JS Files -->
<script type="text/javascript" src="${request.contextPath}js/common.js"></script>
<!-- Begin: Custom Page JavaScript Should Go Here -->
<g:pageProperty name="page.javascript"/>
<!-- End: Custom Page JavaScript Should Go Here -->
</body>
</html>

This will extract the JavaScript portion from samplePage and insert at the bottom of the layoutPage.

Here is the result of this magic in a page in the browser:

<!DOCTYPE html>
<html>
<head>
<titleMyThinkPond.com Custom Page</title>
...
</head>
<body>

<div>
Some template (header) content
Some this page content
</div>

<!-- Common JS Files -->
<script type="text/javascript" src="${request.contextPath}js/common.js"></script>
<!-- Begin: Custom Page JavaScript Should Go Here -->
<script type="text/javascript" src="${request.contextPath}js/samplePage.js"></script>
<!-- End: Custom Page JavaScript Should Go Here -->
</body>
</html>

You can see that the page specific JavaScript content got added towards the bottom as you intended it to be.

If this article has helped you, please add this article to your favorite social links so that others may also find this article.

Cheers & Happy Coding!

Posted in Grails, Groovy, Java | Tagged: , , , | 1 Comment »

Grails 2.X .gitignore file

Posted by Venkatt Guhesan on November 16, 2013

Grails

With a new Grails 2.X project you run into challenges on which folders to check-in into a GIT repository. You want to remove any non-essential files that Grails can rebuild at run-time. And if you are using either GITHub or BitBucket for your GIT repo’s the default .gitignore file created or provided by GITHub is setup for configured for a Grails 1.X project and not a Grails 2.X project.

 

 

 

So here are a few simple steps to help you create the correct .gitignore file for a Grails 2.X project:

Step-1: Create the following .gitignore file under the root Grails project folder:

*.iws
*Db.properties
*Db.script
.settings
.classpath
.project
.idea
eclipse
stacktrace.log
target
target-eclipse
/plugins
/web-app/plugins
/web-app/WEB-INF/classes
web-app/WEB-INF/tld/c.tld
web-app/WEB-INF/tld/fmt.tld

Step-2: Git does not allow you to check in empty (but essential folders). To avoid this you can run the following command:

find . -type d -empty -exec touch {}/.gitignore ;

The above command creates a empty “.gitignore” file below all folders. And since you now have non-empty folders, you can now check them in into Git so that if you check-out/clone the project in the future, you will have those essential but empty folders.

If you find this article useful, Tweet me on your Twitter account or +1 me on Google-Plus so that others can also benefit from this information.

Cheers

Posted in Grails, Groovy, Java, SourceControl - GIT | Tagged: , , , , | 2 Comments »

Cubieboard2 with ARM AllWinner Processor – A20 finally arrived

Posted by Venkatt Guhesan on November 3, 2013

Cubieboard2 with ARM AllWinner Processor – A20 finally arrived. Pretty excited about building my ARM Linux embedded system.

CubieTruck

Learn more about Cubieboard here

Posted in CubieBoard2 & CubieTruck, Embedded Systems, Linux, Technology | Tagged: , , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 124 other followers