下面的图片和文字是一名电子学高手教大家如何轻松DIY一个漂浮在空中的小玩具。
就像在商店里卖的漂浮地球仪一样,它可以让带有磁铁的物体浮在空中,只不过这个装置结合了永磁铁和电磁铁,利用一个微控制器和一个IR感应器,当内部装有磁铁的小物体放在电磁铁的下方,IR感应器就会感应到物体的存在,微控制器就会启动电磁铁并调整磁力大小,当小物体受到向上的磁力和向下的重力相同时,它就会漂浮在空中,漂浮的位置和高度取决于重量和磁力大小。
工作原理图如下:
一、材料准备
所需材料如下:
- ATMega168 Microcontroller
- 1 16-20 MHz Crystal
- 28 Pin Socket
- Dual Full H Bridge IC
- 1 Power NPN
- 2 Electromagnets
- 1 Bicolour LED
- 2 IR LED
- 1 IR Photodiode
- 1 5V Regulator
- 2 Leveling Capacitors
- 1 SPST Switch
- 1 NO Button
- 1, 470 Ohm Resistor
- 1, 5 Ohm Resistor
- 1 Universal Breadboard
- 2 Cases
- Plexiglas
- Solder
- Hot Glue
- Steel Wire
- Vinyl Tubing
- 3 or more 1/4" diameter x 1/4" thick rare earth magnets (for the base)
- 2 or more 1/2" diameter x 1/8" thick rare earth magnets (for the objects)
所需工具:
- Soldering Iron
- Hot Glue Gun
- Desoldering Pump
- 3rd Hand
- Plexiglas cutter
3楼
二、底座的准备
使用收音机的发射盒作为底座,装戒指的盒子用来装点磁铁和感应器。首先在每个盒子的表面分别钻洞,用来穿过电线,安装电源钮、设置高度钮,安装LED指示灯。
连接两个盒子的是一根铁丝,使用胶把两个盒子分别固定在铁丝两端。
使用收音机的发射盒作为底座,装戒指的盒子用来装点磁铁和感应器。首先在每个盒子的表面分别钻洞,用来穿过电线,安装电源钮、设置高度钮,安装LED指示灯。
连接两个盒子的是一根铁丝,使用胶把两个盒子分别固定在铁丝两端。
4楼
三、安装电磁铁和感应器
将电磁铁的线圈连接电源供给线,并安装到戒指盒子中,注意确保每根电源线的安装正确,以确保线圈通电后能够产生磁力。安装完成后,在线圈中央加入永磁铁。
这个是感应器,将它粘在一块透明的有机玻璃上,然后连接电源线,同样保证每根电源线的安装正确。
将电磁铁的线圈连接电源供给线,并安装到戒指盒子中,注意确保每根电源线的安装正确,以确保线圈通电后能够产生磁力。安装完成后,在线圈中央加入永磁铁。
这个是感应器,将它粘在一块透明的有机玻璃上,然后连接电源线,同样保证每根电源线的安装正确。
5楼
四、底座各电子元件的安装组成
这部主要是进行底座上各控制元件的安装,包括微控制器、电源供给、LED指示灯等部分的安装。具备电子学专业知识的朋友可以通过下面原文了解详细信息:
For this step you probably should assemble the electronics on a solderless breadboard before soldering them together. The schematic to build the circuit is attached along with the hex file to load on the microcontroller. The Arduino - 0007 code file is in the introduction so you can tweak it or make changes as you need.
It is very important to plan where all of the parts go, so all of the electronics will fit in the box the first time, If not it could be very frustrating and cause much grief.
It is also important to note that the NPN power transistor(s) will heat up, to overcome this I mounted them to contact the aluminum base of my project box, This way it acts as a heat sink, preventing a spectacular fire. You will also need to come up with something similar to remove most of the heat from the box.
Once the electronics are built, there is a section of code in the program to uncomment and and then load onto the chip to test the orientation of the coils. It pulses the coils off, pulling up, and pushing down, also indicated by the LED. If you hold a magnet under the electromagnets and it doesn't follow the pattern, reverse the wires.
这部主要是进行底座上各控制元件的安装,包括微控制器、电源供给、LED指示灯等部分的安装。具备电子学专业知识的朋友可以通过下面原文了解详细信息:
For this step you probably should assemble the electronics on a solderless breadboard before soldering them together. The schematic to build the circuit is attached along with the hex file to load on the microcontroller. The Arduino - 0007 code file is in the introduction so you can tweak it or make changes as you need.
It is very important to plan where all of the parts go, so all of the electronics will fit in the box the first time, If not it could be very frustrating and cause much grief.
It is also important to note that the NPN power transistor(s) will heat up, to overcome this I mounted them to contact the aluminum base of my project box, This way it acts as a heat sink, preventing a spectacular fire. You will also need to come up with something similar to remove most of the heat from the box.
Once the electronics are built, there is a section of code in the program to uncomment and and then load onto the chip to test the orientation of the coils. It pulses the coils off, pulling up, and pushing down, also indicated by the LED. If you hold a magnet under the electromagnets and it doesn't follow the pattern, reverse the wires.
6楼
五、选择漂浮物体
根据可产生磁力的大小范围以及物体的重量、物体内磁铁的强度,摸索出合适的物体形状和大小,然后做出合适的漂浮物。这位DIYer使用硬纸板做出了圆柱体和红宝石两种形状,并用毛线自己编织了一个骰子,只是手工实在不敢让人恭维。最后三种物体都稳定的漂浮在了电磁铁的下方。
根据可产生磁力的大小范围以及物体的重量、物体内磁铁的强度,摸索出合适的物体形状和大小,然后做出合适的漂浮物。这位DIYer使用硬纸板做出了圆柱体和红宝石两种形状,并用毛线自己编织了一个骰子,只是手工实在不敢让人恭维。最后三种物体都稳定的漂浮在了电磁铁的下方。
7楼
六、开始漂浮
到了享受胜利果实的时候,我们根据磁力的大小范围以及物体的重量、物体内磁铁的强度判断出物体漂浮的大概位置,然后用手把物体托在理论漂浮位置的下方一点,启动电源,这时微处理器会慢慢调整磁力大小,直到物体所受电磁力和重力相等后放手,物体就会稳定的漂浮在电磁铁下方,帅!
到了享受胜利果实的时候,我们根据磁力的大小范围以及物体的重量、物体内磁铁的强度判断出物体漂浮的大概位置,然后用手把物体托在理论漂浮位置的下方一点,启动电源,这时微处理器会慢慢调整磁力大小,直到物体所受电磁力和重力相等后放手,物体就会稳定的漂浮在电磁铁下方,帅!
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |