Mike Soltys, Ph.D. http://www.mikesoltys.com Engineer, Educator, Data-Scientist. Tue, 12 Sep 2017 03:29:11 +0000 en-US hourly 1 https://wordpress.org/?v=4.8.2 60567780 Does rotational weight matter on a bike http://www.mikesoltys.com/2017/09/12/does-rotational-weight-matter-on-a-bike/ http://www.mikesoltys.com/2017/09/12/does-rotational-weight-matter-on-a-bike/#respond Tue, 12 Sep 2017 02:42:20 +0000 http://www.mikesoltys.com/?p=1819 My last post sparked some interesting discussion among some of my cycling friends: Not all weight is equal. The consensus was that weight on the wheels was more important (2x-7x more important) than weight of the frame.  I'm having a hard time buying this... but wanted to clearly write out the arguments here.

### Acceleration and Rotational Inertia

Work is the change in kinetic energy ($W=\Delta K$). For a mass on your frame or wheels, there is work done when you accelerate from rest to your riding velocity (we'll say here 15 mph). We'll stick with the 10 grams from the previous post, and assume our riding velocity is around 15 mph.  That means for both wheels and frame, the work done to accelerate 10 grams to 15 mph is given by:

$W=\frac{1}{2}mv^2$

This ends up being around $5.4\times 10^{-5}$ Calories. The wheels have an additional component of work being done... they also have rotational energy:

$k_{rot}=\frac{1}{2}I*\omega^2$.

here, we'll take the radius of the wheel to be 350 mm*. This gives us a rotational velocity $\omega=\frac{v}{2\pi r}\approx 3 \frac{rev}{sec}$.  The rotational inertia is given by $I=mr^2$.  If we plug in both $I$ and $\omega$, the radius ends up canceling out and we're left with:

$k_{rot}=\frac{1}{2}m*(\frac{v}{2\pi})^2$.

so the work done to bring that 10 gram wheel spinning up to 15 mph is an additional $1.4\times 10^{-6}$ Calories! This means it takes about 2.5% more energy to accelerate a mass on your wheel to 15 mph than it does on your frame.

1. Wheel Radius doesn't matter. 29ers get a bad wrap for being slow accelerators. It's clear from a physics argument this acceleration penalty isn't due to the larger diameter of the wheels.  While the 29" wheels do have higher rotational inertia, they also spin slower and the effect cancels out. (I'd buy an argument that maybe 29" wheels are less stiff than 26" wheels; or, by default, 29" wheels are heavier than 26" wheels...)
2. How often do you accelerate? While acceleration might be important if you're racing matched doubles on a track, trying to break away from a peloton, or win a sprint finish... it really doesn't seem that important for the casual rider. This is especially true on a road bike ride, where you're riding a long distance at a relatively constant velocity...

### Turning and Stability

The other time I can see wheel mass to matter more than frame mass is in cornering. Bicycle dynamics and stability are a pretty complicated matter, but we can think about a few things:

1. Conservation of Angular Momentum When cornering, you want to lean your bike into the turn. You do this for two reasons. First, if you lean a spinning wheel over, it will cause rotation to conserve angular momentum. Second, turning the
2. Work done by steering the work done when turning a wheel is given by
$W=\tau \Delta \theta$

where turning our wheel is given by the change in angular momentum (L):

$\tau=\frac{dL}{dt}$

and $L=Iw$

*700c rims are normally 622mm in diameter. the actual diameter of the wheel depends on the tire size. 350 mm seems like a good round guess.

]]>
http://www.mikesoltys.com/2017/09/12/does-rotational-weight-matter-on-a-bike/feed/ 0 1819
How much does a gram matter? http://www.mikesoltys.com/2017/09/03/how-much-does-a-gram-matter/ http://www.mikesoltys.com/2017/09/03/how-much-does-a-gram-matter/#respond Sun, 03 Sep 2017 20:28:28 +0000 http://www.mikesoltys.com/?p=1800 disclaimer: I am going to use mixed units throughout this blog post. Get over it. I'll also be rounding a lot to the nearest order of magnitude.

I recently peeled all of the stickers off my mountain bike. They weighed in at 10 grams. My question is: how much does 10 grams matter on a bike? I realize the answer is going to be "not much," but it's fun for me to quantify these things.

We can start with a quick back of the envelope estimate assuming that my performance is directly proportional to my total weight: 10 grams is about 0.015% of my weight plus my bike weight:

$\frac{10 grams}{60 kg+10 kg}\approx 0.015\%$

We can go a little more in depth if we assume that the weight savings affects two main components of my ride: The weight I have to carry on climbs, and the reduced rolling resistance over my entire ride. I'll use a typical morning MTB ride as a case study. We'll say this is a 15 km ride with an elevation gain of 500 meters. My average power output is 100 Watts, for about an hour, resulting in a total effort of 100 Calories (kilocalories).

