LTspice Lesson 2: Node Voltage and Mesh Current Analysis using LTSpice

LTspice command: .op

Node voltage and Mesh current are methods that systematically calculate voltages and currents in a circuit. Although LTspice calculate voltages and currents by using sophisticated network theory, but nonetheless, it can be useful to match the node voltages and mesh currents with hand calculation as required to do so in a first year elementary circuit courses. Mesh current and Node voltage examples here are purely for academic purpose. The goal here is to introduce .op command. It perform a dc operating point analysis and calculate all the node voltages and branch currents in a given circuit. 

Following simple circuit is used to illustrate the mesh current analysis by hand:

Screen Shot 2019-07-22 at 11.03.32 AM.png

To get mesh currents from the Ltpsice .op analysis, one has to make sure to get the branch current that is isolated and matches with its mesh current counterpart. For example, current going through 10V source is same as mesh current I1 except polarity is reversed. This is because LTspice takes the current direction into the voltage source. Here is LTspice example for the above hand analysis.

Screen Shot 2019-07-19 at 5.50.01 PM.png

Here is the simple node voltage analysis of the same circuit. Reading the node voltage in LTspice is exactly the same as node voltage calculation by hand given reference node is the same in both cases.

Screen Shot 2019-07-22 at 11.03.37 AM.png

To sum up, the point of this post was to illustrate .op spice statement and how it can calculate dc voltages and currents in a give circuit topology. As an example, Mesh current and Node voltage methods were used in a simple circuit.

If you want to discuss it further, please jump here:

https://www.eevblog.com/forum/projects/ltspice-for-ee-students/

Advertisement
Posted in LTspice for EE students | Leave a comment

Why I returned my 2019 Tesla Model X?

IMG_5933Kids and we were very excited that we bought Tesla Model X (Long range with Full Self-Driving Capability) which was delivered to our door on June 18, 2019 in our Sunnyvale, CA house. In-fact our whole extended family including our parents were excited. They have never seen a car like that with Falcon wings and self-driving capability. Following Sunday, we took the car from Sunnyvale to Sacramento to visit our parents. While driving the car, I noticed a faint high pitch sound coming from front of the car. I immediately turned to my wife sitting next seat to confirm if she can hear it as well, she nodded. We tried to ignore it first by playing some music, and it seemed to get diminished. Noise was more prominent at higher speed from 60-80 mph range, but at lower speed it was barely noticeable. On the way back from Sacramento, the constant high pitch caused me a major headache. I decided to record it using my iPhone. Later I sent the recording to our Tesla representative, Mike Dao. From the beginning Mike has been very professional, quick to response and one point contact. “That doesn’t seem normal.” he replied quickly and suggested that bring the car to have a technician look at it. 

My wife brought the car to Tesla Fremont Center; they confirmed this is normal as it is a dual motor vehicle with one motor in the front, High pitched noise is caused by the current that motor demands. 

As a working hardware engineer professional, that explanation made sense to me, but found it totally unacceptable and disturbing that high pitch sound in the cabin supposed to be “normal” and Tesla do not have any fix for it. From my working experience in audio, I knew that noise frequency seems to be in 4kHz to 5kHz range. Since I have done the recording earlier, I decided to ran some FFT (Fast Fourier Transform) to isolate the noise frequency using a software tool called Adobe Audition.  FFT clearly show approximately 4kHz spike. Even though magnitude doesn’t seem that big but it is significant enough that if you have sensitive ears and listen to it constantly you will get annoyed pretty quickly. 

Spectrum of audio recording while driving on 1-80W toward San Francisco. Speed approximately 60 mph.

Screen Shot 2019-07-04 at 5.50.01 PM

You can also listen to the actual audio I recorded in the cabin while driving:

In conclusion, we loved the car features and wished Tesla has some solution to fix this problem. Honestly, this car is a step forward in the entire car history, and we would strongly consider it again once all these annoying little issues gets ironed out.

Interesting discussion on this topic is here:

https://teslamotorsclub.com/tmc/threads/why-i-returned-my-2019-tesla-model-x.158959/

 

