Quickie Post

This isn’t going to be a full post, but I wanted to mention that my PCBs for my power supply came. I’ve got the OLED display working, and will get the other peripherals working shortly. There will be a full post in a couple day’s time.

The front and back of the power supply PCBs.

Advertisements

Power Supply Revision C

Sorry for not posting in a long while, but I’ve been busy with school. First, the quadcopter is still not finished, but my goal is to have it finished before next year.

Now onto the main topic of this post. As you probably know, I have a power supply project that I’ve been working on for quite some time. When I started my quadcopter project, it got pushed to the backburner, but I still kept slowly tweaking it. It’s back now, though, and better than ever.

While working on my quadcopter, I started using the Xmega series from Atmel. I really like these now, and their power and amount of I/O available make them great candidates for many projects. For Halloween, I built a 10-channel light controller that can be chained together with other control boards to greatly expand the number of channels. I didn’t finish it in time, but now I might be able to use it for Christmas (light shows anyone?). Since I wanted a large number of PWM channels per board without using something like a TLC5940, I used an Xmega A4.

One of the problems with the old power supply design was the display size and update rate. Adafruit stocks some OLED display modules, both in monochrome and color. OLED displays are known for their amazing contrast and sharpness, due to the fact that the pixel itself is light-emitting. A traditional LCD relies on either a backlight or reflected light to provide contrast. The LCD I was using previously communicated over I2C, which is a slower interface than SPI. It could have been the library I was using to control it, but I was not happy with the update rate I got with it. The OLED display that I got from Adafruit uses SPI, allowing me to push more data to it, faster. The physical size is smaller that my previous display, but since this is a graphical display, I can make the text as big (or as small) as I want.

While probably a bit overkill for the task, I also chose to use an Xmega A4 for my power supply. One of the Xmega’s advantages, besides the clock running at 32MHz at 3.3V, is the multiple SPI ports. Now I can update the DAC / read the ADC or update the display at the same time. This will hopefully give me a huge performance boost in update speed. Using the Xmega also gives me more pins to use, so I don’t need to use an I/O expander like before.

The rest of the design is pretty much the same as before, but with a couple improvements. Instead of using buttons, my rotary encoders are going to be the kind with one built in. This will help me create a more intuitive menu system than I could have in the past. Also, the tolerance of the critical resistors has been increased to 0.1%, which is more possible and cheaper now that I’ve switched to SMD parts. Hand assembly would take longer this way, but I can also just put down solder paste and stick the whole thing on my reflow skillet.

The boards and parts have been ordered, so here is a rendering done with eagleUp and Google SketchUp and a screenshot from Eagle.

Board layout and schematic. Available on GitHub

Render done using eagleUp and Google SketchUp

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!

Digital PSU Update

If you are subscribed to me on YouTube (if you aren’t, why not?), you know that a little while ago I started work on a power supply project. It is based off of the one that Dave Jones of the EEVBlog is building. Mine is slightly different, but has the same major components.

After I wore out(!) the first set of rotary encoder with my constant testing of the firmware, the new encoders didn’t work anymore. I tried everything with my code. I tried countless examples on how to get rotary encoders working on an Arduino. I tried changing the interrupt type, the interrupt routine, and the constants that define my pin setup.

The project sat on my desk for a while, getting nowhere. Suddenly, I had the idea to look at the datasheet again for the encoders I was using (EN16-V22AF15 ‘s) to see if I had missed something while wiring them. Lo-and-behold, there was my problem! When I wired the new encoders, I had (wrongly) assumed that all encoders had a standard pinout, and wired them the same as the old ones. Once I switched things around, they started working!

Now I can get the code finished, so the rest of you can build your own as well!