### Climbing weight:

Work equals Force times Distance ($W=Fd$) where the force in this case is $F=mg$. We can thus quantify the work I have to do to lift the extra 10 grams:

$W=(10[g])(9.81[m/s^2])(500[m]) = 0.012[Calories]$

### Rolling Resistance:

Again, the work done by rolling resistance is going to be the increase in Frictional force over the total distance of my ride. This website gives rolling resistance for many different tires; however, the values are given in watts and so we'll need to back-calculate the rolling resistance coefficient, $c_{rr}$, for our example.

A tire close to what I use has a rolling resistance listed as 30 watts. We can back-calculate the rolling resistance coefficient as:

$c_{rr}=Power[watts]*\frac{1}{speed [mph]}*\frac{1}{Weight [N]}$

Plugging in the test parameters:

$c_{rr}=30 [watts]*\frac{1}{18 [mph]}*\frac{1}{42.5[kg] 9.81[m/s^2]}\approx 0.01$

Now we can figure out how much this works against us:

$W=c_{rr} m g d$

$W=(0.01)(10[grams])(9.81[m/s^2])(15[km])\approx 0.003[Calories]$.

### Total

Either way we calculate it, it seems my 10 grams improves my performance by about 0.015% (about 0.015 Calories saved). Nothing to write home about, but it's a free gain and I think it makes the bike look better, so why not?

### Some discussion

Some "weight weenies" go to extreme lengths to save every gram on their bike weight. If you fit into that category of cyclist, and that enhances your enjoyment of riding, then who am I to judge? It's worth noting that many bike races are won by a fraction of a percent (In the 1964 Olympic cycling road race, the time difference between 1st place and 100th place was $\approx 0.001%$*), so if you're competitive you might as well take every boost you can get. Lets face it... I'm not even close to 100th place on any strava leaderboards.

If you're looking to save weight, this article has some nice suggestions to save 1 kg on a road bike for less than $700$. What's interesting is they break all decisions down to g/$, with the most cost-effective improvement being switching to ultralight tubes. At $\infty$ g/$, this is the easiest and best savings available.

It's also worth noting that weight isn't everything. Many changes you make to your bike will affect the feel of the ride, and the most important thing is to have fun! So just go out and ride!

*a time trial would be a more accurate way to measure individual performance boost, but the 1964 olympics illustrates one of the closests races in history. I realize that a 10 gram weight savings wouldn't have boosted the 100th place finisher to the podium.

]]>
http://www.mikesoltys.com/2017/09/03/how-much-does-a-gram-matter/feed/ 0 1800
Teaching http://www.mikesoltys.com/2017/08/02/teaching/ Wed, 02 Aug 2017 22:51:02 +0000 http://www.mikesoltys.com/?p=1738 I'm passionate about engineering education. Read my teaching philosophy.

]]>
1738
Project Portfolio http://www.mikesoltys.com/2017/08/02/test-slider/ Wed, 02 Aug 2017 22:46:24 +0000 http://www.mikesoltys.com/?p=1736 From Javascript to PCBs, see some of the things I have built in my free time.

]]>
1736
Blog http://www.mikesoltys.com/2017/08/02/blog/ Wed, 02 Aug 2017 22:21:50 +0000 http://www.mikesoltys.com/?p=1750 Trip reports, thoughts, tips, and tools.

]]>
1750
Some Productivity Tips http://www.mikesoltys.com/2017/05/04/some-productivity-tips/ Thu, 04 May 2017 14:32:47 +0000 http://www.mikesoltys.com/?p=1697 I get things done.

And as a boss, if there's one thing that I look for in employees, it's not intelligence or ability, but their ability to get stuff done.

So here are some basic rules I have that help me be more productive day in and day out.

More and more the research shows we (humans) cannot multitask. Males and Females. We have finite neural resources and switching tasks is hard for our brain. So any time you get a notification on your phone or computer: Instagram, Facebook, Twitter, Email, Texts, Hangouts, Strava, etc. Your brain is using valuable neural resources. Is it worth it? Not to me. I try to minimize the notifications on my phone by adjusting app preferences.  Do I still check Facebook, yes... but it's not a beacon of distraction calling to me anytime someone likes a post of mine.

## 2) Touch it Once

This follows on the heals of (1). If you are going to use neural resources to switch tasks and read an email... then go ahead and finish up with the task. Don't just read an email and think "I'll respond to that later," because you'll inevitably end up seeing and thinking about that email many times before you finally take action on it. If you're going to read an email, take action and move on. If you don't have time to read and action an email, then don't check your email at that moment.

