Nano issues.

Ok I don’t know if any of you have been following my Automated Tram post in the programming section, but I believe I got the software good there. But I have issues with my Nanos when I try to use them in that system. 4 Generic FTDI Nanos all will no longer connect to my PC and all 4 will not run my code correctly any more. They all ran fine at first but after 1 or 2 power cycles they all went wonky and I lost the ability to connect to my pc.

First one, I soldered to a board (I’m good at soldering and don’t get things too hot) but it wouldn’t connect after that. I had used this one in the past for other projects and testing. Tried reloading the boot loader. The Arduino IDE said it succeeded, but still no connection to the PC.

#2 I loaded the program first then soldered to a board, it worked well for a few days then wonky. After wonky it wouldn’t connect to my PC

#3 I used a breakout board, no soldering on the Nano. This one worked the best for the longest. I had it running the tram for 2 days and aside from an occasional oops, it usually corrected itself the next lap and was fine. I had a new tram that was not broken in yet so I unplugged the setup and installed a regular train power pack... broke in tram... hooked arduino system back up and all wonky, worse than any of the others. No communication to the PC.

#4. I’m getting suspicious now and run an experiment. I loaded the program, success. Installed into breakout board and start serial monitor. Tram runs ok, finds happy in 2 laps (pretty typical) and runs for an hour flawlessly. Unplugged USB cable, still ran Ok 15 minutes later I plugged it back in and the serial monitor started working again. So I powered down the system (a switch that cuts AC power to the PS) and waited a minute or so then powered back up. No connection to PC and the tram never worked properly on this Nano again.

Any ideas?

Yes, I have been following your other thread :wink:

Your diagram from that thread; I personally find it a little big (1 MB) and hence I did not put it directly here.

In you other thread, I mentioned a separate 5V supply for Nano and sensors. Did you try?

I'm further basically out of ideas.

PS
The is not really an "Installation and Troubleshooting" question as this is about your project :wink: You can click the 'report to moderator' link under your post and ask it to be moved to e.g. "Project Guidance" or "Microcontrollers"; not sure which one is better suited.

I’m fresh out of functioning nanos. It seems that something is killing them, that’s why I put this post in troubleshooting. My tram program works great with my Uno so I’m just gonna keep that board moving forward. Plus there is more than enough room in the box that will keep everything safe under the base.

I’m hoping that someone here will know what is going on with the Nanos and help me get them to work again. They are about 5 years old, and I know that 2 of them have been used in the past with no issue. I made a puzzle game with one that used an lcd and the other one I had it count down and trip a light. It was going to be a rocket launcher but my kids were not really into rockets.

Indeed, looking at the diagram, I would second the idea of using a separate 5V power supply and not rely on the 5V output of the H-bridge board. It is just possible that you are getting spikes/transients from that H-bridge board that are affecting the Arduinos. BTW, are you sure the output is actually at 5V and the on-board regulator hasn't failed?

You did mention in your other thread that the motor voltage exceeds 12V if only slightly. I found the following information regarding that H-bridge board:

(!) When using the 5V terminal as an output (J1 fitted) DO NOT draw more than 100mA from this terminal.
(!) For Vm voltages > 12V jumper J1 must be removed and a separate 5V supply connected the 5V terminal.

Failure to observe the above conditions will result in permanent damage to the on-board regulator resulting in the motor supply voltage Vm being applied to the 5V terminal.

It does look like the operating conditions may be pushing the limits of the on-board 5V regulator. In the event that the regulator has failed, you would be getting unregulated >12V to your Arduinos. While they are tolerant up to 12V, this would again be rather pushing things. Your Uno's may be a bit more resilient than the Nanos but I wouldn't count on that for too long....

The safest thing is to power the Arduino + sensor shield from a separate 5V supply.

I have checked the power supply for a change in voltage, and it was spot on. I also checked the output of the Hbridge and it too was spot on 5v. Powering on and off a few times gave no spike in the voltage, it actually will go 4.6-5.0 in about a half a second, and hold at 5.0 after that. Nothing is getting hot and there is no magic smoke smell on any of the components.

Could being a generic Nano have anything to do here? I heard about the FTDI chip issue, and I checked all my units are FTDI units, I have updated my FTDI drivers, still no connection.