Geoff Bunza geoffb

Model animation—bringing models to life—adds enormously to the interest and enjoyment of any layout or individual model!  Recently a fellow modeler (Rick Wade https://forum.mrhmag.com/post/my-operating-ho-scale-tv-on-my-richlawn-rr-layout-12199201) dreamed about building a working HO scale TV—and I wondered—is that possible?  Then I found Harry’s TV shop and stopped wondering…

fkowalick

Cable test

Jim,

I just completed the cable test and it checked out fine.  I saw just what I typed on the screen so I am certain the problem is with the pro mini and not the cable.   Now I wonder whether there is something I can do to salvage it or if I just have to purchase another.

Reply 0
Jim at BSME

Pro mini issues

EDIT: correctly addressed by reply to Fred, instead of Erik.

Fred, doing some reading I came across that some non-Italian produced pro-mini's are shipped without a boot-loader, the small program that sits in the microprocessor looking for a sketch upload request.

I am too concerned that it does power on with the 9v battery, but it still powers on with the USB connection correct?

When you had the cable connected yellow to DTR/GRN, white to RXD/RXI, green to TXD/TXO, Red to VCC, Black to GND, and blue to GND/BLK

What is the error message you are getting in the window when you try to upload the sketch?

Can you look on the pro-mini for a crystal oscillator, usually a small silver can next to the Atmega chip, and check the numbers/letters are on it? For a 16 Mhz chip the oscillator could be labeled as follows: R160JAC6s, 16.000-30, A1, A'N A'a, if it is the 8 Mhz oscillator it could be labeled as: 80e, 80'0.  I found this information at:  http://arduino.stackexchange.com/questions/8511/how-to-identify-arduino-mini-pro-5v-vs-3-3v/8518.

The reason I think more people seem to have problems with the pro-mini is the two pieces to the setup, other arduinos come with an on board USB to serial adapter for programming.  When the adapter is built-in all we have to worry about is getting the driver for the one on board.

Reply 0
fkowalick

Pro Mini issues

Jim,

While you addressed your response to Erik, I assume you meant me.  The oscillator says A 1.  I have also read about the lack of a bootloader but I haven't been able to find a definitive test to determine if that is the problem.  Many of the posts say lack of a bootloader is rare.  Many also say if the green led is blinking that means there is a bootloader and on mine the green led does blink continuously when power is applied by the USB cable.

Reply 0
Jim at BSME

pro mini

Fred, sorry about the name was posting another message and got mixed up where I was typing.

Well we know that you have the 5v, 16 Mhz ATmega328 pro-mini, so at least we know that setting is correct in the IDE. I have located a FTDI cable that I will try with my pro-mini tonight and see if I can figure anything out. When I program the pro-mini with my other USB adapter the flashing light goes out at the beginning of the upload, which makes sense as the board resets to start the upload process, since yours does not do that, it makes me wonder if the boot loader is installed properly.

When you go to upload to the pro-mini, hit upload in the IDE and immediately after that press the reset button on the board.

Also you could try the get Board info from the IDE when connected to the pro-mini to see if that returns anything.

The 9v battery not powering the pro-mini would indicate a problem with the on board regulator, you could inspect that part, outlined in red here:

egulator.jpg 

Unfortunately to burn a boot loader, you either need a programmer or a working arduino, the uno R3 would be the easiest. Another option is to find if you are near a makerspace or hackerspace, someone there should be able to help you at least have an arduino pro-mini to fully test the cable, driver, and IDE. I can't seem to bring up the directory of makerspaces at:  http://spaces.makerspace.com/makerspace-directory, but can get to the directory of hackerspaces at:  https://wiki.hackerspaces.org/List_of_Hackerspaces. The two places are very similar, I really think the only reason for makerspaces, besides being sort of sponsored by make magazine, is the negative connotation of the word hacker.

Reply 0
fkowalick

Troubleshooting

Jim,

You had asked what error message I was getting when uploading the sketch.  I have gotten  several different messages:  1) a non specific "problem uploading to board,"  2) "write error, sorry no info available", 3) "not in sync," 4)" programmer not responding", and 5) "can't open device Com 3, access is denied."  I have searched numerous forums and posts for a solution and have come up with nothing.  Each of these seems to point to a communication problem between the ide and the USB serial converter.  I especially don't understand the error "can't open device Com 3, access is denied," because device manager consistently says the USB cable is working properly, the drivers are up to date, it is assigned Com 3, and Com 3 is checked in the IDE.  Further I made the cable test you recommended and it passed, that is I saw on the screen only what I typed and did not receive any message to the effect non genuine device found.  I am beginning to think there is something about Windows 10 that is not allowing the IDE to talk to the USB cable but I have exhausted all efforts to find out why and have come to a dead end.  Very few of the posts I have seen deal with Windows 10, perhaps because it has not been out that long.

