tinyCopter is ALIVE! (sorta)

Progress! This is exciting. After struggling with a pesky compiler issue, I managed to get an LED blinking on my tinyCopter control board. Yes, I managed to get a 32MHz microcontroller with 256K of flash and 16K of RAM to blink an LED. Good use of resources there folks.

Anyway, the issue that I have been having – and it is still there, trust me – is in the creation of a custom board definition for Xmegaduino for my specific setup. Xmegaduino comes with a couple of options for boards, but all of them use the xmega A1. I have a xmega A3. I didn’t think that there would be any issues because the devices in the A series all have the same basic peripherals, just different pin-counts. The problem, however would soon show up.

I got the board definition finished and just copied the pins_arduino header file from a Sparkfun variant just to see if my variant would compile. Cue the obscure compile error! I looked at the error and it said ‘TCF1’ undeclared. What?! The blink sketch I tried compiled just fine for the Sparkfun board, why won’t it work for mine?!  I went back and took a look at the only thing that I changed in my board defintion from the Sparkfun one. It was the MCU type, obviously. I had changed it to atxmega256a3, because that is the device that I am using. When I changed it back to atxmega128a1, which is what the Sparkfun board has, the code compiled perfectly. Then I went digging through the avrdude header files for various devices and found the one for my xmega a3. I searched ‘TCF1’ and it was RIGHT THERE! I don’t know what the issue is, so if anyone else does, please let me know.

You probably read that and though that I never got anything to work. The issue is still there,  so what I did was set the board in Xmegaduino to the Sparkfun one, found the compiled .hex file, and burned it to my chip using AVR Studio. It’s a pain in the butt, but if I can’t get the ‘TCF1’ undeclared issue sorted out, this will have to do.

The point of this post is to say that now I can work on the code for my quadcopter.

Advertisements

Updates and Tennis Ball Mortar

Now that school is out, I will have more time to work on my projects. First off, I got a new AVR programmer so now I can get to work on the quadcopter control board. I also started putting together the frame. I started over on the 74C922 emulator because I was having trouble with my previous code. The code for the power supply is slowly getting worked on, but I think I may re-do some parts of it because they aren’t as efficient as I would like. So far on that I can: use the display, set the output voltage and current with the DAC, read the drawn current and output voltage with the ADC, read the button inputs, and read the encoders. To do: Make the voltage output match the read voltage from ADC and make a simple menu system for controlling the supply.

On a completely unrelated note, my friend and I had some fun with my tennis ball mortar. Check it out below!

74C922 Emulator

So, while I am waiting on parts to build my quadcopter, I am also working on building a 7400 series drum machine. That’s right, 7400 series drum machine. I wish I had designed this, but I am _very_ slowly building this: 7400 Drum Machine. Why the sudden interest in 7400 chips? My grandpa stopped by a couple days ago with some real goodies. An entire tackle-box PACKED with mostly 7400 chips. There are also some 4000 series and several LM566 VCOs, EPROMS, and various other chips. It turns out that I now have most of the chips needed to build that drum machine.

There are a couple snags, though. Matt (the creator) used a couple (nowadays) rare chips in the design. One of them is the 74C922 16-key encoder. Yes, you can still buy these from some places, but they go for about twenty bucks a pop. Ouch.

Since I’m not entering any contests, like Matt did, I figured I might cheat a little bit. The 74C922 is a pretty simple chip; all it does is scan a 4×4 switch matrix and output BCD – binary coded decimal. It stores the last key pressed and toggles a “data available” output when a valid entry is made. This sounds like the perfect task for an AVR with some custom code.

Thus the 74C922 Emulator was born. My goal is to create an *almost* drop in replacement using an ATTiny2313. It will not be perfect, because the ‘tiny is 20 pins and the 74C922 is 18, but one should easily be able to make an adapter to plug my chip in.

There will be some people who call this “dirty” or “uncool” because I reverted to a microcontroller to replace basic logic chips. Okay, get me a 74C922 for 5 bucks – shipped. It isn’t cheating when you have to use modern technology to replace things that are no longer available.

You can take a look at the code on github as I develop it. I just started before I typed up this post, so it is not even close to being done, but it is there anyway.

qwertyboy now on github!

This is fairly big news. From now on, I will be using github for posting and maintaining my project files. I already have a repository for the tinyCopter and Digital PSU projects, and will  continue to add more. I have several projects going up there way before I do a write ups for them here, so don’t panic if you see stuff there that I have never talked about here.

Check out my github page here!