Arduino Micro & H-bridge (L293D)


hi,

in project, try control 2 dc motors using pwm. motor create flapping motion of wings rotating clockwise , anticlockwise alternately.

first generate 2 pairs of pwm using arduino micro. pass each pair of pwm pin 2 , 7, , pair pin 10 , 15 of l293d. dc motor can operate in voltage range of 3-5v. connect enable pins (pin1 , 9), vcc1 , vcc2 5v pin of arduino micro. think connections correct.

for pwm, frequency 5000hz. according code, each pair of pwm make sinusoidal-like cycle. let 1 of pwm p1 , other 1 p2. @ first p2 has 0 duty cycle , p1 start 0 duty cycle , increase greater value after time , increase maximum (100%). p1 decrease step step until zero. after p1 stay @ 0 , p2 repeat same process p1. if pass p1 , p2 input pin of l293d, output l293d produce signal motor staircase going , down.

what get:
both wings able flap @ correct frequency when set maximum duty cycle 100%. when reduce maximum duty cycle 50%, wing not produce stable flapping amplitude, correct frequency. when try offset motion, setting p1 zero, , setting p2 have stepping , stepping down duty cycle (all above 0%), wing not move predicted. should flapping above equilibrium position since voltage motor 1 direction different amplitude. wing still flapping across equilibrium position.

when check using oscilloscope, signal produced h-bridge output contains high noise level. not sure if normal, because think should signal similar the signal output arduino micro pretty neat , pwm waveform observed easily.

any suggestion? or improvement make produce better output h-bridge.

thank you.

weesiang




the old l293d can used 12v motors.
it not work 3v motors , 5v motors work little.

normally input pins used direction, , enable used pwm signal. see datasheet direction.

do use 5v output pin of arduino micro power motor ? micro can not supply enough current that.


Arduino Forum > Using Arduino > General Electronics > Arduino Micro & H-bridge (L293D)


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62