Using Solidworks to design Stepper Motor Assembly (1)

Have recently acquiried a nice stepper motor from Jameco Electronics.  It is a small motor, less than 2″x2″x2″, but still has substantial torque.  I will get into more Arduino + Circuits + Electro-Mechanical detail soon, but for the moment, I wished to share a couple of screen-shots of the 3D model and the actual parts that I am modeling and assembling.

In this model, I’m (quite happily) making heavy use cross-part references in the assembly.  I caught onto that concept by reading the Top Down Design Overview at the SolidWorks website.

 

 

 

 

 

 

 

Home School Software: Inventory Tracking

Ever lose track of how much flour, sugar, milk, eggs, soap, razors, spices, motor oil, filters, nails, screws, glue, paper, staples, etc… you have on hand?

Ever shop based on hunger, rather than diciplined restocking?

Ever want to have an inventory of groceries at your house, so you don’t have to run to the store for everything?

Our objective is to keep consistent inventory levels of common products around the house, so we never run out of things that we should have on hand.  To that end, I’ve been adding some basic household inventory tracking data to the Home School software.  It has (or will have) the following features:

  • Areas — places that you store products (freezer, basement shelves, kitchen, bathroom, etc…)
  • Items — each “thing” that you want to keep in a given area (flour, sugar, toothpaste, etc)
  • Units — lbs, each, bottle, roll, case, etc…
  • Min Quantity — minimum amount to have on hand
  • Max Quantity — max quantity to have on hand
  • Check every [] days — how often should this item be checked?

From that data, you will be able to pull the following information out of the system:

  • All items and current inventory levels
  • Graphs of inventory levels over time
  • Which items (sorted by area) need checked now
  • What needs refilled (eg, the container of sugar in the kitchen, from the big bags in the basement)
  • What needs purchased (40 eggs, 24 rolls of TP, 10 lbs of sugar)

You will be able to pop on, print out a list of items that need inventoried, and hand it to the kids with a pencil and clipboard to go about filling out how much there actually is.  Excellent math practice, especially if you deal in raw units like oz, lbs, quarts, etc… — the students will have to add/multiply/convert the units that are on the items they are counting.

For Example, you could specify that you want 4 bottles of dish soap around, or 96 ounces of dish soap around.  The difference is that they will need to multiply 24 oz per bottle * 3 bottles on hand = 72 ounces — time to buy another bottle.

Here are some early screen shots:

 

Home School Software now supports Images!

Today I got to a great milestone with the homeschool software I discussed here.  It now has excellent image support.

For every activity, you can attach an unlimited number of images.  They are stored in the database with all of the other data, so it’s easy to backup.  Also, I am using ImageMagick to resize them into various preview sizes for quick speeds while working with them.

I used uploadify to power the image uploader and ImageMagick to resize them into preview sizes.

Here is a screen shot of the list page:

And a screen shot of the details page:

Home School Software, Anyone?

2010-2011 was the first year that we were required by PA law to report our schooling activities to the Altoona Area School district.  (simply because our oldest turned 8)

Naturally, the topic of Log and portfolio came up needing solved.

Having been home educated as a child, I recall the massive effort it took to remain organized enough to be able to assemble a really good portfolio at the end of the year.  Also, the log book needed to be throughly kept to provide record of education activities.

Here is a brief list of items that need improved:

  1. Portfolios typically are assembled at the end of the year, which requires a lot of effort.
  2. There is only one copy of a portfolio.
  3. They are a bit kludgy, having a mix of all sorts of media (photos, papers, art, etc…)
  4. They are not searchable
  5. They are not sortable
  6. They are not printable
  7. They are not email-able
  8. They are not backup-able
  9. They typically show only the “best” work, by virtue of what they are (depends on the assembler)
  10. They are separate from the log of the actual activities
  11. Etc…

Well, after a lot of here and there, I decided we needed a database.  So my wife and I designed a database that would handle a number of aspects:

  1. Multiple Students
  2. Subjects as required by law
  3. Projects that are a part of schooling
  4. Activities and Events
  5. Dates
  6. Summaries
  7. Descriptions
  8. Scanned documents
  9. Photographs
  10. PDF files

The ultimate goal is to be able to send off for a printed book with the above content, and turn that into the school district.

I thought that a web interface would be appropriate.  So here is where I am at after a couple days of tinkering around…

 

 

 

 

 

 

If anyone expresses interest in seeing more of this, post a comment.

Thanks!

 

Essentials of DNS: understand the basics well