As to the problem of it not powering up from the battery, I have inspected the regulator and there is no obvious damage.

 

 

 

Reply 0
fkowalick

New error message

Jim,

I received a new error message I had not seen before:  "The selected serial port does not exist or your board is not connected."

I also have a question:  In the tools menu there is a category "Get Board Info"  With my pro mini connected to the computer I get the following result:

                           BN:  Unknown Board

                           VID:  0403

                            PID:  6001

                            SN:  Upload any sketch to obtain it.

Shouldn't Pro Mini show up after BN instead of unknown board?  What do the other values signify and are they correct?

                        

Reply 0
Jim at BSME

Cabling

Fred,

I got my FTDI cable and after loading two drivers, one under the USB controllers section and then a device showed up under the Other devices which I then installed a driver for I was able to upload to the pro mini.I did get the sync error, but switched the RX/TX wires then it worked.

So with my FTDI cable I connected the wires as follows: 

USB Cable wire namePro-mini pin name
RTSDTR
RXDTXO
TXDRXI
VCCVCC
GNDGND
CTSGRN

I didn't have any issue with having the pro-mini connected to the adapter cable and then plugging it into the computer.  One thing I did notice is the flashing of the LED looks like there may be a pattern of three quick flashes that repeat a couple times when power is first applied.

Reply 0
fkowalick

Cabling

Jim,

What version of Windows is on the computer to which you connected the pro mini via the FTDI cable?   I have tried to upload the sketch on my PC and laptop, both of which are running Windows 10, with the results you know about.  When the USB cable is connected to either computer it makes a difference whether the pro mini is connected to the cable before or after the cable is connected to the computer.  Something in the pro mini itself must be causing the error messages in my previous post, including the newest one about the serial port does not exist or the board is not connected.  How could the serial port show up in device manager and then not exist when the sketch is uploaded?  I also wonder about the unknown board message in the Get Board Info.  When you use the FTDI cable to connect your pro mini do you get the same result or is the board identified?  I do not know enough about computers to know if lack of a bootloader could cause the type of problems I have experienced.  I did, however, go back and look at the eBay listing for the unit I bought and noticed it is described as a bare board.  I didn't attach any significance to that description at the time, but now I wonder what they meant by a bare board.  There is nothing in the description that indicates it either does or does not have bootloader.  Although the board I bought was probably made in China I purchased it from a seller in the US.

 

Reply 0
Dave.S58

win 10 problem?

Just a thought:

If you feel that it is a win10 problem, have you tried to run the upload program in compatibility mode? 

If you right click on the program file that runs the upload there are two ways to run in compatibility mode. One is to select the file, right click and select the compatibility troubleshooter, or you can right click the file, select properties and then the compatibility tab, there you can select to run it under various systems all the way back to win95.

If you try that with no success you can turn off compatibility mode by right clicking the file , select properties, compatibility tab and uncheck the run compatibility box.

You may have to be signed on as an administrator on Win10 to make those changes

Reply 0
Jim at BSME

PC configuration

Fred,

I used a laptop with Windows 10 Pro, 64-bit OS, used the USB 2.0 port to connect the FTDI cable. Don't think the pro will matter, and the driver should have loaded the correct one on install (i.e. 32-bit for the 32-bit OS and 64-bit for the 64-bit OS).

I will have to check what Get Board Info returns for me, sorry I didn't think to check that last night when testing.

