Cool Cap Engineer

Engineering by an anime nerd


Leave a comment

Rants: Second Room, New Lab

20140623_164300[1]

Back in March, I moved from Kingston NY to Lawrence/Andover MA to work as a design engineer for a power electronics company. Due to the fact I needed to find an apartment within a 3 week time frame, I had no other choice but to rent a two bedroom apartment, even though I will be the only one living in the apartment. So, what did I do with the extra room? I turned it into a lab! Although I still need to get a bench multimeter, hot air soldering iron, etc, I think it’s a good starting point. Anyway, here’s a small tour of my lab.

20140623_164357[3]

So right now my inventory is pretty sparse. The cabinet on the bottom I had before I moved to MA and contains spare items.Some of the items include diodes, op amps, atmel and PIC18F  microcontrollers, PIC programmers, and AVR programmers. However, one of my co-workers gave me his old electronics cabinet. This one contained a diverse amount of through-hole discrete parts such as resistors, capacitors, even some inductors. Either way, I will not run out of discrete components anytime soon.

20140623_164411[1]

So I obtained another goodie from my co-worker- a power supply (15V/1A). Although I do not use it often since I have a higher wattage power supply (32V/5A),  I’ll find a use for it soon. For the first time in my engineering career, I finally invested in a….meh function generator. I never heard of Victor before obtaining the function generator, but it does a decent job. My chief complaint is the minimum and maximum duty cycles for square waves. This function generator can only be set to have a 20%-80% duty cycle for square waves. As a person who likes to switching things at a fast pace, this continues to annoy me.

20140623_164417[1]

One of my electrical engineering colleague told me that a good electrical engineer typically has an analog and digital oscilloscope. I took that advice to heart and obtained an old school analog oscilloscope from – you guess it – my current co-worker. I’m not going to lie, I’m still tying to figure out how to use this scope. I tried looking for the instruction manual online and even asked my co-worker who lend me the oscilloscope, and I still cannot figure out how to use it.

20140623_164427[1]

So this is one of the supplies I brought while I was living in Kingston. As embarrassing as it sounds, I lost the caps to the power supply’s output during the move to MA. For now, I have alligator clips attached to the power supply’s output. Although the current capability of the cables is a little less that the maximum current the power supply can deliver, my current projects are not really current demanding, so I can get away with it. Of course, I cannot forget my multimeter from Radioshack, Although I was groomed to love Fluke multimeters, I cannot complain about it as it gets the job done. I will get a bench and Fluke multimeter sometime in the future.

20140623_164436[1]

So here’s my current oscilloscope. Originally I wanted to get a small cheap Techtronix oscilloscope but apparently the cheapest Techtronix oscilloscope I could find at the time was $1000. So…I brought a Hantek oscilloscope from Ebay. Although I find the screen to be a little hard on the eyes and the speed isn’t something to brag about,I can save pictures using USB! I cannot tell how many oscilloscopes I used in the past could only save waveforms using a floppy drive. I know it’s petty, but after using oscilloscopes for two years  now, it’s kind of a big deal.

20140623_164506[1]

So the last item I got for my lab is my new soldering iron. My previous soldering iron I obtained from Radioshack started to affect my soldering. Instead of getting another cheap crappy soldering iron, I decided to invest in a Hakko 936 soldering iron. Not only did I get a new soldering iron, but I got two chisel tips with them. What’s great about these chisel tips is that the heat is spread out a little more, making through hole soldering a little easier.

So that’s it for my little post for today. Again, I apologize for the delay, but assimilating to life in MA was….more time consuming that I thought. Anyway, thanks for reading this post and if you have any suggestions on any lab equipment I should get, then please comment below! I will see you guys next week and have a wonderful day!


Leave a comment

PSA- The Disappearance of CoolCapEngineer

It’s been a long time since I posted on this blog. The reason for the disappearance of posts was the fact that I came to a realization that my past job was making me miserable and needed to obtain a new job. Let me explain what happened.

If you’re a regular visitor on the blog, then you might be familiar with the fact that I worked as a Junior Project Engineer in Woodstock, NY. However, the job was not as amazing and career advancing  I expected it to be. The environment was unnecessarily stressful as my supervisor and my co-workers made things very unpleasant for me. My supervisor would verbally abuse me for the way I completed my assignment despite the fact I finished the tasks in a timely manner.  Some of my older co-workers would demean me for making small mistakes- e.g. mixing up which electrical component leads or lags for current during conversations.  It was to a point where there were accounts of racism – a topic which I honesty try to avoid as much as possible- was mixed in the verbal abuse. So from January till mid-February, I spent my time looking and applying for new jobs.