Posted in 5 Hi-Tech Silicon Valley Tour | 8 Comments

Unconventional guide to becoming a leader and being a leader

Kashif Javaid

I recently took Advanced Leadership class in Santa Clara University as a part of my MSEE program. Class discussion took turn from conventional view of becoming a leader to philosophical yet practical view. Becoming a leader and being a leader are two distinct traits. In this post I will share my final paper. I believe it will make you think if leaders like Ghandi, Hitler or Mandela were born leader or they actually cultivated some leadership skills or perhaps they were just there at the right time. In the end, I came up with 5 leadership strategies to become a leader in your chosen field.

Becoming a leader involves tailer to the need of followers and provide a common vision but it involves much more. In fact, whether ethical or not, leadership comes with certain leverage where if leader runs into a wall, people following him or her will do so as well. Now there is more at stake and leadership comes with certain responsibility. Before an actor act for his or her role in a movie, they have to study the character, dress, walk, and talk like a character, in short, become a character. In-fact, becoming a leader is similar to becoming an actor. 

Screen Shot 2019-03-28 at 10.00.44 AM

In essence, becoming a leader requires an ability to read perception of target followers and adapt behaviors that correspond to desired perception. History is littered with leaders where they went in great length to create a perception that followers perceived. For-example, Hatshepsut, one of ancient Egypt’s first female rulers, chose to wear false beard along with masculine attire to preserve the status quo of that time and to become leader of her people. From the history channel website, “As pharaoh, Hatshepsut undertook ambitious building projects, particularly in the area around Thebes. Her greatest achievement was the enormous memorial temple at Deir el-Bahri, considered one of the architectural wonders of ancient Egypt. Another great achievement of her reign was a trading expedition she authorized that brought back vast riches–including ivory, ebony, gold, leopard skins and incense–to Egypt from a distant land known as Punt (possibly modern-day Eritrea).” [1] I argue that she accomplished all the above great feats by catering to the need to her followers and creating perceptions that followers demanded.

Being a leader is completely different phenomena than becoming a leader. Being a leader is all about developing an ability to seeing reality as it ‘is’. This cannot be taught in few days and may take a lifetime to develop it. The main thing is to develop an awareness that ability to see things as they ‘are’ really distorted by our intellectual, emotional and biological obstacles. 

Intellectual obstacles are beautifully captured by Kahneman book: Thinking Fast and Slow. Although the book discusses many heuristics, some tries to explain why our ability to see things can be distorted. In the heuristics, confidence over doubt, Kahneman assert, “When we detect what appears to be a rule, we quickly reject the idea that the process is truly random” [2] Since our brains are wired with pattern recognition, we tend to attribute causality where none exist. Our memories are fallible, but we tend to rely on it when a critical decision needs to be made. We are more suggestible than we are actually aware of. This is really important point because this could directly distort reality. 

Emotional obstacles are captured by Steinbeck book: Log from the Sea of Cortez. In his essay, he states: 

“But the greatest fallacy in, or rather the greatest objection to teleological thinking is in connection with the emotional content the belief. People get to believing and even to professing the apparent answers thus arrived at, suffering mental constrictions by emotionally closing their minds to any of the further and possibility opposite “answers” which might otherwise be unearthed by honed effort—answers which, if faced realistically, would give rise to – struggle and to a possible rebirth which might place the whole problem in a new and more significant light.” [3]

This one paragraph allude to a mental state when conflicting with a situation we tend to believe in an apparent first answer and eliminate tension with an alternative situation that might exist in the brain. The only way to see beyond the first thought is to stick with contradictions that arrises and create a mental leap where one take oneself out of the situation and reality or situation being observed unwind itself to present its true nature. 

Biological obstacles are discussed in the paper by Churchland, Ramachandran, and Sejnowski: A Critique of Pure Vision. The main premise is that we are hardwired in our brain to detect pattern where none exists and can be easily fooled by randomness. Essay further discusses how our biology hinders our ability to see reality which beautifully concluded by the essay:

