Problem converting from Uno to Nano

I have a project, where I am trying to convert from using a Uno to a Nano. So far everything works fine, as long as I power the Nano from a USB-port on my PC, but if I try to connect the USB plug to a power supply or power via the power connector or Vin or direct to +5 Volt, it will not work. Are there any significant differences from Uno to Nano, since project works perfect on Uno?

Best regards

Ulf

I've used plenty of Nanos with 5 v. connected to the Vin pin, and they always work fine. Have you checked to see if your 5 v. supply is good? Measure it under load (i.e, the Nano and its circuitry), to see if it stays near 5 v.

The two processors are identical, there should be no difference between the two. So all we can tell is you are doing something wrong. As you give very little information as to what you are actually doing that is all we can say so far.

More information equals more help.

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7 http://forum.arduino.cc/index.php/topic,148850.0.html

We need the basic info to be able to give you the answers.

Even a picture of your project to show us your component layout.

Thanks… Tom… :slight_smile:

First of all, I am soory for giving so litle information. I am not an expert, and I have tried to make a clone out of another project by Matin Kumm, making a soldering station, but I have made a board using an Arduino Nano, to save space, which means I had to copy his project, after asking him first.

The schematics and code will be layed out in a separate files:

I have had to do two small changes due to the fact I mixed the S0 and S2 line on the board I made.

When I connect the board via usb connected to the PC, everything works OK, but if I just supply 5 volt via USB or 9 volt in, then the display will start counting up to 400, and stops there.

Hope this is more illustrating

Schematics.pdf (110 KB)

Scematics.txt (13.8 KB)

Hi,
When you uploaded to the NANO did you select NANO in the IDE, even though they are 328's the IDE sees UNO as different from NANO.

Tom.... :slight_smile:

You did not show us how you connect the power supply, 5V, 12V, did all the ground connected together?

Show us a picture of your project to show us your component layout and how it connected.

Where are the S0 and S2 line on the board? it did not show on the Schematics.

Hi,
I agree with BillHo, where is the UNO NANO in the diagram, it is meaningless at the moment, especially with MOSFETs represented by boxes and not showing polarity.
We need a complete diagram, power connections included please in CAD or a picture of a hand drawn circuit in jpg, png?

Tom..... :slight_smile:

First of all, thank you so much for looking into my project.

The Nano is represented with J1 - J5 and the connectors are marked with the connection on the Nano. I don’t understand why there is a problem representing the MOSFETS with a square symbole as long as the Gate, Drain and Source are propperly marked. I will enclose the original schematics I used for the project, but please be aware I use 3 x 7 segment LED insted of 3 single 7 segment LED, and the mapping is different. This schema also uses the Arduino Uno, not the Nano. My problem is, as I have told you, that I can so far only make the system work with the Nano if I hang the USB connection direct to my PC - which will give signals to USB Data+ Data- and ID, which is not the case if I just connect direct to a powersupply, beeing into the USB-plug (5 volt) the in connection (9 volt) or direct to +5V pin on the Nano.

Please inform me if you need more information, and thank you again for your effort!

Best regards

Ulf

rt_solder_station_v1_4_schematic.pdf (71 KB)

By the way, the S0, S1 and S2 are connected via J1 (9, 10, 11). There is a ground plain on the board, and the + 12 volt is connected via POW connector on the board. I also attach a layout of the board on a separate fil

Looks like the layout file disapared. I’ll try again

Layout.pdf (364 KB)

Hi,
Where is the 5V coming from for the NANO?

Tom… :slight_smile:

Hi Tom

Thank you for caring!

When I connect via the USB I get 5 volt via the mini USB input. Else I can use 9 Volt at Vin, which will give me 5 volt at +5V on the Arduino Nano.

:slight_smile:

Hi,
What are you using as a 9V supply?
Have you got a DMM to measure your voltages when you are experiencing correct operation and failure?

Tom.... :slight_smile:

Hi Tom.

I am using a 9 volt supply regulated with a LM7809, dropping down from + 12 Volt for the soldering tip.

Martin Kumm said I shoud try to connect 2 K resistors from + 5 to the hot side of the push button
from Pin 13 and pin 12, since the internal pull up resistors in some cases did not work
Made system work, but only if connected to PC.
Have checked input voltage. Is 4.95 from PC and 5.15 from USB power supply

Looks like the problem has something to do with the Nano not beeing able to read the push buttons correct. That is inside this code:

