All Posts (14054)
unsigned int serinp[8]; //servo positionsvoid setup_timer1(){//disable all interuptsTIMSK1 &= ~( _BV(TOIE1) | _BV(ICIE1) | _BV(OCIE1A) | _BV(OCIE1B));//set timer modeTCCR1A &= ~( _BV(WGM11) | _BV(WGM10) );TCCR1B &= ~( _BV(WGM12) | _BV(WGM13) | _BV(ICNC1));//capture raising edgeTCCR1B |= _BV(ICES1); //capture raising edge//prescaler 1/8TCCR1B |= _BV(CS11);TCCR1B &= ~( _BV(CS12) | _BV(CS10) );//disable outputsTCCR1A &= ~( _BV(COM1A0) | _BV(COM1A1) | _BV(COM1B0) | _BV(COM1B1));//enable capture interuptTIMSK1 |= (1<<ICIE1);}ISR(TIMER1_CAPT_vect){static unsigned int lasticr; //icr at last caputrestatic unsigned char cserinp; //current input servounsigned int licr;//TCCR1B ^= _BV(ICES1);licr=ICR1-lasticr;lasticr=ICR1;if(licr>5000){ //pulse too long, means start of new framecserinp=0;}else if(licr>1000){ //pulse good, take reading, go to next channelserinp[cserinp]=licr;if(cserinp<8){cserinp++;}}else{//too short, nothing to see here}}void setup()pinMode( 8, INPUT ); //sumsetup_timer1();}void loop(){//use serinp!!!}
it'll take a sum signal on pin 8. you can also connect the signal for a single servo, then just serinp[0] will be populated. the values in serinp are 2 times the microseconds, so between 2000-4000 (instead of 1000-2000), yes, there's extra accuracy in there!the timer-capture only works on digital pin 8!if you don't have access to the sum signal, a possible way to read multiple servos would be to connect them all to pin 8. since the receivers usually output the pulses one after the other, this should work (you'll have to adjust the code in the capture-interupt).
Command a system of UAVs remotely from an iPhone's web browser, regardless of what the TOS says. (thanks to Danger Room for the tip)
- Buy the board here.
- Eagle 5 files: ir_dual.sch, ir_dual.brd
C1,C2,C3,C4,C6 5 x .027uF P4518-ND
C5 0.01uF 1 x 495-1065-1-ND
IC1 1 x AD8552RU AD8552ARUZ-ND
MOLEX PRT-08231 SparkFun
R1,R4 2 x 200 200EBK-ND
R2,R5 2 x 0.8M 820KEBK-ND
R3,R6 2 x 510 510EBK-ND
R7,R8 2 x 604 620EBK-ND
(TP1,2,3,4) 4 x MLX90247-ESF-DSA
SMD version (shown at top):
- Buy the board here.
- Eagle 5 files: ir_dualSMD.sch, ir_dualSMD.brd
C1,C2,C3,C4,C6 5 x .027uF PCC1833CT-ND
C5 0.01uF 1 x 478-1383-1-ND
IC1 1 x AD8552RU AD8552ARUZ-ND
MOLEX PRT-08231 SparkFun
R1,R4 2 x 200 P200ACT-ND
R2,R5 2 x 0.8M P806KCCT-ND
R3,R6 2 x 510 P510ZCT-ND
R7,R8 2 x 604 RHM604CCT-ND
(TP1,2,3,4) 4 x MLX90247-ESF-DSA
"RoboGames is the world's largest open robot competition (even the Guinness Book of World Records says so!) We invite the best minds from around the world to compete in over 70 different events. Combat robots, walking humanoids, soccer bots, sumo bots, and even androids that do kung-fu. Some robots are autonomous, some are remote controlled - but they're all cool! As an open event, anyone can compete - this means you. "
No UAVs (that I know of) but I might be there on Sunday with the kids to check out the battlebots. PM if you're coming and perhaps we can meet up.
Changes include:
- All surface mount technology, to make the board smaller, lighter and easier to manufacture.
- Now with two dedicated RC channel input ports, so you can easily fly in RC mode (for testing) or autonomous mode.
- A new power supply that can handle anything from 3V to 18v and output both 3.3v and 5v. This will allow you a range of battery options, from 2 or 4 AAAs (cheap) to a 7.4v Li-Po (expensive).
- Includes a port for a servo, for the vectoring thruster
- Includes ports for a Bluetooth wireless module and a magnetometer (compass)
The board is designed to fit in and work with both a modded toy RC blimp or a custom blimp gondola.
You can buy the board here.
Eagle 5 files are here: blimp_SMD_V4.sch blimp_SMD_V4.brd
Here are the components that you need:SMD DIGIKEY parts:
Capacitors:
(C4)2x 22uF 495-1556-1-ND
(C1,2,6,7,9,10,11,12,13)9x 0.1uF PCC1828CT-ND
(C8) 1x 33uF 478-1715-1-ND
Diodes:
(D4,D5,D6,D7):4x Navi LED (green) 67-1357-1-ND
(D2):1x Power LED (red) 67-1359-1-ND
(D3) 1x Status LED (blue) 160-1643-1-ND
IC's:
(IC1)1 x Atmega168, ATMEGA168V-10AU-ND
(IC2) 1xLM3940: LM3940IMP-3.3CT-ND
(IC3) 1xL4049: 497-1404-5-ND
Resistors:
(R1) 1x 10kOhms P10.0KCCT-ND
(R2) 2x 1Kohms P1.00KCCT-ND
(R3-R7) 4x 30 ohms P30ACT-ND
3x LB1630 (motor controller).
4x IR sensors (Pololu)
Switch:
(S1) Switch SMD, sparkfun
A lot of pin headers
Arduino code coming soon