<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&quot;C0QNRX8_fip7ImA9WhdbE0s.&quot;'><id>tag:blogger.com,1999:blog-5574043507631319093</id><updated>2011-10-11T12:29:54.146-07:00</updated><title>ElektroMad!</title><subtitle type='html'>Math, computers, electronics, curiosities and a little bit of madness :-)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://elektromad.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default?redirect=false&amp;v=2'/><link rel='alternate' type='text/html' href='http://elektromad.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Carlos Barcellos</name><uri>http://www.blogger.com/profile/11548508134231510274</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry gd:etag='W/&quot;C0QNRXw6eip7ImA9WhdbE0s.&quot;'><id>tag:blogger.com,1999:blog-5574043507631319093.post-2679495664433401889</id><published>2011-10-10T08:20:00.000-07:00</published><updated>2011-10-11T12:29:54.212-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-10-11T12:29:54.212-07:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='material strength bending flexure'/><title>Bending materials</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Have you ever wondered how to calculate the precise amount of weight some materials can handle? Let's suppose you want to build a old fashioned furniture for that audio system of yours using some nice wood you have in home and need to know if the wood will hold the audio weight. This can be achieved using formulas regarding strength of materials, more precisely the bending property.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Bending tensile strength (i.e.&amp;nbsp;Yield strength or rupture tensile)&lt;/b&gt;: The first thing we need in order to continue with our calculations is to discover what is the bending tensile strength of the material we are using. This value represent the edge where the material will break if that amount of pressure is applied to it. These values can be obtained from the suppliers (commercial materials) or a search in the net also can help. These values are not always expressed in the same unity, being the most common units: &lt;b&gt;psi&lt;/b&gt; (pound per square inch), &lt;b&gt;Map&lt;/b&gt; (mega pascal), &lt;b&gt;N/mm2&lt;/b&gt; (Newton per square&amp;nbsp;millimeter), &lt;b&gt;kgf/cm2&lt;/b&gt; (kilogram-force per square centimeter), etc. None of them are better than other, they are just a way of see the pressure the material can hold. We are going to work with &lt;b&gt;kgf/cm2&lt;/b&gt; as this is one of the most used. If you find the bending tensile strength in some other unity you can use this &lt;a href="http://www.translatorscafe.com/cafe/units-converter/pressure/c/"&gt;site&lt;/a&gt; to convert it to&lt;b&gt; kgf/cm2&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2. Choosing the material&lt;/b&gt;:&amp;nbsp;&amp;nbsp;The material we are going to use for the tests is the very well known &lt;i&gt;Plexiglas&lt;/i&gt; (PMMA), some more info about this material can be obtained &lt;a href="http://en.wikipedia.org/wiki/Poly(methyl_methacrylate)"&gt;here&lt;/a&gt;. The Plexiglas tensile strength is around 11000 psi, thus this is about&amp;nbsp;&lt;b&gt;773.4 kgf/cm2&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3. Defining the shape&lt;/b&gt;: Having the first property we can now discover how to calculate the weight some material can handle for a given shape. There are formulas for most of the shapes we can find over the market, for the sake of simplicity we are going to do calculations using the rectangular shape (the most common one). The properties used by the formulas depend on the way the shape is being hold, more precisely which side are supported by a base (foundation pillars). Using the example from the picture below we can clarify this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-k1yOu3dX9hA/TpMZ833UtWI/AAAAAAAAeXI/E3Dvsgw5a0M/s1600/rect.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="270" src="http://1.bp.blogspot.com/-k1yOu3dX9hA/TpMZ833UtWI/AAAAAAAAeXI/E3Dvsgw5a0M/s400/rect.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
From the picture above we have the following variables:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;b&lt;/b&gt; is the side of the rectangle hold by the foundation pillars.&lt;br /&gt;
&lt;b&gt;h&lt;/b&gt; is the height of the rectangle.&lt;br /&gt;
&lt;b&gt;L&lt;/b&gt; is the side of the rectangle from pillar to pillar&lt;br /&gt;
&lt;b&gt;P&lt;/b&gt; is the force applied over the shape.&lt;br /&gt;
&lt;br /&gt;
As we are working with &lt;b&gt;kgf/cm2&lt;/b&gt; all measurement must be made using centimeters, and &lt;b&gt;P&lt;/b&gt; must be calculated using kilogram-force (&lt;b&gt;kgf&lt;/b&gt;). Kgf is just the weight of the material in kilos multiplied by the&amp;nbsp;acceleration&amp;nbsp;of the gravity in meters per second, which is around 9.8m/s. 10 kilos in kgf will be 98 kgf.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4. Formulas&lt;/b&gt;: There are a couple of formulas that we are going to use to calculate the material. Below I present some of the formulas related to the rectangular shape. Notice the shape is formed by the &lt;b&gt;b&lt;/b&gt; and &lt;b&gt;h&lt;/b&gt; sides, also known as section.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-BeW0EwAxSOc/TpMCxCl04FI/AAAAAAAAeW4/xiC1t7aINLc/s1600/formulas.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-BeW0EwAxSOc/TpMCxCl04FI/AAAAAAAAeW4/xiC1t7aINLc/s320/formulas.JPG" width="307" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;T&lt;sub&gt;r&lt;/sub&gt;&lt;/b&gt; is the bending tensile strength in &lt;b&gt;kgf/cm2&lt;/b&gt;.&lt;br /&gt;
&lt;b&gt;F&lt;/b&gt; is a security factor (see section below).&lt;br /&gt;
&lt;b&gt;T&lt;sub&gt;f&lt;/sub&gt;&lt;/b&gt; is the acceptable bending tensile strength calculated based on the security factor.&lt;br /&gt;
&lt;b&gt;M&lt;sub&gt;f&lt;/sub&gt;&lt;/b&gt; is the maximum flexure (bending) moment in &lt;b&gt;kgf&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;P&lt;/b&gt; is the force applied to the rectangular shape in &lt;b&gt;kgf&lt;/b&gt;.&lt;br /&gt;
&lt;b&gt;L&lt;sub&gt;1&lt;/sub&gt;&lt;/b&gt; is the distance from pillar 1 to the point where &lt;b&gt;P&lt;/b&gt; is applied (in centimeters).&lt;br /&gt;
&lt;b&gt;L&lt;sub&gt;2&lt;/sub&gt;&lt;/b&gt; is the distance from pillar 2 to the point where &lt;b&gt;P&lt;/b&gt;&amp;nbsp;is applied (in centimeters).&lt;br /&gt;
&lt;b&gt;L&lt;/b&gt; is the distance from pillar to pillar.&lt;br /&gt;
&lt;b&gt;I&lt;/b&gt; is the inertia momentum (no external forces being applied to the material).&lt;br /&gt;
&lt;b&gt;y&lt;/b&gt; is a imaginary line that divides the height of the shape in 2.&lt;br /&gt;
&lt;b&gt;W&lt;/b&gt; is the resistance module of the material (in cube centimeters)&lt;br /&gt;
&lt;b&gt;b&lt;/b&gt; is the side of the shape hold by the pillars (in centimeters).&lt;br /&gt;
&lt;b&gt;h&lt;/b&gt; is the height of the shape (in centimeters).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;5 - Security Factor&lt;/b&gt;: This&amp;nbsp;is a number made by certain considerations about the elasticity and discharge of the material and also based on the way (effort) the weight is going to be applied over the shape.&amp;nbsp;The effort for the security factor is divided into 4 groups:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center style="text-align: left;"&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Static - The weight is applied over the material statically&amp;nbsp;—this is kept in the same place all the time.&lt;/li&gt;
&lt;li&gt;Intermittent - The weight is applied and released from the material periodically.&lt;/li&gt;
&lt;li&gt;Alternate - The weight is applied periodically in both directions (up and down).&lt;/li&gt;
&lt;li&gt;Abrupt - The weight is released over the material abruptly and periodically.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;For each group there is a security factor to be used for certain types of materials. If you don't know which type to use try to find the material that has the closest &lt;b&gt;T&lt;sub&gt;r&lt;/sub&gt;&lt;/b&gt; of the material you are using.&lt;/div&gt;&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;table border="1"&gt;&lt;tbody&gt;
&lt;tr style="background: powderblue;"&gt;&lt;td valign="middle"&gt;&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Material&lt;/td&gt;&lt;td&gt;/&lt;/td&gt;&lt;td&gt;Effort&lt;/td&gt; &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;td&gt;Static&lt;/td&gt;&lt;td&gt;Intermittent&lt;/td&gt;&lt;td&gt;Alternate&lt;/td&gt;&lt;td&gt;Abrupt&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Cast iron&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Soft Iron&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Hard Iron&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;12&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Wood&lt;/td&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;10&lt;/td&gt;&lt;td&gt;15&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Security Factor&lt;/center&gt;&lt;center&gt;&lt;br /&gt;
&lt;/center&gt;&lt;center style="text-align: left;"&gt;&lt;b&gt;6 - Plugging the numbers&lt;/b&gt;: Now, suppose we have a piece of Plexiglas with these dimensions:&amp;nbsp;&lt;b&gt;b&lt;/b&gt; is 10 cm,&amp;nbsp;&lt;b&gt;L&lt;/b&gt; is 20 cm and&amp;nbsp;&lt;b&gt;h&lt;/b&gt; is 2 cm.&amp;nbsp;What is the maximum weight in kilos this shape can hold? Remember we already know that the bending tensile strength (&lt;b&gt;T&lt;sub&gt;r&lt;/sub&gt;&lt;/b&gt;) of the Plexiglas is about 773.4 kgf/cm2. Let's discover what is the appropriate flexure tensile (&lt;b&gt;T&lt;sub&gt;f&lt;/sub&gt;&lt;/b&gt;) using the security factor. I'm going to use 8 for the security factor as the bending tensile strength from Plexiglas is very similar to wood and our audio system will sit statically over the shape.&lt;/center&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-KebS8BEUUaw/TpMnEYd-A5I/AAAAAAAAeXM/5wgMrkCJscM/s1600/tf.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-KebS8BEUUaw/TpMnEYd-A5I/AAAAAAAAeXM/5wgMrkCJscM/s1600/tf.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;P&lt;/b&gt; is going to be applied in the center of the shape (equilibrium point), in this way the weight is going to be distributed among the whole area.&amp;nbsp;Now we are going to need a formula that relates the force applied with the shape we have.&amp;nbsp;In order to do that we are going to need to calculate the resistance module of the material first.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-AuJeqKec_mQ/TpMIl4i5amI/AAAAAAAAeXA/Ewkz1IAU1wA/s1600/w.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-AuJeqKec_mQ/TpMIl4i5amI/AAAAAAAAeXA/Ewkz1IAU1wA/s1600/w.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now we can relate Tf, Mf and W using the following formula:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-f8rOFiQH9vw/TpMtCSt2aVI/AAAAAAAAeXU/1i67_NFX_qw/s1600/P.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-f8rOFiQH9vw/TpMtCSt2aVI/AAAAAAAAeXU/1i67_NFX_qw/s1600/P.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;
So we discovered that our piece of Plexiglas can handle 129.204 kgf. To convert to kilos just divide by 9.8, which give us 13.18&lt;b&gt;&amp;nbsp;&lt;/b&gt;kg&amp;nbsp;—around 29 pounds! Now, it's just a matter of rearrange the formulas in order to solve for any variable you want.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;7 - Other Shapes&lt;/b&gt;: Below I present some other shapes (section) formulas&amp;nbsp;—if some of the variable is missing this means that the formula is the same as the rectangle shape. if you have trouble finding the one you want, just drop me a message and I can try to find some more information regarding it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-q6wN8VNLmkI/TpSRPtqE2UI/AAAAAAAAeYQ/wUt2uxWsbHI/s1600/solidcirc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="168" src="http://2.bp.blogspot.com/-q6wN8VNLmkI/TpSRPtqE2UI/AAAAAAAAeYQ/wUt2uxWsbHI/s200/solidcirc.png" width="200" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-7yarmJBbnzQ/TpSHlntyE5I/AAAAAAAAeXY/PE89Y5NxdpE/s1600/circ.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-7yarmJBbnzQ/TpSHlntyE5I/AAAAAAAAeXY/PE89Y5NxdpE/s1600/circ.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt; &lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;Solid circumference&lt;/b&gt;, where &lt;b&gt;d&lt;/b&gt; is the diameter.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/center&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-p4o7sW1RuAI/TpSRLMKiN_I/AAAAAAAAeYI/lvOhn9i7zKM/s1600/tubcirc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="169" src="http://4.bp.blogspot.com/-p4o7sW1RuAI/TpSRLMKiN_I/AAAAAAAAeYI/lvOhn9i7zKM/s200/tubcirc.png" width="200" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-Jb0R0gZhIPE/TpSJOe06VpI/AAAAAAAAeXg/HpYHC6K-5Gw/s1600/tube.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-Jb0R0gZhIPE/TpSJOe06VpI/AAAAAAAAeXg/HpYHC6K-5Gw/s1600/tube.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;Tubular circumference&lt;/b&gt;, where &lt;b&gt;d&lt;/b&gt; is the internal diameter and &lt;b&gt;D&lt;/b&gt; is the external diameter.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-JpRqZvX-opU/TpSS-QLDKOI/AAAAAAAAeYc/CxcTfYU520Q/s1600/solidsquare.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="191" src="http://3.bp.blogspot.com/-JpRqZvX-opU/TpSS-QLDKOI/AAAAAAAAeYc/CxcTfYU520Q/s200/solidsquare.png" width="200" /&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-reb6sc4yhGc/TpSK81oHMfI/AAAAAAAAeXo/S9Ya67znWRY/s1600/square.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://3.bp.blogspot.com/-reb6sc4yhGc/TpSK81oHMfI/AAAAAAAAeXo/S9Ya67znWRY/s200/square.JPG" width="154" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;Solid square&lt;/b&gt;, where &lt;b&gt;a&lt;/b&gt; is the side.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/-a73ZNRqMDvc/TpSXT_6aFsI/AAAAAAAAeYk/qMyTXC_hvxs/s1600/tubesquare.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="196" src="http://1.bp.blogspot.com/-a73ZNRqMDvc/TpSXT_6aFsI/AAAAAAAAeYk/qMyTXC_hvxs/s200/tubesquare.png" width="200" /&gt;&lt;/a&gt;&lt;a href="http://4.bp.blogspot.com/-Hcl5AeyKznQ/TpSMQrvyZlI/AAAAAAAAeXw/wVbiqX21_eE/s1600/tubesq.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-Hcl5AeyKznQ/TpSMQrvyZlI/AAAAAAAAeXw/wVbiqX21_eE/s1600/tubesq.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;Tubular square&lt;/b&gt;, where &lt;b&gt;a&lt;/b&gt; is the external side and &lt;b&gt;b&lt;/b&gt; is the internal side.&lt;/div&gt;&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
Have fun!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5574043507631319093-2679495664433401889?l=elektromad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elektromad.blogspot.com/feeds/2679495664433401889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://elektromad.blogspot.com/2011/10/bending-materials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default/2679495664433401889?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default/2679495664433401889?v=2'/><link rel='alternate' type='text/html' href='http://elektromad.blogspot.com/2011/10/bending-materials.html' title='Bending materials'/><author><name>Carlos Barcellos</name><uri>http://www.blogger.com/profile/11548508134231510274</uri><email>noreply@blogger.com</email></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-k1yOu3dX9hA/TpMZ833UtWI/AAAAAAAAeXI/E3Dvsgw5a0M/s72-c/rect.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;C0cGQn8yeyp7ImA9WhdbEEw.&quot;'><id>tag:blogger.com,1999:blog-5574043507631319093.post-7993417102003023509</id><published>2011-10-07T11:02:00.000-07:00</published><updated>2011-10-07T11:10:23.193-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-10-07T11:10:23.193-07:00</app:edited><title>Calling functions dynamically in C</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is not news that someone can loads a function dynamically from a library and use it regularly. But how&lt;br /&gt;
&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;about dynamically choosing the function to call and send the number of arguments based on this decision? One can say that this can be achieved using a BIG &lt;i&gt;switch&lt;/i&gt;, but, using a &lt;i&gt;switch &lt;/i&gt;or &lt;i&gt;ifs &lt;/i&gt;we'll always have to change the code when new functions are included, besides that, it will not be fun! :)&lt;br /&gt;
&lt;br /&gt;
This is simpler than it looks, all we have to do is to input some assembler into the code and et-voilà! We just need to pay attention at the calling convention being used. In the &lt;i&gt;_cdecl &lt;/i&gt;calling convention the caller must cleanup the stack and as opposite of that, the _stdcall calling convention, the callee (the target function) will do the job automatically. For more details on calling conventions see this &lt;a href="http://en.wikipedia.org/wiki/X86_calling_conventions"&gt;article&lt;/a&gt;&amp;nbsp;in&amp;nbsp;Wikipedia.&lt;br /&gt;
&lt;br /&gt;
See below the example for the x86 processor in Windows 32 bits assembler. Notice 64 bits numbers are sent in 2 registers, the most significant byte are pushed first on the stack.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background: #F4F5F7 url(http://2.bp.blogspot.com/-CnKP7Srq5ao/To85cTf1EfI/AAAAAAAAeWs/AwV39KQuHMg/s1600/blockquote.gif) 3px 3px no-repeat; border: 1px dashed #CCC; font-family: times new roman; font-size: 12px; margin: 5px 0; padding: 8px 12px 8px 36px;"&gt;&lt;span class="Apple-style-span"&gt;
&lt;span class="Apple-style-span" style="color: blue;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;/span&gt;