Usually a bare board for a pro-mini means that the header pins are not soldered to the board and may not even be provided with the board.

Certainly a missing boot loader could cause the "avrdude: stk500_getsync(): not in sync: resp=0x00" error, but so can't the RX/TX wires not being correct. Or if the pro-mini is not connected at all.

When you press the reset button on the pro-mini right after releasing the button you should see the LED flash quickly 3 times and it may repeat. That is when the boot loader is waiting for the communications from the program to download the sketch. Normally the reset happens through software before the beginning of the download process.

Reply 0
fkowalick

PC configuration

Jim,

When I press the reset button on my pro mini it does not affect the flashing rate of the green led.  When powered up the green led begins to flash at a steady rate and pushing the reset button only causes the green led to go out while the button is held.  When I let up on the button the green led goes back to flashing at the same rate as before.  There are no three quick flashes.

I am now getting the error "serial port does not exist or board is not connected" on a regular basis so obviously my pro mini is not in connection with my computer.  I have checked all of the connections with my multimeter and they test fine so I am reasonably certain the problem is not in the hardware.  I guess I received a pro mini without a bootloader, something has corrupted the pro mini, or it was just bad from the beginning.  It doesn't seem like it could be a driver problem as, when the cable is plugged in alone, device manager says it is working properly and the drivers are up to date.  I am curious, however, as to what driver you have for your FTDI cable.  My computer says Driver provider FTDI, Date 9/28/2016 and version 2.12.24.0

Again, if I connect the pro mini to the cable and then connect the cable to the computer I get one of two errors:  Device has malfunctioned (code 43) or the device cannot start (code 10) operation failed.

Reply 0
Kevin Rowbotham

Flashing LED

The green LED is connected to pin 13 I think.  The regular flashing LED could be the basic flashing LED sketch running on the promini...?  Wish we were neighbors as I have an FTDI cable and spare promini boards on hand.

Best of luck!

Regards,

Reply 0
Jim at BSME

PC configuration

I have two different manufactured pro-minis and I see they behave differently as far as the initial flashing of the LED. I am fairly certain that no sketches have been loaded on the second one and it behaves as yours, a slow steady rate of flashing, but I can successfully upload a sketch.

The board info returns BN: unknown board, VID:0403, PID:6001, SN: Upload any sketch to obtain it, and even after uploading a sketch the BN: and SN: remain as the same. So I tried an UNO r3 clone and get similar results, BN, and SN: never get a value.

The driver I am using was earlier, it was 3/9/2016, 2.12.16.0, provider is FTDI, I can not install a later version through windows update, update driver says "The best driver software for your device is already installed."  I found on FTDI's website the 2.12.24 driver but the release date listed is 10-10-2016 ( http://www.ftdichip.com/Drivers/VCP.htm). I downloaded and installed that one and when I check the date was 9-28-2016. I updated to this version under the Port category only and upload still worked for me - sorry. Was hoping that the two different versions were the problem.

The Device has malfunctioned and device can not start seem like driver problems to me. I think it would be worthwhile to uninstall the device, reconnect the cable and let windows find the device driver and install it. The FTDI cable has to be connected to uninstall the device. The FTDI driver appears in two places for me, once under Ports (COM & LPT) and once under Universal Serial Bus Controllers as USB Serial Converter, I would uninstall both. Like I said when I connected my cable windows did two driver installs. I would reboot (restart) after uninstalling the drivers before reconnecting the cable to install.

Reply 0
fkowalick

PC configuration

Jim,

I went through the process of uninstalling and reinstalling the FTDI cable and drivers but it has not made any difference in my ability to upload the sketch.  After the reinstall, when I connect the cable to the computer with the pro mini attached in device manager the USB Serial Converter shows up as working properly, but under Ports (COM & LPT) USB Serial Port (COM3) shows up with a yellow triangle and the message cannot start.  In both places the drivers are listed as 3/9/2016 2.12.16.0.  I tried changing the com port to COM5 just to see if there is a problem with COM3, but I still get the error "device cannot start" after connecting the FTDI cable with the pro mini attached.  And when I try to upload the sketch Arduino gives me the message that the serial port does not exist or my board is not connected.

