AutoStrummer

13,979

80

16.

简介:AutoStrmmer.

{这笔指示是在履行南佛罗里达大学(www.makecourse.com)的MakeCourse的项目要求时创建的。}

可以放在AutoStrummer /进洞里of an acoustic guitar, and will strum the string set selected by 6 tactile buttons. A potentiometer allows for tempo control, and a menu system provides the user with a few rhythm choices for the strumming.

While time constraints did lead to some poor design choices (seeKnown Issuesbelow), the end result worked! However, I had to modify my guitar string heights slightly by placing spacers at the bridge, so it may not work on every guitar right off the bat. Also, it's sized formy吉他,所以它可能或可能不适合那里的每个声学吉他,我不确定。我的吉他洞是3.875“直径。

Supplies:

工具:

  • Screwdriver
  • 3D打印机
  • FDPD Upload chip to upload data to microcontroller
  • 12-30V Power supply, 300 mA min.
  • Acoustic Guitar (pretty much required)

Parts:

  • 1x - Arduino Pro Mini, Nano, or other small sized micro-controller
  • 1x - 电压调节器,线性 -LM2940T-9.0
  • 6x - Tactile Buttons, With internal LED -- TL1240GQ1JCLR
  • 1x - 28byJ-48步进电机(5V优先,12V似乎具有较低的顶峰)
  • 1x - 电位计
  • 1x - microSwitch.
  • 1x - 步进电机驱动器芯片 - DRV8825或可比性
  • 1x -PCB Prototype Board, 3cm x 7cm
  • 1x - 2.1X5.5MM Power Jack --EJ501A
  • 6x - 470 Ohm Resistors
  • 1x - 22 µF Capacitor
  • 1x - 100 µF Capacitor
  • 1x - 100包4-40菲利普斯螺丝,1/4“(不使用所有100)
  • 1x - 100包4-40菲利普斯螺钉,1/2“(不使用全部100)
  • 12x - 4-40垫圈或坚果
  • 2x - Spring
  • 22规格绝缘电线,固体和滞留
  • Various pin connectors as needed
  • Cheap Guitar Pick (or you can use my STL file to print one)
  • Foam or Cotton Balls

Additional Notes:

来自家庭仓库弹簧套件的春天我使用的是1“x 1/4”。由于压缩它所需的力,我不会推荐这一点。如果您可以找到较弱的春季平等大小(甚至是较小的直径),它真的会使这吉他放在吉他上的痛苦。

我使用的电位计和微动开关从旧硬件中清除,因此难以解决它们的确切匹配。MicroSwitch Base可以定制打印,以满足您使用的任何尺寸。对于电位器,如果需要,可以使用间隔物来使其提升到适当的高度。如果找不到适合的,可以完全遗漏,电路修改,使得适当的引脚始终看到5V(因此它将在禁食时间播放)。请参阅下面的电路部分。

第1步:打印

The first step is to print each part out! While there are some identical components, I have included every part with a unique file. So just print every file provided.

All of the STL files can be found in the .zip file. Instructables won't let me upload a zip file for some reason, so just delete the '.txt' and it will work as a normal zip file.

Step 2: Assemble LH and RH Bases

Here we will assemble the part that latches into the hole of the guitar. Each side is identical, so you'll just do this step twice!

首先,用1/4“4-40螺钉和螺母将每个孔夹拧到滑块。你想要看看吉他洞的内部结构,并相应地放置脚,所以它们会适合(每只脚有一个偏移法兰)。如果您无法使用1/4“螺钉启动螺母,可以首先使用1/2”螺钉,然后一旦螺母座椅进入塑料,就可以切换螺钉。

For the last step, place the slide into the base, and pop the screw into position so that it sits in the circular grooves on each part. The spring I used (see photo) was a bit too strong, which made it hard to install on the guitar. Try to use a decently strong spring, but weak enough where it can still slide under reasonable force.

第3步:将LH和RH基于LH和RH中间部分

Here we will simply screw the bases onto the mid-sections with 1/4" screws. Easy and quick! Each side should still be separate.

这张照片从后来的我的建造 - 所以不要担心泡沫,我们稍后会加。

Step 4: Assemble the Pick Box

要组装镐盒,您将首先需要剪吉他挑选以适应盒子内。您可以使用3D打印的拾取本身,或者更好地用作剪裁指南以剪裁真正的选择。我从未尝试过3D选择,所以不确定它会有多好。

将此拾取插入盒子,并将两个销插入孔中以锁定到位。我手头上有这些别针,但在1/2“螺丝中也应该拧紧或胶合,也应该工作。在最坏的情况下,通过盒子一直钻出针孔,并使用较长的螺丝螺母。

