搜索
bottom↓
回复: 9

版主开源怀表的一些资料

[复制链接]

出0入0汤圆

发表于 2009-11-19 12:52:46 | 显示全部楼层 |阅读模式
最近开源怀表这个项目聚集了好几位高手,大家都这个项目的关注度也比较高
作为新手,把自己了解到的一些资料总结一下,好让像我一样的菜鸟稍微系统的了解这个开源项目

项目起源:
huayuliang 花生  转载的项目 http://www.ourdev.cn/bbs/bbs_content_all.jsp?bbs_sn=3642631  

LED Pocketwatch v1.0  
网址:http://www.eng.yale.edu/pep5/pocket_watch.html

其他参考网址:http://hackedgadgets.com/2007/08/24/pic-16f84-led-clock/     http://www.clock-it.net/led_clocks/charlie5.html

原文中主要技术部分中文翻译(以下为本人转载,版权归原作者所有)

Clock Face and Circuit
I had the idea of using LEDs to represent the position of the hands, although I've since learned that it's been implemented in larger   clocks   before  , but I've yet to find an example this small. There are 133 surface mount LEDs on the front face, all hand-soldered: 60 for seconds, 60 for minutes, 12 for hours and one for charging status. The great challenge was fitting all the 0603 LEDs and mosfets on the front dial; obviously, surface mount components were a must. The PCB is 44mm across.

我想到了用LED来显示表的指针,有人做过大尺寸的,但是没人做过小的。我用了133个表贴的LED,全是手工焊接的。60个做为秒针,60个做分针,12个做时针,还有一个用来表示充电的情况。最麻烦的就是焊这些0603的LED和三极管(mosfet?)。 PCB直径为44mm。



To reduce the pin count, each set of 60 LEDs is divided up into six banks of ten, selected by a mosfet. Long circular tracks run around the outside of the board, connecting one LED from each bank to a drive pin. Each hour pin is controlled invidually. Everything is controlled by a PIC 16F946 - an 8-bit micro with plenty of IO pins. The spiralling via pattern this produces is quite aesthetically pleasing.

为了减少使用的IO,60颗灯分为6组,用mosfet来进行组选。时针的LED是用IO单独控制的.所有的这些都是用PIC 16F946实现的。布线产生的螺旋线非常好看。(布线也是一种艺术 :) )



pcb_front (原文件名:led_pw_v1.0_pcb_front1.jpg)


pcb_back (原文件名:led_pw_v1.0_pcb_back.jpg)


pcb_loaded (原文件名:led_pw_v1_0_pcb_loaded_thumb.jpg)


