Servo rotation and 315Mhz T/R help

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

is there any update on the CAD files for the trinket pro? I'm going to contact the manufacturer of the 315Mhz transmitter/receiver parts to see if and how coding the parts to each other can be done.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo rotation and 315Mhz T/R help

Post by adafruit_support_bill »


User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

Awesome, thank you. I sent an email to the manufacturer of the T/R parts to see if they can bet set to one another. I am hoping it can be done and for cheap because I don't know what other parts would work for the project.

User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

Ok, the code works for the trinket, but I am guessing. That it will not work for the trinket pro. I should be getting the 2 pro's i ordered today and I was going to play around with them.
Since the pro has more output pins, I am thinking of using it instead of the original trinket in my project. And because of these new pins I can have it flash some LEDs along with rotating the servo. I would like 3 pins to go high to light leds when the servo rotates down and have the pins go low when the servo goes back to the start position (2 pins will flash on and off 2 LEDs, the other pin will stay high as long as the servo is in the down position). To do this should I just create another if statement that has the pins flash the LEDs or should that be in the statement where the servo rotates. I'm going to try tonpost some code over thanksgiving, so inknowninwont get a response for a few days.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo rotation and 315Mhz T/R help

Post by adafruit_support_bill »

This guide shows a good way to mix led flashing with servo movement: https://learn.adafruit.com/multi-taskin ... ino-part-1

User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

Sorry for the long delay again on this thread. I haven't played with the trinket pro since I got them. for now using the trinket works for my project, but I will try the pro later.
Thanks again for all your help.

User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

I have one question about one of my boards. When the servo is connected to one particular board, it constantly twitches; it doesn't rotate more than it should from its position which is set from a switch, it just constantly twitches back and forth a tiny bit. It does this at both the zero and 90 degree positions. I tried another servo and it does the same thing. The code that is stored on the trinket is the same as all the other boards. I tried changing the refresh rate for the servo thinking it was too fast, but that did not help. Maybe I have a bad trinket? A couple of the other boards do the same thing but no where near as bad as the one particular board. I checked the soldering and it good, I just wanted to ask if a bad trinket could cause this.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo rotation and 315Mhz T/R help

Post by adafruit_support_bill »

Refresh my memory. Are you using 3.3v or 5v Trinkets? What else is connected to the Trinket?

User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

Its the 5v trinket set to 8Mhz. There is a wireless receiver and a servo on the board (I can't get a pic to load). The trinket is powered by either 4 AA batteries or a 6v battery pack. The receiver is powered off of the 5v out on the trinket and the servo runs directly off of the battery, its only connected to the trinket for the rotation control signal, nothing else (oh, and the grounds are connected).

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo rotation and 315Mhz T/R help

Post by adafruit_support_bill »

Twitchy servos are usually caused by timing jitter on the control pulses, or a weak or noisy signal. You don't have any interrupt intensive things going on to mess up the timing. A 5v signal should be plenty strong. Noise could be coming from any number of sources, including a grounding problem or brush-noise from the servo itself. If you have access to an oscilloscope, a peek at the signal would give us some hints. If you post a photo or two of the complete setup, we might be able to spot something.

User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

Ok. I will take a pick tonight. I have an old o-scope so I can see if I can get that working. How do I post a pic, when I click on the photo icon, it just posts the [image] blocks and no photo.

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo rotation and 315Mhz T/R help

Post by adafruit_support_bill »

There is a 'browse' and 'add the file' button under the message editing window. Uploads are limited to 1-meg. If you resize to about 800x600 you should have no problems.

User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

Here is a pic of the board. I didn't get a chance to use the 0-scope to check the signal. That may have to wait until the weekend.
Attachments
board.JPG
board.JPG (113.06 KiB) Viewed 484 times

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo rotation and 315Mhz T/R help

Post by adafruit_support_bill »

Nice little custom board. Are all of the other Trinket & Servos configured the same?

User avatar
jc27
 
Posts: 185
Joined: Sun Nov 24, 2013 5:05 am

Re: Servo rotation and 315Mhz T/R help

Post by jc27 »

Yes. They are all exactly the same. I am going to take the bad bird to work and see if I can see anything in it with a o-scope. I will save a screen shot and post it.
Thanks, if you guys didn't post the dxffiles of your stuff I wouldn't have been able to make the board. You guys are awesome and I wish I lived in NY so I could try to get a job and do the kind of stuff (design and build projects) you guys do all the time.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”