“Obviously visual system evolved not for the achievements of sophisticated visual perception as an end in itself, but because visual perception can serve motor control and motor control can serve vision to better serve motor control, and so on. What evolution “cares about” is who survives and that means, basically, who excels in the fours Fs: feeding, fleeing, fighting and reproducing” [3]

Thus, our biology really distort the reality we actually see. Since being a leader requires the ability to see things as they are, so what can we do to overcome these limitations?

The only way to really know you are developing an ability to see things as it “is” that you have sincere and authentic humility growing deep within you. This is completely opposite of arrogance which blocks one’s ability to see the things as it “is”.

The  solution is to use of Hegalian dielectric thinking combined with emotional management. The gist is that once one has abstracted an idea and after developing some humbleness and staying with the idea long enough to create a tension, one reach a Aufhebung, a german word for sublation or overcoming. In this stage one let go of his or her bias and perceive reality as “is” rather than obscured by thoughts, bias and prior history and experiences. This is a broad topic and beautifully captured by Pravin Jain article, “A framework for embodying emergence in visioning. Emergence: Complexity and Organization [5]”

In summary, below diagram illustrate that a transition from becoming a leader to being a leader is bit like growing a tree where right ingredients such as directly asking questions to potential followers, by body techniques that followers value in the leadership, creating a track record or perception of it, but most importantly by quiet observation, reading and listening accurately what followers values and judges in a leader are needed to become a leader. But being the leader and ability to perceive reality is bit like sitting on the canopy where vision is clear of any branches, leafs or any other objects in the forest.

Screen Shot 2019-03-28 at 10.03.36 AM.png

5 Leadership Strategies:

Throughout the course, I was able to glean out some strategies which I will be personally using at my work and home to become an effective leader. Here are a list organized by the most important trait to the least important trait, but are keys to be an effective leader:

  1. Acknowledge and recognize personal paradigms that limits oneself to see what things actually are.
  2. Become aware of intellectual, emotional and biological obstacles to seeing the actual reality and develop a genuine humility from what we do not know, but also what we cannot know.
  3. Being more observant, study potential followers, a bit like when actor prep for his role.
  4. Create track records, work on body language, improve speech and presentation skills.
  5. Do not hesitate to engage in a struggle and learn to bring an order in seemingly chaotic group of potential followers.

Reference:

  1. https://www.history.com/topics/ancient-history/hatshepsut
  2. D. Kahneman, (2011), Thinking, Fast and Slow. Farrar, Strauss and Giroux, New York
  3. J. Steinbeck, (1995) The Log from the Sea of Cortez. Penguin Classics
  4. P.S. Churchland, V. S. Ramachandran, and T.J. Sejnowski, (1994), A Critique of
    Pure Vision. The MIT Press Cambridge, Massachusetts London, England 
  5. Jain P. Leadership and Steinbeck’s ‘non-teleological thinking’: A framework for embodying emergence in visioning. Emergence: Complexity and Organization. 2017 Dec 31.

 

Posted in 5 Hi-Tech Silicon Valley Tour | Leave a comment

LTspice Lesson 1: Generating IV curves

Kashif Javaid

“Never perform a measurement or simulation without first anticipating the results you expect to see.” ~Eric Bogatin’s Rule # 9

Learn these spice commands: .dc .param

In these 10 lesson series, we will explore LTspice circuit simulator. Assumption is that you’re a beginner or someone who already plays around with it a bit and feel it has potential to solve circuit problems, and perhaps provide intuition and insight how electronic circuits works. Ultimately, it will help solve a real world EE problem and continue to provide a quick go to tool for a quick circuit simulation of some proof of concept.

The approach we will take is that we will never simulate a circuit unless we know what output we expect to see. This is beautifully captured by world-renowned signal integrity expert Eric Bogatin rule # 9. [1]

First of all, why start with IV curves? Voltage-Currrent (aka IV) relationship of a component can tell us a lot about behavior of that component. In a nutshell, by applying a voltage across its terminal and measuring the resulted current, one can figure out the resistance or more generally impedance of the component. Later this knowledge can lead to electrical models which can help design and predict the behavior of a circuit. This  is a good starting point as we will get to know immediately two of most important LTspice simulation commands: .dc and .param

