Search This Blog

Powered by Blogger.

Translate

Home » , , , , , » [TC] Building an analog meter clock with Atmel and Adafruit

[TC] Building an analog meter clock with Atmel and Adafruit


“We wanted to design a microcontroller board that was small enough to fit into any project – and low cost enough to use without hesitation,” Adafruit’s Limor Fried (aka LadyAda) explained. “[It is] perfect for when you don’t want to give up your expensive dev-board and you aren’t willing to take apart the project you worked so hard to design.”
Although the Trinket launched in September, the ATtiny85-powered Trinket has already tipped up in a number of projects including a sound-reactive color LED organ, IR control device, Tap Tempo and a temperature/humidity sensor. Today, we’ll be talking about building a Trinket-powered analog meter clock. As Adafruit’s Mike Barela notes, the Trinket is a perfect fit for clock projects, as the platform is small and easy to hide behind a larger display.
“Clocks don’t need a lot of logic, this example only has maybe 20 lines of code, [while] adding a digital display via I2C is possible using seven segment or character-based displays (with the library code posted for other projects),” Barela wrote in a detailed tutorial on the subject. ”This [specific] project interfaces Trinket to the the Adafruit DS1307 real-time clock (RTC) breakout board to form a clock. But in a twist, the display is done using two analog meters. One for hours, one for minutes.”
According to Barela, the Trinket is capable of outputting to a meter without digital to analog converters.
“Trinket has pulse width modulation (PWM) on three of its pins. The meter uses a moving coil inductance movement, acting to average the indication of current flowing through it,” he continued.
“If you have narrow pulses, the average voltage it sees is lower, thus the current is lower for the fixed resistance attached to it. For wide pulses, the meter sees nearly the supply voltage and will stay around the full scale. This circuit varies the pulse width sent to the meters proportional to the hour of the day and the minutes after the hour.”
For two meters, says Barela, two of the three PWM pins on Trinket will be used (the third is also an I2C pin connected to the clock module). Although there are many ways to display the finished product, Adafruit decided to go with the meters “free-floating” in a colorful box, rather than a cabinet or plexiglass display.
To kick off the project, Barela recommends Makers first unpack their Trinket. Those using a breadboard or Perma-Proto board will want to solder on the (provided) header pins. After unpacking the DS1307 kit and building the circuit, Makers are instructed to modify the Arduino IDE to work with Trinket by adding the hardware definition file, the avrdude.conf file – while changing the ld.exe program from the 2008 dated version to the 2009 dated version and installing the driver for USBtinyISP appropriate to your operating system.
“To prepare the Trinket for other programs, you will want to first load the Trinket Blink sketch into the Arduino software then load it onto the Trinket to verify everything works well. You must press the hardware reset button on the Trinket then quickly press upload in the Arduino software to upload a sketch,” Barela added. “If you get an error, try the reset-upload process again. If you continually cannot load the blink sketch, check to make sure the Trinket is connected (without any wires connected to pins #3 and #4) and the Arduino IDE software has all the required changes.”'


Source: http://atmelcorporation.wordpress.com/2013/10/18/building-an-analog-meter-clock-with-atmel-and-adafruit/
Share this on your favourite network

0 comments:

Post a Comment

Page Rank

google pagerank

Write For Us

Submit a Guest Post

Find us on Facebook

Categories

555 Timer IC 7 segment Display 8051 Project AC Circuits Adafruit Alarms Amplifier Circuits Analog Circuits android Arduino arm processor Assembly Languange Atmel Atom Size Audio Circuits augmented reality Automotive Circuits avr Battery Circuits Bicycle Gurad bluetooth Cable TV Circuits Cambridge University Camera Technology Circuit Boards Clipping And Clamping Circuits Clocking And Timer Circuits Computing contact lens Contact Us Form Contests Controller Circuit Conversion Circuits Counter Circuits Digital Electronics diy circuits Downloads EFY EFYTimes Electronic Books Electronic Components Electronic Locks And Keys Engineering Fan Circuits Filter Circuits Fire Alarm free Frequency Fun And Game Circuits future Google Hack n Mod Ham Radio Circuits heart rate monitoring High Voltage Circuits Home Circuits IC Guide ieee Industrial Circuits Infrared Instructables Inventions ipad lcd Led Circuits Light Related Lighting Circuits Medical Circuits Meter Clocks Microcontrollers Microprocessors Mini Projects modules Movie maker NatGeo Navigation Notice Optical Fiber PC Circuits PCB Boards Physics pnp transistor Power Supplies Printing Projects Programmer Project Ideas Projectors Protection circuits Proximity Detectors Radar Radio Circuits Radio Transmitters Raspberry Raspberry Pie Remote Circuits Retis Lab RFID Robot Cars Robotics Science Science Alert Security And Safety Sensor Circuits Servo Motors Smallest Smartwatches sms Software solar cell sound application Spectram Switch Technology News Telephone Related Television Related Test And Measurement Circuits Thermal Projects Tone generator circuits Touch Screen Tutorials Wearables Wi-Fi Wireless
Like us on Facebook
Follow us on Twitter
Recommend us on Google Plus
Subscribe me on RSS