3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

MCU-Controllable Carousel for a Camera-Mount

Step 7Calibrate your MCU readings

Calibrate your MCU readings
«
  • SerialVoltmeter.JPG
  • DSCN0570.JPG
So, cable up your potentiometer to your MCU board with some alligator clips. I connected the Left electrical terminal to the 3.3VDC source on the MCU board, grounded the right terminal, and connected the middle terminal to the Analog input's pin, Through the 1K resistor.

The resistor keeps you from releasing the magic smoke from your MCU when the potentiometer is at one of the extents of its travel.

Provide your MCU with a power source, and attach your serial cable. Open your favorite RS232 Terminal program and watch the readings come in.

What I was looking for first was the highest/lowest possible voltage reading the ADC would register.
I put those numbers in my firmware, used some fancy number-math on my voltmeter code, recompiled, reflashed, and started my terminal program back up. By the way, "_udivsi()" is tricky to track down. Apparently, LPC2000 MCU's don't like to do division. Neither do I, so we agreed to disagree.

The next set of numbers I wanted was the voltage when the carousel pointed straight forward, left, and right. I found that the carousel can turn much farther left and right than you can get meaningful numbers from. I did get good readings for about a full 180 degrees, so I could point my camera from full-left to full-right. Again, I added these numbers into my calculations in firmware. This makes the reading taken from the potentiometer into a somewhat reliable sensor reading.
« Previous StepDownload PDFView All StepsNext Step »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
15
Followers
13
Author:psymansays
Hi, I'm psymansays. I'm an engineer from California. I enjoy sunsets, and long robot test drives on the beach. More from me: http://psymansays.deviantart.com/ http://www.youtube.com/user/mobilisC...
more »