20 Band Audio Spectrum Analyzer
October 5th, 2011

7400 Logic Competition

Youritronics is a proud sponsor of the 7400 Logic Competition. We are giving away:

If you have a project based on 74XX logic circuits you should register for the competition. There’s about 3 weeks left before judging begins on October 21, still plenty of time for new entries and there are allot of prizes available.

tinyIMU v2 inertial measurement unit

tinyIMU V2 is a sensor unit useful for building quadrocopters or other platforms where you need to know the orientation of the given platform. It uses the MMA7455 3-axis accelerometer from Freescale with 10 bit output and the ITG3200 3-axis gyroscope from Invensense with 16 bit output. The PCB was designed to be as small as possible to save weight and space (both important parameters when flying). There is only a 4 pin header present on the PCB for power and I2C lines. The schematics and PCB was designed in Eagle and I’m releasing it under CC BY-NC-SA 3.0 (download link bellow).

This sensor unit has already been used successfully with AeroQuad software and its just a matter of having the right drivers for the sensors to use it with other platforms as well.

here is a video with tinyIMU connected to AeroQuad:
You need to a flashplayer enabled browser to view this YouTube video

tinyIMU V2 schematics + PCB

September 14th, 2011

74HC4051 Analog Multiplexer

74hc4051 mux

This was actually the first time I ever needed to multiplex analog channels so it was a good opportunity to learn how to use them. My task was to measure the temperature of 32 thermistors (NTC) with a microcontroller and later process that data. Obviously you cant find that much analog input channels on your common microcontroller so you need to multiplex the signals. First I looked for large analog multiplexers with 16 input channels but those are way too expensive. As it turns out its cheaper to use more smaller 8ch multiplexers(example Digikey pricing: 2pcs 16:1 mux from TI is $7.84 while 3pcs of 8:1 mux from TI is $1.53). I was able to get the 74HC4051 at a good price so I started creating the design around it.

With just four 74HC4051 I can multiplex 32 input channels to 4 outputs. The 74HC4051 has 3 select lines A,B,C and one enable line E. These 4 lines are used for control and they can be tied together like I did for controlling all 4 chips with the same 4 lines. By a combination of state (high/low) for A,B and C you can control which input gets connected to the output. In the schematic you will also find a table with the address select concerning the 3 pins A,B and C. The enable pin is used to disconnect all internal switches (when high) or allow connection (when low) by selecting the appropriate address. Each 74HC4051 got its own 0.1uF decoupling cap close to its supply pins and if you’re design is very sensitive to noise you can further optimize the layout and place more filtering on the supply lines.

To get a more stable reading at the output of the thermistor(actually at the output of the multiplexer) I also placed a low pass filter which later on after assembling and testing turned out to be unnecessary even creating problems because I was switching the lines faster than it took the filter to settle so I left the filter components out during assembly.

The PCB was manufactured at home hence the big vias and it was designed to allow a second board with the microcontroller to be stacked on top of it. Everything was tested on an Arduino and it works perfectly. The schematics and board file are released under CC-BY-SA and can be downloaded from the link bellow.

mux 74hc4051

Downloads:

Eagle schematic and board file.

July 18th, 2011

Bus Pirate case

bus_pirate_case

I was looking around for a small case to put by Bus Pirate in and I found these Microchip sample bins in which the Bus Pirate fits just nice. No need to make any openings cause I’ll only be using it for storage probably. Checkout the pics below.

ATAVRSBIN1 and Bus Pirate

So in my last post I was telling you how I managed to mess up the ATAVRSBIN1 I got from Atmel during a crash with the quad. After the crash I noticed it didn’t respond any more so I hooked it to my Bus-Pirate and the result of a search on the bus was not pretty, no device found:

I2C>(1)
Searching I2C address space. Found devices at:
Warning: *Short or no pull-up

But I figured maybe one or two of the chips (ITG3200, AK8975 and BMA150)survived and the other one who got damaged is keeping the bus low, or shorted or whatever. So I decided to de-solder the chips one by one to find if any still works. I started with the ITG3200 gyro, removed it and the same error, no device found, next I continued with the BMA150 accelerometer and success!:

I2C>(1)
Searching I2C address space. Found devices at:
0×18(0x0C W) 0×19(0x0C R)

When there was only the AK8975 magnetometer left it replied. I also tried soldering back the ITG3200 but it didn’t work. So I was only left with the AK8975 but that’s useful for comparing with the other magnetometer that I’m working with the LSM303DLHC from STmicro. I guess you could call this whole incident a stress test and I’ve determined that out of the 3 chips only the AK8975 survived in conditions above its maximum ratings :) .

Now for reading something out of the sensors I tried reading the WIA register which holds a fixed value(0×48 as mentioned in the datasheet) set during manufacturing. The WIA register is at 0×00 address so start by writing the address of the register then perform 1 read:

I2C>[0x18 0x00]
I2C START BIT
WRITE: 0×18 ACK
WRITE: 0×00 ACK
I2C STOP BIT

next perform 1 read:

I2C>[0x19 r]
I2C START BIT
WRITE: 0×19 ACK
READ: 0×48
NACK
I2C STOP BIT

And the returned value 0×48 matches the one from the datasheet. I’ve gotta say the BP helped allot during this debug session and it would’ve been much harder without it.



© 2007-2011 YourITronics | Any logo, trademark and project represented here are property of their respective owners | Wordpress | Privacy Policy    RSS