Despite the stressful situation, I managed to obtain an associate design engineer job near Boston, Massachusetts- a location which I always dreamt of living even before obtaining my previous job. Thus I will begin working for this company during the first week of March and began the moving process.

So what does this mean for new posts? Unfortunately, I will not post any new articles until the start of the summer.  Although I could start posting new articles in April, or when I’m fully acclimated with my new job and living location, I see this as an opportunity to drastically improve this blog including a new look, new articles, a chance to show the small lab I’m trying to setup in my new apartment and a new V-blog category.

As for my Arduino brushed motor controller project, I have not forgotten about it and will resume working on before the blog starts.

Despite my hiatus, my Twitter page will still be active. Be sure to check it out when you get the chance as I keep up with power electronics, microcontroller, Kickstarter, and cool electrical engineering projects. Until then, I hope you guys have a wonderful day and see you during the summer!


Leave a comment

Projects: Arduino 24V Brushed DC Motor Controller Shield Update #4

wpid-20131228_181153.jpgWell, this is a first. This is kind of an embarassing first, but a first nevertheless. In my two years blogging on Cool Cap Engineer, I could never get past a third update for any of my projects. A lot of the times, I cancelled a project due to the huge time commitment for a project, or the lack of knowledge on the project’s topic. With that said: here’s the 4th update for the 24V Brushed DC Motor Controller Shield project.

In my last post, I mentioned that the original 24V Brushed Motor Controller circuit needed some improving. One of the crucial improvements I mentioned was adding overvoltage and undervoltage protection circuitry. Because of the power supply protection circuitry additions, I decided to look into the LM2574: a 12V/.5A Buck Regulator IC. By using the LM2574, not only will I be able to add the protection circuitry by manipulating the on/off pin of the regulator, but its surprisingly more efficient than the 7815 linear regulator I was using.I could not emphasize how efficient this regulator is. No matter how much I loaded the regulator, it still delivered 11.92V  to the load. Even when I loaded the regulator with a 24 ohm resistor, it still maintained 11.92V. Of course, the performance will change depending on huge temperature variations, but I’m assuming the final shield will be used at room temperature.

wpid-20131229_145125.jpg

Just for the sake of curiosity, I wanted to see how the regulator performed when I loaded it with an Arduino, which typically draws 30-40ma. To my surprise I regulator delivered 11.97V to the Arduino. So I think I will use the LM2517 in the final design.

wpid-20131229_145616.jpgThe final thing I was thinking doing for the project was implementing the MC33035 brushless motor controller on the shield. The MC33035 can not only control DC motors, but it comes with a current limit. If I have time this week, I will implement the undervoltage and overvoltage protection circuitry with the 12V Buck regulator circuit and start working on the PCB for the shield, which will control 1 motor. Once I test the shield, I will modify the shield to control 2 motors.

Well, that’s it for me this week. Feel free to post a question, comment, or concern and I will do my best to respond back to you. See you guys next week and Happy New Years!


1 Comment

Electronics-LTC3639

Buck regulators are used for reducing the input voltage coming from a power supply to safely power microprocessors, gate drive circuitry, and other circuits. Today, I will show you how to use the LTC3639 – a buck regulator that can receive up to 150V- which comes with under-voltage and over-voltage lockout.

The LTC3639 should allows you to to easily change the output voltage, undervoltage lockout, overvoltage lockout, switching frequency, and the maximum peak current. I built 15V power supply using the LTC3639 and the DC1901A development board from Linear Technology.

Pin Functions

pinltc3639

  • SW (Pin 1): Connects to the drain of the LTC3639’s internal MOSFET.
  • Vin (Pin 3): Supply pin for the IC
  • FBO (Pin 5): Feedback comparator output. Connect to VFB of other LTC3639’s in order to increase the output current. Otherwise, leave FBO floating.
  • VPRG2, VPRG1 (Pins 6, 7): Used for configuring the output of the LTC3639. These pins can be connected to either ground or the LTC3639’s SS pin.