We will look at IV curves of following components:

  1. Resistor
  2. Diode
  3. NPN and PNP BJT
  4. NMOS and PMOS MOSFET
  5. Solar cell

We will be using following 5 steps approach for each of the circuit in these tutorials:

Step 1: Draw a circuit. 

Step 2: Add proper dot simulation command.

Step 3. Predict its behavior.

Step 4: Simulate and verify behavior with your prediction.

Step 5: (Optional) Repeat step 3 if result doesn’t match prediction and extend the example for some other use case or different parameters.

RESISTOR

Let’s start things with a lonely resistor and it’s IV curve. True to rule # 9, a resistor is related with voltage and current through ohm law: V=I*R or I = V / R. This is in the form of y = m*x form where m = 1/R is the slope. So if we vary a voltage from 1V to 2V we expect to see a current proportional to 1/R. This means if resistor is huge (i.e ~MΩ range), current would be small compared to if resistor is small (i.e ten’s of ohm). Let’s see if we can verify it using LTspice.

Step 1:

I am not going to layout exact steps for how to find these components. Just mess around and find them yourself and wire it up like this. Tip, you can find most of generic component in this toolbar link:

Screen Shot 2019-02-03 at 10.58.28 AM

*If you want to take a short cut, you will find all the .asc files at the end.

Here is a simple schematic where resistor and voltage source are wired as below. Note the variable X in curly bracket. We will use it to vary the value of R1.

Screen Shot 2019-02-03 at 1.25.21 PM

Step 2:

We will start with following two simulation commands: .dc and.param

.dc V1 Lin -10 10 .1

The syntax is almost readable and follow the format of .dc <Voltage or Current source> <Start value> <Stop Value>  <increment>. In this case we want to sweep voltage source V2 linearly from -10V to +10V with increment of 100mV. Ltspice provide a useful dialog box which can also be used enter these values:

Screen Shot 2019-02-03 at 1.29.29 PM.png

Now let’s a take a look at this command

.step param X list 100 1k

Again the syntax is readable and allow a source or parameter to vary by a list of values or some increment. In this case, we want to step our X variable which correspond to R1 value in the schematic for two values 100Ω and 1kΩ.

Step 3: 

As mentioned earlier, low value resistor will be able to pass lot more current and curve will be close to current axis in accord with the ohm law. A high value resistor will pass low current thus its curve should be close to voltage axis.

Step 4:

Run the simulation with clicking on the running man in the tool bar: Screen Shot 2019-02-03 at 1.37.17 PM.png. After simulation run without an error, point the cursor on the resistor until a current probe appears and click it. This will plot voltage vs current plots on the plot window with two defined resistor values:

Screen Shot 2019-02-03 at 1.40.54 PM.png

Notice as expected R1=10Ω is close to current axis when compared with R1=100Ω as we have predicted from the ohm law. Granted this is a extremely simple example, but it will help with more complicated circuit in which reasoning remain the same but formula gets more complex.

Step 5:

Let’s go one step further and create IV curves by varying R1 from 1Ω to 100Ω with increment of 1Ω. How does the .param command will change? How long it takes for simulation to plots these curves? I will leave this as an exercise, but prediction remain the same and curves are shown below: Actual simulation file .asc attached if you want to play along. R_IV_2.asc

Screen Shot 2019-02-03 at 1.55.52 PM.png

DIODE

Step 1 and 2:

Screen Shot 2019-02-03 at 7.48.09 PM.png

Step 3:

Lets add a .dc command to simulate diode IV. Notice, 1N4148 is real diode, but it should follow diode equation:

Screen Shot 2019-02-18 at 3.48.09 PM.png

We expect to see an exponential curve as we vary VD. Click on the diode when cursor become a current probe to following plot:

Step 4:

Screen Shot 2019-02-18 at 3.51.42 PM.png