Cut small squares of foam and put inside the pick box to keep the pick in the vertical position (each foam piece should be identical so forces are equal). If you don't have foam, I'm guessing cotton balls might work as well.

Screw the pick box to the pick slide and make sure to include the shim between the two. This ensures the pick is the appropriate height above the strings. You can always add more/less shims as necessary if your guitar strings are different. The shims I printed were too long and hit the pick, so I used metal cutters to trim them shorter.

Step 5: Stepper Motor Modification

步进电机是单极电机,所以我们首先需要将其转换为双极电机。基本上,单极电机只需将5V电流输入到每个线圈的中间,并且电机驱动器选择了一个线圈的一半电流以控制该线圈'推动'或'拉动'电机。但是,DRV8825芯片驱动器可以通过相同的引脚向前发送电流并向后发送,因此我们不需要将线圈分成两半。

在28By-48的情况下,红线为中心提供电源bothcoils. So we need to not only cut this wire completely, but also cut the trace on the motor's circuit board so the coils aren't shorted together at their middles.

采用电机芯片的蓝色塑料盖板和撬动/拉出钳子。如果你打破它,那么可以通过马车外壳安全地覆盖。查看红色电线进入的位置,并了解如何运行到两个线圈的中心迹线。用金属螺丝刀或尖锐的东西划伤这迹线以切断连接。检查线圈不再电连接的万用表。

注意:如果您想重用电机作为单极性,您需要做的就是重新焊接跟踪切割。但是,请确保在这种情况下不要剪切红色线路,因为当您将其切换时,您希望再次使用电线。我不打算再次使用这些作为单极,所以我刚刚完全削减了红线。

Step 6: Attach Motor and Pick Slide

首先,将拾取箱的一个臂滑入LH中间部分的方孔中。我在这里使用了一些有机硅润滑脂,但它是可选的。

接下来,将金属销推入步进电机臂的一端。我不得不使用卧式按下,因为它紧紧地按下。然后将臂推到步进电机的输出柱,直到它完全坐下。没有将其推到足够的下降会导致它旋转时擦拭盖子。

Lastly, screw the stepper motor onto the support post of the LH mid-section. Make sure to set the pin into the slot of the pick box so that when the motor moves it pushes the pick box side to side.

Step 7: Attach the Feet and RH Side

将双脚拧到LH中间部分的背面,如1/2“螺钉所示。然后将单个LH和RH脚拧到每个相应的中间部分(螺钉头应位于中间凹槽的槽中,不是脚的底部)。

Step 8: Attach RH Side

Connect the RH side to the LH side with 1/2" screws through the stepper motor's mounting flange, the center post, and the back foot.

第9步:组装盖子

Take the LH and RH cover pieces, and connect together with the half-circular slide cover using 1/4" screws. We won't actually attach this cover to the rest of the strummer until the very end, but you will want to push everything together and in place as you assemble the circuit to make sure things fit.

Step 10: Add Foam

At this point, we can add some foam strips to the bottom of the strummer body where it would contact the guitar, and to the hole feet.

Cut squares just big enough for the clamping surface that would rub against the inner rim of the guitar hole. Use a glue stick to coat the foam, and then stick them to the plastic. Take two or three rubber bands and stretch them around all 4 feet, to make sure the foam sticks to the plastic as the glue dries.

在胶水干燥后,通过向内压缩脚然后向下压入孔中将起动机构放在吉他上。您可能希望首先拧紧顶盖,因为这在推动脚时提供了很多结构支架。一旦放在吉他的身体上,将泡沫放在身体和脚下,以帮助在适当的水平上支撑它,并防止刮擦。

For my guitar, I ended up using two layers of foam on one side, and one on the other. So do what works.

步骤11:级别字符串

虽然起步位于吉他上,但在弦中移动镐(您可能必须删除电机臂以执行此操作)。

The guitar strings probably won't really be flat, which will make the pick box miss or get stuck on some of the strings. Look across the strings horizontally, and try to see which ones stick up too high, or not enough. Take the string shims and try to level the strings as best as possible by placing them between the strings and the bridge, so that the pick hits each string evenly. Use extra foam to raise the whole thing up if some strings are too high, or increase/reduce the pick box's shim (installed earlier). Just be careful to consider how everything will fit together in the end when changing shims!

Step 12: Arduino Sketch

随着大多数装配完成,让我们准备好了我们的Arduino芯片软件。文件包含在zip'text'文件中,可以通过Arduino IDE编译和上载。我还包括pinchangeinterrupt库。