// Problem possibly excist inside this area
void timer_sw_poll()
{
bool sw_up = !digitalRead(PIN_SW_UP); // This is pin 13
bool sw_down = !digitalRead(PIN_SW_DOWN); // This is pin 12

bool sw_changed = (sw_up != sw_up_old) || (sw_down !=sw_down_old);

if(sw_up || sw_down)
{
cnt_but_press++;

disp_on = true;
cnt_disp_blink=0;
cnt_disp_reset=0;

if((cnt_but_press >= 100) || sw_changed)
{
if(sw_up)
target_temperature += 1;
if(sw_down)
target_temperature -= 1;

if(target_temperature < 0)
target_temperature = 0;
else
if(target_temperature > MAX_TARGET_TEMP_IN_DEGREES)
target_temperature = MAX_TARGET_TEMP_IN_DEGREES;

disp_blink = true;
timer_disp_refresh();
if(!sw_changed)
cnt_but_press=97;
}
}
else
{
cnt_but_press=0;
}
sw_up_old=sw_up;
sw_down_old=sw_down;
}

/*
This function is periodically called every TIME_DISP_RESET_IN_MS (for setting the display back to actual temperature and to store the result in the EEPROM):
*/
void timer_disp_reset()
{
disp_blink=false;
disp_on=true;

EEPROM.write(0, target_temperature & 0xff);
EEPROM.write(1, (target_temperature & 0xff00) >> 8);
}

/*
This function is the interrupt service routine which is called every ms. Several counters are used then for “virtual” timers.
*/
void timer_isr()
{
if(cnt_disp_blink >= TIME_DISP_BLINK_IN_MS)
{
timer_disp_blink();
cnt_disp_blink=0;
}
cnt_disp_blink++;

if(cnt_disp_mux >= TIME_DISP_MUX_IN_MS)
{
timer_disp_mux();
cnt_disp_mux=0;
}
cnt_disp_mux++;

if(cnt_disp_refresh >= TIME_DISP_REFRESH_IN_MS)
{
timer_disp_refresh();
cnt_disp_refresh=0;
}
cnt_disp_refresh++;

if(cnt_sw_poll >= TIME_SW_POLL_IN_MS)
{
timer_sw_poll();
cnt_sw_poll=0;
}
cnt_sw_poll++;

if(cnt_disp_reset >= TIME_DISP_RESET_IN_MS)
{
timer_disp_reset();
cnt_disp_reset=0;
}
cnt_disp_reset++;
}

Hi,
Not sure if this is relevant.

NOTE: Digital pin 13 is harder to use as a digital input than the other digital pins because it has an LED and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up resistor, it will hang at around 1.7V instead of the expected 5V because the onboard LED and series resistor pull the voltage level down, meaning it always returns LOW. If you must use pin 13 as a digital input, set its pinMode() to INPUT and use an external pull down resistor.

Got it from

I am using a 9 volt supply regulated with a LM7809, dropping down from + 12 Volt for the soldering tip.

Have you got the LM7809 bypassed with the caps recommended in the spec sheet?
Is there any ripple on the 12V supply when the iron is ON, this could be causing the controller to reset, the PWM noise could be significant if there isn't sufficient smoothing on the 12V supply.
Can you post us a diagram of the 12V powersupply please?
Tom.... :slight_smile:

Hi again,

On your PCB you have Vref and 3V3 connected to tracks, on the schematic they are not connected.

Tom... :slight_smile:

Hi folks.

Looks like problem might be solved! Seems like it the was the drop up resistor I connected to D13. This resistor was 10 K. I tried to lower the value and suddenly things started working! I still have to experiment for finding the optimal value, now I just put 2 x 10 k in parallell, since that was what I had available. Have to be carefull not to burn something in the Arduino.

Very strange, since I don't have to use any drop up resistor on the Uno.

Thank you for spending time looking at my problem. I'll report back when I have finished testing - which will be when I get some missing parts in a week or two.

All the best from

Ulf

Just a quick update.

Found that a resistor at 4.7 k was the best solution when I used an external powersupply at 9 volt in to Vin. I think problem now is solved, but I managed to blew an IC, and don't have the equipment to unsolder here in Thailand, so I am not able to do the final check until I'm back in Norway end of next month, though when I tested with low voltage into the MOSFET, it worked like a dream. Problem was I managed to short circuit and sent 9 volt into the wrong place on the board.

Ulf