Notice, VD can be varied at any arbitrary voltage, but since this is a real diode it adheres to absolute maximum rating as per its datasheet:

Screen Shot 2019-02-18 at 4.02.09 PM.png

Simulation gives a false sense of putting any voltage across diode, but in-fact if power dissipation gets exceeded, expect to see smoke in a real circuit build. LTspice won’t gives any warning. It is your job as a circuit designer to adhere to any datahseet limits.

Step 5:

Let’s extend the above example to simulate the effect of temperature. As diode equation predict and both VT and Is are function of temperature, we expect to see at higher temperature current rise earlier than room temperature. In order word diode will switch faster. As an example add following command to effect of temperature on this real world diode.

.step temp list -40 25 85

Screen Shot 2019-02-18 at 4.15.02 PM.png

BIPOLAR JUNCTION TRANSISTOR (BJT)

From this point on, I will combine all the steps here. Since a transistor is 3-terminal device, you have to make the one terminal constant current or voltage value while varying the other one. For typical IV curves, we make the base current constant while varying the VCE of the transistor. Then we can do it for multiple value of base current. The .dc command shown below the circuit. We expect to see a triode region and saturation region.

NPN

Screen Shot 2019-02-25 at 9.18.10 AM.png

PNP

Screen Shot 2019-02-25 at 9.18.58 AM

Screen Shot 2019-02-25 at 9.21.56 AM.png

bipolar.asc

Metal Oxide Semiconductor Field Effect Transistor (MOSFET)

Screen Shot 2019-02-25 at 9.46.19 AM.png

Note the convention used above where PMOS is source is tied to highest positive rail.

Screen Shot 2019-02-25 at 9.45.46 AM.png

Screen Shot 2019-02-25 at 9.47.58 AM.png

mosfet.asc

ami_c5n_corner_bsim3.txt

SOLAR CELL

An excellent paper that discusses the solar cell simulation using datasheet parameters is given below.

Simulation of Single-Diode

A simplified Rseries and Rshunt model of solar cell is given below. Just click on the V1 while cursor in current probe mode to run the simulation.

Screen Shot 2019-02-25 at 10.48.17 AM.png

Screen Shot 2019-02-25 at 10.48.27 AM.png

solar_iv.asc

Conclusion.

This just scratches the surface of LTspice capability and a good starting point to get familiarize with some basic commands. Next tutorial will focus on DC circuit analysis.

If you want to discuss it further, please jump here:

https://www.eevblog.com/forum/projects/ltspice-for-ee-students/

 

 

 

 

Posted in LTspice for EE students | Leave a comment

Tales of a system design that worked

Screen Shot 2018-01-29 at 10.58.33 PM.png

Early in my career at National Semiconductor (now merged with Texas Instrument), we were spitting out 7+ different audio chips each quarter in a fiscal year. Some of them were brand new design or some were just a little tweak such as addition of a small feature i.e low power or shutdown mode. Typically, these chips came in with different packages from microSMD to DIP. With handful of application engineers and test engineers always needed more time, the challenge was how to characterize these chips on time with better efficiency. My application manager at that time, Jeff Bridges, came up with a solution: simply to build automation test system using Audio Precision as the brain of the system (now a standard tool to test audio performances of almost any audio system and chips) with GPIB (General Purpose Interface Bus) equipped power supplies, data acquisition units, function generators, and a digital oscilloscope. (simple block diagram block shown below). Not just build one, but build 10 of these systems to support different regions in the world that are doing manual audio testing for our products. Screen Shot 2018-01-29 at 10.43.54 PM