DNS stands for “Domain Name Service”.  It is the mechanism in which the internet is able to map a name (eg http://www.sgasoftware.com) to an IP address (eg 12.34.56.78).

This writeup is not designed to be 100% technically accurate.  Rather, it is designed to give a layman understanding of relevant parts of the DNS system.
Much more comprehensive information can be found here: http://en.wikipedia.org/wiki/Domain_Name_System

A bit on IP Addresses and Routing

Packets of data to move to and fro across the internet based entirely on IP Address.  At every “network meeting point” on the internet, there is a router which examines all traffic to find out where it is headed, and then sends it to the next step.  This process is repeated at each “network meeting point” until the traffic arrives at the destination.
There is a popular utility called “Trace Route”, which will demonstrate all of the routers that a packet of data must go through to get from where you are to where it is headed.  In the following example, I ran a traceroute to http://www.google.com.
Notice the first step was a DNS lookup, converting www.google.com to 72.14.204.99
c:\>tracert www.google.com
Tracing route to www.l.google.com [72.14.204.99]
over a maximum of 30 hops:
  1    <1 ms    <1 ms    <1 ms  192.168.0.1   (our office router/gateway))
  2     1 ms    <1 ms    <1 ms  10.1.10.1     (our cable modem (another router/gateway)
  3    15 ms    13 ms    12 ms  96.179.208.1
  4     9 ms     9 ms    10 ms  ge-2-20-ur01.blairsville.pa.pitt.comcast.net [68.86.146.165]
  5    14 ms    10 ms     9 ms  te-9-1-ur01.indiana.pa.pitt.comcast.net [68.86.100.178]
  6    10 ms    55 ms    30 ms  te-9-3-ur01.punxy.pa.pitt.comcast.net [68.87.173.81]
  7    12 ms    18 ms    19 ms  te-9-1-ur01.ruralvalley.pa.pitt.comcast.net [68.86.100.122]
  8    21 ms    63 ms    53 ms  te-6-3-ar01.pittsburgh.pa.pitt.comcast.net [68.87.173.73]
  9    28 ms    29 ms    27 ms  te-3-1-0-0-cr01.chicago.il.ibone.comcast.net [68.86.90.181]
 10    25 ms    28 ms    25 ms  pos-1-6-0-0-pe01.350ecermak.il.ibone.comcast.net [68.86.87.130]
 11    43 ms    44 ms    44 ms  as15169-1.350ecermak.il.ibone.comcast.net [75.149.230.198]
 12    48 ms    52 ms    58 ms  209.85.254.130
 13    37 ms    39 ms    39 ms  209.85.248.222
 14    36 ms    43 ms    41 ms  66.249.94.46
 15    42 ms    39 ms    39 ms  iad04s01-in-f99.1e100.net [72.14.204.99]
Trace complete.
In true geek fashion, after 15 hops, our packet reached 1e100.net.  Google was derived from the word Googol, which is a number with 1 and 100 zeros.  Henceforth, 1e100.net stands for something to that effect.

Why does this matter?

It is important to understand that computers are binary, and therefore require input to be ultimately converted to binary.  An IPv4 address is simply 32 bits, but rather than presenting it as 11000000.10101000.00000000.00000001, humans find it more convenient to look at it like 192.168.0.1.  However, that is still a far cry from a human readable name like mail.domain.com.
This is where DNS comes into play.  DNS is a system which allows people to use names, while still providing for computers to use the numbers.  Of the many benefits of DNS, it allows you to move a domain to another IP address while keeping the domain name the same. 

Common Types of DNS Records

DNS records come in several types:
A record
Points to a specific IP address.  “A” stands for “Address”.

This means that appcove.com should resolve to 74.205.111.168
appcove.com.            70755   IN      A       74.205.111.168
CNAME record
Points to another record.  “CNAME” stands for “Canonical Name Record”
This means that http://www.appcove.com should resolve to appcove.com and in turn resolve to 74.205.111.168
www.appcove.com.        86400   IN      CNAME   appcove.com.
MX record
Specifies a domain which will handle incoming email for the domain.
This means that mail sent to @appcove.com will be handled by APPCOVE.COM.S9A1.PSMTP.com, and if that does not work, send it to APPCOVE.COM.S9A2.PSMTP.com and so on.  The weight indicates which server should be tried first — the lower the weight, the better.
appcove.com.            86400   IN      MX      40 APPCOVE.COM.S9B2.PSMTP.com.
appcove.com.            86400   IN      MX      10 APPCOVE.COM.S9A1.PSMTP.com.
appcove.com.            86400   IN      MX      20 APPCOVE.COM.S9A2.PSMTP.com.
appcove.com.            86400   IN      MX      30 APPCOVE.COM.S9B1.PSMTP.com.
NS record
Delegates a DNS zone to use the given authoritative name servers.  “NS” stands for “Name Server”.
This means that DNS for appcove.com is to be handled by either ns.rackspace.com or ns2.rackspace.com.
appcove.com.            57957   IN      NS      ns.rackspace.com.
appcove.com.            57957   IN      NS      ns2.rackspace.com.
TXT record
Specifies arbitrary text associated with a name.  “TXT” stands for “Text”
The provides a mechanism for the DNS system to be extended with different bits of text about a domain name.  The following TXT record stores SPF information, used to specify what servers are allowed to send mail on behalf of appcove.com.
appcove.com.            86400   IN      TXT     "v=spf1 include:fogcreek.com include:aspmx.googlemail.com ip4:207.126.144.0/20 ip4:64.18.0.0/20 ip4:74.125.148.0/22  ~all"

DNS Propagation

DNS is a distributed system.  This means that there are thousands of DNS servers scattered around the globe.  Most internet providers will have their own DNS servers.  Most hosting providers will have their own DNS servers.  Etc…
How do they all stay in sync?  They do and they don’t!
Every DNS entry has a corresponding TTL value associated with it.  TTL means “time to live”.  This value, expressed in seconds, states how long a given DNS entry is valid before it must be refreshed from the “authoritative” DNS server for the given domain.  Typically, the TTL is set to 86,400 seconds, or 1 day.
With a TTL of 1 day, any changes to authoritative DNS records may take up to a full day (or more) to propagate around the internet.  This is worth keeping in mind before you engage in any important DNS changes.
The proper way to change DNS is to first, at least 48 hours prior to the transition period, change the TTL to a very low value (like 5 minutes).  It will still take at least a day for this to fully propagate to all relevant DNS servers.   However, once they are all aware that the TTL is 5 minutes, they will frequently check your authoritative server for updates every 5 minutes or each time a new request comes in for one of your DNS records, whichever is longer.
In other words, DNS servers only look up what they are asked to look up.  Then they retain it for the TTL period, and finally discard it (only to repeat if needed).
Authoritative DNS
Every domain must be registered with a registrar.  Part of this registration information for every domain, is the DNS servers to use as “authoritative dns information” for that domain.   These NS records are transmitted to the root nameserver system. 
Every top level domain (com, net, edu, org, us, gb, br, uk, au, etc…) all have their own authoritative DNS servers.  This information is kept in the world’s root name servers, which are currently:
a.root-servers.net.     117655  IN      A       198.41.0.4
a.root-servers.net.     196594  IN      AAAA    2001:503:ba3e::2:30
b.root-servers.net.     113829  IN      A       192.228.79.201
c.root-servers.net.     120655  IN      A       192.33.4.12
d.root-servers.net.     113757  IN      A       128.8.10.90
e.root-servers.net.     115554  IN      A       192.203.230.10
f.root-servers.net.     121256  IN      A       192.5.5.241
f.root-servers.net.     280321  IN      AAAA    2001:500:2f::f
g.root-servers.net.     113755  IN      A       192.112.36.4
h.root-servers.net.     116456  IN      A       128.63.2.53
h.root-servers.net.     206320  IN      AAAA    2001:500:1::803f:235
i.root-servers.net.     115856  IN      A       192.36.148.17
i.root-servers.net.     337685  IN      AAAA    2001:7fe::53
j.root-servers.net.     119155  IN      A       192.58.128.30
If you lookup the NS record for com at one of the above root servers, you will be told this:
d.gtld-servers.net.     16131   IN      A       192.31.80.30
g.gtld-servers.net.     74653   IN      A       192.42.93.30
f.gtld-servers.net.     111162  IN      A       192.35.51.30
c.gtld-servers.net.     33590   IN      A       192.26.92.30
j.gtld-servers.net.     171076  IN      A       192.48.79.30
a.gtld-servers.net.     2665    IN      A       192.5.6.30
a.gtld-servers.net.     8352    IN      AAAA    2001:503:a83e::2:30
i.gtld-servers.net.     78083   IN      A       192.43.172.30
k.gtld-servers.net.     14957   IN      A       192.52.178.30
b.gtld-servers.net.     127812  IN      A       192.33.14.30
b.gtld-servers.net.     168301  IN      AAAA    2001:503:231d::2:30
e.gtld-servers.net.     29652   IN      A       192.12.94.30
h.gtld-servers.net.     47519   IN      A       192.54.112.30
l.gtld-servers.net.     41990   IN      A       192.41.162.30
m.gtld-servers.net.     42456   IN      A       192.55.83.30
If you lookup the NS record for appcove.com at one of the above “com” servers, you will be told this:
appcove.com.            172800  IN      NS      ns2.rackspace.com.
appcove.com.            172800  IN      NS      ns.rackspace.com.
Finally, we have the authoritative DNS servers for appcove.com.  Now, if you lookup the record for http://www.appcove.com at ns.rackspace.com, you will be told this:
www.appcove.com.        86400   IN      CNAME   appcove.com.
Finally, if you lookup appcove.com at it’s authoritative server ns.rackspace.com, you will be told this:
appcove.com.            86400   IN      A       74.205.111.168

Some thoughts on education and school

A couple of thoughts for thinking about…  Perhaps the whole premise of “school” as we know it is incorrect?

  • Learning is focused on K-12, plus an additional 4-8 years of college.  Then what?
  • The academics themselves have taken a front row seat.  At best, academics should be a tool to learn the things you need in life.
  • What is the main point of general education?  Whatever a competent adult needs to live an effective and productive life should be the main goal of non-specialized education.
  • This has little to do with many of the subjects that are so extensively taught, and much to do with subjects that are not little taught.


The saying “begin with the end in mind” needs applied. If you were to ask the typical person “why kids go to school”, you would get many varied answers.  Some legit, and some stupid, but I guess there would be little consistency between answers.

If you told the average adult that they need to spend the next 16 years of their life, 40 hours per week, doing a job that does not pay, doing things that they do not want to do, and having no physical end result… what would they say?  That is 1/5 of the average human life, and regardless of what you are doing, there had better be a really good reason for it.

Every learning activity should have a “end in mind”.  I think a lot of kids are also confused about why they are put through so many grueling tasks, when they have more interesting things to do.  Let’s break it down into basics…

  • Learn to Read -> so you can learn and understand things
  • Learn to Write -> so you can communicate with others
  • Learn Arithmetic -> so you can “figure” problems out
  • Learn History -> so you do not repeat the bad parts
  • Learn Government -> so you can be an effective part of it
  • Learn Language -> so you can communicate more widely
  • Learn Science -> so you understand life around you
  • Learn Physics -> so you can keep your car on the road
  • Learn Accounting -> so you can handle finances in all areas of life
  • Learn Management -> so you can handle the projects life gives you
  • Learn Attention to Detail -> so you do not drop the ball in life
  • Learn Health -> so you are able to maintain a healthy body

And so on…

If the learning is not producing the correct end result, then why waste huge amounts of time and money and life?


There need to be fundamental changes in the way leaning is handled.  Anyone with experience should know that experience cannot be taught, that experience is valuable, and that experience comes only with doing.

Therefore, the goal of education should be to impart experience.  In doing this, bookwork should be reduced, and practical projects should be emphasized.  The end goal being to impart enough experience in enough areas that the student can live life without making the huge blunders that so many people have made.

But once “graduated”, this process of learning should not stop.  In our culture, I am not aware of a place where diverse and experienced people gather to teach to those who wish to learn.  Such a mechanism was outlined in two excellent books (IIRC): “The Man who Counted”, and “The Richest Man in Babylon”.
Quite frankly, the distinction between “student” and “adult” is a flaw in the way our culture thinks.  Learning should never stop, neither should structured learning.

You can force a horse to water, but not make him drink.  You can force a child to school, and not make him learn.  And even if you do force him to learn, you will diminish his desire to learn.  Everyone is different, headed to a different path in life, and their education should reflect that.  But the best thing one can learn is the art of leaning itself.


In summary, I would like to see:

  1. Free learning centers where wise people gather to pass their knowledge and experience on to willing ears who hear.
  2. A culture that promotes the above, values wisdom, and makes learning a center of culture (rather than TV, for example).
  3. Parents who teach the above, teach their children, and form a belief in their children that learning is valuable and to be sought.  Instead of school M-F.
  4. Only part time teachers, teaching the things they heavily practice in real life.  Engineers teach math, writers teach writing, editors teach spelling, historians teach history, accountants teach accounting, scientists teach science, doctors teach health, etc…
  5. People are certified in their knowledge of general areas + specific areas by the successful execution of a challenge, teaching, or test that is a real life project, or if not, as close as possible.  Similar to how Doctorate programs are currently structured, but much more diverse.

Following such an excellent general education, colleges could be far more focused on specialized knowledge needed for different fields.


While much of this may be difficult to achieve in our current culture, there are aspects which I have implemented already in our school program.  My 3rd grader writes a real letter on real paper to a real person every day (bank teller, store owner, librarian, machine shop owner).  This has several side effects:

  1. it builds his reputation
  2. it teaches him to read, write, and spell in a very practical way
  3. it teaches him to communicate
  4. it blesses many people

Likewise, the students needed flashcards so they could memorize the arithmetic tables…  Rather than purchasing them, I had them create the cards themselves.  Many good effects:

  1. Very effective learning
  2. Penmanship
  3. Organization
  4. Diligence and Patience
  5. A physical “end product” of their education

I have specifically focused extensively on reading and writing under the premise that: “if they can effectively communicate, they can learn anything.”

Comments?