Reply 0
Brent Ciccone Brentglen

FTDI Cable

I still think the problem is the ftdi cable. Get a good one from someplace like sparkfun or digikey. I was having similar problems until I bought the breakout board from sparkfun.

https://www.sparkfun.com/products/9716

You will need a mini-USB cable with this one, but you probably already have one as part of some other device.

While you are at it, order one of their pro mini boards as well. That way you know that you have a good set of hardware to work with and you can sort out your problems

Reply 0
fkowalick

FTDI cable

Perhaps it is a bad cable, however, I tried changing the serial port to COM1 and discovered the yellow caution symbol and error (Code 10) went away.  However, at the same time the green led stopped flashing and only now flashes when I press and release the reset button.  I thought I was on my way to uploading the sketch when I received three new error messages:

Avrdude: loadaddr(): (6) protocol error, expect=0x14 resp=0xfc

read operation not supported for memory "flash"

failed to read all of flash memory, rc=-2

Reply 0
Jim at BSME

Next step

I'm more inclined to believe it is the pro-mini that has an issue as your cable appears to function correctly, no device errors when the pro-mini is not connected and you can transmit and receive characters fine when you loop back the transmit to the receive. Can you measure the 5v output to make sure that is not way out of range?

Also one other thing to check is for any solder bridges at the programming pins, even if that was factory soldered it is good to check for that, actually you should check all the pins for solder bridges as one somewhere else on the board could be causing an issue.

One question I have is how do you change the COM port? mine is assigned automatically when the driver loads and the cable is connected and I don't see a way to change that.

Do you have other unique USB devices connected? They shouldn't cause any problems, but if they are something other than keyboard and/or mouse it certainly would not hurt to try without them connected.

I think we are pretty much at the point where you need a known good setup to test further. Even if you don't belong to a train club, if you have one in your area there may be a person there to help, or the maker/hacker spaces have an electronics hobbyist there who could help. The local high school robotics club would be another source of electronics hobbyists for help. Several other groups use Arduinos: Ham radio, RC guys, home automation, even some photographers and astronomy guys, anyone who wants to control or sense something is a likely person to ask for help, that is the thing about Arduinos they are used by lots of hobbyists, not just us train guys.

 

Reply 0
fkowalick

Next step

Jim,

I learned that if you right click on the USB Serial Port and open up properties you will get a window that has Port Settings referenced at the top.  In Port Settings go to Advanced and in that window it will show COM Port number. Clicking on the down arrow will bring up a list of all the com ports and one can be selected, provided it is not already in use.  Select the new com port and click ok.

In fact from my experience trying to load the Harry's sketch I have learned more about computers than I ever wanted to.  I look at a computer as a tool, not an avocation.  I am so tired of searching Arduino forums and reading posts that are written using computer jargon and acronyms that I do not understand.  Apparently Google is tired of my searches as well as now I have to enter some nonsencsical word in a dialog box to continue in order to prove that I am a real person.

With that said, I ran across another post that seems to indicate the problem is caused by the way in which the IDE is launched.  One post I read says:  "If the IDE is launched by clicking on an .ino it does not appear possible to then 'upload' the completed code to any of the Arduinos that I tested (uno & mega).  If however, the IDE is launched on its own and the .ino is then loaded...compilation & uploading will then work."  I don't know if this would apply to the pro mini, as well as the uno & mega, but even if it does I don't know enough to really understand how the writer says the IDE should be launched.  I downloaded the sketch and other files before I even received my pro mini.  When I got the pro mini I downloaded the IDE and it placed a icon on my desktop.  I have started the IDE by clicking on that icon and when I do it opens with the sketch already there.

I agree that I need to find a working example to test my set up against.  In the meantime can you tell me how a successful upload goes.  When I click on the upload button I get the message compiling the sketch and that seems to take several minutes.  Is that normal?  Then I get a message in white letters about the sketch and the message on the blue field switches to uploading.  Sometimes I immediately get the orange messages that indicate an error, and sometimes it says uploading for a period of time before the error message pops up.  I notice that even after I get the error messages it still says uploading.  When a sketch successfully uploads what indication is given by the IDE?

