Tweets about ‘Electronics’

 

Posts in the ‘Electronics’ Category

Making music with Android

March 11th, 2012

A quick post about my two favorite music apps for Android. I’m using Gingerbread on a Samsung Galaxy S2.

I’m an old guitar player and I can’t stand it when a guitar is out. I found an app called GStrings in the market that works really good.

Next, how about some multitrack recording? Four Tracks Lite does this easily. Heres a shot of it in action.

Recordings are 11025hz, and you can mix down to wav or ogg formats to export it. That way I can take it to the studio and have the tracks right there to refresh my memory.

You need headphones to record and listen at the same time, but for a quick recording of a riff or song idea, you can just use the phones mic. I use this all the time to keep stuff I would otherwise forget about 2 minutes later.

Well that’s it. No big deal eh? A music studio on my phone. Welcome to the future!

Android, Electronics, Music, Phones, Recording No comments

Downloading and installing the Android SDK on Linux

November 13th, 2011

First I downloaded the SDK here, then downloaded Eclipse Classic here. Threw them both in a folder on the desktop and extracted them. Opened a terminal, navigate to ~/Desktop/android sdk/android-sdk-linux/tools and type

./android

This starts the SDK Manager. You can install the updates and packages from here. It had the Android 4.0 ICS packages highlighted, so I just clicked on install 5 packages in the bottom right hand corner and let them download.

A dialog popped up saying a package that depends on ADB has been updated, and to restart ADB. Click yes and it started the ADB Server.

Next cd’ed back to the eclipse folder, and typed

./eclipse

and followed the instructions here. Here is a repost of that page.

Downloading the ADT Plugin

Use the Update Manager feature of your Eclipse installation to install the latest revision of ADT on your development computer.<>

Assuming that you have a compatible version of the Eclipse IDE installed, as described in Preparing for Installation, above, follow these steps to download the ADT plugin and install it in your Eclipse environment.

  1. Start Eclipse, then select Help > Install New Software….
  2. Click Add, in the top-right corner.
  3. In the Add Repository dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:
    https://dl-ssl.google.com/android/eclipse/
  4. Click OKNote: If you have trouble acquiring the plugin, try using “http” in the Location URL, instead of “https” (https is preferred for security reasons).
  5. In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
  6. In the next window, you’ll see a list of the tools to be downloaded. Click Next.
  7. Read and accept the license agreements, then click Finish.Note: If you get a security warning saying that the authenticity or validity of the software can’t be established, click OK.
  8. When the installation completes, restart Eclipse.

Configuring the ADT Plugin

After you’ve successfully downloaded the ADT as described above, the next step is to modify your ADT preferences in Eclipse to point to the Android SDK directory:

    1. Select Window > Preferences… to open the Preferences panel (Mac OS X: Eclipse > Preferences).
    2. Select Android from the left panel.

You may see a dialog asking whether you want to send usage statistics to Google. If so, make your choice and click Proceed. You cannot continue with this procedure until you click Proceed.

  1. For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory.
  2. Click Apply, then OK.

Done! If you haven’t encountered any problems, then the installation is complete. If you’re installing the Android SDK for the first time, return to Installing the SDK to complete your setup.

I went with the defaults, accepted all the agreements, didn’t send usage statistics to google, and just installed the 4.0 branch, not the 2.1 stuff. Maybe I’ll add that later, 97% of phones sounds like a good choice.

Next I started following the instructions here. It looks like it downloads them again from within Eclipse, and I might have been able to skip the first SDK manager download. Should have read the instructions. Here is another repost of their page.

Install a Platform

To run the Hello World application, you need to install at least one Android platform in your SDK environment. If you have not already performed this step, you need to do it now.

To install a platform in Eclipse:

  1. In the Android SDK and AVD Manager, choose Available Packages in the left panel.
  2. In the right panel, expand the Android Repository list to display the components available for installation.
  3. Select at least one platform to install, and click Install Selected. If you aren’t sure which platform to install, use the latest version.

Create an AVD

To learn more about how to use AVDs and the options available to you, see Managing Virtual Devices.

In this tutorial, you will run your application in the Android Emulator. Before you can launch the emulator, you must create an Android Virtual Device (AVD). An AVD defines the system image and device settings used by the emulator.

To create an AVD:

  1. In Eclipse, select Window > Android SDK and AVD Manager.
  2. Select Virtual Devices in the left panel.
  3. Click New….The Create New AVD dialog appears.
  4. Type the name of the AVD, such as “my_avd”.
  5. Choose a target.The target is the platform (that is, the version of the Android SDK, such as 2.3.3) you want to run on the emulator. For this tutorial, choose the latest platform that you have installed and ignore the rest of the fields.
  6. Click Create AVD.