Very few newsletters, marketing campaigns, and notification emails add value to my life. If they're not useful, unsubscribe or use filters to sort these out.

]]>
1697
A Letter To My Brother about Finances http://www.mikesoltys.com/2017/04/01/a-letter-to-my-brother-about-finances/ Sat, 01 Apr 2017 03:40:50 +0000 http://www.mikesoltys.com/?p=1691 My brother is about to finish school and start his first job. I'm writing this post to him, based on lessons and things I've learned along the way, but hopefully it's helpful to everyone! My financial goal here is to live comfortably (not excessively) and be able to retire someday!

1. If your employer has retirement matching, max it out! This is free money, and will really add up in 30-40 years. It means you'll have less immediately available spending cash... but it will make it easier to meet your long term financial goals.
2. Pay off high interest debt as fast as you canDebt with interest rates over about 4-5% will bleed you dry. Always pay the minimum monthly payment, but whenever possible, any money you can put towards this debt will likely save you more money than you can make through investing. Plus, lowering your debt will improve your credit, which could save you thousands of dollars when making big purchases like a car, or a house.
3. Debt is not a bad thingOur parents raised us to be debt averse, and I'm mostly thankful for this... but interest rates presently are much lower than they ever were when our parents were our age. If you have the opportunity to buy something with cash, or take a loan at a rate less than 4%, you might come out ahead if you take the loan and invest the cash! *This assumes you don't get a floating interest rate that could skyrocket, and that the stock market doesn't crash...
1. Credit Cards aren't bad either! Some money gurus will tell you to cut up your credit cards. If you can't use a credit card responsibly, I'd agree with this advice, but with willpower, credit cards can be a very powerful tool giving you cash back bonuses or points towards vacations. Just make sure to always pay off the full balance every month, and your credit card will pay you to use it. *There's a lot of subtle arguments against this, which I'll link to, but not dive in here...
4. Plan for Goals. Whether it's a downpayment on a house or car, a new mountain bike in a few years, or a remodel, think about purchases you'll make 5-15 years down the road. I use an investment tool with low fees called Betterment which automatically helps me estimate how much I should put aside each month and invests the money in stocks and bonds.
1. Home Ownership is NOT always a smart move. The 2008 housing crisis challenged the notion that buying a home is a no-brainer investment, and that renting is "throwing your money away." In reality, the choice between renting and buying is very muddy.  The NY Times has a really nice calculator to help break down the cost/benefits of renting and buying. What can be real deal-breakers in the Rent vs Buy decision are things included in rent (Free Internet, Trash, Water), and things like HOA fees in a neighborhood you might buy in.If you live in a market, like Denver CO,  where home prices are growing at a rate of 10%, (and rents are growing at a similar rate) than buying a home can be a very sound investment... but if you live in an area where rent and real-estate are relatively flat (like Springfield, IL) renting can be a sound choice. This is especially true if you do not enjoy home maintenance/improvement projects and shopping for and maintaining appliances.
5. Be careful about subscription services. These can really sneak up on you, and eat away at your money. When you start paying monthly fees for cable, internet, smartphone data, streaming entertainment (Hulu, Netflix, Spotify, Pandora), cloud storage (Dropbox, Google Drive, iCloud, Box, etc.), online shopping (amazon prime, etc.), a big chunk of your income can start to disappear. Figure out what has value to you, and try to limit the rest. Even saving $10 a month on subscription services can turn into$15,000 by the time you retire.
6. Budget the Rest. After setting aside money for your big goals, little goals, and necessary bills, find a system that works for you to budget your money. I use mint, although there are a lot of great tools out there.  For me, the key is to be aware of my spending so I can make data-driven decisions on my actions.
1. Sometimes being cheap can cost you money. A stupid example is pants. I wear pants to work every day, and I was buying cheap $40 pants, and blowing through the crotch or knees of my pants every 6 months or so... I then bought a pair of higher quality$70 jeans that have lasted years.

What other advice did I miss?

]]>
1691
Weather Forecasting Smart Lamp http://www.mikesoltys.com/2016/05/10/weather-forecasting-smart-lamp/ Tue, 10 May 2016 02:48:46 +0000 http://www.mikesoltys.com/?p=1671 I have this bedside lamp I got at a consignment store, and I've always thought that a lamp should be able to do more than just light up the room.  There's something beautiful to me of everyday objects becoming a little smarter, and displaying information without us having to look at our screens.

So I decided I wanted the lamp to tell me the current and forecast temperature. A pretty useful bit of info when you're going to bed at night or waking up in the morning. So I gutted the existing 40w incandescent fixture inside the lamp, threw a Particle Photon in the base, and wired up two-12 LED neopixel rings from adafruit!

