I saw this video on youtube
On the developer’s blog the scooter’s operation is described as:
A brief summary of what exactly is going on here:
- Laptop program parses a MIDI file and I choose three tracks that look interesting.
- XBee radio streams MIDI data wirelessly to the motor controller.
- Motor controller uses the frequency of the MIDI note as the PWM frequency.
- Each phase corresponds to one MIDI track. Three phases can play three tracks simultaneously.
For kicks, here’s the code for both ends of the system.
Because the PWM frequency is independent of the motor speed, this all happens more-or-less in the background while the regular motor control algorithm runs in the foreground. Meaning, I can ride the scooter around at low speeds without noticing any difference in performance. At high speeds, when the note frequencies get close to the commutation frequencies, bad things would happen.
I still don’t get it how it actually works with the motor signal. If he’s converting the tone frequency into a pwm signal he’s changing the resulting energy that he gives to the motor so the speed is also changing in contradiction to his statement the PWM frequency is independent of the motor speed. If he’s modulating a pwm signal onto another the resulting energy also changes. I also don’t know where the sound is actually coming from. Is there a speaker or is he using the motor as a kind of speaker? oO
Any ideas of what’s going on there?
I’m not that much into mechanicals so a block diagram would have been nice.