Reply 0
Jim at BSME

Next step

Fred,

As for invoking the IDE, I have always double clicked the icon on the desktop and the last sketch loaded is populated in the editor window, which I can then compile and upload. Also I just use the upload button in the IDE (right arrow) since it compiles before uploading anyway instead of the compile/verify button first. I just tried by double clicking on the .ino file and everything compiled and uploaded, I did have to set the board and Port though, something which seems to be remembered when double clicking the desktop icon.

Upon successful upload the IDE will state Done Uploading where you see the compilation and uploading message. The compilation seems like it takes a while, so I timed mine and it takes about a minute to compile and about 30 seconds to upload this sketch. I imagine different hardware will take different amounts of time, but wouldn't expect it to be radically different unless you have really old hardware.

Thanks for the info on setting the com port, I would not use 1 or 2 as those are legacy hardware serial ports, which may even exist on your desktop.  That might be why you got different error messages when trying to use those. I would expect the same results no matter what COM port number you use. Since you brought up port settings, make sure they are the standard 9600, 8, None, 1, None for the USB to serial adapter.

Reply 0
Geoff Bunza geoffb

Back in action

Hi Fred, Jim, et al,

Fred you have had a bad time while I was off the grid in China. I read through all the messages and Jim has offered some very good advice to you. I would like to confirm a few things:

Your Serial USB cable was similar to this: http://www.ebay.com/itm/400985415752

So your original pin mapping was (in order):

Red wire: 5V
    Black wire: GND
    White wire: RXD
    Green wire: TXD
    Yellow wire: RTS
    Blue wire: CTS

and it needed to be rearranged to:

Pin Wire     Signal on      Signal on
#   Color      Cable            Pro Mini Label

1  Black        GND               GND or BLK
2  Blue          CTS
3  Red          +5 Volts          VCC
4  Green       TXD     
5  White        RXD     
6  Yellow       RTS                DTR or GRN

You can reference the USB cable problems discussion here: SMA20 New Low Cost 17 Channel DCC Decoders & Dual Motor,LED, & Servo Control Updated: 6 Ftns/Pin & New Features  http://model-railroad-hobbyist.com/node/24316

Please verify that this is exactly what you changed the order to.

Next, in Win 10 open the Device Manager. Under the menu pick View, click on "Show Hidden Devices"

Then Open the list of Ports with you USB cable plugged in. For all the ports you "selected for your USB cable right click on them and "Uninstall." Then, only If you know your computer well, if you don't recognize any of the other ports listed, also uninstalled them too. If you are doubtful, then leave them alone.

Now unplug the USB serial cable, and start up your Arduino IDE directly, not by double clicking the .ino file. Are there any serial ports listed (COMx ports) Port may be grayed out if you are using a later version. Hopefully there are no ports listed. Now close the IDE, and restart your computer. The latest versions of the Arduino IDE have been reported to cause some strange problems with Win 10, so I would recommend you download an older version like 1.6.4 from https://www.arduino.cc/en/Main/OldSoftwareReleases#previous

and install it. Now plug in your usb serial cable and attach it to the Pro Mini, and when asked for a driver do not let windows automatically load it, but go the the release directory and find ...\arduino-1.6.4\drivers\FTDI USB Drivers to allow loading of the correct driver. Now start the Arduino 1.6.4 IDE look at the port list and select the USB serial port and the Pro Mini Board. If you have not corrupted the Pro Mini, when powered through the USB, based on your original description, the green LED should be blinking, and a red Power LED should be on constantly. The blink sketch is often used by the board fabricator as a final board test. Since you reported this behavior in a previous post, if you don't have it now you either downloaded another sketch (or a partial), or somehow had a board failure.

See if you can download the BLINK example from the File-> Examples-> 01.Basic-> Blink sketch.

If you can successfully download the new blink sketch you have everything operational. Let me know where things stand. If you think you corrupted the bootloader (as someone listed) you need another Pro Mini or a raw bootloader to reload the boot. If you can get ahold of another Pro Mini that would help. If you can't let me know where you are located via a PM.