The remaining program files were written by myself, partly as a learning experience and partly because the stepper libraries I tried to use weren't running my motor as expected for whatever reason (probably user error). You will want to modify the code so that the pins you use for each component are accurately programmed by changing the number next to the #define lines withinStrummerMain.cpp

If you find that you want to use a higher voltage and think it will let you play faster, you can change the maximum tempo by changing the value in thepot.max_tempo()function underSetup()inStrummerMain.cpp。This number is in Beats Per Minute.

Lastly, you can change the step positions that the stepper motor will use as points between strings by changing the values understruct stringpositions.inGlobalVars.h。在修改这些时,应注意,如将它们设置得太高会导致电机在外壳上停止并失去步骤。此外,在改变它们之前,它可能是一个好主意,因为它们最初通过测量CAD绘图中的角度而发现,并且可能难以通过试验和错误找到。

With the sketch ready to go, the last part is just uploading it into the chip. I used an FDTI shield board bySparkfun。这确实要求将针头标头焊接到板上,但是更容易上传草图更容易。

步骤13:电路设计概述

接下来的几个步骤将涉及电路。上面的图像是电路图。对于我的项目,我使用了一个亲迷你Arduino和DRV8825,但是Arduino据说Pro Mini据说没有生产,因此您可能需要找到第三方制造商。此外,DRV8825理论上可以由任何步进驱动器代替,因为它们都基于相同的一般引线,但必须考虑电压限制。

注意:我的3 d打印ULN200最初是由3.AN transistor driver board, but I later changed to a bipolar chip driver. Thus, I made a custom bracket to hold a small PCB prototype board for the additional circuitry. Depending on how you integrate your parts, you might need to make a slightly different bracket.

There are a few main components of the circuit, detailed below:

  1. Motor Driver Chip: This requiresstepdirection,5V供应pins, 4 motor pins, and separate power and ground. The program will pulse the step and direction pins as appropriate, and hold 5V high during motor operation to the reset and sleep pins of the stepper driver. When the motor isn't running, the 5V pin will drop low to keep the stepper from getting hot as it otherwise tries to provide 'holding torque' to the motor.
  2. Potentiometer: Supplied with 5V, and connected to ground on the other. We read the potentiometer setting with an analog input pin to see what tempo to play the strummer at.
  3. 6触觉按钮:每个按钮连接到单个INPUT_PULLUP引脚。按下按钮时,它将触发程序中的中断。然后,程序将读取所有6个按钮,并确定按下哪些按钮(低电压=按下)。
  4. 按钮LED:每个按钮都有一个唯一的LED,它可以帮助用户使用程序和菜单。因此,有6个独特的LED引脚,在到达LED之前,通过470欧姆电阻进行路线。
  5. Voltage Regulator: The 5V stepper motor runs best when higher voltage runs through a current limiting chip driver. In my project, I supplied 22V to the DRV8825 (which can handle up to 48V), but limited the current to about 160mA. The Arduino, however, needs 12V or less. The voltage regulator thus reduces the 22V (this regulator can only handle 26V max) down to 9V, which the Arduino can easily convert to 5V. Two capacitors, as marked on the schematic, help filter any surges before and after the regulator. The 22 µF is required, but the 0.47 µF is optional if you have a good power supply and the distance between the supply and the strummer isn't too great.
  6. Microswitch: The microswitch helps zero the stepper motor during operation, which can easily miss a step or two due to the changing forces as it crosses strings. This needs an INPUT_PULLUP pin to read when the switch closes the connection to ground.

The actual circuit construction will be left somewhat up to you. Because PCB prototype boards are a pain to wire (and this one has a lot going on for the small space), you will have to get creative in how to fit it all together. The main things to consider are space considerations to make sure everything fits together still in the end, and efficiency. By efficiency, I mean that many things like the grounds can be bussed together into single wires.

However, you can see in the images above and following steps how I ended up wiring mine, for better or for worse. I would actually highly recommend creating an actual PCB in KiCad or another program, to save space and headache. If I were to do this project again, this is what I would do.

Step 14: Circuit Assembly: Voltage Regulator

电压调节器具有三个引脚。调节器输入连接到2.5mm插孔上的高压点和调节器的地面到千斤顶的地面。9V输出引脚连接到Arduino板的VIN。最后,将22μF电容从输出引脚焊接到地,从输入引脚焊接0.47μF电容。

Step 15: Circuit Assembly: Chip Driver

You will need to connect:

  • 4 motor wires to A1, A2, B1, B2
  • 步销
  • Dir pins
  • VMOT to the high input voltage (pre-regulator)
  • 2 GND pins to ground
  • Reset and Sleep pins to 5V pin (needs to be a digital pin as program will turn this off/on)

