LowPowerLab Forum

Hardware support => Moteino => Topic started by: ejhollas on June 06, 2016, 07:26:10 PM

Title: Programming Moteino for the first time [FTDI / DTR pin role]
Post by: ejhollas on June 06, 2016, 07:26:10 PM
This is my fourth Arduino based board to work with, so I am surprised to be unable to download a sketch. Instead of using an FTDI board offered at the shop, I have used a FTDI board designed for a Raspberry Pi, a SiLabs USB to Serial board, and an RFDuino USB adapter. None of the adapters seem to work for me.

I have the GND, VIN, RX, and TX pins attached to the adapters. Some have suggested that I ground the DTR pin so the board will reset on power-on. My USB to Serial adapters do not support the DTR signal. No other pins, are connected.

There is 3.3v on the VIN, RX and TX pins. When the adapter is connected to the PC, the Moteino's led blinks once, holds lit, then goes out. The COM port is seen on the Windows system and the Arduino IDE is configured to use that port. I have tried to program using the latest IDE and the Motenino board JSON setting as well as an UNO with IDE 1.5.8.

Both of my boards have the extra SPI flash on board. Neither wants to accept a download.

What am I doing wrong?
Regards,
Eric
Title: Re: Programming Moteino for the first time
Post by: luisr320 on June 07, 2016, 05:59:55 AM
With your setup, can you upload a sketch into a normal UNO? Can you open the serial monitor? What board do you choose on the IDE when you try to upload your sketch?

On a side note,
why don't you get a nice FTDI adapter like this one?:
(https://lowpowerlab.com/shop/image/cache/data/FTDI/DSC_6617-228x228.jpg)
You can get them on the lowpowerlab store by clicking here: https://lowpowerlab.com/shop/FTDI-Adapter (https://lowpowerlab.com/shop/FTDI-Adapter)
It's a bit pricey, when compared to what you can get on ebay, but you are also supporting Felix's work.
I have a couple of those from ebay and one from lowpowerlab. And I can tell you that this one is always a no-frills, plug & play, win/win experience and with those from ebay I always have to mess with drivers, bricking problems, and a lot of waisted time.
Also, with Felix FTDI adapter, you can choose if you want to drive a 5V or 3.3V signal board.
Note: I have no affiliation with Lowpowerlab. I'm just a very happy and thankful customer  ;)
Title: Re: Programming Moteino for the first time
Post by: Felix on June 07, 2016, 08:23:56 AM
Eric,
You will need a proper adapter that has DTR.
Luis, thanks for the plug. I make these adapters so people have something guaranteed to work.

FWIW We in the USA cannot work for $1/hour and still make a living and can't source genuine parts for 50cents. Hence a component that is USA manufactured and tested cannot cost $2.
Title: Re: Programming Moteino for the first time
Post by: ejhollas on June 07, 2016, 11:52:21 AM
Dear Felix,

How does the DTR operate? What is the signaling protocol on this interface? A Waveform diagram showing the signaling protocol would be excellent.

I work in electronics and have several other serial adapters. I also have access to a Cypress EZUSB board which can make any signaling sequence I want. This particular project is a hobby so I'd rather not buy something I do not need. If you could explain what the board is expecting, then I can make an appropriate circuit or even program one of my existing Arduino's to do the work of your custom FTDI adapter.

Eric
Title: Re: Programming Moteino for the first time
Post by: Felix on June 07, 2016, 12:16:21 PM
DTR is used to reset the target board, so it goes into the bootloader which would accept your new program and rewrite the flash with it. Without a DTR you have to reset the target manually just after clicking Upload in the IDE.
http://forum.arduino.cc/index.php?topic=53631.0
Title: Re: Programming Moteino for the first time
Post by: ejhollas on June 07, 2016, 04:16:57 PM
Felix,

Thank you for the link and advice. I was able to solve my problem by using an RFduino USB adapter which included the DTR pin. I had tried that adapter before, but did not connect its RST pin to the Moteino's DTR pin. Once connected, the Arduino IDE downloads sketches.

Now time to work on my remote servo control system.

Regards,
Eric