VPRG2 VPRG1 Vout
GND GND Adjustable
GND SS 5V
SS GND 3.3V
SS SS 1.8V
  • GND (Pins 8, 16, 17): Ground connection. Pin 17 must be soldered to the PCB ground plane for rated thermal performance.
  • VFB ( Pin 9): Output voltage feedback. Connect to output voltage’s resistive divider for an adjustable output. Connect this pin to Vout for fixed output configurations.
  • SS (Pin 10): By connecting a capacitor from this pin to ground, the voltage ramp up time can be set. Leave floating to use internal 1ms soft start.
  • Iset (Pin 11): Leave this pin floating for 230ma peak current. Short this pin to ground for 25ma peak current. For a configurable peak current, connect a resistor from this pin to ground.
  • OVLO (Pin 12): Can be used to configure the overvoltage lockout using a resistive divider connected from the input supply. If the voltage on this pin is greater than 1.21V, then the overvoltage lockout is activated. The chip resumes operation when the voltage on the OVLO pin is less than 1.10V.
  • Run (Pin 14): Activates the chip when the voltage on this pin is greater than 1.21V. This pin shuts off the chip when the pin’s voltage is less than .7V. The Run pin is also used for setting the under voltage lockout.

Leaving  pin 12 floating sets the peak current to 230ma, while shorting this pin to ground sets the peak current to 25ma. For a different current peak current limit, a resistor should be connected from pin 11 to ground. The peak current cannot exceed 230ma and cannot be less than 20ma. The peak current is also twice the average current. The value of the peak current resistor can be found using the following equation…

The inductor is used to determine the LTC3639’s switching frequency when it is operating in burst mode, or when the LTC3639 is lightly loaded. The following equation is used for determining the inductance during burst mode.

If the LTC3639 will not be lightly loaded, then the inductor must meet the following two conditions…

Although the previous equations provide some insight on how the inductor will affect the switching frequency of the LTC3639, figure 2 gives a range of recommended inductor values given peak current for maximum efficiency.

inductordchart

It is recommended to use ferrite core inductors for their ability to handle a high switching frequency, and low core loss.

An input capacitor is necessary for filtering the trapezoidal current going into the source of the LTC3639’s internal high side MOSFET. If the maximum input voltage ripple is given, then the following equation can be used.

The output capacitor is needed to filter the inductor’s ripple current. If the desired output voltage ripple is given, the output capacitor can be selected as long as it follows the following two conditions…

How the output voltage is configured depends on the configuration of VPRG2 and VPRG1. For an adjustable output voltage, short VPRG2 and VPRG1 to ground, and connect VFB to an external resistive divider from the output. The output voltage can be set according to the following equation.

The only requirement on the resistive divider is to keep R2 less than 200K in order to keep output voltage variation less than 1%.

resistivedivider

The undervoltage, and overvoltage lockout can be set using a three resistor divider.

ovuv

All three resistors must satisfy the following condition…

V_(in(MAX))*(R5/(R3+R4+R5))<6V

By leaving pin 10 floating, the output voltage ramp time will typically be 1ms. If a longer ramp time is required, then connect a capacitor from pin 10 to ground. The value of capacitor can be computed from the following equation…

Although the ramp time can be calculated from C_ss, it must fulfill the following condition…

ltc3639

I used the LTC3639 to assemble 15V power supply circuit to power a gate drive circuit I was working on. The 15V power supply must perform according to the following requirements…

Vo=15V
Ipeak=230ma
Overvoltage Lockout=97V
Undervoltage Lockout=18V

One of the first tests performed on the 15V circuit was loading it with a 100ma load and observing the start up time. It took 12ms for the output to start up after immediately applying 43V and 85V to the 15V power supply circuit.For more information about the LTC3639, look at the datasheet. Feel free to post a comment if you have a question or concern. Once again, I will see you guys next week!


1 Comment

Projects: Arduino 24V Brushed DC Motor Controller Shield Update #3

wpid-20131215_141332.jpg

Hey guys! Today’s post will be a relatively short post compared to the last post, but I just wanted to update you guys on my project. Well, the first thing I want to mention is that I finally tested the circuit with the new Arduino, and it works perfectly!  No short circuits, and the motor rotates properly. I included a picture of the schematic in the figure below. If you’re having a hard time viewing the picture, just click on it and it will expand.

Arduino_24V_Motor_Driver_REV_1

So does that mean my project is finished? Nope. In fact, this project is just getting started. I want to make some serious improvements to this circuit. First obvious improvement is by making the circuit as cheap as possible. For example, the MOSFETs I used for the circuit are really nice and robust (they’re rated  around 150V/100A), but they cost $24 in total.  Second, I must include an overcurrent protection circuit as it will prevent the MOSFETs from getting damaged when the motor is stalled. The next improvement is the inclusion of a undervoltage and overvoltage lockout to protect the Arduino from any possible damage. Not to mention, by adding overvoltage and undervoltage lockout circuity, I can forget adding an  isolated DC-DC converter, which are really expensive. Finally, I will consider the project fully complete once I implement the circuit on an Arduino shield.