&lt;span class="Apple-style-span" style="color: #274e13;"&gt;/**
 * This function will be called dynamically (This will return my IQ coefficient! :-)
 */&lt;/span&gt;
&lt;b&gt;__int64 _cdecl &lt;/b&gt;test_stack(&lt;b&gt;int &lt;/b&gt;first,&lt;b&gt;int &lt;/b&gt;second,&lt;b&gt;char &lt;/b&gt;*third,&lt;b&gt;__int64 &lt;/b&gt;last)
{
&lt;/span&gt;    &lt;span class="Apple-style-span"&gt;&lt;b&gt;return&lt;/b&gt;(180);
}

&lt;span class="Apple-style-span" style="color: #274e13;"&gt;/**
* example on how to execute a function with dynamic arguments passing
* (example valid for x86 in Windows 32 bits for _stdcall and _cdecl calling conventions)
* see http://en.wikipedia.org/wiki/X86_calling_conventions for more detais
*/&lt;/span&gt;
&lt;b&gt;int &lt;/b&gt;main(&lt;b&gt;int &lt;/b&gt;argc,&lt;b&gt;char &lt;/b&gt;*argv[])
{
&lt;span class="Apple-style-span" style="color: blue;"&gt;#define&lt;/span&gt; MSB_LL(ll) ((&lt;b&gt;long&lt;/b&gt;) (ll &amp;gt;&amp;gt; 32))
&lt;span class="Apple-style-span" style="color: blue;"&gt;#define&lt;/span&gt; LSB_LL(ll) ((&lt;b&gt;long&lt;/b&gt;) ll)
    &lt;b&gt;int            &lt;/b&gt;result,first=4,sec=5;char *third="6";
    &lt;b&gt;void          &lt;/b&gt;*f=test_stack;
   &lt;b&gt; __int64    &lt;/b&gt;ll=123;
    &lt;b&gt;long          &lt;/b&gt;hi=MSB_LL(ll);
    &lt;b&gt;long          &lt;/b&gt;lo=LSB_LL(ll);

    &lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* caller must know the type (and order) of the arguments before calling the function */&lt;/span&gt;
    &lt;b&gt;_asm &lt;/b&gt;{
        &lt;span class="Apple-style-span" style="color: #351c75;"&gt;push &lt;/span&gt;hi&lt;/span&gt;        &lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* last argument is __int64 - push most significant part first */&lt;/span&gt;
        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;push &lt;/span&gt;lo&lt;/span&gt;        &lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* now send the least significant part of int64 */&lt;/span&gt;
        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;push &lt;/span&gt;third&lt;/span&gt;   &lt;span class="Apple-style-span" style="color: #274e13;"&gt; /* third argument in the function prototype */&lt;/span&gt;
        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;push &lt;/span&gt;sec&lt;/span&gt;       &lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* second argument */&lt;/span&gt;
        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;push &lt;/span&gt;first&lt;/span&gt;     &lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* first argument */&lt;/span&gt;
        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;call &lt;/span&gt;f&lt;/span&gt;            &lt;span class="Apple-style-span" style="color: #274e13;"&gt; /* call function */&lt;/span&gt;
&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;#ifdef &lt;/span&gt;_STDCALL_CONVENTION
&lt;/span&gt;        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* on _stdcall callee must cleanup the stack */&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: blue;"&gt;#else&lt;/span&gt;
&lt;/span&gt;        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* on _cdecl caller must cleanup the stack */&lt;/span&gt;
&lt;/span&gt;        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;add &lt;/span&gt;esp, 20    &lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* Stack cleaning  --&amp;gt; add esp, sizeof(long) * arguments */&lt;/span&gt;
&lt;span class="Apple-style-span" style="color: blue;"&gt;#endif&lt;/span&gt;
&lt;/span&gt;        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;mov &lt;/span&gt;hi,edx     &lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* get result of hi order (only used for 64 bits returns) */&lt;/span&gt;
&lt;/span&gt;        &lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: #351c75;"&gt;mov &lt;/span&gt;lo,eax     &lt;span class="Apple-style-span" style="color: #274e13;"&gt;/* get result of low order or integer response */&lt;/span&gt;
&lt;/span&gt;    &lt;span class="Apple-style-span"&gt;}
&lt;/span&gt;    &lt;span class="Apple-style-span"&gt;ll=((&lt;b&gt;__int64&lt;/b&gt;) hi &amp;lt;&amp;lt; 32 | lo);
&lt;/span&gt;    &lt;span class="Apple-style-span"&gt;&lt;b&gt;return&lt;/b&gt;(result);
}

