Showing posts with label DIY. Show all posts
Showing posts with label DIY. Show all posts

Wednesday, December 27, 2017

Industrial Electronics- Building a Power Supply

Hey everyone! I am back from a bit of a hiatus due to my engineering classes at Florence Darlington Tech. I am working towards my degree in Electrical Engineering and due to the curiosity from friends on facebook I have decided to share a project I worked on this past semester.

I had to build a power supply and write up a report. Here goes:





To build a power supply, three circuit sections will be needed. Knowledge of transformers, how to build a filtered bridge rectifier, and how to build a voltage regulator is also necessary for this project. A transformer, four 1N4001 zener diodes, a 741 Op Amp, a 2N2222 Transistor, four resistors, a zener diode, and a capacitor will all be needed for this project.

To begin, we started with a step down transformer which was built with a 10:1 or rather a 0.1 turns ratio. This lowers the incoming 120Vac coming from the wall outlet. This particular transformer was center tapped so we could pick either 13vrms or 26vrms. We chose to wire it for 13vrms. Using the formula Vsec=(Nturns)(Vpri) we would come closer to 12vrms however Vrms from the wall can fluctuate within a range so for this report I will stick with 13vrms as it was already established on the transformer. 
In order to know that our transformer was working correctly we need to calculate the peak voltage expected on the oscilloscope screen. Rms=.707(vp) gives us an 18.387Vpp. The oscilloscope verified this by displaying a 18vpp (approximate) sine wave. The sign wave is far from the flat positive voltage we need for DC. 
To start smoothing this sine wave out, we need to build a bridge rectifier. To build the bridge rectifier, we wired together four 1N4001 diodes in this pattern:


We were careful to keep the positives and negative ends of the diodes in the proper direction. At one point, failure to double check our work resulted in the melting and untimely death of a few diodes. The capacitor and the load resistor were chosen to keep the ripple factor low. With a 20KΩ load resistor and a 10uf capacitor our ripple factor turned out to be 4.2%. We could have modified this by switching out the capacitor and resistor and using these formulas until we created the desired ripple factor:

Vp(rect)=Vp(sec)-1.4
Vr(pp)= 1/(fR_LC) x Vp(rect)
VDC= (1- 1/(2fR_LC)) X Vp(rect)
% ripple factor =vr(pp)/ VDC


Connecting the bridge rectifier up to the oscilloscope produced a 18vpp approximate ripple wave to appear on the screen. This is possible due to the diode positioning. During the positive half of the AC sinewave cycle, one pair of diodes conducts the current while the other two are reversed biased. As the negative half of the AC sinewave cycle passes the reversed biased diodes become forward biased and conduct current while the first pair become reversed biased. The process repeats itself bringing all the negative voltage into the positive. Like this:

Adding the capacitor into this circuit creates the sawtooth like ripple. This is created by the capacitor charging during the positive cycles when the diodes are forward biased and discharging as the cycle begins to drop (when the diodes are reversed biased). This created a signal on the oscilloscope like this (exaggerated):


This still isn’t flat DC though. We need to build a voltage regulator to smooth this out. For this we will need a 741 Op Amp, a 2N2222 transistor, three resistors, and a zener diode wired in this configuration:

A zener was chosen to set a voltage of 6.2 volts and R1 was chosen to be 1k to limit the current to the zener and help it maintain a nearly constant 6.2 volts no matter how high or low the incoming voltage goes as long as the current does not exceed the zener limits. In order to create a flat DC voltage this voltage level held by the zener holds the positive input of the op amp at 6.2v creating a reference voltage. Any time Vin decreases or the IL (the load current) increases (due to a decrease in the load resistance), and vice versa, the voltage divider created by R2 and R3 insures that a proportional increase or decrease is applied across the negative input of the op amp.
The difference between the two op amp inputs is amplified by the gain and sent to the base of the transistor. This change in voltage applied to the transistor causes the emitter at Vout to increase until the voltage to the negative op amp input matches the zener input at the positive terminal. This creates a flat DC voltage who’s voltage we can predict by plugging the zener reference value and the chosen R2 and R3 values into the gain formula:

Vout= (1+ R2/R3)Vref    ->      (1+(10k/10k)) x 6.2= 12.4V expected output.
The power supply was completed by connecting the two circuits together by a wire connected in parallel with the capacitor and resistor from the bridge rectifier circuit over to Vin of the voltage regulator:

Connecting the oscilloscope across vout and ground showed that the signal that was once sawtooth in shape was now a flat and solid 12V (approx) DC readout.

To test whether our power supply could handle a variable load we connected an 80k potentiometer at Vout in parallel with R2 and R3. Keeping an eye on the oscilloscope we were able to turn up the resistance to find where the transistor could no longer keep up with the current load (and could no longer keep the voltage at a stable 12volts). As the transistor failed this caused the signal on the oscilloscope to become distorted once again. We unplugged the potentiometer and tested the resistance with a meter to find that the transistor was able to handle the current and keep a steady 12v signal going to the output as long as the resistance of the load stayed under 6K.