There’s another thing I want to look into. When I was running the motor control circuit with the motor attached,  I noticed that my power supply went into current limit whenever I commanded the motor to make a sudden turn.  This is due to the large amount of power needed to apply a torque large enough to change the rotation of the motor’s shaft. However, this solution can easily be fixed by implementing motor soft start code on the Arduino, which involves applying an increasing.decreasing PWM signal to the gate of the upper transistors to limit the power following through the motor.

Sorry for the short post today guys, but I spent most of last week preparing for my trip back to Philadelphia next week. I’m not sure if I will post a new update or a completely different article. Anyway, if you guys have any questions, comments, or concerns, feel free to post a comment. See you guys next week!


Leave a comment

Projects: Arduino 24V Brushed DC Motor Controller Shield Update #2

wpid-20131207_164254.jpg

In my last post, I talked about my newest project; a 24V DC brushed motor controller shield for the Arduino. I mentioned my setbacks in my post and that in my new post, I will give an update for the project. Unfournately, the only thing I could do last week was replacing my old Arduino Duemilanove with the Arduino Uno. Until I can test the circuit proper, I decided to spend this post discussing how I intend to control this 24V motor.

310px-H_bridge.svg

If you’re a regular visitor of this blog, an electrical engineer, or just an electronics hobbyist, then you’re probably familiar with an Hbridge. An Hbridge is an electronic circuit that changes the direction of current flowing to a motor in order to change the rotation its shaft. To change the flow of current, four switches are used. Using the figure 1 as a reference, the motor’s shaft rotates clockwise when S1/S4 turns on, and when S2/S3 turns on.

Today, these Hbridge switches are replaced with transistors. Lower voltage Hbridges can be made using Bipolar Junction Transistors (BJT) since they require little current to properly control lower voltage motors. However, if you’re control 12V and more motors, then BJTs would be horrible as they will require more current to control these motors. So instead, metal oxide semiconductor field effect transistors (MOSFET) are used since they “ideally” consume no power to turn them on. For motor control, Power MOSFETs are used. There are two types of MOSFETs: Pchannels and Nchannels. I will not discuss the physical difference between them, but I will mention that Nchannels turn on when you apply a positive voltage to its gate, and Pchannels turn off when you apply positive voltage to its gate.

Alas, MOSFETs also have problems to consider. One problem is that if you try to pass 12V or more through the Nchannel MOSFET, then you need at least 12V to turn them on. Also, to turn off a pchannel, you to apply the same voltage you’re sinking through the MOSFET to its gate. I seen many forum posts in which people blown out their MOSFET forgetting this important fact. Of course I’m no different since I made the same mistake senior year of college…and in my last post.

Now that I talked about the theory of this motor control, let me talk about my proposed circuit. In my Hbridge circuit, I have my upper switches comprised of pchannnel MOSFETs and my bottom switches made up of nchannel MOSFETs. To turn on just one pchannel MOSFET, the Arduino will activate a low current NPN transistor, which will turn on the pchannel MOSFET because of the voltage divider at its gate. However, when the NPN transistor is off, then the voltage at the pchannel’s gate will be equal to the voltage being applied to it. By having the voltage applied to equal to the voltage at its gate, the Pchannel turns off. This method is repeated for the other pchannel MOSFET.

Finally, to control whether an nchannel is off or on, 12V-20V must be applied to the gate. Unlike a pchannel MOSFET, the voltage applied to the gate can be a separate voltage from the vvoltage applied to it. To accomplish this, I used low side gate drivers (IR4427) to provide the right voltage to turn the bottom Nchannels on or off.

Now that I explained the theory the best way I could, let me discuss what’s next for this project. Although I did not test my Arduino to my motor control circuit yet, there’s a glaring problem with the circuit. There is no isolation between the Arduino and the circuits responsible for driving the MOSFETs. In order to achieve this, not only will have to look into optoisolators, but also isolated DC to DC DIP modules. But that’s another post. Another item that I will have to look into is setting up an undervoltage lockout circuit for the circuits driving the MOSFETs gates.  By adding an undervoltage lockout circuit, the motor will not turn on until the right amount of voltage is applied to the MOSFETs.