Check out the full build and code on Hackster:

]]>
1671
Getting started with the Particle Photon http://www.mikesoltys.com/2015/11/10/getting-started-with-the-particle-photon/ Tue, 10 Nov 2015 05:03:18 +0000 http://www.mikesoltys.com/?p=1663 I love using all flavors of Arduino in the engineering classes I teach. They're great tools, and students do some truly awesome stuff with them. More and more, students want to build connected devices.  This used to require an expensive WiFi shield or Ethernet shield, or require the students to switch to developing on a Raspberry Pi.

Enter the particle Photon: a promising tiny Arduino-based micro-controller with WiFi for only \$20.  This opens up a huge world of possibilities for Arduino-based projects... once you get it working

## The web-based IDE

At its core, the photon was designed to be programmed via their app and their web-based IDE.  While in principle, this sounds great, I found the two hard to use and lacking functionality.  The first hiccup is the Photon couldn't get past the authentication page for my university's WiFi. Resolving this took a lot of patience working with our school's IT department, and while this isn't exactly Particles fault, it was still annoying.  Once running, it was easy enough to blink an LED and view sensor data from the cloud (very cool).

However; when I took my photon home, it took a lot of work to connect to my very old router. Here's the post that saved the day on that front.  After that I had problems with my photon loosing connection to said router every 5-15 minutes, and then locking up until i manually reset it.

Maybe I'm old school, but I  just want to write some code... and then flash flash it to my device over the USB cable, not the web. And I want my LEDs to blink, buttons to press, and servos to spin even when I don't have an internet connection....

# CLI: the back door

The good news is all this is possible with the particle photon.  The bad news is at that next level that takes quite a bit of extra effort. The Command-Line Interface (CLI) lets you compile code and flash it using your own text editor and terminal prompt. Instructions to install the CLI are available for Windows and Mac, but on my windows computer I found it to be impossible to get working. (I think installing python 2.7 and visual studio are the two steps missing from the windows instructions... but the Microsoft visual studio installer kept crashing on my Microsoft Surface running Microsoft windows 10!)

Once you do get everything set-up, compiling and flashing your code is a breeze.

1. Write some code in your favorite text editor. Mine is sublime text 2.
2. Compile it from the command prompt. This is well documented on Particle's website. An example compile might look like:
particle compile photon GitHub/smartLamp --saveTo firmware.bin

3. Put your photon in DFU mode. Hold both buttons, then release the RST button. Wait for the light to flash yellow, and then release the other button.  This tells the photon there is some incoming code
4. Flash your code. This is also well documented.
particle flash --usb firmware.bin
5. Enjoy! (Note: If you want to debug your photon, using the CLI or the web-IDE, you might

## Some extra tips

I love me a good API, and the particle has a lot of really cool baked-in functionality that is well-documented. My favorites include:

Note: Many of these projects, and ones i've tackeled, have required you to start your code with

SYSTEM_MODE(MANUAL);

This maneuver seems to open a lot of functionality and control, but you also loose the ability to run the web IDE at this point.

I've got a couple projects i'll post shortly. In the meantime... happy hacking!

]]>
1663
Wireless Google Calendar Display using Raspberry Pi and Arduino http://www.mikesoltys.com/2015/08/10/1648/ Mon, 10 Aug 2015 03:57:49 +0000 http://www.mikesoltys.com/?p=1648 When I'm not in my office, I like for people to know where to find me. Am I teaching a class? Working from home? In the manufacturing area?

So I thought it'd be cool to build a little device that I could put in my office window that shows where I'm at and when I'll be back...

## On the window side:

On the window side, the parts were pretty easy. I'm using:

The Arduino waits for a radio message, separated by null characters (\0) to differentiate between the Descriptive text, Location, and End time. It's pretty straightforward.  One of the trickiest things is assigning the radio "pipes" and setting the payload size (Note: The max payload is 32 bytes!!). Playing with the OLED was also a bit challenging, although I got it to display how I wanted.

## The Brainy Side

The real crux maneuver is getting a device that can talk to the internet and pull google calendar information. I looked into doing this with an Arduino, but in the end decided a Raspberry Pi would be better. I'm using a B+, although I think any revision should work just fine. You'll notice I'm also using an Arduino Nano between the raspberry pi and the the radio. In theory, the Raspberry Pi should be able to talk to the RF24 Radio, although after sinking a couple of late nights into it to no avail, I decided to use the Arduino Nano as a bandaid and take serial input from the Pi and send it out over the Radio.

Here's the Python code on the Raspberry Pi. It asks your calendar for a current event, and then parses out the summary text, location info, and end time. It then sends the text via a 2-wire serial connection to the Arduino to be relayed over to the radio. You'll have to sign up for your own account under the Google Developers API, and enter your credentials into the google_calendar.py bit of code.