I was chosen as the lead hardware and software engineer. As a newly graduated EE, I was eager to take in the big responsibility, but this turned out to be no joke at all. As most people in the group weren’t software engineer, I was left alone to figure out how the whole system supposed to interface with hardware and software. With time clock started ticking, myself and my technician at the time, started the daunting job. Luckily, technician, Orville has tons of experience building cabling and test racks, while he started on purchasing equipments and cabling, I went to white board and started brainstorming, how the boards and daughter card should looks like? Schematics were drawn in Protel (now Altium). I started working on the layout of the motherboard and daughter cards. The idea was that we will have one giant (12”x8”) motherboard with relays to route different audio test paths with interface pins which connect to test rack. After that I focused on the software aspect, the audio precision used at that time supported built in visual basic programming; this became the logical choice to automate other instruments as well. It turned out that VB is a great scripting language to control GPIB capable instruments. The only thing was that libraries have to be written from scratch for each instrument. For example, in order to set voltage and current for a power supply or capture a scope shot with a required relays configuration, raw SCPI commands from these instruments has to be properly captured and then wrap around on user friendly functions. The whole project needed several files linked together in the main program. The good portion of the year went by and finally we were able to characterize numerous products including LM4930.

The LM4930 is an integrated audio subsystem that supports voice and digital audio functions. The LM4930 includes a high quality 16 bits I2S input stereo DAC, a voice band codec, a stereo headphone amplifier and a high-power mono speaker amplifier. I believe it is still in production as of today by Ti despite the fact, they have closed the audio group.

As a first big project, I really enjoyed the whole system experience from idea to actually building the test system (a picture of this test system shown above). Another happy side effect came out when datasheet electrical table entirely can be produced with one command. Various performance curves now be generated much faster than on the bench. Soon it became part of a regular project development cycle where product and other application engineers used this test system on a regular basis.

One of the main lesson that I learned was that during development of layout and design, it is best to engage relevant people early on where they can chime in their expertise before you send the board to fab. For example, I did the routing of some of amplifier control lines without 50 ohm impedance matching. Even though, SPI interface can be run at lower frequency, but at 24MHz, it needs proper termination and controlled trace impedances. This ended up being requiring spin out of a new version of the daughter board.

 

Posted in Automation | Leave a comment

A Concise Guide To Patagonia Torres del Paine W-Trek


Life is all about pushing yourself to the limit and knowing little details that makes the life so worth living in which appreciation manifest. 

Kashif Javaid


Wow, what an adventure and thrill we just experienced in one of world true last wilderness! A little over a month ago we were hiking among the great wilderness, the biggest glaciers, breathtaking mountain ranges and never-ending waterfalls. In this concise post, I would include all essential details that one needs to successfully complete W trek without any issue. We actually did track total miles, altitude gain and other statistic using a smart Garmin (model Fenix 5x) watch for the whole trek.  We wished we had this info beforehand. Article also includes a pdf checklist at the end which you can download. This will definitely help you to prepare in advance for a successful adventure. We did W trek in 5 days including Gray glacier trekking, but no matter you choose either 4 days or 6 days, you can use the attached map to get estimated time and miles for each trek.

How To Get There?

Puerto Natales, Chile is the gateway and entrance to Torres del Paine park. Typical route is from Buenos Aires, Argentina or Santiago, Chile to Punta Arenas, Chile. Finally take bus ride to Puerto Natales. People in our group utilized both routes to get to Punta Arena.

Where To Stay Inside The Park? 

In the park, Lodging or camping can only be in designated area or Refugio camps. Refugio and camps are strategically placed inside the park  and highly recommended for whole W trek. We used ChileTour, Patagonia to reserve our lodging in camps and Refugios.

What Fitness Level and Training is needed?

If you already have experience in backpacking and hiking, no special training is needed. Here is my suggestion, and I wished I have followed it completely as toward the end I started getting some leg muscle cramps.

At-least two months before the trip, do a weekly hike preferably 3000 ft elevation change or equivalent stair master if hike is not possible. Also this is a good time to buy new shoes and start breaking them in.

One month before, continue weekly hike or equivalently stair master with bag pack of about 20 LBS or whatever your estimated weight you plan to carry. For overall fitness and health, I would recommend some running during the week and any other fitness program such as weight training in the mix. Use this time to get in the best shape than ever before, you will have the best experience ahead.