Anyway, that’s it for me today. If you have a question, comment, or concern, feel free to leave a comment. I will see you guys, next week.


Leave a comment

Projects: Arduino 24V Brushed DC Motor Controller Shield Update #1

So let’s rewind 7 months ago, when I was still in senior year of college. One of my final projects I was working on for my club was a drink dispensing robot. We were close to finishing the robot, but I could not get the motor drive working for it. No matter how much I tried, the circuitry for the motor controller kept burning out. I felt so ashamed because I could not figure out what was wrong with the circuit. Fast forward to today and I wanted to try to correct the mistakes I made for that project by working on a similar one. So, one of my new projects is a 24V brushed motor controller using Arduino.

So, I want the final version to be implemented as an Arduino Uno shield. The shield will allow the user to control two 24V DC motors and limit the current 10 amps (5 amps per motor). If one of the motors draw more than 5 amps, then the shield will shut off power to both motors. The shield should also provide some level of isolation between the Arduino and the motor controller. By providing some isolation between the Arduino and the motor controller,  the Arduino will not get damaged during overcurrent condition. To control the direction of both motors, I will be making a homebuilt Hbridge using a combination of pchannel and nchannel mosfets. For my pchannels mosfets, I used Fairchild’s FQP27P06. As for nchannel mosfets, I used FQP20N06.

Normally, I would talk about the theory behind the brushed motor controller shield and talk about testing later, but I drew a lot of the schematics by hand and will need to be either re-scanned or converted to an Eagle Cad schematic. I will mention that for driving the pchannels and nchannels, I used IR’s IR4427 dual low side gate driver.

wpid-20131130_165132.jpg

Arduino motor controller implemented on a breadboard

The figure above shows my first implementation of the motor control circuit. This motor control circuit should allow me to change the direction the motor is rotating. For testing the circuit, I used a 24V scooter motor I brought from Ebay. Despite the fact the motor is a 120W motor, the motor will not be loaded. By not loading the motor, the motor draws a couple of milli-amps (200-300ma) when I connected 24V to it using my 32V/5A DC power supply.  Because of this, I thought it would be unnecessary to heatsink some of the parts of the circuit.After building the circuit, I was able to safely power the motor from 12V-19V, but then one of the motor control transistors burned out. “Why?” you ask? Because by the time I put 18V into the circuit/motor, it was drawing 2.5A.

One of the pchannel mosfets was damaged around 18V.

One of the pchannel mosfets was damaged around 18V.

How could this be? If I provided a heatsink to each of the transistors as I should of, I could of pump 24V into the motor easily. To fix this situation, I was going to have to either grab a couple of heatsinks, or grab a piece of metal to act like a giant heatsink and attach the transistors to the piece of metal with sol-pads on the back. I also going to need to buy some more p channel mosfets T_T. However, I could not wait a couple weeks to solve the issue. I wanted it fixed now.

wpid-20131130_195156.jpg

A homemade heatsink for power mosfets.

Luckily, I had several pieces of pre-drilled metal and sol pads already available. After attaching each transistor to the piece of metal and using every available alligator clip at my disposal to connect each transistor to the circuit I built on the breadboard, I tested the circuit again. Again, I was still having problems as the circuit was still drawing a high amount of current (around 4.89A). I later found out that the way I was driving my pchannels was completely wrong. For  pchannel mosfets to be fully off, the gate voltage must be equal to the source voltage. Because of my inproper way of controlling the pchannel mosfets, this caused a short in my Hbridge. So now I have to completely revise my previous hbridge control circuit in favor of a new one.

newmotorcircuit

New motor control circuit. Surprisingly used less parts than the last circuit.

After testing the new circuit, I still saw a high current draw (again, around 4.89A). It was later revealed that my arduino was turning on both pchannels of my Hbridge, even though I specify in my code that only one pchannel should be on at a time.  In other words, this caused yet another  short in my Hbridge.When I looked at the voltage Arduino’s onboard 5v regulator was outputing, I found it that instead of outputting close to 5V, it was outputting 3.5V. Long story short, I need to replace my Arduino.

arduinotest

To see if my Hbridge was still working, I provided the input voltages using an 7815 voltage regulator. Now my circuit was drawing the correct amount of current!

rightvoltagedraw

Correct current draw. The circuit/motor was drawing 280ma and not 2.80 amps.

Well, that’s it for me today. Not only will I post the parts I used and the theory of the motor controller circuit soon, but I will keep you guys updated on the progress on this project. If you have any questions, comments, or concerns, feel free to leave a comment!