Opened the SDK manager from within Eclipse ( Window > Preferences > Android SDK manager) and checked Android 4.0 (API 14) and clicked Install 4 packages in the lower right hand corner. Created the AVD. Selected my AVD and started it. A working Android emulator! Excellent! Next I followed the rest of the page here. It takes for freaking ever to load. Started looking for a fix. See ya later, I’m off to make some apps! Cheers.

 

Android, Computers, Electronics, Phones, Ubuntu No comments

Samsung Galaxy S2 take 2

November 5th, 2011

My new Samsung Galaxy S2 was working great, set up just like I like, and had a bunch of my un-backed up information on it.

Then it went through the washer, full cycle.

After learning how to take it apart, I started the process of drying it out. I knew enough to not turn it on at all, but I knew that it had been on when it had went into the wash. If the same thing has happened to you, take this advice that I read on a thousand forums. Wait, wait, forget about it and just wait. Put the phone in some dry, uncooked rice, in an uncovered bowl, and f#(king wait!

I waited for four days before even trying it. It seemed like forever. It turned on, but wouldn’t charge the battery. So I thought the battery had died when it hit the water. Good enough guess. Ordered a new battery and waited for a few more days. The battery arrived, and I plugged it in. Same deal, wouldn’t charge. Something got fried in the charging circuit. Game over. I will give a try at getting it repaired, but for now, I need a new phone.

So I went and got a new one. Yup, the exact same one. Even though the new Galaxy Nexus is coming out this month, it has a 5MP camera and that is not going to cut it. The 8MP camera on the Galaxy S2 rocks! I take better pictures on it than on my real camera. The Galaxy Nexus will apparently get Android 4.0 (Ice Cream Sandwich). That sounds great, but in a few months, that will not matter, So will the Galaxy S2. The Galaxy S2 is a good phone. Battery life is good, and it doesn’t run hot for what I do.

Hmm, so I start looking into this Android 4.0, and there is some differences, but nothing really game changing for what I do. I take pictures, play music, browse social media, surf and text. When it comes out, I’ll upgrade to it, sure. But does it matter, right now? If the things that I like the most are the theme and the live wallpaper, then I think it’s good to load those up right now. WidgetLocker is a replacement lockscreen, and after configuring it, it’s looking great and working better than the original.It cost a few bucks in the Android Market. Not essential, but I like it.

Second, I needed a theme. ICS Launcher from Syndicate Apps is a great, free launcher. There is a lot of settings, but now that it’s set up, I’m quite happy with it.

So the phone still runs Gingerbread, but now it’s looking really nice. Last I added the Live Wallpaper shown in these two screeners, ICS Ice Cream Sandwich Live from Eight-Soft. It was a buck or so. I could probably find some icon packs to replace this and that, and replace some of the apps to emulate ICS functionality, but I can wait for that. For now, I am just going to try and keep this phone out of the wash.

Android, Electronics, Phones 2 comments

Samsung Galaxy S2

July 28th, 2011

Finally picked up the Samsung Galaxy S2 that I had been waiting for. Dual 1.2Ghz processors, 4.3″ AMOLED display @ 800×480 and 16GB internal memory. Running Android 2.3.3 Gingerbread.

Buying this, I knew I wanted an Android phone. I wanted to get a new one a few months ago, but all that was out on Sasktel was the HTC Incredible S. Then I read about all the dual-core phones coming out this year. So I waited and I am glad, this is an amazing phone.

Also I bought a screen protector and case for it. I’m still trying to figure out how to carry it around, it’s a bit big for a pocket. Applying the screen protector was kind of scary, but worked great, just followed the directions.

And how cool is that AC adapter. That’s the way to do things right there. After tweaking things for most of the day, I’ve found it easy to configure and use, and will be able to keep in touch with everyone better than with my old phone. Back on the phone nerd after a couple of year hiatus.

 

Computers, Electronics, Phones, Reviews No comments

DIY Midi over Cat5e

February 26th, 2011

Last night I did some testing and got the Roland-MC303 working as a sound module. As a sequencer, it is less than average, but as a sound module, it is great.

So after getting the piano set up upstairs, there was one big problem. The studio is on the opposite side of the house, in the basement, a good 70 feet away. I realized I could run a midi cable there, and then run a 1/4 inch instrument cable back to bring the piano’s sweet sounds into the studio. The maximum ‘recommended’ distance of a midi cable is 50 feet, but after some searching, I saw that Cat5e cable can be run a bit further. If you are looking to buy premade midi extenders, there is many people out there selling.

>> Keep Reading >>

Computers, Electronics, Music, Recording 2 comments

Hammond R-125 Rhythm II Organ

August 31st, 2010

