View Single Post
Old Jan 27, 2012, 04:26 AM
kile is offline
Find More Posts by kile
Registered User
Joined Jan 2011
113 Posts
Originally Posted by blackmoon View Post
Now at least on the bench the SP responds well to all the stick movements from the TX.
Congratulations and thanks for the support! It's a great feeling to have someone on the other side of the globe build the circuit and make it work I've never done this sort of collaboration before and I like it

Originally Posted by blackmoon View Post
Now pcb etching to complete this and fly .
I can send you EagleCAD files of the previous version of the PCB(s), if you want. I don't want to upload that version because of the misplaced nRF module -- you can't close the case. I am currently working on a single PCB version. I think I will have a DIY press&peel prototype by mid next week. If that turns out well, I will order a batch of factory made PCBs from ITead.

I've fixed a bug in the encoding of the packets which caused unreliable behavior from the heli. The problem you mentioned with having to restart the TX could be due to that. I've uploaded the new version of the source code. Other changes:

- changed the hw_setup pin assignments from the old ATmega644p version to the first prototype with ATmega88pa.
- the 3.3V regulator I chose (LP2980) has an on/off feature controlled through a digital pin. This is great for resetting the nRF (not so important for the end product but very important during testing) which is a feature I wish nRF had built in. So, I've added NRF_PWR_PORT & NRF_PWR_PIN definitions and a nRF_Reset() function.

If you want to fix the bug I mentioned, but don't want to use the new source version, just change the TX_Send() function with this one:

void TX_Send(void)
	// clear the TX buffer

	// cycle the channels
	if (neChannel == 10)
		neChannel = 30;
	else if (neChannel == 30)
		neChannel = 50;
		neChannel = 10;
	nRF_WriteReg(RF_CH, neChannel + neChannelOffset);

	nRF_WriteReg(CONFIG, vEN_CRC | vCRCO | vPWR_UP);	// TX mode
	// send a fresh packet to the nRF
	nRF_WriteTxPayload((uint8_t*) &nePackets[neLiveNdx], PACKET_LENGTH);

	nRF_CE_hi;		// power up the transceiver
	// wait for MAX_RT
	loop_until_bit_is_clear(PIN(NRF_IRQ_PORT), NRF_IRQ_BIT);

	nRF_WriteReg(STATUS, vMAX_RT);	// reset MAX_RT flag
	nRF_CE_lo;		// power down the transceiver
It's a tiny casting problem but it caused weird behavior.

Originally Posted by blackmoon View Post
I learned a lot doing this and it was fun (not destroying my harvested module tough), thank you again Kile.
It's a pleasure, and I learned a lot too, and I'm only just beginning

BTW, the new PCB will have a few additions:

- a FTDI cable breakout for an Arduino compatible bootloader and serial output. It will be good for configuring the channer order. Many people already have the cable, so I think this will be useful.
- Saleae Logic analyzer breakout. I love my Logic 16, so this is a must for me It takes up a lot of space, but it's worth it.
- Buzzer. Currenly it's a fixed frequency on/off version, but I will put a PWM driven one for a little frequency range.
- V-USB connection. This will allow the device to be upgraded and configured through USB if you don't have or don't want the FTDI cable. It's in the schematics at the moment, but I think I might drop this if I don't have enough space on the board. We'll see...
kile is offline Find More Posts by kile
Last edited by kile; Jan 27, 2012 at 04:31 AM.
Reply With Quote