Stories
Slash Boxes
Comments

SoylentNews is people

The Fine print: The following are owned by whoever posted them. We are not responsible for them in any way.

Journal by cafebabe

This article has almost nothing to do with a promised series of articles. Instead, this is a continuation of motor control using audio amplifiers.

I previously discovered that a commonly available PAM8403 stereo audio amplifier board is sufficient to control two small motors. This is possible because the amplifier is intended to drive speakers with 4 Ohm or 8 Ohm windings. A speaker is a special case of linear motor and many small motors similarly have 4 Ohm or 8 Ohm windings.

The major advantage of this scheme is that *any* headphone output may be sufficient to control two motors. This includes pre-recorded sound or any programming language which can play sounds. That includes programming languages aimed at kids, such as Scratch and Squeak.

In some regards, a PAM8403 is an overkill for hacking. Regardless, it has advantages over an H-Bridge. For example, a linear amplifier allows forwards and backwards operation of two motors at variable speed. The major catch is that audio amplifiers expect an RTZ [Return To Zero] signal and therefore sending a continuous positive or negative signal fails to have any sustained impact. This can be overcome by sending a square wave of arbitrary amplitude and arbitrary duty cycle. A quirk of this encoding is that the square wave frequency isn't hugely important. We'll be using that property next.

A member of my makerspace asked if it was possible to control four motors using two audio channels. (Specifically, he's obsessed with quadcopters, drones and suchlike.) After some false starts, I found that an audio channel can be partially split into two by using an analog low-pass filter.

In this arrangement, the majority of an audio channel's amplitude is allocated to a low frequency square wave. This is directed to one pair of motors and allows the pair to be driven at almost maximum speed. The remainder of the audio channel's amplitude is allocated to a high frequency square wave which may have a complimentary or opposing bias. This is directed to one motor of the pair and provides stabilization of the platform in one axis.

For each audio channel, the audio filter consists of one resistor in series followed by one capacitor to ground. The product of the resistor and capacitor in the RC network determines the resonant frequency of the filter in radians per second. (Adjust by 2π to obtain cycles per second.) Optionally, use multiple RC networks in series to increase signal discrimination. However, for this application, it isn't particularly important.

Worked figures are as follows. Low frequency signal is 440Hz. Cut-off frequency is low frequency times four. High frequency signal is cut-off frequency times four. Resistors should be 470 Ohms. Capacitors should be 220pF.

I assumed that two stereo amplifiers would be required. By chance, another member of my makerspace was making an enclosure for stereo speakers and re-chargable batteries. The audio amplifier is a TDA7379 which is a quadraphonic amplifier which can be ganged into stereophonic. As a quadraphonic amplifier, it provides 13W per channel. I haven't gone through figures in detail but that should be sufficient to lift a computer, gyroscope and batteries. This is an extremely dangerous project but it is also shockingly accessible.

Display Options Threshold/Breakthrough Reply to Comment Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.