在实际连接电机之前,您需要使用芯片上的电位器设置电流限制。因为160 mA是如此小(步进电机很便宜),锅需要几乎处于完整的0位置。你必须测试这是什么,但我很确定0 =完全cw。

To test, plug the motor into the power source with the motor DISCONNECTED, touch a multimeter probe to the pot screwhead, and then touch the other to ground. Keep turning the pot until the appropriate reference voltage is read (you'll have to read the chip's datasheet for the specific voltage-to-current formula).

Step 16: Circuit Assembly: Buttons and Arduino Board

Place each button on the prototype board so that they will fit between the squares of the strummer case as shown. Place a 470 Ohm resistor in each button's center for the internal LED. Solder the buttons and LED lines to pins, and then create a single ground bus wire for all the buttons and LEDs. Connect this ground bus to the board's ground pin.

The Arduino board can be soldered onto the PCB, offset to the side对面的of where the chip driver will sit. Take a lot of time to make sure there will be room, and really think out how you plan to lay out all the required connections. Refer to the schematic, andplan。这是很多放到一个小空间,所以即使是few mistakes will mean it won't end up fitting.

Step 17: Circuit Assembly: Potentiometer

The potentiometer needs to be connected to 5V power from the board's 5V output pin (not a digital pin), and the other side to ground. The center is then connected to an analog pin. Direction doesn't matter, unless you want to control the actual direction of rotation for increasing/decreasing tempo. The potentiometer just sits on the post in my design (feel free to glue it). So whenever you're ready to assemble it, just plop it on and it's ready to go!

第18步:连接微动开关

微动开关的一个引线连接到地,另一端到数字销。方向无关紧要,因为它只是一个开关。

Next, attach the microswitch to the mounting block using two 1/2" screws. Because the screws were too long, I added nuts as thick washers to reduce their length.

Next, take the microswitch mounting block, and attach it to the RH side loosely. You'll notice that the slots are oblong to allow for slight position adjustments. Screw in the microswitch, and adjust as appropriate so that the pick box just barely closes the switch when it is far right (but before it makes contact with the housing). Tighten the mounting block screws, so that the switch is secured at this position.

第19步:电路组装:将其全部放在一起

Route wires as appropriate. The housing has some slots for the stepper motor wires, and the photo above shows how I routed all the others. It took a bit of shoving together and bending (and a little bit of cutting of some of the plastic connectors), but I fit it all in there. Depending on how you do it, you could probably save a lot of space by smartly routing the prototype board.

You can see how nuts the wiring ended up being for my prototype board, as I severely underestimated the number of connections needed. If it looks messy, just do your best to fit it all in as smartly and neatly as possible.

Note: There is a central post to support the prototype board when the buttons are pushed. You will want to make sure no wires or soldered connections are in this central location on the board (it is offset slightly to the right though). Checking fit periodically as you put the circuit together is a must!

第20步:上传草图

Once the circuit is assembled, we can now upload our final sketch into the Arduino chip using the FDPD pins of the chip. You can theoretically do this much earlier, but you may find that your pin layout has changed during the assembly due to space limitations, or you may even cause corruption of the program after handling the chip during assembly. (This happened to me during some troubleshooting, and it took me a bit to figure out what was wrong. After re-uploading the sketch into the chip, the strummer suddneely worked again).

步骤21:拧紧!

Once the sketch is uploaded, you can put everything together with the screws. Except for the stepper motor and the circuit board, the screws should all be 1/4" 4-40's. The circuit board needed really small screws, which I pulled off some scrap hardware (but you could easily buy smaller screws for this).

Step 22: Play

You can now attach the strummer to your guitar. Compress the feet inwards, and drop them into the hole of the guitar so they clip in, making sure the back feet don't catch on the strings. Use foam to help level the strummer over the strings, and to also keep it from accidentally scratching the surface.

Plug your 22V power source (or other appropriately regulated voltage) into the jack, and the motor will zero. When it finishes zeroing, the LEDs will flash 3 times, and then it is ready to play!

您可以按下相应的字符串按钮播放,或通过一次按两个按钮使电机播放一系列字符串。如果按下两个以上的按钮,它将播放到最外部选定的字符串。

Use the potentiometer to control how fast the stepper motor strums the next beat. The fastest speed is still relatively slow due to using such a cheap stepper motor, but higher voltages could theoretically allow faster speeds.

