Posts Tagged ‘motor’
These are a few of the bits that I cut from the main video because it was too long, including running it at full speed and a comparison with a super-simple system! There’s a strobe light in this video, too.
You might want to watch part 1 if you haven’t already, so that this makes more sense.
I threw this together from an old toy’s motor, old printer’s iR sensor, pizza box and some other things, to try out the PID controller algorithm after discovering it on Wikipedia and seeing that there was pseudocode, meaning that I didn’t have to get a PhD in mathematics to be able to read the crazy-looking formulas that Wikipedia seems to be so fond of. There’s a strobe light in this video.
I had planned to screen-capture my program while recording but completely forgot to at the time, so please try to survive my camcorder pointing at my laptop screen…
Here, the PID controller is trying to keep the motor at a precise speed (and get it there as quickly as possible). It doesn’t work well half the time because the L298 (H-bridge), responsible for switching power to the motor, doesn’t seem to like making the motor brake. That means it speeds up much more quickly than it slows down, which the algorithm doesn’t like (it’s designed for linear systems) – it basically ends up trying too hard to slow down, resulting in a big undershoot. I might be able to somewhat compensate for that in code.
I might try this with a Sabertooth motor speed controller (as used in my old singing motors project) in place of the L298, which can certainly force a motor to stop spinning, but the Sabertooth gives such a boost to the motor to get it up to speed that 90% of the PID’s job becomes redundant… Oh well, at least it’d be able to hit any given note without me having to calibrate it first like I did with the singing motors. By the way, that’s why this system measures speed in Hz – I originally intended for it to play music like a new kind of “singing motor”.
Originally, I planned to use a 3-pin computer fan instead of this motor, using the tachometer pin to measure the speed, but that required me to have a common ground for the motor and the tachometer, and I didn’t have the right components available (I only had N-channel MOSFETs, but I needed a P-channel MOSFET). So I ended up throwing my own motor assembly together and using an N-channel MOSFET only (could only turn power on/off, not brake), which the PID system didn’t like. I thought the L298 would fix that problem, since it’d allow the PID system to reverse power to the motor and brake it, but it turns out it’s too weak to have much of an effect after all… =/
Part 2/2 will show it running at full speed (with a more powerful PSU), show a much more naïve speed controller algorithm for the lulz, and just clear up a couple of details.
I was cleaning out my room and found a load of random stuff (mostly toys), and some of it was interesting, so I decided to record it. Some of it’s around 14 years old. I didn’t intend for 50% of the video to be about Beyblades.
Eagle-eyed viewers may notice that I uploaded the singing motor test video with Fuuko’s theme AFTER July. I actually had this Koi No Tenshi video planned for a long time, and wanted to make that video introducing the new singing motors first. =P
Full version is here.
Text from July 2011:
It’s the version 2 of the Singing Motor! This time, there are 2 that can sing a duet together.
I wonder how it can already be 3 years since I made version 1…
The tuning is wrong with the right-hand motor at the start (it’s not easy to get DC motors to spin at just the right speed – they seem to change as they get hotter, too…). The sound and the video were recorded separately. While recording the sound, I had my fingernails rubbing against the cogs so that they’d actually make some sound, but that would’ve meant you couldn’t have seen the motors moving.
Yes, I do have something big planned, but since it’s big, it will probably take a month or so to prepare for / complete. This is just a proof-of-concept with a MIDI that’s in the public domain.
Now there are 4 motors singing together! Perhaps this is an early Christmas video…? It was originally just going to be a test, but I decided to upload a proper video of it. Still, the sound recording is experimental. I want to find a way that doesn’t hear a thump when a DC motor starts and stops spinning.
The music was used in the Christmas special of the anime Love Hina, and is originally sung by Yui Horie and Yukari Tamura (“Yamato Nadeshiko”).
My laptop runs a program of mine that plays a MIDI file, and sends info about certain notes to an Arduino. The Arduino then shows info on an LCD, switches the 2 stepper motors via 8 MOSFETs, and passes on info for the 2 DC motors to a separate motor speed controller (Sabertooth 2X5), which controls those 2 motors. I think these DC motors are much more suited to the higher notes of a singing voice than the stepper motors are. Likewise, the steppers are certainly better for bass notes. Together, they make a team. =D
The stepper motors and DC motors are running from separate power supplies – 12V for steppers, 15V for DC motors – as I haven’t found a reliable way to compensate for the drop in voltage that the stepper motors cause when they run (this causes the DC motors to slow down a little).
More info is in the video! =)
Just a little test for a completely-remade version of the singing motor from 2007 which I made with my brother. This time, it’s controlled by my not-yet-released program Bawami (a MIDI player), via an Arduino and a Sabertooth motor speed controller.
Much more info is in the video, just like old times! =D
Bawami works out the speed the motor needs to run at to hit each note. It sends that info to the Arduino, which displays info on an LCD and passes it on to the motor speed controller, using dithering to improve the resolution from 122 speeds to 488 speeds. In the future, Bawami should be able to control any 2 DC motors at a time, plus the 2 stepper motors I’ve shown in previous videos.
The music is Fuuko Ibuki’s theme, 「は～りぃすたーふぃっしゅ」 (“Hurry, Starfish”), from the visual novel Clannad. It’s a MIDI (which I didn’t make) playing on my program.
They’re back! This time, I made the MIDI from scratch myself, specifically for the motors, and used a lot of pitch-bends and subtle vibratos.
Also, if the motors try to jump to a high speed too suddenly, the Arduino now ramps up the speed gradually (although it’s fast to human ears). That means no more nasty grinding sounds like the ones in my previous video, which you should watch for more info on the singing stepper motors and this “stepper bass box”…
Believe it or not, that plasma ball-like program of mine normally runs nice and smoothly, but my MIDI player eats a painful amount of my netbook’s CPU (yes, my computer is still out of action – I’m dual-viewing with that monitor). I’m not sure if I’ll release Biribiri, since it’s only my railgun *is shot*
Since I can’t run a proper video-editing program on my netbook, that credit screen was made on Paint. And that concludes today’s random facts.
Apologies for the sucky sound quality – it seems these stepper motors aren’t ideal for music, since they’re so quiet. -_-
A program of mine running on my laptop is sending the frequenciesof notes from a MIDI file to an Arduino, which in turn controls 2 stepper motors and shows the frequencies on an LCD. The music is the opening theme to the anime “Kannagi”, 「motto☆派手にね」.
I suppose this is a step up from the “singing motor” videos I uploaded in 2007/2008. With stepper motors, the pitch can be precisely correct! However, the ones I have can’t get very high-pitched, so they’re better for bass (not what they’re doing in this video). At around 00:16, you can hear what happens if one tries to go faster than it can – it just vibrates.
Maybe I’ll try to get some stepper motors which are louder / higher torque / have more steps per revolution, when I have the money to spend on such random things…
My friend, Sota Systems (Sota250993), and I, made this techno remix of Shikieiki’s theme, “Critical Judgement”, after hearing IOSYS’s remix of the same theme, “Koko de atta ga 60 nenme”. Then I made a StepMania simfile for it.
We play it on StepMania at the same time, but in our own separate countries, recording our gameplay with several cameras, and here you see it all mixed into one video – our combined gameplay views. I have a few custom things connected to my comp being controlled by StepMania. ;D
You can download the simfile (even if you don’t play StepMania, it’s just a ZIP and it includes the MP3) from a new “StepMania Simfiles” section of my site, here.
Also in the video is a crazy announcer which my bro (“Steeeven1″) and I made, after being told that a previous attempt wasn’t crazy enough. I won’t provide a download link for it unless anyone seriously wants one. ;P
The StepMania theme is called Pop☆Candy 2, and you can get it from the author’s site, here.
That computer-controlled motor is back! Headaches guaranteed, or your viewing time back! (I’m sure Sakuya will sort it somehow.)
It just plays a short part of Sakuya’s theme “Tsuki Dokei ~ Luna Dial” (Moon clock) and Remilia’s theme “Naki Oujo no Seputetto” (Septette for a dead princess). Since I recently made them on BMM, I decided to challenge the motor to try to play them. Yes, it’s a useless mod for my program “Bleeper Music Maker“. In fact, it was only the first or second mod which I made for BMM, a while before I ever released BMM to the public.
I’ve changed it since last time so that now the motor doesn’t stop between notes (it was affecting being able to hit notes on time, and is no good for the power supply xD).
This time the usual motor has help from another motor which it spins via a drive belt, which adds more power to the sound (slight understatement). Amazingly, it seems it’s still strong enough to hit most of the notes.
Oh, and Yukari because… gaps are awesome.