Using what was learned in this project it would be possible to replace pieces of the circuit to create a power supply that could operate at higher voltages or tolerate wider load resistance variances. It was very interesting to see firsthand how each part of the circuit worked individually and then how they changed the Ac to Dc once they were connected together. The greatest challenge for me during this project was making sure the diodes in the rectifier were all going in the proper directions and figuring out where everything was in relation to the diagram once we started adding the circuits together. 



  If you have come this far (Holy smokes CONGRATULATIONS!) and have questions (I'm sure you do!)... feel free to leave them in the comments or reach out to me on facebook/twitter ;)

Also, hit the subscribe button because I will be going back to writing sci-fi short stories on my blog as well as entering in updates on my current work in progress which should be out of edition hopefully before May 2018... Just in time for ConCarolinas- I hope.

Meanwhile... run on over to Amazon to get the updated edition of The Alien Mind on kindle for just $0.99 till Jan 1st (afterwhich it returns to $2.99)!

Till next time-> Never stop reaching for the stars and exploring your potential!



Tuesday, July 5, 2016

UnBlocking My Site With Social Media Buttons


Improving 
For those of you out there with websites I have a very interesting piece of info for you!

Originally I was using Social Media Button Maker to help me create the coding for the social media buttons on my website. That is until I started getting reports from Avast Users that they were getting blocked from my website!

After weeks of googling for a solution, I finally sent an e-mail to Avast to report to them that all other antivirus software (including Kaspersky) were reporting that my site was clean.

Avast sent me back a fast reply telling me that the Social Media Button Maker code (they actually sent me the erroneous piece of code to assist in me finding the problem) was why my website was getting blocked. Back to my backend to figure out why.

I pulled up my code for that widget and found a link INSIDE the code to a shifty hotel site! That was my tip off! I don't remember that being there before! So I deleted the Javascript and sat down to find better buttons and write the html myself. This sent me to a google search where I found ALL of my buttons (including the ones the button maker didn't offer) on WikiCommons! SCORE!


And here's what the buttons look like!:



website buttons
Buttons in use!
Just regular buttons! YAY!

Once I was finished I reported my fix to Avast and they promptly sent me a confirmation saying that my site would be taken off "blocked" in the next antivirus definition update! YAY!!!

Because I have so many friends that love building their own websites I figured I would offer the code here. They don't have counters, don't lag in loading, or do anything fancy. All you have to do is update the BOLDED links with your own social media links and paste the html where you need it on your site!

HTML Code for social buttons:


<div><a href="http://www.instagram.com/author.vl.jennings" style="font-size: 100%;"><img alt="WikiInstagram button" src="https://upload.wikimedia.org/wikipedia/commons/a/a5/Instagram_icon.png" style="border: 0; height: 42px; width: 42px;" / /></a><a href="www.twitter.com/vljennings" style="font-size: 100%;">  <img alt="Wikitwitter button" src="https://upload.wikimedia.org/wikipedia/commons/7/74/Twitter_Logo_Mini.svg" style="border: 0; height: 42px; width: 42px;" / /> </a><a href="www.facebook.com/vljennings" style="font-size: 100%;"><img alt="Wikifacebook button" src="https://upload.wikimedia.org/wikipedia/commons/8/82/Facebook_icon.jpg" style="border: 0; height: 42px; width: 42px;" / /> </a><a href="https://plus.google.com/+VirginiaLoriJennings" style="font-size: 100%;"><img alt="WikiGplus button" src="https://upload.wikimedia.org/wikipedia/commons/0/04/Google_Plus_logo.png" style="border: 1; height: 42px; width: 42px;" / /></a><a href="https://www.pinterest.com/vljennings/" style="font-size: 100%;"><img alt="Wikipinterest button" src="https://upload.wikimedia.org/wikipedia/commons/0/08/Pinterest-logo.png" style="border: 0; height: 42px; width: 42px;" / /></a><a href="https://www.youtube.com/user/virginialorijennings" style="font-size: 100%;"><img alt="Wikiyoutube button" src="https://upload.wikimedia.org/wikipedia/commons/a/aa/Youtube_logo_stacked-vfl225ZTx.png" style="border: 0; height: 42px; width: 42px;" / /></a><a href="https://www.goodreads.com/VLJennings" style="font-size: 100%;"><img alt="Wikigoodreads button" src="https://upload.wikimedia.org/wikipedia/commons/1/14/Goodreads_%27g%27_logo.jpg" style="border: 0; height: 42px; width: 42px;" / /></a><a href="http://www.amazon.com/Alien-Mind-V-L-Jennings/dp/1940812658" style="font-size: 100%;"><img alt="Wikiamazon button" src="https://upload.wikimedia.org/wikipedia/commons/e/eb/Amazon-mp3-store-source_Faenza.svg" style="border: 0; height: 42px; width: 42px;" / /></a><a href="https://www.linkedin.com/in/vljennings" style="font-size: 100%;"><img alt="Wikilinkedin button" src="https://upload.wikimedia.org/wikipedia/commons/c/c9/Linkedin.svg" style="border: 0; height: 42px; width: 42px;" / /></a><a href="http://www.virginialorijennings.com/feeds/posts/default" style="font-size: 100%;"><img alt="WikiRSS button" src="https://upload.wikimedia.org/wikipedia/commons/d/d9/Rss-feed.svg" style="border: 0; height: 42px; width: 42px;" / /></a></div>


