I modified the code to report a new reading every 200 samples (with there being 2 sensors, it is a total of 400 samples). It is pretty accurate and I was able to get the sensors accurate enough within about ~0.1 of a degree with adjustment. The AtMega328-PU was given the Arduino Bootloader and programmed using the Arduino IDE by popping out the old AtMega328P-PU chip in an Arduino and connecting the rx/tx and reset lines. You can use the P-PU version and it will work fine. I had to get a usbTiny to program the bootloader.
Here are pictures, code, and CAD circuit drawings. I will post component list later, but all of them came from mouser.com
Pictures:



Files:
Arduino PDE
Autocad Drawing
No comments:
Post a Comment