Have fun! 
Best regards,
Geoff Bunza

PS. Sincere thanks to all for helping out in my absence from the blog.

Reply 0
fkowalick

Back in action

Geoff,

Thank you, I will try everything you suggest.  But first I have a question.  This afternoon, while trying to upload the sketch on a computer different from the one I had been using I noticed that when I checked "set rts on close" it immediately caused a code 10 error.  I have been looking on line for information about what could cause this but have come up empty.  Can you tell me why device manager should switch from showing a working com port to one showing a code 10 error after checking the "set rts on close?"  I have a different, and slightly more expensive cable, from a US supplier, but it has the wire arrangement you describe, and I have it correctly wired as you indicate it should, except possibly for tdx and rdx as you do not list which terminals on the pro mini should be connected to tdx and rxd on the cable.

Reply 0
Geoff Bunza geoffb

@Fred re:RTS error

Hi Fred,

Your device manager is likely looking for a response to the RTS set and not getting what it expects. I don't know if this is just an aberration with the FTDI/USB hardware interface or a biproduct of the USB channel closing so the normal serial operation ceases. Remember that the Device manager interface things it has a traditional permanent serial interface connected. In any case, don't set the option. These is also sometimes found an option for extended double buffering, don't set that either. Start by using as many of the default settings as possible, then once you have it working you can go play with it. Both the newest Arduino IDE's (from about 1.6.8 and on) and later Windows versions after Win 7 (particularly Win 10) have had anomalies reported. When something squirrelly happens to me I always revert to 1.6.4 and try things out. Always try to simplify the design and minimize what can go wrong when trying to sort these things out. Then add options/features back on, one at a time if possible. Sometimes you can overlook the most trivial detail which can mess everything up! It's like letting a little but of glue ooze out onto the wrong part messing up your fine finish on a great model!! Yuk!!!

Have fun! 
Best regards,
Geoff
Reply 0
fkowalick

Driver installation

Geoff,

I went through the procedure you outlined, but windows does not let me install the drivers from the Arduino directory.  When I plug the cable into the computer windows does not ask for a driver.  The device manager shows the com port 3, with a yellow triangle, and the code 10 message.  Under driver it says FTDI as the driver provider and version 2.12.16.0 dated 3/9/2016. 

I also discovered after uninstalling 1.6.12 and installing 1.6.4 when I try to open the .ino file my computer screen changes and then I get a message asking whether I want to allow this app to make changes to my computer and the dialog box refers to aurdino.exe.  When I had 1.6.12 if I clicked on the .ino file the ide opened showing the sketch.  If I open the ide directly I get the ide with a bare bones sketch file listed as sketch_oct22a.

Reply 0
Geoff Bunza geoffb

@Fred

Hi Fred,

Leave your USB cable plugged in, open device manager, find the COM3 USB port, right click on the port listing, and click on Update driver, Browse my computer, and point it to the Arduino drivers folder. That should make it happen.

Have fun! 

Best regards,

Geoff

Reply 0
Yaron Bandell ybandell

drivers from Arduino directory

Fred,

I had to explicitly tell my old Windows Vista machine to add the drivers in the Arduino directory to the Windows driver store. I believe I used the pnputil.exe command to do so, but it has been a few weeks since I did this. I knew I should have written it down..... Anyways, see the Microsoft Technet article on the pnputil.exe command:

https://technet.microsoft.com/en-us/library/cc772036(v=ws.11).aspx

I suggest removing the installed hardware drivers as described in an earlier post, followed by unplugging the FTDI adapter and a reboot of the computer. Now use the pnputil.exe command on an Administrator (!) command prompt to stage the Arduino driver version:

cd "\Program Files (x86)\Arduino\drivers"

pnputil -a "FTDI USB Drivers/ftdibus.inf"

pnputil -a "FTDI USB Drivers/ftdiport.inf"

Now plug in the FTDI device and the FTDI drivers from the Arduino driver directory should be installed.

Hope this helps.

Reply 0
Reply