What Things To Take?

  1. Good water proof hiking shoes with toe protection. Shoes are very important part of this trip, so take them seriously and break them in during one to two months before you embark on the journey.
  2. Hiking backpack with rain cover. 40L size is a good compromise if staying in refugios. Rain cover is very important, so be sure to pack it.
  3. Rain and wind protection jacket as top layer. This is absolute essential as weather is unpredictable and almost guaranteed to have a high wind and rain. (see movie at the end). From more info check out REI website: How to Choose Rainwear?
  4. Down jacket as mid layer. Make sure it is light weight and you can even use it as pillow. From REI:Layering Basics
  5. Merino wool layer as a first layer for both upper and lower body. Synthetic probably will work too, but I like the feeling of Merino wool.
  6. Gloves. Make sure they are water proof and can keep you warm.
  7. Hiking Socks. A good pair of hiking socks can save you from blisters as well as keep you warm.
  8. Sun glasses. Beside protecting from sun, these are especially useful during high winds and glacier trekking if you plan to do it.
  9. Hat and sunblock. Even with clouds you can get sun burn if you stay outdoors all day. UV rays are always there.
  10. Beanie. This will keep your head warm; it does gets cold in Patagonia even during summer months.
  11. Water Pouch or Bottle. Patagonia is one of the place where we can fill the water from streams and it is highly recommended to do so.
  12. Camera and solar/battery charger. We used iPhone X to take pics, but definitely take a lots of photos with whatever camera you prefer.
  13. First Aid kit and Medicine. 
  14. Hiking Poles. We had people who used hiking poles or others who did not. These are high recommended if you have any past knee issues. These can also be rented.
  15. For my complete list, download list in pdf or iPhone/Mac notes checkable list. Feel free to add or delete an item to suit your need.

What Are Distances, Elevation Gains For All Trails In W-Trek?

Below map show all the stats. A high resolution pdf can be downloaded along with actual data (courtesy of Umer Khan) from Garmin Fenix watch.

Screen Shot 2018-01-15 at 8.29.32 PM

What Are Park Etiquettes & Regulation?

  • Fires are STRICTLY prohibited.
  • Camping is only allowed in designated areas.
  • Cooking (with non-plant based fuel) is only allowed in the camping areas.
  • Do NOT disturb wildlife.
  • Pack out all trash you bring in.
  • Use of drone is prohibited.
  • Swimming is prohibited in all bodies of water within the park.
  • Take nothing but pictures and, leave nothing but footprints.
  • Follow the principal of Leave No Trace (LNT).

Enjoy

Most importantly, in the midst of battling through trails, make sure to enjoy all the breathtaking scenery around you. Following is a video and a picture tour of this beautiful place.

Download Compete Patagonia CheckList (pdf)

 

Posted in Hikes Around the world | Leave a comment

Excel VBA automation with multiple files

Kashif Javaid

In the course of one career, there may be more than one occasion where one need to pull some data from one or multiple excel spreadsheets into another main spreadsheet for summary or management update. This can typically be done by opening one file at a time and copying required information and pasting into the summary spreadsheet. Now this may be cool for one or few times, but if this task is required on daily basis, this could quickly become mind-numbing and outright boring. Luckily, excel has built in mechanism to automate these tasks: VBA.

Screen Shot 2014-12-15 at 9.56.52 AM

In this application note, I will show you, this kind of task can be easily automated using excel visual basic using an example.

Lets assume you have a big excel file that comes from a vendor or some other group in your company (a sample data file link is given at the end). This excel file gets updated daily and send out to you. Your task is to extract some particular regional data only and need to send it upper management periodically.

Here are the steps:

1) First load the visual basic editor as shown below:

LoadingVisualBasic2) Assume, there is a sale file where sale information is updated regularly for different Regions (see snapshot below). The problem is that it is not organized, and your task is to extract information for your region. Lets say it’s “West” and you need to send it to management daily. You could do it manually possibly filtering rows but task is boring and takes extra steps.

