четверг, 7 февраля 2013 г.

ардуино двигатель pwm

Good to here, it's working. What is the maximum distance you can reach? I think about to increase the range the Asuro communication with such kind of a booster.ВP At the moment 50cm is the maximum.

Haven't solved it yet but i understood where the problem is. I've used your hardware setup and it worked fine. So the problem must be in my setup (the one at the top of the page). I still can't understand what could be wrong though. I have already used a similar setup with the picaxe and it worked fine, only difference was that the serial was normally low instead of normally high so there was no pnp transistor to reverse the signal.ВPNo idea why it sends data multiple times..ВPВPEDIT!!! :It works! I re-read the page carefully and noticed that you suggested 1KOhm resistors between the gate and the pins. Guess what, it worked! You are my new god, RobotFreak :DВP

Hmm strange. I tested the program with Hyperterm on a PC via the Asuro IR programming dongle. There is only 1 charcater received, when I send one, never multiple characters. Sometimes there are wrong characters. This IR connection is not 100% error free. You need some kind of error detection (CRC) . Keep in mind that this is a half duplex connection. You can only send or receive at one time. If both partners send at the same time there will be interferences.One more tip, try to decrease the data rate to 1200 Baud.ВP

UPDATEВPI've used RobotFreak's code and it works. But...not always. Both the sender and the receiver are working at 2400 and "strange" things happen. The sender is using the code "serial.print(9)", and the receiver gets "57" (correct, it's its ascii value). But it doesn't only receive one, it receives something like eight 57s every time the IR led light's up. Not only, but sometimes after getting those eight 57s it also gets some other random values like 230 or 190.ВPI will try to tweak it up a bit, both on the software and hardware part, and see if it gets better.ВP

Select your preferred way to display the comments and click "Save settings" to activate your changes.

10 comments per page30 comments per page50 comments per page70 comments per page90 comments per page150 comments per page200 comments per page250 comments per page300 comments per page

Flat list - collapsedFlat list - expandedThreaded list - collapsedThreaded list - expanded

Hi guys.I'm trying to modulate my IR led at 38KHz so that the receiver will pick up the signal. I've googled around and all i've seen is some people modding the wiring.c file, but this way the only get a limited number of possible frequencies. Some other guys say that you have to use a 555 cause you can't do that with arduino. Then i've found this:ВP ВPand i thought it could work, since it gives you the pwm command which also lets you specify the period....but it doesn't work, my IR receiver doesn't pick it. Maybe i just specified a wrong period? (i wrote 26, which is 26 micro seconds)ВPDid i get something wrong? Do you know another method to achieve custom frequencies on PWM?this is the circuit (not really needed though)ВPthank you!ВP

Комментариев нет:

Отправить комментарий