Buy an Axon, Axon II, or Axon Mote and build a great robot, while helping to support SoR.
0 Members and 1 Guest are viewing this topic.
1. Yes, a sonar receiver will pick out any wave. There is no way for it to know if it is its own wave or someone else's, unless some filtering is applied. I think the purpose of the ring is another one - you send out one ping, and watch it with all 8 receivers, so you can understand more about how the signal reflected.
2. I do not know how power drain should be spread out, but picture this: if you are in a tight environment, echoes will come back quick. if you are in an open hall, they might never come back (or will come, but too faint to detect). Your best guess it to make the next sonar ping depending on the last echo + some reflection kill time or a timeout variable (if no echo will come back, timeout will occur)
do you have a picture of the robot that it came off of?Bane
since this is a sensor you took off a robot, why not just reverse engineer the source code that came with it?
It is very slow to transmit from one sonar at a time, as you need to provide at least 50 milliseconds per ping/listen cycle (25 ft range). Instead, if the hardware supports this (unclear because of their multiplexer circuit), you should fire all sonars at the same time and listen simultaneously to all receivers. If you are only looking for the first sonar return on each channel, you will not have an issue with secondary reflections. However, this approach won't work if you are mapping based on multiple returns.
ISR(TIMER0_OVF_vect){ extern short adcChannel; // Handle ADC conversions -- cycle through different // inputs at a rate of 100KHz/Number of inputs = 12.5Ksps if(!(ADCSRA & ADCSTART)){ // Conversion completed adcOuts[adcChannel] = ADC; // Save conversion output // adcStatus[adcChannel] = ADCVALID; //??Does this make a difference adcChannel = (adcChannel +1) & 0x7; // Cycle through 8 channels ADMUX = (ADCREF | (1 << adcChannel)); // Select next input ADCSRA |= ADCSTART; // Start conversions } // Handle system and delay timing systime++; if(systime == delaytime) delaytime = 0; TCNT0 = CLKTICK; // init counter // TIFR1 &= (1 << TOV1); // Done automatically when ISR is executed}