<end code>

Once again these codes are completely clean! Once you replace the bolded links with your own there will be no further link back to me at all ;) 

If you'd prefer to take out some of the buttons or perhaps re-order them... here's the breakdown:

Instagram:
<div><a href="http://www.instagram.com/author.vl.jennings" style="font-size: 100%;"><img alt="WikiInstagram button" src="https://upload.wikimedia.org/wikipedia/commons/a/a5/Instagram_icon.png" style="border: 0; height: 42px; width: 42px;" / /></a>

Twitter:
<a href="www.twitter.com/vljennings" style="font-size: 100%;">  <img alt="Wikitwitter button" src="https://upload.wikimedia.org/wikipedia/commons/7/74/Twitter_Logo_Mini.svg" style="border: 0; height: 42px; width: 42px;" / /> </a>


Facebook:
<a href="www.facebook.com/vljennings" style="font-size: 100%;"><img alt="Wikifacebook button" src="https://upload.wikimedia.org/wikipedia/commons/8/82/Facebook_icon.jpg" style="border: 0; height: 42px; width: 42px;" / /> </a>

Google+
<a href="https://plus.google.com/+VirginiaLoriJennings" style="font-size: 100%;"><img alt="WikiGplus button" src="https://upload.wikimedia.org/wikipedia/commons/0/04/Google_Plus_logo.png" style="border: 1; height: 42px; width: 42px;" / /></a>

Pinterest:
<a href="https://www.pinterest.com/vljennings/" style="font-size: 100%;"><img alt="Wikipinterest button" src="https://upload.wikimedia.org/wikipedia/commons/0/08/Pinterest-logo.png" style="border: 0; height: 42px; width: 42px;" / /></a>

Youtube Profile:
<a href="https://www.youtube.com/user/virginialorijennings" style="font-size: 100%;"><img alt="Wikiyoutube button" src="https://upload.wikimedia.org/wikipedia/commons/a/aa/Youtube_logo_stacked-vfl225ZTx.png" style="border: 0; height: 42px; width: 42px;" / /></a>

Goodreads:
<a href="https://www.goodreads.com/VLJennings" style="font-size: 100%;"><img alt="Wikigoodreads button" src="https://upload.wikimedia.org/wikipedia/commons/1/14/Goodreads_%27g%27_logo.jpg" style="border: 0; height: 42px; width: 42px;" / /></a>

Amazon Author Page:
<a href="http://www.amazon.com/Alien-Mind-V-L-Jennings/dp/1940812658" style="font-size: 100%;"><img alt="Wikiamazon button" src="https://upload.wikimedia.org/wikipedia/commons/e/eb/Amazon-mp3-store-source_Faenza.svg" style="border: 0; height: 42px; width: 42px;" / /></a>

Linkdin:
<a href="https://www.linkedin.com/in/vljennings" style="font-size: 100%;"><img alt="Wikilinkedin button" src="https://upload.wikimedia.org/wikipedia/commons/c/c9/Linkedin.svg" style="border: 0; height: 42px; width: 42px;" / /></a>

RSS Feed:
<a href="http://www.virginialorijennings.com/feeds/posts/default" style="font-size: 100%;"><img alt="WikiRSS button" src="https://upload.wikimedia.org/wikipedia/commons/d/d9/Rss-feed.svg" style="border: 0; height: 42px; width: 42px;" / /></a></div>



I hope this helps someone out there! Thanks for stopping by!

***"Improving, Non-stop"photo credit: Broadway via photopin (license)


Find The Alien Mind on Amazon!

Did you like this post? If so you might enjoy my book!

For adults and teens alike, it is truly a science fiction adventure for the whole family!

If you'd prefer an autographed copy straight from the author you can buy one here as well!
Autographed Copy:$13.00 + Shipping
 


"If you enjoy my writing, would you care to buy me a cup of coffee?"



Tip Options

Friday, June 19, 2015

Jo Linsdell's Top 5 Twitter Tips for Twittering






Jo Linsdell is a best selling author and illustrator and internationally recognized marketing expert. She is also the founder and organizer of the annual online event “Promo Day” (www.PromoDay.info) and the Writers and Authors blog (www.WritersAndAuthors.info). To find out more about Jo and her projects visit her website http://www.JoLinsdell.com.