My Eagle Library

Posted by on October 15, 2011

 

This is my personal Eagle library, it has very few parts at the moment but it will grow as I work on different projects, so stick around if you want the latest version. You are free to use it for your personal projects. Contact me for details.

The devices currently in the library are:

  • ICL8038
  • LCD3510i
  • LM4040
  • LTC1144
  • MAX4580
  • MMBT3904
  • PIC18F2520
  • REF50XX ( REF5010, REF5020, REF5025, REF5030, REF5040, REF5045, REF5050 )
  • TL431
  • OPA209
  • MSP430G2553
  • MSP430G2231

Something to download

You can download the lib from here: eaglelib_gushh_v4.zip.

If you find any errors please let me know, however I have used this library for my own projects and so far I haven’t noticed any boo-boos. On the other hand I am not responsible for your own mistakes and cannot held accountable for any losses. Use it at your own risk :)

Enjoy.

 

Eagle V6 To spread wings

Posted by on October 14, 2011

It’s new and shiny, but…

After taking a look at the new feature-set for Eagle V6 I got quite excited, but then it hit me… Will they ever make this version available with a lite license? And which features will be cut out?

I’m not a fan of XML but it’s certainly a step into the right direction. The more you open your formats the wider the acceptance of your package will be, generally speaking.

Continue reading “Eagle V6 To spread wings” »

MSP430 Launchpad – ADC Primer

Posted by on August 19, 2011

I know why you are here! — I’ve been there!

Trying to find useful notes on how to accomplish anything is often a daunting task, mainly due to the fact that the Internet suffers of very low SNR and applications lately have been catering to dummies only.

While there are some very interesting documents out there, you still have to go through a lot of dirt to find a few gold pebbles!

 

Let’s jump right on it.

I won’t bother you with the technical aspects of ADCs and their different implementations, I will instead jump right on what you need to know in order to get started with them. You obviously understand what ADC stands for and you generally have a good idea of what they do.

First of all, the msp430g2131 has an 8 channel ADC port, the type of ADC used is  a 10bit SAR.

 

SAR ADC:

The letters stand for Successive Approximation Register – Analog to Digital Converter, this ADC actually uses a DAC to sweep and approximate the input using a comparator, for this reason a voltage reference is required.

 

Calculating the actual input voltage from the resulting sample:

Let’s assume your voltage reference is 2.5v, this means 2500mV. Now, we have 10 bits of resolution, that means ~1024 steps are available (2^nBits).

With this information, if you were given a sample with a value of “511″, you’d know the input voltage would be around 1.25v.

Thus, we can formulate a very simple approach to obtain a meaningful value out of the given sample:

input_millivolts = ( adc_sampled_value * reference_voltage ) / ( 2^adc_bits )

If we — for some reason — wanted to perform the inverse operation, one way of doing it would be:

adc_sampled_value = ( input_millivolts / reference_voltage ) * ( 2^adc_bits )

Of course, if we have a “compressed” range, we must expand it after conversion to obtain the actual voltage at the input of the circuit. You would simply multiply the input_millivolts variable by the ratio used in your input divider.

 

Accuracy vs Resolution:

The accuracy of your conversion will be dictated by process variance, component tolerances and circuit stability, whereas the resolution is defined by the overall available range of values; that is the amount of meaningful bits.

 

Using it…

So now you understand that the input voltage must be within the reference voltage. This means that we must perform input conditioning in order to achieve meaningful results.

For example, If you wanted to measure 0 to 10 volts, then of course we’ll be compressing a bigger voltage range into a smaller one and this tells us one thing: we’ll lose resolution. Now, there are ways to enhance our results by over-sampling for example, but that’s outside the scope of this guide.

Naturally, one way to “compress” this range would be to use the modest voltage divider: two resistors. This works just fine for low complexity circuits and low sampling rates. In this particular example we would obtain about a quarter of the resolution you’d have if you were working with a 1:1 input / reference ratio.

When you dive into higher sampling rates and resolution, suddenly other factors come into play, for example the accuracy and stability of your reference voltage (you may not use an internal reference anymore!) and noise, and…! — It gets harder than the pope at the candy store.

 

Closing up…

While I mentioned a specific device (it merely pertains to TI’s LaunchPad) the same principle applies to any platform as long as there is a SAR ADC being used. There are other topics involving ADCs such as dithering, operation modes, input conditioning (not only voltage scale but also sample and hold, etc).

However for the most part, this short text should provide you with the necessary tools to obtain a raging epiphany should you be a beginner.

Cheers.

 

PS: Comprehension comes first, this is why I didn’t bother to paste any code. One must first understand the basics.

 

References:

 

Turn your UT60C into an UT60E (almost)

Posted by on August 9, 2011

The differences between them are:

  • RS232 Interface
  • True RMS

How:

Turns out you can enable the RS232 interface by shunting pin 84 to GND, you will then obtain the data through pin 64 which is TX.

Originally pin 64 would drive the base of a PNP (2n3906) which in turn would drive an IR LED, this LED provides optical isolation — Typically there would either be an external plug-in module with a photo-transistor or it would have the module built-in, with the connector exposed to the user.

My suggested modification would only require a small hole at the back of the enclosure to expose the LED, you could then interface with it rather easily.

True-RMS cannot be “unlocked” easily since this feature requires an extra IC (AD737 or similar) which obviously isn’t populated on the C version. Other components around this IC are required as well.

Notes:

I’m not sure but perhaps the quiescent current would increase if you have the RS232 mode enabled, it may be worth testing.

For a protocol specification you may refer to the FS9721 LP3 datasheet, even though it’s in Chinese you should be able to comprehend most of it. Scroll near the bottom to find the RS232 section.

Either way, if you have the UT60C and you wish you had data-logging capabilities, give this a go — You don’t have to make any permanent changes if you only intend to test it.

References:

 

Xbox 360 – Mini-USB SPI Flasher PCB

Posted by on August 4, 2011

Intro:

Here’s a XBOX 360 USB SPI Flasher with a Mini-USB connector, the board is based on this project.

I redesigned the PCB since the original had a poor layout and used quite the uncommon B type connector.

 

It was made for a friend but I’m sharing it nonetheless, you can see his results here (Don’t worry, the whole “xbox sucks” deal is an inside joke).

Files:

You can download the eagle sch and brd files from here: Xbox360 Mini-USB SPI Flasher.

Notes:

In theory the board could be made smaller, but since most people will be making these at home, I decided to use a bigger isolation gap, bigger pads, etc. To simplify the process.

For reasons of availability the smd switch was replaced by a simple pin header, thus a jumper is used instead of the switch.

 

 

Enjoy.

 

References:

  • http://www.xboxhacker.net/index.php?topic=12306.0