Pages: [1] 2   Go Down
Author Topic: Isolating motor feedback from Arduino?? (speaker)  (Read 2189 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey gang-

I finally have my code worked out the way I want.. and it 'seems' to be running great so far..

its more or less a (customized) Arduino & Waveshield board....

I have added a 'motor' to the mix.. for testing.. and it seems to work great as well and how I want it to..  (albeit it might not have enough torque?  as its from some kids toy)

I 'do' have this as an alternate motor.  (hoping it has more to torque..but the voltage rating is throwing me off on it?.. maybe I should use a vRegulator on it?)

says 1.5v-3v.. but some comments are saying they have been giving it up to 9v even? (wow)..

http://www.radioshack.com/product/index.jsp?productId=2102828


I have my current motor wired up like this:  (and plan to have the other/replacement motor wired up the same way)



Anyways... the question more at hand is...

Whenever I trigger a sound to play.. I also 'jog' the motor... (or if I press & hold the button.. I repeatedly play an audio clip.. and continuously jog/pulse the motor..etc)
However I notice a small whine like a feedback noise over my speaker now????????

After reading previously.. I read there is much 'noise' from a motor when started & stopped.. (which is dangerous when hooking up a motor to Arduino directly)..

As I mentioned I have it wired up as above.. using a transistor, diode, resistor...etc..

What can I do/add to help isolate the motor noise/feedback from the Arduino circuit (dac/amp/speaker)??

Is it the power lines?  Do I need to put a cap somewhere? (not sure where)




the second part is maybe locating a better motor?  I need it to be small (same size one listed above).. but need to have decent torque on it to spin a tube/turret (gattling gun style)


Logged


Offline Offline
Sr. Member
****
Karma: 6
Posts: 429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could be a number of things, I would try a 0.1 uf capacitor across the motor first.

How much current is the motor drawing, is it driving anything at the moment?

I would think driving a 3volt motor with 7 volts is not a good idea as it would burn out under too much load and damage the transistor.
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

a 0.1uF cap across the motor... power lines?   before or after the diode?  (or doesnt it matter?)

How can I check for the draw of my motor?  (or any component for that matter?)

It is currently not under ANY load.. 

which is why I do not believe this motor will work... (current motor is motor from some spinning led wand kid toy)..

the second replacement motor (radioshack one) is only rated at 1.5v-3.v tops. (although comments say people have been driving them @ 9v!!!)
I was thinking maybe trying that one for the torque?.... but should I use a 3.3v vRegulator in there somewhere?  (not sure where is should go though) after battery pack toward motor,,,but before the DIODE?


UPDATE:

(hoping I did it right)

so taking my whole circuit above (Arduino as well)..

I unhooked battery +.. connected to + probe on multimeter
took - probe on meter.. and connected it to where I just unhooked the battery + lead from..

powered up/booted..  Im at a constant 61.4   (DCA setting on meter is @ 200m)

(this is without any audio playing...or the motor being jogged/pulsed)

playing a simple audio track (without motor)  shows me at around 74 range (tops)

motor with audio shows me at around: (no more than 185 ever)..  thats with constant interaction: audio and motor spinning/jogging/pulsing..

thanks
Logged


UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
powered up/booted..  Im at a constant 61.4   (DCA setting on meter is @ 200m)

(this is without any audio playing...or the motor being jogged/pulsed)

playing a simple audio track (without motor)  shows me at around 74 range (tops)

motor with audio shows me at around: (no more than 185 ever)..  thats with constant interaction: audio and motor spinning/jogging/pulsing..

Those look perfectly reasonable figures to me.

Personally I would get two very small value capacitors - say 10 to 100nF - and connect them to the motor.  Connect one from the motor + terminal to the body of the motor, and the other from the motor - terminal to the body of the motor.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Sr. Member
****
Karma: 6
Posts: 429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yup, current draw looks ok, 100nf = 0.1uf, connect it across the diode, see if that works first.
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks guys..

(I'll definately try the cap stuff)..

HOWEVER... it seems as if I had possibly spoke to soon about the cause??

I decided to remove the whole motor portion of the circuit..and try it again.. to see if the 'slight' whine is still present.. (it is)..

I can sorta 'hear' the speaker being ON.. just by powering it on??  not really making a noise... but if I get close.. I can HEAR that is it being powered

(I even removed the volume resistors.... put in a pot.. so I could dial in the volume settings better.. even all the way OFF.. I can still hear the speaker being powered..

when you play/trigger a sound.. its 'almost' as if you here a quick screech right before the sound plays...

Its no REAL bad (per se`)  but Im trying to learn and make tweaks to improve it as best as it can be.

any suggestions??  Im new to all this.. so Im not sure where to start researching?

seems maybe some noise/dirty lines somewhere?

Im wondering if the motor IS in fact fine (outside of needing to find a new one with more torque)..  and this was there all along?


thanks!!!!


Logged


Offline Offline
Sr. Member
****
Karma: 6
Posts: 429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I`ve not used a waveshield, if its a standard board that is widely used with the arduino, then I would search the forum for other people that have had the same problem.

Is it a whine you can hear (high pitch noise) or amplifer hiss( random noise)?

Are you powering the circuit from a battery or from a power unit?
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi-

to be more clear.. its a 'custom' board..

which is basically an Arduino UNO and an Adafruit Waveshield merged together in one board:



compared to Arduino & Waveshield stacked together vs my board:





as far as 'noise'.. Id say it two fold..

1.) I can sorta HEAR the speaker is on.. when the board has power...    but I dont believe the volume is up so high to be causing this.. (as there is no distortion of the sound itself when its played)..


the second

2.) when I hit a button to play/trigger a sound to be played... I can hear this brief 'whine/screech' a split second before the sound plays...
its not the actual audio file itself.. as this happens on all clips..

so not sure where this extra noise is coming from?

thanks!!
Logged


Offline Offline
Sr. Member
****
Karma: 6
Posts: 429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does the separate stacked waveshield/arduino make the same noise?

If not, maybe there is a problem with the design of the custom board. 
Logged

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hmmm....

good question!..

I have given back the WaveShield.. (after I was done comparing the volume....... WaveShield is NOT very loud IMHO)..

I'll have to see about borrowing it again.. (or just buying my own!  lol)

Logged


UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

On a side note...

I have never seen a wave shield in the flesh before, and looking at those pictures I am really really surprised at the choice of DAC on it.  It's far from an audio DAC that - it's designed for calibration and precision offset use.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This my first 'venture' into Ardunino & Audio...  (so no clue?!) haha

its a MCP4921 or something if I recall off hand..

I had tried a different one previously..

this one:
http://www.linear.com/product/ltc1257

but it didnt work.. 
well....  I had the DAC on the SPI bus at first..thinking more than one device could be on the SPI bus..etc..etc..  but it seems the WaveHC lib uses a bitbang method of constantly reading so it can NOT be on the same SPI bus..etc.

(I have 1 or two boards still laying around with that DAC if you have any suggestionso n what  to do with them!  they still work as basic Arduino.. with a uSD socket on it!!)

for me.. I was to be using (dependent) on the WaveHC library..  so if it only can use or wont play nice with other DACs.. I would have no clue where to start troubleshooting.. so I went back and used more of the same stuff of the WaveShield..



Logged


UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I use those chips (or other ones in the same family) as variable references for ADC chips.  Quite useful to be able to set an analog reference of anything between - and 4095mv in 1mv steps.  I certainly wouldn't choose them for anything audio (other than for control).  I'd prefer to have something with a real audio DAC.  And maybe can buffer the audio itself.  Something like the dsPIC33FJ128GP802 we used in the Ronin.  Maybe I'll design a decent wave shield around that chip one day.  It could even read the audio direct from the SD card to both free the Arduino up to do other tasks and give CD quality stereo sound smiley-wink

... I'll add it to my list ...
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1250
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I hope that list starts SOON!..

would be nice to free up the Arduino for other tasks!!


I mean right now Im doing ok.. but Im a beginner really.. and just fudge my way through..  learning hardware is my weak point.. (but its going ok.. learned Eagle and started doing my own schematics & .brd file (pcb's made..stencil orders..etc).. all new to me.. but was a fun learning curve.

Software is MORE my strong point.. but not really in C/C++ style programming (used to much more forgiving languages like for web programming..etc)

Would love to see a new/variant waveshield!..

Audio on the Arduino has been too hard for far too long...  smiley-wink

Logged


UK
Offline Offline
Faraday Member
**
Karma: 100
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I hope that list starts SOON!..

would be nice to free up the Arduino for other tasks!!

Would love to see a new/variant waveshield!..

Audio on the Arduino has been too hard for far too long...  smiley-wink

Well, my initial tests show it is perfectly possible.

I have taken a prototype Ronin board, and wired in an SD card adapter to it.  A days's worth tinkering with firmware, and I have it playing CD quality WAV files direct from the SD.  The SPI interface to it is also working, but kind of sparse at the moment - many more commands to be added for interacting with the SD card - and who knows, I might even add a line in socket and get some form of recording direct to the SD card going...

Then it's on to designing a real board for it.

I might have this actually made and ready to sell before you know it...
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Pages: [1] 2   Go Up
Jump to: