1
Show Posts
This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
Messages - embeddederic
2
Project development, ideas, and suggestions / Re: DIY Audio Function Generator Part 1
I was actually looking at buying a HP 3310A very seriously on ebay, but i still wasn't able to find one for under $200. My function gen isn't really going to be an less expensive by the time I buy the precision LT opamps and order some raw PCBs.... but design and build something form scratch will be fun and I'll learn a few things. Also if it works will I may offer it as a OSHW kit.... I got to get it built up and working first though :)
3
Project development, ideas, and suggestions / Re: DIY Audio Function Generator Part 1
My original idea was to use a AD9850 125 MHz Complete DDS Synthesizer and hook it up to an Atmel micro running some Arduino code, but I didn't think I could get as good of THD from this DDS solution so I was always going to still have a separate BNC output for the wien-bridge oscillator. I also wanted to hook up an SD card and DAC IC to the Atmel micro and have a "wav" file programmable wave form generator. I used Scilab to create a bunch of sine, square, ramp and ECG wave forms in a wav file format. the Arduino would then play the wav file out one of the Outputs of the function gen and produce a programmed signal..... but the project was getting too big in my head, so inorder to do more than think about it I broke the project up into a "Analog" function gen and I'll later build up the DDS Arduino based programmable function gen.
4
Project development, ideas, and suggestions / Re: DIY Audio Function Generator Part 1
It is fun pushing the limits of my test gear though. Once I get the function generator built up I may have to send one off to someone with a better Distortion analyzer than me to get a second opinion.
5
Project development, ideas, and suggestions / DIY Audio Function Generator Part 1
I have lots of test equipment in my home lab from O-scopes, RF Signal Generators, a Spectrum Analyzer, RF Power Amps to a slew of Multimeters and DC Power supplies, but one piece that is missing is a simple low end Audio Function Generator. I searched eBay and anything worth wild was in the $200+ mark and to be honest I wasn't that impressed with their specs. Most $200 Function Generators only have a Sine Wave output spec'd at 1% THD....... 1% is ok for most uses, but I just got done building up Jim Williams Wien-Bridge Osc. and was able to get 0.024%.
http://http://embeddederic.blogspot.com/2012/01/sine-waving-into-new-year.html
I want to be able to use the Sine Wave output to test ADC resolution and as a base band signal for RF projects and having very Low Total-Harmonic-Distortion (THD) would be nice.
So I've decided to build my own Function Generator. Most DIY Function Generators I found online start out with a Square Wave Oscillator feed into an integrator to get a triangle wave, then you feed the triangle wave into a wave shaper and you get a rough Sine Wave output. This is similar to a project I built up last year.
http://http://embeddederic.blogspot.com/2011/08/remembering-jim-williams-dead-bug-style.html
This method works, but the wave shaped Sine wave isn't going to have the low THD I was looking for, so I am taking the opposite approach and starting with a Sine Wave Generator based on the #327 Lamp Wien-bridge Circuit to get the low THD. I'll then feed that into a Comparator to produce the Square wave; I am then using the Square Wave to turn on/off a ramp generator circuit. I would rather have a ramp output vs a triangle wave. The ramp circuit will let me play around with different single & dual slope ADC concepts later on.
Below is a block diagram of my proposed design:
[attachment=5]
I've added a +3.3V Square wave output to be feed into a frequency counter, so I don't need to bother to add a display to the function generator. Mine as well make use of the Frequency counter I have for a display, also having a +3.3V square wave output would be nice for any micro projects later on.
I'll have a Freq. Adjust Pot, Freq. Range switch, Ramp Current Source Adjustment Pot, and an Output Amplitude Adjustment potentiometer. Below is a rough layout of the proposed design:
[attachment=4]
I really like the layout of the CEE Source Measurement unit, so I'll be mounting the PCB in a similar looking plexi top and bottom when it is all done.
After sketching out the concept drawings my next step was to test the Wien-Bridge Oscillator circuit I was basing this whole design around. I prototyped up the circuit with the Frequency Range Select switch and 10K pot and was pleasantly surprised to see everything worked well.
[attachment=3]
[attachment=2]
[attachment=1]
The three switch selectable frequency ranges I have are: 16Hz to 600Hz, 160Hz to 6kHz, and 1.6kHz to 60kHz with the 10K potentiometer adjusting the output frequency continuously through the ranges. The one downside with this Lamp based implementation is there is a settling time of several seconds needed after each major adjustment to allow time for the Lamp to thermally settle.... this is an ok tradeoff for me given I should be able to achieve very low 0.05% or lower THD.
The next step was to draft up the rest of the circuitry in LTSPICE to see if I could create the Square Wave and Ramp functions successfully.
[attachment=0]
After an afternoon of playing I settled on this circuit. It works well in simulation and now I'll have to build it up and see if it works for real.
More Testing, DesignSpark PCB Layout, and prototyping to come...........................
6
Project development, ideas, and suggestions / Arduino Battery Monitor Part II
I took an Adruino Uno and a Protoshield and made a simple battery monitor, so I could measure the voltage of a discharging 9V battery when it was drained through a constant 100mA load. Below is the 9V battery discharge curve:
[attachment=3]
The 100mA constant load was chosen because my ProtoStack Arduino Clone with LCD draws about 92mA and I wanted to write a sketch to display a battery bar and the approximate hours battery life left. Since all batteries have an internal equivalent series resistance (ESR), it is important to take that into account when only using a battery's voltage to monitor its state of charge. Since we discharged the battery through a load that is similar to the ProtoStack board with LCD, the ESR of the battery has automatically been accounted for in the voltage measurements.
With the plotted excel data from the discharge monitor I created a look-up table in software to approximate the battery life:
Battery Voltage, Hours Life Left , Displayed Battery Bars
7.87V > Batt , 4.5hrs, 4
7.45V > Batt <= 7.87V, 4.0hrs, 4
7.23V > Batt <= 7.45V, 3.5hrs, 4
7.08V > Batt <= 7.23V, 3.0hrs, 3
6.94V > Batt <= 7.08V, 2.5hrs, 3
6.77V > Batt <= 6.94V, 2.0hrs, 2
6.56V > Batt <= 6.77V, 1.5hrs, 2
6.30V > Batt <= 6.56V, 1.0hrs, 1
5.71V > Batt <= 6.30V, 0.5hrs, 1
Batt <= 5.71V, mins left, 0
Here is the sketch I wrote: http://http://www.divshare.com/download/16665949-ab3
I tied the input voltage through a resistor divider (220K Ohm series and 100K Ohm shunt) to the A0 pin on the micro.
[attachment=2]
One issue I ran into was the 9V battery can go down as low as 5.71V before it is completely dead. The ProtoStack board has a 1N4004 reverse polarity protection diode and a 7805 Linear Regulator to generate its 5V rail. These components require that the input voltage be greater than 7.8V in order to create the 5V rail properly.
[attachment=1]
So I replaced the 1N4004 diode with a schottky diode that has a much lower 0.2V forward voltage and used a L4941 5V linear regulator to replace the 7805. The L4941 has a drop out voltage of less than 0.45V when sourcing 1Amp. With these mods I was able to go down to 5.30V input voltage before the LCD stopped functioning.
[attachment=0]
I used the Parallax 16x2 LCD commands to create the custom characters for the "EH" and Full & Empty Battery Bar Segments. Here is a link to the spreadsheet I used to calculate the values for the custom characters. http://http://www.divshare.com/download/16666179-f87
This was a fun project to get myself familiar with the Arduino Analog pins. Now my ProtoStack Board is all ready for a future portable battery powered electronics project. http://http://embeddederic.blogspot.com/2011/11/protoshack-atmega328-kit-review-arduino.html
7
Project development, ideas, and suggestions / Sine Waving into the New Year!
Jim's first iteration of the circuit consisted of a RC Wien Bridge, an LT1037 Opamp and a #327 Lamp. The Lamp is used as a variable resistor that starts out at a very low 98 Ohms DC resistance that helps get the Opamp oscillating (because of the increased gain) and ends up stabilizing at around 235 Ohms once it heats up (thus servo-ing the gain down to an equilibrium point that keeps the circuit oscillating).
I thought this would be a fun circuit to build up and recreate.
[attachment=1]
[attachment=3]
I hooked everything up on the breadboard just to prove out the circuit then I transferred the circuit over to a more permanent FR4 copper PCB.
[attachment=2]
[attachment=0]
There is more detail about this project on my blog. http://http://embeddederic.blogspot.com/2012/01/sine-waving-into-new-year.html
8
Open 7400 Competition / 7400 Logic Prize Review - ProtoStack ATmega328 Kit
For the rest of my review and detailed build and programming description go to my blog here:
http://http://embeddederic.blogspot.com/2011/11/protoshack-atmega328-kit-review-arduino.html
Overall I am pretty happy with the ProtoStack ATmega328 Development Kit and would highly recommend anyone getting one. I am excited to build up a few new projects with this board; having the extra prototyping space without having to stack a proto shield is a huge plus. Thanks ProtoStack for sponsoring the 7400 contest and getting me this kit and USBasp programmer!
[attachment=1]
Also Thank You Dangerous Prototypes for putting on the contest! It was a lot of fun seeing all the cool project ideas.
[attachment=0]
9
Open 7400 Competition / Re: 7400 Series Logic PLL Based Switch-Mode PSU
http://http://embeddederic.blogspot.com/2011/10/7400-series-logic-pll-based-switch-mode.html
10
Open 7400 Competition / Re: 7400 Series Logic PLL Based Switch-Mode PSU
For the link to work, Thanks!
Eric
11
Open 7400 Competition / Re: 7400 Series Logic PLL Based Switch-Mode PSU
12
Open 7400 Competition / 7400 Series Logic PLL Based Switch-Mode PSU
I am getting the spamming alert with the url tags, but the site below is legit.
embeddederic(add dot)blogspot (add dot) com
Thanks,
Eric