3) Insert a button into the active sheet with J1 cell as Region input we want. Shown below is what happened after user clicked on the Get Data button. Note that you need to have developer tab enabled to see the button and other GUI controls. Refer to Excel help to see how to enable it if its not already there.Screen Shot 2014-12-09 at 9.04.25 PM4) The main program is extremely simple and consist of four subroutines:Initialize, OpenFile, GetData and CloseFile. There are two variables, app and CustFile. Basically program create a new excel workbook customer file with the same data, but it does not change the source fileScreen Shot 2014-12-09 at 9.09.18 PM5) OpenFile and CloseFile, basically consist of code that open the file and create a new workbook. The beauty is that it does that automatically and do not care about the source file name. The only requirement is that data file need to be in the same folder.

6) GetData is where actual data is imported into summary workbook. This sub basically go over all the occupied rows and copy the data for each Region and OrderDate, TotalCost for each row into variables Region, OrderDate and TotalCost. RegionNeeded is used to store button input from cell J1. As you can see, this can become very powerful if you need to customize or have some special requirementsScreen Shot 2014-12-09 at 9.24.53 PM7) Moreover, I need to mentioned a helper function called fcol. Basically fcol function scan the first three row and up to thirty columns to get the column number based on the column header as specified by input argument of this functionScreen Shot 2014-12-09 at 9.34.50 PM8) Now there you have it, it’s a very simple program but could prove powerful and real time saver and can be adaptable to your particular requirements. I have attached both files if you would like to play with them. Modify it to make it work with other columns. Here are the downloads links: summary and SampleData.

9) Create a new folder, save both file there, open summary workbook and hit command button. Type different region such as ‘Central’ or ‘East’ and watch how the rows updated.

screen-shot-2017-02-20-at-9-37-53-pm

10) In conclusion, with some basic programming constructs such as for loop, and some if and else statements, a very powerful and useful excel automation can be created.

Posted in Automation | Leave a comment

10 everyday items replaced by iPhone or other digital devices

by Kashif Javaid

Yes, iPhone is the first smart phone where it made the leap to touch screen interface and started apps revolution.

Here is my list. Please add your items to comments section below:

1) Digital Alarm clock- who uses these anymore? please raise your hand.

71mGkKsP1wS._SL1500_.jpg

2) Books, Magazines and dictionaries

3) GPS

Screen Shot 2019-02-03 at 8.38.55 PM.png

4) Game boys and other portable console

5) Digital Camera

6) iPod and other music players

ipod_hero.jpg

7) Voice Recorders

8) Scanners

 

scanner.jpg

9) Photo Albums

 

10) Credits card via Apple pay

This is it. As we continue to move forward, we will see that one device can do much more eventually replacing other primary  computers and tablets. If there is anything more that is replace by smart phones, add into comments section below:

Posted in 5 Hi-Tech Silicon Valley Tour | Leave a comment

Multilayer Ceramics Capacitor (MLCC)

 By Kashif Javaid

4872694Now a days any modern portable electronic device has almost exclusively multilayer ceramics capacitors in it. In a typical cellphone, hundreds of these little critters as small as 0.3mm width to 0.6mm length are all over the main PCB (Printed Circuit Board) . So it seem like they have no drawback and easy to drop into where there is a capacitor needed. I made following graphic to remind myself that may not be the case. Note following diagrams only apply to class 2 type which are most commonly found.

Why MLCC’s are useful?

MLCC_advantages

When does a MLCC become problematic?

MLCC_disadvantages

 

The above are little handy charts which could be used on a engineering virtual wall.

Posted in Electronics Components | Tagged , , , | Leave a comment

Stanford University – Silicon valley pump house – 2nd Tour

This is one of my favorite tour. I just can’t believe a walk in a university could be that rewarding, but this is no ordinary school; it has pumped out constant stream of engineers and entrepreneurs for generations. Check out the pictures below and map to follow as I suggested.

  1. Cactus Garden/Stanford Mausoleum/Angel of grief
  2. Cantor Art Museum and Rodin Sculpture Garden
  3. Engineering Quad/Main Campus tour
  4. Hoover Tower
  5. Discovery Walk
  6. Red Barn
  7. Head for dish for the hike or go shopping in Stanford Mall
Posted in 5 Hi-Tech Silicon Valley Tour | Leave a comment