Enter 'Rhythm Menu Selection Mode' by holding the outermost strings, and both innermost strings (1,3,4,6) simultaneously for 3 seconds. Once in menu mode, you can select different rhythms by pressing the two center flashing buttons (for up and down). The LED on the high E string flashes on the downbeat of the rhythm to help identify what beat it's on. And the low E button can be held for another 3 seconds to exit the menu mode.

Step 23: Known Issues and Final Thoughts

项目当前状态有一些已知的问题,其中一些可能会受益于完全重新设计。首先,步进电机的速度和缺乏功率导致非常缓慢的播放速度。

第二,程序有漏洞,我没有able to identify yet, which basically causes the program to freeze up and stop playing occasionally. Simply unplugging the power and restarting solves the problem, but is rather annoying. Feel free to debug the program if you wish!

Lastly, the strings of a guitar are not as flat as one might initially think. The bridge of the guitar is actually curved, meaning that as the pick goes across the strings some are higher than others relative to the pick, causing the loudness of each pluck to change. And when the player presses a string, it changes this height enough to actually cause strings to not play at higher frets.

But enough of the pessimism! The guitar still plays, it was still a great learning experience, and it looks cool! I'm definitely interested in trying a second version at some point, and hope to improve upon the initial design. Maybe individual picks for each string to really get some riffs goin'?!

是第一个分享

    建议书

    • Clocks Speed Challenge

      Clocks Speed Challenge
    • Toys & Games Contest

      Toys & Games Contest
    • Big vs Small Challenge

      Big vs Small Challenge

    16评论

    0.
    工具箱

    9 hours ago

    Nice construct! Consider adding on a thumb wheel control for tuning the tempo up or down. That way one could play mostly one-handed.

    0.
    tytower

    11 days ago

    看起来很棒的开始。接下来在kneck上用一些螺线管,你有一个自动播放器。是kraftworks,也许不是,但是有一个基于吉他字符串的自动吉他字符串,根据某处的脚本播放音乐。

    There is a video on it too maybe on Utube . I have it somewhere but finding it could be a problem .

    0.
    Jacobstambaugh.

    回复9 days ago

    That was originally my idea, but maybe a bit too complex at the moment... Are you referring to the LEGO machine? (there's a video of one on youtube). I was trying to also make it somewhat portable and sturdy, and it got hard to fit the two axes of motion into such a small space... Next time

    0.
    tytower

    回复4 days ago

    No not Lego . It was a multi stringed instrument flat bed with solonoids that moved along the string ,one for each string . It played very fast . I kept the video but can't find it atm . German made I think. Its not Kraftwerks.

    0.
    DulcetBrewer

    8 days ago onStep 23

    Looks like a variation on a theme created by Kevin Godley & Lol Creme way back in 1969. They were the driving force in the band 10cc, and the device was named the Gizmotron (or Gizmo). They patented it in 1975, but this is different enough for it not to infringe. For interest, search "10cc gizmo". I'm a drummer, not a strummer, but I think this is a pretty clever application.

    0.
    聪明

    7天前回复

    当他们参与时,它适用于mu-tron。

    0.
    zayedalam

    10天前

    very nice but can we play other songs other than chords?

    0.
    Jacobstambaugh.

    回复9 days ago

    You can play anything you want! So long as it's a nice, plodding rhythm at the same speed as your chords :) A better version with at least 1 steppers (one to move the pick vertically) would be needed to really play more intricate stuff. It makes me realize how complicated simple musical instruments actually are...

    0.
    Spi_WvS

    9 days ago

    Your lock-up problem could be an overheating voltage regulator. Your power-supply shows 23V, so with aprox. 50-60mA (with all LEDs on an no idea what current the stepper driver board needs @5V) the 5V regulator has to dissipate P=(23V-5V)*0,05A = 0,9W. Without a heatsink, the thermal resisance of the voltage regulator (Rth,JC = 3°C/W and Rth,JA = 50°C/W) result in a temperature of at least 70-80°C after some time. Add a heatsink or a piece of aluminum to the case of the voltage regulator and reduce the input voltage of your power supply. Also two 100nF caps are a good idea at the 5V regulators terminals.

    0.
    Jacobstambaugh.

    回复9 days ago

    Interesting! I'm not 100% sure if that is it (it only seemed to lock up after I released all buttons, so I'm thinking it had something to do with my code). But certainly something I should have considered more in the design. Thanks for the heads up!

    0.
    niokeskub.

    12天前

    相当了不起!
    将它与一个ez和弦夫妇,你让自己成为最容易玩的吉他!

    0.
    keets.

    12天前

    Genious project!

    0.
    tercero

    13 days ago

    Very neat. For complicated patterns it would be a god send.

    0.
    Kid space

    14天前

    非常有创意,我喜欢它。