The clock face itself includes hour marks and Roman numerals for reading the time, as well as pin number markers on the centre IC. The outer-most LED ring is red for seconds, the middle is blue for minutes and the inner-most is blue for hours - this is in line with the standard relative lengths of clock hands. Underneath the chip is stenciled a tiger eye (a subtle reference to my grandfather's long-time association with the Freemasons). The watch is watching you!

表盘有罗马数字读数和IC的引脚数字。最外层红色LED是秒针,中间蓝色的是分针,最里蓝色的是时针。和传统的钟表一样。


On the reverse side is room for all the power regulation, charging, programing, precision timing and IO hardware. The watch runs off a single-cell 110 mAh Lipo cell, recharged through a jack underneath the back cover. The bottom side also has pads for a Temperature Controlled Crystal Oscillator (TCXO) capable of 1 part per million timing precision, although this hasn't been tested yet. A cell-phone vibrator is attached to the inside back cover; every second the vibrator pulses, using the cover as a sounding board to produce an audible 'tick'. The vibrator also serves as an alarm buzzer.

表的背面放着电源转换模块,充电模块,编程模块,时间调整等硬件模块。这块表由一个100mAh的锂电池供电,通过背后的插孔充电。底部还有一个1ppm的温度补偿晶体振荡器的焊盘,但是还没有测试过。后盖中有一个手机的振动电机,每一秒都会被通上电,用来模拟秒针的滴答声。同时这个振动电机也做为闹钟的蜂鸣器。




face (原文件名:led_pw_v1_0_face_thumb.jpg)


inthedark (原文件名:led_pw_v1_0_inthedark_thumb.jpg)


vibrator (原文件名:led_pw_v1_0_vibrator_thumb.jpg)
         



User Interface and Programming
The watch is controlled by an encoder and two switches. The encoder (from Alps - the tiniest I have ever seen) sits in the slot milled in the PCB, and connects to the stem via a hexagonal channel sized to fit its square end, milled by hand. When the crown is depressed, the stem slides through the encoder and pushes a rotating disc against a switch. A collet and grub-screw hold the stem in place. The second switch is positioned behind the time-set button, although it has not yet been implemented.
这只表由一个编码器和两个开关控制。编码器(来自Alps-我见过的最小的)放在PCB的槽中,通过六角管道连在表柄上。当表冠按下时,表柄会触发一个开关。另一个开关在时间设置开关旁,虽然还没有实现。


The microprocessor was programmed in C using the MikroC IDE for 8-bit PIC microprocessors. Unfortunately, I only have the demo version of this software, which has a 2KB code-size limit. By far the hardest part of this project was writing my code to fit within this limitation; almost without exception, though, it made my code better, more streamlined and more elegant. I can easily say it's made me a better coder.
芯片代码用C语言编写,在MikroC中开发。我只有2KB限制版本,所以花了很多功夫去写代码满足这个要求。这使我的代码更优秀,更精简,更美观。


Most of the time, the watch will be in standby mode, with the LEDs turned off to save power. When the crown is pressed to open the case the stem switch is also depressed, bringing the watch out of standby and into display mode. The LEDs will progress each second, and when a minute or hour is incremented, a the LEDs will light through 360 degrees to advance to the next position, producing a decorative swirl. After 15 seconds of display, the LEDs will turn off and the watch will go back into standby mode.
大部分时间表工作在待机模式,为减少耗电所有的LED都会关掉。当用按下表冠去打开表盖时,连在表柄上的开关也会按下,这会让表从待机模式退出工作在显示模式下。LED在每秒会更新。当分钟或小时更新时,LED会绕一圈后更新到下一个位置,产生一个旋涡的特效。15秒后会自动进入待机模式。


To set the time, the stem is depressed and held in for 3 seconds to enter programming mode. The second hand will then stop incrementing and be set to the 12 o'clock position. Twisting the crown will cause the minute and hour hands to increment or decrement. Pressing the button for another second will exit programming mode.
时间设置:按下表柄3秒进入设置模式。此时秒针会停在12点处。转动表冠可以增加或减少时针和分针。再按一次会退出设置模式。


The pocketwatch also has an alarm function. The alarm is set by holding depressing the stem for 1.5 seconds, whereupon the LEDs will begin to blink. Setting the alarm is handled identically to setting the time. Entering alarm mode sets the alarm on; it will stay on until programming mode is entered, or until the alarm rings. When the alarm goes off, the vibrator inside will pulse in time with flashing LEDs displaying the time.

这块怀表还有闹钟的功能。按住表柄1.5秒进入闹钟设置模式,这些LED会开始闪烁。与设置时间相同。闹钟会被打开直到再次进入闹钟设置模式或是闹钟响起。当闹钟响的时候,表会振动,LED会闪烁。



   

front (原文件名:led_pocketwatch_v1_0_front_thumb.jpg)


tinyinhand (原文件名:led_pw_v1_0_tinyinhand_thumb.jpg)


inthedark (原文件名:led_pw_v1_0_inthedark_thumb.jpg)




The LEDs are very bright at night - so much so that they can be dazzling when you turn the watch on. To avoid this, an optical sensor was placed on the front dial. In display mode, the sensor reads the ambient light level and dims the lights if it's too dark, or brightens them if it's light. This way, the display is comfortably readable even in complete darkness or direct sunlight.

LED在晚上很亮,以致于会看不清时间。为避免这种情况,前面板装了一个光学传感器。在显示时,传感器先得到前环境光亮度,如果环境光太暗就减弱LED的亮度,如果环境光很强就增加LED亮度。这样无论在黑夜或是阳光下都能清楚的看见时间。

出0入0汤圆

 楼主| 发表于 2009-11-19 13:13:35 | 显示全部楼层
项目的进行情况在版主的帖子里面都有介绍
http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=3650875&bbs_id=3041
貌似我就没有必要重复了

就把这个主要技术部分中文翻译发一下吧

强烈关注这个项目中...以后在找到什么新的资料,会继续发的。

论坛里的人不全是高手,希望跟我一样的新手能一起来讨论学习一下!

出0入0汤圆

发表于 2009-11-19 13:24:58 | 显示全部楼层
呵呵!占位

出0入0汤圆

发表于 2009-11-19 17:55:22 | 显示全部楼层
表很漂亮

出0入0汤圆

发表于 2009-11-19 23:08:55 | 显示全部楼层
也很好玩,

出0入0汤圆

发表于 2009-11-25 23:19:34 | 显示全部楼层
手工焊接,有点技术

出0入0汤圆

发表于 2009-12-10 23:35:51 | 显示全部楼层
表很漂亮

出0入0汤圆

发表于 2009-12-11 20:20:58 | 显示全部楼层
不错,顶!

出0入0汤圆

发表于 2009-12-27 00:48:26 | 显示全部楼层
强烈建议大家搞点好玩的,有创意的东东玩玩!!
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-3 11:36

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表