Advise on mounting USBasp internally
Advise on mounting USBasp internally
I am sorry if I am asking a question that have been answered previously, but I have not been able to find the answer anywhere.
The USBasp programmers are very convenient since they are small and available for as little as 4$. I want to mount the programmer internally in the TX so I can use a standard USB cable between the computer and the TX. Mounting the board is easy enough but the problem is that if you mount the USBasp internally the board is powered by the TX as soon as you turn it on. I would much prefer to leave the board inactive until it is needed, ie. when it gets powered by an attached USB cable. I want to use the TX battery for flying, not for driving an unused logic board
I have tried to disconnect pin2 (VCC), which obviously leads to the board not being powered. Sadly the TX refuses to start if pin2 isn't connected
Does anyone have any bright ideas or do I have to bite the bullet and install an uggly 6 pin connector?
The USBasp programmers are very convenient since they are small and available for as little as 4$. I want to mount the programmer internally in the TX so I can use a standard USB cable between the computer and the TX. Mounting the board is easy enough but the problem is that if you mount the USBasp internally the board is powered by the TX as soon as you turn it on. I would much prefer to leave the board inactive until it is needed, ie. when it gets powered by an attached USB cable. I want to use the TX battery for flying, not for driving an unused logic board
I have tried to disconnect pin2 (VCC), which obviously leads to the board not being powered. Sadly the TX refuses to start if pin2 isn't connected
Does anyone have any bright ideas or do I have to bite the bullet and install an uggly 6 pin connector?
- cre8tiveleo
- Posts: 1434
- Joined: Tue Dec 27, 2011 6:13 pm
- Country: -
- Location: Ontario,(GTA North)
- Contact:
Re: Advise on mounting USBasp internally
viewtopic.php?f=25&t=25
viewtopic.php?f=26&t=60
there are threads on this somewhere, at work so I can't search that well.
Mine doesn't power up unless the usb is attached. If it's attached just to the transmitter, it does not power up at all. You could always throw a little single throw switch inline on the power pin (pin 1 I think, red line on wire) that would do the trick
viewtopic.php?f=26&t=60
there are threads on this somewhere, at work so I can't search that well.
Mine doesn't power up unless the usb is attached. If it's attached just to the transmitter, it does not power up at all. You could always throw a little single throw switch inline on the power pin (pin 1 I think, red line on wire) that would do the trick
Re: Advise on mounting USBasp internally
I don't think it matters if the programmer is powered or not. From the code it looks like the programming pins are left in a high-impedance state. Unless the USBASP is currently programming.
-Gohst
-Gohst
Re: Advise on mounting USBasp internally
I installed mine pretty much like in the second link. Fits nicely. The link was actually the inspiration.
A switch on the power line was exactly what I tried ( It is pin 2. Pin 1 is MOSI ) Doesn't work. The TX doesn't start.
Come to think of it, it is strange that the board is powered via PIN2. As far as I can understand the pin is supposed to be used to power the external system, not to receive power FROM the external system.
Nice to know that there are USBasp programmers that do not steal power via VCC. I have just ordered a HK USBasp that I need in another project. The HK variant has configuration jumpers for currency and VCC on/off. Who knows, it might work...
A switch on the power line was exactly what I tried ( It is pin 2. Pin 1 is MOSI ) Doesn't work. The TX doesn't start.
Come to think of it, it is strange that the board is powered via PIN2. As far as I can understand the pin is supposed to be used to power the external system, not to receive power FROM the external system.
Nice to know that there are USBasp programmers that do not steal power via VCC. I have just ordered a HK USBasp that I need in another project. The HK variant has configuration jumpers for currency and VCC on/off. Who knows, it might work...
Re: Advise on mounting USBasp internally
But an unpowered AVR might well drive the RESET line low with it. Bit like having 2 RF modules sharing the same PPM line in the 9x without inline resistors, if one module is unpowered it will drag the signal too low for the other module to pick it up.gohsthb wrote:I don't think it matters if the programmer is powered or not. From the code it looks like the programming pins are left in a high-impedance state. Unless the USBASP is currently programming.
There seems to be many different USBASP-compatible circuits around, maybe some have small differences.
I'd maybe try a resistor inline with the RESET line between the programmer and board, 1k or so...
I'll have a look myself once my usbasp's I ordered to do just that have arrived.
Re: Advise on mounting USBasp internally
Ah yes the protection diodes in the usbasp would try to keep all of the lines at ground, if there is no Vcc. Resistors cannot be used they would affect the program timing too much. Probably just best to power the programmer the whole time. I think this is how the Smartieparts board works anyway. And it is using the usbasp type programmer. Especially on the reset line, some 9x's have large capacitors on the reset line. With a resistor it will take too long for the chip to go into reset and programming errors would occur. This is also why I advise to remove the capacitor from the reset line. And it is not needed there.But an unpowered AVR might well drive the RESET line low with it. Bit like having 2 RF modules sharing the same PPM line in the 9x without inline resistors, if one module is unpowered it will drag the signal too low for the other module to pick it up.
-Gohst
Re: Advise on mounting USBasp internally
OK, my turn. The USBASPs arrived this morning, and I hastily installed one in my radio. They come from here (link in the Wiki): http://www.ebay.com/itm/ws/eBayISAPI.dl ... OC:CH:3160Kilrah wrote:I'll have a look myself once my usbasp's I ordered to do just that have arrived.
All good, nice and clean, programs fine... however I now get random RESETs of the radio. I have the USBASP powered by the radio at all times so as to avoid the usbasp driving lines low when unpowered, but it doesn't seem to be enough.
So... those who installed a permanently wired usbasp in their 9x, did you have to do anything special?
Sv: Advise on mounting USBasp internally
Nope. Nothing special. I just soldered the leads in the ribbon cable to the specified points on the board. I have not had any resets this far, although the programmer board is permanently powered "in reverse" over the vcc.
I have given up on turning off the board. It consumes a minimal amount of energy.
The programmer I used does not look the same as yours. Mine has the main chip mounted in a 45 degrees angle to the side of the board. My board lacks support for jumper 1 and 3. Jumper 1 is always set, which I assume is the reason it is permanently powered.
Sent from my GT-N7000 using Tapatalk 2
I have given up on turning off the board. It consumes a minimal amount of energy.
The programmer I used does not look the same as yours. Mine has the main chip mounted in a 45 degrees angle to the side of the board. My board lacks support for jumper 1 and 3. Jumper 1 is always set, which I assume is the reason it is permanently powered.
Sent from my GT-N7000 using Tapatalk 2
Re: Advise on mounting USBasp internally
OK, got it sorted. The "problem" was that as I was going to power the USBASP from the radio like you I removed the jumper for USB supply. However, it turns out the stupid Chinese wired this particular USBASP implementation with the decoupling caps for the AVR on the USB side of the jumper. So, no decoupling caps -> USBASP would brownout, and RESET the radio with it.
Soldered a bridge in place of the jumper, no problems anymore. And as I hadn't wired the power line from the USB plug anyway, no risk of connecting both supplies.
The good thing is that as I had to reopen the radio I took pictures this time
The Sparkfun Mini-USB breakout board is a perfect fit, it even slides in the little rails that can be found in the battery compartment.
Soldered a bridge in place of the jumper, no problems anymore. And as I hadn't wired the power line from the USB plug anyway, no risk of connecting both supplies.
The good thing is that as I had to reopen the radio I took pictures this time
The Sparkfun Mini-USB breakout board is a perfect fit, it even slides in the little rails that can be found in the battery compartment.
Re: Advise on mounting USBasp internally
Looks like Sparkfun replaced the original USB Mini breakout board (BOB-08401) with BOB-09966, which is about 2.3mm wider and doesn't fit into the slots in the battery compartment without modification
@Kilrah, I'm experiencing similar issues with my transmitter resetting randomly after installing the USBASP programmer into my transmitter. This is also a different USBASP implementation than I've seen before. The only jumpers I see on the board are one for 5V (currently closed) and another for 3.3V. Any idea what to look for, before I get another programmer?
This is the programmer after I removed the USB connector:
@Kilrah, I'm experiencing similar issues with my transmitter resetting randomly after installing the USBASP programmer into my transmitter. This is also a different USBASP implementation than I've seen before. The only jumpers I see on the board are one for 5V (currently closed) and another for 3.3V. Any idea what to look for, before I get another programmer?
This is the programmer after I removed the USB connector:
Re: Advise on mounting USBasp internally
Yup, got some of the new wider ones too, had to install that in my 2nd TX... I cut the plastic on the TX instead of the board, but obviously that was stupid, cutting the board is much easier.
Hmm, never seen your usbasp implementation either. Mine had 2 (linked) problems. Firstly the power supply decoupling caps were connected between 5V and GND close to the USB plug, on the wrong side of the power jumper. As I hadn't fitted it because I was powering the usbasp from the radio, the AVR had no decoupling. That's what caused the initial problems. So I bridged the jumper with solder. But that wasn't really enough, as the existing decoupling caps ended being quite far from the AVR, and I still had rare, occasional resets. I scraped the PCB traces to add an additional 100nF cap as close as possible to the AVR (which should have been done from the start, damn Chinese) and no more problems since then. Did the same on the 2nd radio, and that one's fine too.
Hmm, never seen your usbasp implementation either. Mine had 2 (linked) problems. Firstly the power supply decoupling caps were connected between 5V and GND close to the USB plug, on the wrong side of the power jumper. As I hadn't fitted it because I was powering the usbasp from the radio, the AVR had no decoupling. That's what caused the initial problems. So I bridged the jumper with solder. But that wasn't really enough, as the existing decoupling caps ended being quite far from the AVR, and I still had rare, occasional resets. I scraped the PCB traces to add an additional 100nF cap as close as possible to the AVR (which should have been done from the start, damn Chinese) and no more problems since then. Did the same on the 2nd radio, and that one's fine too.
Re: Advise on mounting USBasp internally
Kilrah can you point out where you bridged the jumper & added the extra cap on your programmer?
Re: Advise on mounting USBasp internally
I removed and permanentely bridged J2, and added the cap between the 2 red lines. I removed J1 too to save space (no bridge there).