We found a nice looking 1970′s R-125 (Mediterranean) Hammond Organ for the house looking through Kijiji. It was up for 30 bucks but the lady was nice and said we could have it for free! The only problems were getting it home, repairing a key that was broken, and fixing a short in the bass pedals.

>> Keep Reading >>

Electronics, Music 1 comment

Drums are here!

August 16th, 2010

Picked up the Roland TD-9 Drums today and got to play a bit after Anna and Mommy. It is a TD-9k kit (mesh snare, rubber toms) which was a great decision (mesh toms were a thousand more dollars = really, buy the TD-9 brain, and upgrade the toms after. People on the V-Drums forums say this, and they are right.)

Other than that, a DW 5000 Accelerator (DW5000ad3) Single Bass drum pedal which is the most amazing pedal I have ever played, and two pairs of nice sticks. Vic firth 7a’s (for Anna) and 5a’s (for me). She loves drumming with the sticks and her meter is great (even on the Nar). Drum Drum Drum! now if Dad can catch up!

Drums, Electronics, Music No comments

My new Crackberry

March 6th, 2009

crackberry2 I think I have been really patient. I’ve stayed away from surfing on my Sony w810, and used my Dell Laptop’s Telus evdo modem to get my fix while we’ve been on the road. But after I drove over the w810 (actually it dropped out of my pocket while I was pulled over on the side of the road having a pee, then I probably peed on it, and then I drove over it… oops) the screen has been dying little by little.

I was tagged for an upgrade to a Blackberry, and we went in to check them out. It turned out for 99 bucks, I could get a Blackberry Bold 9000, so I said yes plz.

Being able to surf and look at stuff, receive emails, and update web pages from anywhere rules! In the places I hang out, if you pull a net laptop out, it’s a conversation starter, but now, I’m just another loser addicted to playing with his phone in public. Hah!

Electronics 2 comments

Power Amplifiers

January 28th, 2007

Power amplifiers are typically used in the final output stages of circuits. In communications, they can be hooked up to an antenna or a transmitter, and in audio, to provide signal power to a speaker system. As the name implies, they dissipate large amounts of power, so heat sinks or cooling fans are important. They are physically larger than small signal transistors, and may have cooling fins built in. Power amplifiers deliver power to the load. Therefore the power gain (Ap) is the ratio of the power to the load (Pl), to the input power (Pin).


Ap = Pl/Pin

where:
Pl is the load power, calculated by


Pl = Vl^2/Rl

and Pin is the input power, calculated by

Pin = Vin^2/Rin

Rin being the input resistance.

This is usually expressed in RMS, which is .707 times the peak voltage. If you measure AC voltage with an RMS voltmeter, this is the way to calculate load power. More often you are looking at the AC output voltage with an oscilloscope. In this case use

Pl = Vpp^2/8Rl

When the voltage gain is known, another equation that can be used is

Ap = Av^2(Rin/Rl)

Assume a common collector amplifier has an input resistance of 10k ohms, and a load resistance of 100 ohms. Voltage gain is approximately one for common-collector, so the power gain is

Ap = 1(10k/100)
Ap = 100

The AC and DC load line

AC load lineDuring the positive half cycle of ac source voltage, the collector voltage swings from the Q-point towards saturation. During the negative half cycle, the collector voltage swings from the Q-point towards cutoff.

Maximum output voltage can be achieved when the Q-point is at the center of the AC load line. This differs from the DC load line in amplifiers (common emitter for example) because the DC and AC collector resistances are not equal. The DC collector resistance is simply the collector resistance, where the AC collector resistance is the collector resistor in parallel with the load resistance.

In the image of the AC load line for a CE amplifier, point a is the AC saturation point, and is calculated by

Icq + (Vceq/Rc)

and point b is the AC cutoff, calculated by

Vceq + IcqRc

DC quiescient power

Pdq = (Icq)(Vceq)

This is saying the power dissipation of a transistor with no signal input will just be the product of q-point Ic and Vce. Class A power amplifiers must maintain a quiescient current that is at least as large as the peak current requirement for the load current. The output power is

Pout = Vl(rms)Il(rms)

This formula can be used to determine the output power maximum.

Pout(max) = .5(Vceq)(Icq)

The Efficiency of an amplifier is the ratio of the signal power to the load, to the power supllied from the DC source.

%Eff(max) = (Pout/Pdc)100

Classifications of Power Amplifiers

There are a few classifications of power amplifiers, and they are based on the percentage of the input cycle that the amplifier operated in the linear region. In the previous examples, reaching cutoff or saturation was undesirable and resulted in clipping and distortion.

Amplifiers operating solely in the linear region are known as Class A amplifiers. They are usually mid-point biased to maximize the available gain. Any distortion or clipping is undesired. They are usually constructed in a common-emitter or common-source configuration. The amplifier conducts for the full 360 degrees of the input cycle, always in the linear region, and the output wave is 180 degrees out of phase with the input. Class A efficiency is usually around 25%.