&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
Now, suppose that you receive the function pointer as a parameter and you also receive the arguments to be sent to the function in a &lt;i&gt;va_list &lt;/i&gt;fashion&lt;i&gt;?&lt;/i&gt; Powerful, don't you think?&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Have fun!&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: transparent;"&gt;&lt;span style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 11pt; font-style: normal; font-variant: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5574043507631319093-7993417102003023509?l=elektromad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elektromad.blogspot.com/feeds/7993417102003023509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://elektromad.blogspot.com/2011/10/calling-functions-dynamically-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default/7993417102003023509?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default/7993417102003023509?v=2'/><link rel='alternate' type='text/html' href='http://elektromad.blogspot.com/2011/10/calling-functions-dynamically-in-c.html' title='Calling functions dynamically in C'/><author><name>Carlos Barcellos</name><uri>http://www.blogger.com/profile/11548508134231510274</uri><email>noreply@blogger.com</email></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CkENRH4_fCp7ImA9WhdbEEw.&quot;'><id>tag:blogger.com,1999:blog-5574043507631319093.post-1655352513693210970</id><published>2011-09-22T11:32:00.000-07:00</published><updated>2011-10-07T11:04:55.044-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-10-07T11:04:55.044-07:00</app:edited><title>What I know about gears, RPM and speed</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I was always curious about cars maximum speed, not the one shown in the speedometer, but the real one. So, after some research, this came up to me that the speed is related to 3 simple things.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;- RPM: The speed the engine can turn itself in revolutions per minute.&lt;/div&gt;&lt;div&gt;- The gears ratio: How the engine speed can be&amp;nbsp;transferred&amp;nbsp;to tires&lt;/div&gt;&lt;div&gt;- The tires's size: Yes, size matters!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;So, lets do the magic.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;1 - Gears&lt;/b&gt;: The gear is a toothed wheel that when coupled to another gear can alter the relation between the speed of a driving mechanism. This relation about teeth and speed, can be expressed in the following formula:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-y21ZvEc8xss/TnstpdjHBFI/AAAAAAAAeVA/ETtdTBPfqWk/s1600/ratio.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-y21ZvEc8xss/TnstpdjHBFI/AAAAAAAAeVA/ETtdTBPfqWk/s1600/ratio.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Where:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;b&gt;V1&lt;/b&gt; is the speed at the first gear.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;b&gt;V2&lt;/b&gt; is the speed at the second gear.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;b&gt;G1&lt;/b&gt; is the number of teeth in the first gear.&lt;/div&gt;&lt;div&gt;&amp;nbsp; &lt;b&gt;G2&lt;/b&gt; is the number of teeth in the second gear.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Looking at the example below we can see another gears property. Coupled gears work in inverse rotational directions, when &lt;b&gt;gear A&lt;/b&gt; is turning clockwise, &lt;b&gt;gear B&lt;/b&gt; is turning counter clockwise. If the same rotational direction is needed another gear can be added to the mechanism or &lt;a href="http://en.wikipedia.org/wiki/Pulley"&gt;pulleys&lt;/a&gt;&amp;nbsp;can be used instead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-cz2Hdy-amu8/TnsuqW4CBDI/AAAAAAAAeVE/BcH_0RqpGpw/s1600/gears.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-cz2Hdy-amu8/TnsuqW4CBDI/AAAAAAAAeVE/BcH_0RqpGpw/s1600/gears.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Using the same example, we can determine what will be the speed at both gears if one of them starts turning. Notice &lt;b&gt;gear A&lt;/b&gt; has 12 teeth and &lt;b&gt;gear B&lt;/b&gt; has 18 teeth. Applying the formula given above, let's suppose that &lt;b&gt;gear A&lt;/b&gt; suddenly starts turning at the speed of 30 RPM, then:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-CrH_zOrLGWk/Tns47RHI0bI/AAAAAAAAeVI/9How62SEWt0/s1600/eg1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-CrH_zOrLGWk/Tns47RHI0bI/AAAAAAAAeVI/9How62SEWt0/s1600/eg1.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;A small gear coupled to a bigger one will decrease the speed of its counterpart (and increase the power of it), which brings us to the following question: What if the &lt;b&gt;gear B&lt;/b&gt; was the one that started turning at 30 RPM? So, lets see what happens:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-7uSB1vn3w5I/Tns6bZDEpII/AAAAAAAAeVM/fvaEk0uw7Jw/s1600/eg2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-7uSB1vn3w5I/Tns6bZDEpII/AAAAAAAAeVM/fvaEk0uw7Jw/s1600/eg2.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;When this speed is applied to &lt;b&gt;gear B&lt;/b&gt;, the &lt;b&gt;gear A&lt;/b&gt; will start turning at 45 RPM. Therefore, a bigger gear coupled to a small one will increase the speed of the mechanism.&amp;nbsp;Two important things: Gears in the&amp;nbsp;&lt;b&gt;same axis&lt;/b&gt;&amp;nbsp;have the&amp;nbsp;&lt;b&gt;same RPM&lt;/b&gt;&amp;nbsp;no matters the size of them. When the speed is increased, the power is decreased and vice-versa.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;2 - Ratio&lt;/b&gt;: Another way of calculate the speed in each gear is use the ratio between the first and second gear. As you will discover, all the car gears are expressed using this number. This can be&amp;nbsp;easily&amp;nbsp;done applying this formula:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Z99h6x3nCZU/TntuQTU-pWI/AAAAAAAAeVk/inQwLIy62mI/s1600/gratio.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-Z99h6x3nCZU/TntuQTU-pWI/AAAAAAAAeVk/inQwLIy62mI/s1600/gratio.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Where:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp; &lt;b&gt;R&lt;/b&gt; is the gear ratio&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp; &lt;b&gt;G1&lt;/b&gt; is the number of teeth in &lt;b&gt;gear A&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp; &lt;b&gt;G2&lt;/b&gt; is the number of teeth in &lt;b&gt;gear B&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp; &lt;b&gt;V1&lt;/b&gt; is speed at &lt;b&gt;gear A&lt;/b&gt; (in RPM)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&amp;nbsp; &lt;b&gt;V2&lt;/b&gt; is speed at &lt;b&gt;gear B&lt;/b&gt; (in RPM)&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;3 - Tires&lt;/b&gt;. There is a very good article about tire codes at&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Tire_code"&gt;Wikipedia&lt;/a&gt;. I got the picture below from there which I will use to do a little summary about the parts that is related to our job.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-WKYFB1OSEF0/Tns-MGXAFrI/AAAAAAAAeVQ/QQgtG7ISRyY/s1600/500px-Tire_code_-_en.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="246" src="http://2.bp.blogspot.com/-WKYFB1OSEF0/Tns-MGXAFrI/AAAAAAAAeVQ/QQgtG7ISRyY/s320/500px-Tire_code_-_en.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;From the picture above we are interested in 3 things:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-3cObWYb3qdM/TntFibeMW4I/AAAAAAAAeVY/kV8OVRcVGgU/s1600/tire.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-3cObWYb3qdM/TntFibeMW4I/AAAAAAAAeVY/kV8OVRcVGgU/s1600/tire.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;a&lt;/b&gt; - Nominal width: This is the width of the tire in millimeters, using the example above the tire's width is 215mm.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;b&lt;/b&gt; - Ratio of the height to width: The height of the tire is a percentage from its width. Using the example above, this will be 65% of the width: 0.65 x 215 = 139.75mm.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;c&lt;/b&gt; - Rim diameter code: This is the diameter of the wheel, this is expressed in inches. As all the calculations are done using the metric system, we are going to convert it to meters. Again using the example, the wheel diameter is 15 inches, or 381 millimeters.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;We are going to use all these number to discover one simple thing, the circumference of the whole wheel (wheel + tire). From the picture above we can clearly see that the mounted wheel diameter is the wheel size + 2 times the tire height. So, the full diameter will be 381 + 2 * 139.75 = 660.5 mm. Now we just multiply by π and we get the circumference: 660.5 mm * 3.1416 = 2075.03 mm, or approximately 2.07 meters.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;3 - Remembering:&lt;/b&gt;&amp;nbsp;Let's make a summary about we got until now:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;a - We know the engine speed is measured in RPM (a common RPM speed for cruise cars is about 5000).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;b - We know that car have gears and these gears have ratios, some of them increase the speed of the engine and some of them decrease it. Some of them are fixed gears (called differentials) and some of them can be changed while you are driving. This is done using the&amp;nbsp;clutch on manual cars, and they are automatically changed on automatic&amp;nbsp;cars.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;c - We know that gears on the same axis will turn at the same speed, doesn't matter their sizes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;4 - Speed&lt;/b&gt;: &amp;nbsp;How about after all the gearing the very last gear is attached in the same axis with the wheel? It will just be a matter of calculate all the speed transmission among the gears to discover the RPM at the last gear and as the last gear is in the same axis with the wheel, every time the gear turns, the whole will turns as well, or, every time the last gear turns, the car moves 2.07 meters using the tires from our example (I told you size matters!). Supposing that after all the coupling the last gear is turning at the speed of 10 RPM, the car will be moving at 20.7 meters per minute, or 3.45 meters per second or&amp;nbsp;12.42 km/h or 7.72 mph.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;5 - Common ratios&lt;/b&gt;: After a little research in the net I found some gear ratios regarding commercial bikes (B), cars (C) and SUVs (S). See below the table.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;&lt;table border="1" style="text-align: center; width: 100%;"&gt;&lt;tbody&gt;
&lt;tr style="background: lemonChiffon;"&gt;    &lt;td style="border: 1px solid black;"&gt;Vehicle&lt;/td&gt;&lt;td style="border: 1px solid black;"&gt;RPM&lt;/td&gt;    &lt;td style="border: 1px solid black;"&gt;Start Differential&lt;/td&gt;    &lt;td style="border: 1px solid black;"&gt;Final Differential&lt;/td&gt; &lt;td colspan="6"&gt;&lt;table style="text-align: center; width: 100%;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td colspan="6"&gt;Gear ratio&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;     &lt;td&gt;1st&lt;/td&gt;&lt;td&gt;2nd&lt;/td&gt;&lt;td&gt;3rd&lt;/td&gt;&lt;td&gt;4th&lt;/td&gt;&lt;td&gt;5th&lt;/td&gt;&lt;td&gt;6th&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;/tr&gt;
&lt;tr style="background: powderBlue;"&gt;&lt;td&gt;(C) Volkswagen Golf&lt;/td&gt;&lt;td&gt;5750&lt;/td&gt;&lt;td&gt;3.087&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;3.36&lt;/td&gt;&lt;td&gt;2.09&lt;/td&gt; &lt;td&gt;1.47&lt;/td&gt;&lt;td&gt;1.19&lt;/td&gt;&lt;td&gt;1.15&lt;/td&gt;&lt;td&gt;0.98&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="background: powderBlue;"&gt;&lt;td colspan="4" style="width: 90px;"&gt;Speed (km/h) with default tire: 1.81m&lt;/td&gt;&lt;td&gt;60.16&lt;/td&gt;&lt;td&gt;97.31&lt;/td&gt;&lt;td&gt;137.60&lt;/td&gt;&lt;td&gt;169.96&lt;/td&gt;&lt;td&gt;175.93&lt;/td&gt;&lt;td&gt;206.45&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="width: 90px;"&gt;(B) Suzuki GSX-R 1000&lt;/td&gt;&lt;td&gt;10800&lt;/td&gt;&lt;td&gt;1.553&lt;/td&gt;&lt;td&gt;2.47&lt;/td&gt;&lt;td&gt;2.687&lt;/td&gt; &lt;td&gt;2.052&lt;/td&gt;&lt;td&gt;1.681&lt;/td&gt;&lt;td&gt;1.45&lt;/td&gt;&lt;td&gt;1.304&lt;/td&gt;&lt;td&gt;1.208&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;&lt;td colspan="4" style="width: 90px;"&gt;Speed (km/h) with default tire:&amp;nbsp;2.00m&lt;/td&gt;&lt;td&gt;125.76&lt;/td&gt;&lt;td&gt;164.64&lt;/td&gt;&lt;td&gt;201&lt;/td&gt;&lt;td&gt;233.04&lt;/td&gt;&lt;td&gt;259.08&lt;/td&gt;&lt;td&gt;279.72&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="background: powderBlue;"&gt; &lt;td&gt;(S) Ranger 3.0 Electronic&lt;/td&gt;&lt;td&gt;3800&lt;/td&gt;&lt;td&gt;3.54&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;4.08&lt;/td&gt;&lt;td&gt;2.29&lt;/td&gt;&lt;td&gt;1.47&lt;/td&gt;&lt;td&gt;1.00&lt;/td&gt;&lt;td&gt;0.72&lt;/td&gt;&lt;td&gt;-&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="background: powderBlue;"&gt;&lt;td colspan="4" style="width: 90px;"&gt;Speed (km/h) with default tire:&amp;nbsp;2.19m&lt;/td&gt;&lt;td&gt;34.56&lt;/td&gt;&lt;td&gt;61.63&lt;/td&gt;&lt;td&gt;95.92&lt;/td&gt;&lt;td&gt;140.99&lt;/td&gt;&lt;td&gt;195.92&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt; &lt;td&gt;(B) BMW F650 GS Dakar&lt;/td&gt;&lt;td&gt;6500&lt;/td&gt;&lt;td&gt;1.946&lt;/td&gt;&lt;td&gt;2.9375&lt;/td&gt;&lt;td&gt;2.75&lt;/td&gt;&lt;td&gt;1.75&lt;/td&gt;&lt;td&gt;1.31&lt;/td&gt;&lt;td&gt;1.05&lt;/td&gt;&lt;td&gt;0.88&lt;/td&gt;&lt;td&gt;-&lt;/td&gt; &lt;/tr&gt;
&lt;tr&gt;&lt;td colspan="4" style="width: 90px;"&gt;Speed (km/h) with default tire:&amp;nbsp;2.18m&lt;/td&gt;&lt;td&gt;54.02&lt;/td&gt;&lt;td&gt;88.94&lt;/td&gt;&lt;td&gt;118.77&lt;/td&gt;&lt;td&gt;148.33&lt;/td&gt;&lt;td&gt;176.84&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;/tr&gt;
&lt;tr style="background: powderBlue;"&gt;&lt;td&gt;(B) BMW K 1200 S&lt;/td&gt;&lt;td&gt;10250&lt;/td&gt;&lt;td&gt;1.559&lt;/td&gt;&lt;td&gt;2.82&lt;/td&gt;&lt;td&gt;2.52&lt;/td&gt;&lt;td&gt;1.84&lt;/td&gt;&lt;td&gt;1.45&lt;/td&gt;&lt;td&gt;1.28&lt;/td&gt;&lt;td&gt;1.14&lt;/td&gt;&lt;td&gt;1.01&lt;/td&gt; &lt;/tr&gt;
&lt;tr style="background: powderBlue;"&gt;&lt;td colspan="4" style="width: 90px;"&gt;Speed (km/h) with default tire:&amp;nbsp;1.94m&lt;/td&gt;&lt;td&gt;107.67&lt;/td&gt;&lt;td&gt;147.48&lt;/td&gt;&lt;td&gt;187.17&lt;/td&gt;&lt;td&gt;211.96&lt;/td&gt;&lt;td&gt;238.04&lt;/td&gt;&lt;td&gt;268.65&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt;&lt;center style="text-align: left;"&gt;&lt;br /&gt;
&lt;/center&gt;&lt;center style="text-align: left;"&gt;To calculate the maximum hypothetical speed at any gear just do the math. For instance, to calculate the VW Golf speed at the 3rd gear with default tires:&lt;/center&gt;&lt;center style="text-align: left;"&gt;&lt;br /&gt;
&lt;/center&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-OOaoARE_yg4/ToDbFcKt8RI/AAAAAAAAeV8/41ox7o2fb1I/s1600/golf.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-OOaoARE_yg4/ToDbFcKt8RI/AAAAAAAAeV8/41ox7o2fb1I/s1600/golf.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;The ratio is including fixed gears in its calculation (differentials), we just need to multiply them together. Notice these values are expressed as&lt;b&gt; maximum possible values&lt;/b&gt; and will rarely be obtained due to external factors, like friction and engine efficiency, which can literally blow if this is kept on the maximum RPM for long periods.&lt;br /&gt;
&lt;br /&gt;
Have fun!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5574043507631319093-1655352513693210970?l=elektromad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elektromad.blogspot.com/feeds/1655352513693210970/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://elektromad.blogspot.com/2011/09/what-i-know-about-gears-rpm-and-speed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default/1655352513693210970?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default/1655352513693210970?v=2'/><link rel='alternate' type='text/html' href='http://elektromad.blogspot.com/2011/09/what-i-know-about-gears-rpm-and-speed.html' title='What I know about gears, RPM and speed'/><author><name>Carlos Barcellos</name><uri>http://www.blogger.com/profile/11548508134231510274</uri><email>noreply@blogger.com</email></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-y21ZvEc8xss/TnstpdjHBFI/AAAAAAAAeVA/ETtdTBPfqWk/s72-c/ratio.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;AkcMRns5eyp7ImA9WhdVGE0.&quot;'><id>tag:blogger.com,1999:blog-5574043507631319093.post-3185840023546342561</id><published>2011-09-20T11:57:00.000-07:00</published><updated>2011-09-23T13:01:27.523-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-09-23T13:01:27.523-07:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='electronic transformer coil amperes power current voltage'/><title>Little study about transformers</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;For a while a question has been hunting me: How the transformers really work under the hoods? Below I present some gathering I got from the internet, including concepts, formulas and some explanation about it. Have fun!&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;b&gt;1 - What is a transformer&lt;/b&gt;? According to &lt;a href="http://en.wikipedia.org/wiki/Transformer"&gt;wikipedia&lt;/a&gt;:&lt;br /&gt;
&lt;blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;“A transformer is a device that transfers electrical energy from one circuit to another through inductively coupled conductors—the transformer's coils.”&lt;/blockquote&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-UIeotf6lNCE/Tnn0p7IDPYI/AAAAAAAAeU4/F-OYSLXnk0Q/s1600/trafo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="133" src="http://4.bp.blogspot.com/-UIeotf6lNCE/Tnn0p7IDPYI/AAAAAAAAeU4/F-OYSLXnk0Q/s200/trafo.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;In other words, the transformer changes the voltage applied to a new value, smaller or greater than the original value. The applied voltage is commonly called the primary voltage or primary winding, and the converted value is called the secondary voltage or secondary winding. NOTICE transformers are by their nature bi-directional,&amp;nbsp;“primary and secondary” concepts&amp;nbsp;are dependent of the way you are going to use it. If you get a transformer 110/220, this can be used to convert 110 (primary) to 220 (secondary), or backwards, 220 (primary) to 110 (secondary).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-wbsZabyyeXw/Tnn1Pba98dI/AAAAAAAAeU8/NDB4Z4ObCJ0/s1600/primary.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-wbsZabyyeXw/Tnn1Pba98dI/AAAAAAAAeU8/NDB4Z4ObCJ0/s1600/primary.gif" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;2 - How does this work?&lt;/b&gt; When one alternating current is applied on the primary coil of the transformer this generates a magnetic field due to the inductance. This magnetic field then inducts a current on the secondary coil of the transformer. The relation of the applied and the converted voltages depends on the wire turns in both coils as in the following formula:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-1oMibgC442s/Tniey7K-gDI/AAAAAAAAeT0/r7C4VsOs304/s1600/vs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-1oMibgC442s/Tniey7K-gDI/AAAAAAAAeT0/r7C4VsOs304/s1600/vs.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;Where &lt;b&gt;Vs&lt;/b&gt; is the voltage in the secondary, &lt;b&gt;Vp&lt;/b&gt; is the voltage on the primary, &lt;b&gt;Ns&lt;/b&gt; is the number of turns in the secondary and &lt;b&gt;Np&lt;/b&gt; is the number of turns in the primary. This formula will be used and explained later on this post.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b style="line-height: 19px;"&gt;3 - Power and current: &lt;/b&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;According to the&amp;nbsp;physics's law the power in the primary and in the secondary must remain the same.&amp;nbsp;As the power of the circuit is voltage multiplied by the current, t&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 19px;"&gt;he current in the secondary coil will be proportional to the current and inversely proportional to the voltage in the primary coil (as bigger is the voltage in the primary, as smaller is the current in the secondary). This relation is best described in the following formula:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-sq8ZVj5dq3o/Tnil1zEV-MI/AAAAAAAAeT8/Qyz39aBTyIc/s1600/is.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-sq8ZVj5dq3o/Tnil1zEV-MI/AAAAAAAAeT8/Qyz39aBTyIc/s1600/is.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;Where &lt;b&gt;Vs&lt;/b&gt; is voltage in the secondary, &lt;b&gt;Vp&lt;/b&gt; is the voltage on the primary,&lt;b&gt; Ip&lt;/b&gt; is the current on the primary and &lt;b&gt;Is&lt;/b&gt; is the current on the secondary. As an example, if we have 2 amperes in the primary with a voltage of 220 and we want to transform this to 110 volts, the current in the secondary will be 4 amperes, as following:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-EmafpurK6F0/Tnip-MJinfI/AAAAAAAAeUA/o6b8Xk9yfjI/s1600/egis.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-EmafpurK6F0/Tnip-MJinfI/AAAAAAAAeUA/o6b8Xk9yfjI/s1600/egis.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;4 - Defining current and wiring:&lt;/b&gt;&amp;nbsp;As mentioned before, the current is related to the wiring used, as bigger the current as thick the wire must be. Before knowing the thickness, we need to calculate how many turns of wire the coil must have. The primary step for these calculations is to define the area of the transformer core. All further calculations are based on this. This is very simple to find and its based on the power in watts the transformer must supply. The area is calculate in square centimeters (cm2).&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-uQ2KWyltQ6g/TnjHxZ_tnEI/AAAAAAAAeUE/CU2hOSEvYY0/s1600/a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-uQ2KWyltQ6g/TnjHxZ_tnEI/AAAAAAAAeUE/CU2hOSEvYY0/s1600/a.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Where&amp;nbsp;&lt;b&gt;A&lt;/b&gt;&amp;nbsp;is the area area in square centimeters (cm2),&amp;nbsp;&lt;b&gt;W&lt;/b&gt;&amp;nbsp;is the power (voltage x current) and&amp;nbsp;&lt;b&gt;Q&lt;/b&gt;&amp;nbsp;is a material quality factor. This factor is based on the quality of the material used for the core.&amp;nbsp;Typically this is 0.8 for very good materials, 1 for regular materials and 1.2 for poor materials. As a rule of thumb, use 1 for calculations for homemade transformers.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Below we can see an example of what a transformer core looks like. The core is mounted using E plates which can be found in several sizes. During the mount process 2 things must be kept in mind: The area must be as close as possible from the value found in the formula and the core's shape must be as similar as possible from the square shape. The core's area can be calculated from the E plates multiplying its width by its height in centimeters. In the picture below the core's area is shown in blue.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-KPaBLd0jrX4/TnzfjKXD-TI/AAAAAAAAeV4/CNEos5jYLWo/s1600/eplates.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="93" src="http://4.bp.blogspot.com/-KPaBLd0jrX4/TnzfjKXD-TI/AAAAAAAAeV4/CNEos5jYLWo/s320/eplates.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
Following our previous examples, lets calculate the area needed for a transformer which has 220V and 2A (440W) on the primary coil.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-DR-M-y-QUnY/TnjML5ZwH4I/AAAAAAAAeUM/43ETqjXH9i0/s1600/ega.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-DR-M-y-QUnY/TnjML5ZwH4I/AAAAAAAAeUM/43ETqjXH9i0/s1600/ega.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
After calculating the area of the core, now is just calculate how many turns of wire we are going to need in the primary coil. This is done using the following formula:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-I-hunT8u-2I/TnjOtW-ZcOI/AAAAAAAAeUQ/kmOGpKHoK3Q/s1600/n.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-I-hunT8u-2I/TnjOtW-ZcOI/AAAAAAAAeUQ/kmOGpKHoK3Q/s1600/n.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;Where &lt;b&gt;Np&lt;/b&gt; is the number of turns in the primary, &lt;b&gt;V&lt;/b&gt; is the voltage, &lt;b&gt;&lt;i&gt;f&lt;/i&gt;&lt;/b&gt; is frequency of the alternating current in hertz, &lt;b&gt;B&lt;/b&gt; is the magnetic flux of the core material in Gauss and &lt;b&gt;A&lt;/b&gt; is the area of the core in cm2. The magnetic flux of the material is given by the material supplier. When this number is&amp;nbsp;unknown, use 10000 for a approximate calculation. &lt;b&gt;4.44&lt;/b&gt; is 4 times the alternating current &lt;a href="http://en.wikipedia.org/wiki/Form_factor_(electronics)"&gt;form factor&lt;/a&gt;. &lt;b&gt;10&lt;sup&gt;8&lt;/sup&gt;&lt;/b&gt; is derived from the electromotive force principles (&lt;a href="http://en.wikipedia.org/wiki/Electromotive_force"&gt;e.m.f&lt;/a&gt;). Continuing with the previous example, let's calculate the number of turns necessary for 220V, 2A, and the frequency of 60Hz.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-w5XC0ROzCIk/TnjVARR5VeI/AAAAAAAAeUY/PvFmNrgf-xI/s1600/nt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-w5XC0ROzCIk/TnjVARR5VeI/AAAAAAAAeUY/PvFmNrgf-xI/s1600/nt.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Now that we know how many turns we need in the primary coil, we just use the formula given above to calculate the number of turns in the second coil for the voltage of 110V, as follows:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Q1chLxZNTCU/TnjW-U1qt2I/AAAAAAAAeUc/q7qs_U2vLbE/s1600/nts.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-Q1chLxZNTCU/TnjW-U1qt2I/AAAAAAAAeUc/q7qs_U2vLbE/s1600/nts.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The number of turns in the secondary coil is 197. As stated before, for this example, the current in the primary is 2A and the current in the secondary is 4A. The thickness of the wire is defined by these values and can be calculated using the following formula:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-I7l2J36BKH4/TnjZHomHx-I/AAAAAAAAeUg/43JFwfWH_80/s1600/d.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-I7l2J36BKH4/TnjZHomHx-I/AAAAAAAAeUg/43JFwfWH_80/s1600/d.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Where &lt;b&gt;d&lt;/b&gt; is the diameter of the wire in millimeters (mm), &lt;b&gt;I&lt;/b&gt; is the current in amperes and &lt;b&gt;J&lt;/b&gt; is current density in the material in amperes per square millimeter (A/mm&lt;sup&gt;2&lt;/sup&gt;). The density is a decimal number commonly in the range from 1 to 2. When using 1 the transformer will flow without extra heating but more material are used. When using 2, less material is needed to build the transformer but this cannot be used for long periods because this can literally burn. A widely used value is 1.5. Below is the calculation for the primary and secondary coils for our example.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-8rZoMRKyClY/TnjcUW4hf_I/AAAAAAAAeUk/ZsuDSGZbBVM/s1600/egd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-8rZoMRKyClY/TnjcUW4hf_I/AAAAAAAAeUk/ZsuDSGZbBVM/s1600/egd.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;For our example the wire thickness for the primary coil must have at least 0.85mm and for the second at least 1.7mm. In stores the wires are sold by the AWG table, see below what is the closest greater value for the diameter found in the formula. For our examples, the wire for the primary coil is AWG 19 (0.91mm) and for the secondary coil is AWG 13 (1,83mm).&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-5THKSdQyrvg/Tnjg_r94y5I/AAAAAAAAeUo/YeRnqdIbCyQ/s1600/table.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-5THKSdQyrvg/Tnjg_r94y5I/AAAAAAAAeUo/YeRnqdIbCyQ/s1600/table.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Related material can be found in:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://www.py2bbs.qsl.br/calc_transf.php"&gt;http://www.py2bbs.qsl.br/calc_transf.php&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://www.813am.qsl.br/artigos/teoria/ProjetoTrafos.pdf"&gt;http://www.813am.qsl.br/artigos/teoria/ProjetoTrafos.pdf&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://www.eletromaniacos.com/modules.php?name=News&amp;amp;file=article&amp;amp;sid=74"&gt;http://www.eletromaniacos.com/modules.php?name=News&amp;amp;file=article&amp;amp;sid=74&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="http://www.comunidadelectronicos.com/articulos/transformadores.htm"&gt;http://www.comunidadelectronicos.com/articulos/transformadores.htm&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5574043507631319093-3185840023546342561?l=elektromad.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://elektromad.blogspot.com/feeds/3185840023546342561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://elektromad.blogspot.com/2011/09/little-study-about-transformers.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default/3185840023546342561?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5574043507631319093/posts/default/3185840023546342561?v=2'/><link rel='alternate' type='text/html' href='http://elektromad.blogspot.com/2011/09/little-study-about-transformers.html' title='Little study about transformers'/><author><name>Carlos Barcellos</name><uri>http://www.blogger.com/profile/11548508134231510274</uri><email>noreply@blogger.com</email></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-UIeotf6lNCE/Tnn0p7IDPYI/AAAAAAAAeU4/F-OYSLXnk0Q/s72-c/trafo.png' height='72' width='72'/><thr:total>1</thr:total></entry></feed>