Class B amplifiers have the q-point at cutoff. For this reason, they operate for 180 degrees of the input signal, and since Icq = 0 and Vce = Vce(cutoff), the transistor is not conducting until an AC signal is applied. Two transistors are usually used in class B amplifiers to create a push-pull configuration. Each transistor conducts for 180 degrees of the input signal, and the full signal is sent to the load. Class B amplifiers have a 79% maximum efficiency.

Bipolar junction transistors have the .7 (silicon) or .3 (germanium) volt drops that must be overcome, or the signal becomes distorted as it flips between the two transistors. This is known as crossover distortion. Diode biasing can be used to overcome it. The diodes compensate for the base-emitter voltage drops and produce a undistorted signal.

Class AB is a modified form of Class B push-pull operation when biasing resistors are used to put the push-pull stages into slight conduction, even when there is no input signal applied.

Basic Class C amplifiers are biased so they conduct for even less than 180 degrees of the input cycle. More power can be obtained, but the output is very distorted, and so Class C is used more often in RF applications. They are biased way below cutoff, and therefore much less heat is generated from this momentary conduction. A negative voltage is applied from the base, and the transistor conducts only when Vin exceeds this negative voltage and the voltage from the base to the emitter.

Power dissipation is very low for a class C, and can be found through

Pd(avg) = (time on/T)(Vce(sat)Ic(sat))

Remembering that the voltage drop across a transistor is around .2 volts, this will usually be a pretty small amount.

In tuned operation, a tank circuit containing an inductor and a capacitor set for resonance is used. This tank circuit would normally start out at a full wave form, and then slowly discharge with one pulse from the input. These circuits are tuned so each pulse from the input keeps the oscillation of the tank circuit going. Efficiency for Class C operation can approach 100%!

Electronics, Math No comments

FET Amplifiers

January 18th, 2007

Field Effect Transistors (FETs) can be used as amplifiers, much like the Bipolar Junction Transistors (BJTs) studied earlier. The difference is instead of being current controlled, they are voltage controlled. FET’s are just a current source that are controlled by Vgs. The different configurations of FET amplifiers even have similar characteristics to their BJT counterparts. Before looking at the different configurations, lets look at what makes a good FET amplifier, and the formulas used.

The transconductance curve for a FET is a comparison of values of voltage from gate to source (Vgs) to values of drain current (Id). When Vgs is closest to Vgs(off), which means the transistor is no longer conducting, then Id is at a minimum. When Vgs = 0, then Id is at it’s maximum, Idss. Idss is the drain current with the source shorted, which under normal conditions, is the highest amount the transistor will let flow.

Vgs(off) you get Id at a minimum
Vgs = 0 you get Idss (Id maximum)

The different types of JFET’s and MOSFET’s are detailed in my other posts so I won’t go into it too much here. Until further mentioned, I am going to assume a mid-point biased JFET transistor. This gives a bit of distortion due to the transconductance curve, but is acceptable for some applications. When less distortion is needed, D-Mosfets, which operate in either depletion or enhancement mode, the area around Idss can be a fairly linear and therefore a good spot to bias for amplification. For now, I’ll just stick to JFET’s.

The main advantage to FET amplifiers is their high input resistance. Since the gate to source junction is reverse biased, it has as much input resistance as a reverse biased diode.

Gain is still and can always be defined as the ratio of Vout/Vin. In the case of a FET amplifier, it can also be defined as

Av = Vds/Vgs

Gain can also be determined using transconductance (gm) measured in Siemens (S) times the value of the drain resistor (Rd). Remember that in the case of a loaded amplifier, the drain resistor is parallelled with the load resistance (Rd = RD || RL).

Av = gmRd

gm0 is a value given on datasheets, and represents the value of gm measured at Vgs = 0. From this, you can calculate values of gm for different values of Vgs.

gm = gm0 (1-(Vgs/Vgsoff))

There are three main configurations. Common-Source, Common-Drain, and Common-Gate.

In FET Common-Source amplifiers, the DC and AC share a common point at the source of the transistor, and share a lot of the characteristics of the Common-Emitter BJT. The signal at the output has a 180 degree phase shift from the input, and some voltage gain.

In FET Common- Drain amplifiers, the DC and AC share a common point at the drain, and can be compared to BJT Common-Collector amps. Vout is in phase with Vin, and the voltage gain is ~1. They are current amplifiers, and are also referred to as source-followers.

In FET Common-Gate amps, the gate is the common point for DC and AC, and can be compared to Common-Base BJT’s. They have a low input resistance. Common-Gates are mostly used for high frequency circuits, often as the first stage, and sometimes connected directly to an antenna.

Electronics 1 comment