Go Down

Topic: Serial ports missing - Arduino Nano Windows 7 (Read 644 times) previous topic - next topic

rynd2it

Hi,

Great minds etc :)  I have just ordered three Nanos, a 12v power supply, a spare servo and a board to mount it all on to build a testbed.

The board is this:
https://www.electroniclab.co.uk/prototype-shield-io-expansion-module-for-arduino-nano-v30-46-p.asp

The servos are:
https://hobbyking.com/en_us/hobbykingtm-hk15178-analog-servo-1-4kg-0-09sec-10g.html?wrh_pdp=1&___store=en_us

and the Nano comes from:
https://www.ebay.co.uk/itm/161784434085

Curious about your remark regarding the 12v power - the write up suggests between 6 & 20vdc - but is the Nano actually powering anything else? My servos are connected to the expansion module and their 5v comes from the control panel, likewise the indicator LEDs. I am new to how all this works so if I'm missing something please tell me.

I've attached a schematic of one switch.

Thanks

David

septillion

#16
Jul 09, 2018, 09:21 am Last Edit: Jul 09, 2018, 09:22 am by septillion
Great minds etc :)
Hehe :D

The board is this:
No experience with that board. Regulator seems a bit bigger but still would not trust it with 12V.

and the Nano comes from:
At least now you know for sure they are clones and have the CH340 :D


Curious about your remark regarding the 12v power - the write up suggests between 6 & 20vdc - but is the Nano actually powering anything else?
With that board, probably not. And yeah, a lot of write ups use the max ratings of the regulator. That can indeed be 20V on a lot. BUT, the regulator also needs to stay cool enough. Aka, the higher the voltage the lower the allowed current to draw from it.

My servos are connected to the expansion module and their 5v comes from the control panel, likewise the indicator LEDs.
What do you mean? Do you have a separate 5V supply rail? Or do you mean with the regulator on the expansion board?

OP image

The Arduino has no -ve and +ve connections. So I guess you mean GND and Vcc?

Still see no need for the diode. I do see the need for a pull down resistor this way. Would be simpler with common anode leds :) That way you only need a single resistor.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

rynd2it

OK, to clarify.

The Nano boards I have bought for testing are the ones in the link, I don't know the source of the ones on the railway yet.

The diode was added while testing the circuits prior to connecting the servos. In a group of LEDs (several switches) all the LEDs would be red if all switches were 'off'. Turning one on - to green - would result in the others glowing amber, clear indication of current being applied to both legs of the LED. Testing with a meter showed that all pins that were notionally 'off' were in fact showing 5vdc back to the LED. The diode fixed this. The addition of the 10k resistors later to prevent this 'spurious' voltage affecting the servos would have probably solved the LED issue as well but by then it was all installed so the diagram shows it as is.

I may have misunderstood your comment - the servos are connected to the expansion board so the 5vdc is coming from the Nano via the 12vdc input and the on-board regulator.

Now to await the arrival of the bits ;-)

David

septillion

#18
Jul 09, 2018, 10:58 am Last Edit: Jul 09, 2018, 10:58 am by septillion
The Nano boards I have bought for testing are the ones in the link, I don't know the source of the ones on the railway yet.
I understood. But the new ones are at least CH340's.

The diode was added while testing the circuits prior to connecting the servos. [...]
I still don't know why because there is no reason for it as far as I can tell. But I have no idea what is on the expansion board. And it's still not 100% clear how you connected everything. Do you just supply power to that expansion board or do you really have external regulators?

And a note, servo's might be small but can be pretty power hungry. And although that regulator on the expansion board seems a bit bigger than the one on the Nano, it's still not very big. And it does need to drop 7V (12V - 5V) linear. So at 1A (pretty common when the servo is moving) that means 7W! So I would switch to a lower supply voltage. Depending on the exact type of regulator, I would switch to 6V or 7V. Or, switch to a DC-DC converter which can do the conversion like 90% efficient aka taking only +- 0,5W.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

rynd2it

I still don't know why because there is no reason for it as far as I can tell. But I have no idea what is on the expansion board. And it's still not 100% clear how you connected everything. Do you just supply power to that expansion board or do you really have external regulators?


OK, using my diagram above, there is a 12vdc power supply to the control panel with a regulator to provide 5vdc. Imagine now there are three such circuits connected (via the expansion board) to the Nano. If all three switches are set to red all LEDs glow red. If one switch is set to green, the other two show amber because 5vdc is coming from the expansion board pin back to the 'green' leg. As the red leg is powered the LED shows amber. The diode stops this. I do not know  (and probably don't need to) why the unpowered pin is showing a positive voltage and as I said, the 10k resistor would probably have done the job but it happened in the sequence it did.

It's not an issue - what is an issue is why one board is hot and the other two are not even though they are wired identically.

Cheers

David

septillion

So the only regulator is ON that expansion board?

And yes, maybe that 10k would also fix the glow. A modern LED doesn't need a lot. But again, expect from the pin floating, I see no reason for there to be any (real) voltage.

And what exactly does get hot? The regulator on the expansion? Or the regulator in the Nano? Or the Nano itself?

If it's the first (because I assume* the expansion regulator supplies the servo), does it still happen when the servo's are disconnected?

If it's the Nano, does it still happen with nothing connected? If so, just throw it in the bin ;)



* But assumption the the mother of all fuckups... So without schematic I don't know for sure.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

rynd2it

So the only regulator is ON that expansion board?
No, the one for the switches is on my control panel
Quote
And yes, maybe that 10k would also fix the glow. A modern LED doesn't need a lot. But again, expect from the pin floating, I see no reason for there to be any (real) voltage.
Not a glow, bright LED, full 5vdc voltage

Quote
And what exactly does get hot? The regulator on the expansion? Or the regulator in the Nano? Or the Nano itself?

If it's the first (because I assume* the expansion regulator supplies the servo), does it still happen when the servo's are disconnected?

If it's the Nano, does it still happen with nothing connected? If so, just throw it in the bin ;)
Most noticeable on the USB port on the Nano. And on that one no servos are connected yet.

Quote
* But assumption the the mother of all fuckups... So without schematic I don't know for sure.
You have my schematics and a photo.


septillion

No, the one for the switches is on my control panel
You might have some weird voltages drops which cause the GND to be higher er something. Are both regulators powered from the same supply?

Not a glow, bright LED, full 5vdc voltage
I can't image it having much power...

Most noticeable on the USB port on the Nano. And on that one no servos are connected yet.
you forgot the most important questions ;)

You have my schematics and a photo.
Which does not show anything of that expansion board... Also, -ve and +ve are non-existing terminals on them. That's why I asked for a complete schematic :)

And again, you can simplify things a lot if you get yourself common anode leds.

[/quote]
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

rynd2it

You are stretching my knowledge to the limit - The spec on the expansion board is on the link I gave above. If you check the attached schematic/photo the switch connections are on the edge pins, the servos connected to the blue/black/red pins as noted. I have no other info at this stage.

Way too late to change the LEDs, panels built, working and done. That's a closed issue.

As far as heat is concerned I only noticed it when unplugging the USB, didn't check anything else at the time. I'll do that next time I'm there.

septillion

I have no other info at this stage.
Pity :/ But not uncommon with China stuff. You have to reverse engineer it to know how it works. From the the looks of it the regulator is powering the Nano. I assume also the servo headers. You could check with a DMM. Together with the marking on the voltage regulator (in the middle).

Way too late to change the LEDs, panels built, working and done. That's a closed issue.
Case of doing first, check it later :D You will need the pull down resistor. Place it close to the Arduino, not the switches. (Easy place would be to solder them to the headers). Diode isn't needed. You can save a resistor by not placing two in the anodes but a single in the cathode.

Image:


Couple of questions/comments about that:

- Is that 12V really DC? If so, the (bridge) rectifier isn't needed (and does not magically give you 5V). Combined with the question below it might even act weird.

- Is that same 12V plugged in the barrel jack of the expansion board?

- -ve and +ve are a bit of a weird term. Especially because you draw them at the 5V and the 12V. More conventional to speak of 5V+ and 5V-, or 5V PWR (/power) and 5V RTN (/return). Or, if the return of multiple supplies is common (or you just have a single supply) to call the return GND (ground)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

rynd2it

Hi,
I really appreciate all you are doing but please realise, this is built. The panel, switches & LEDs were there long before the Arduino and servos.

My problem now is simply the communication between Nano & laptop plus the question of the heat on one board. I will check the rest of the board and its wiring in a few days, my new Nano's have arrived so I will be building my testbed soon.

I will post the results when I get them

Cheers

David

septillion

The panel, switches & LEDs were there long before the Arduino and servos.
I understand. But you still need the pull down resistor (close to the Nano) and power it the right way, don't you? Needing that diode tells me something is off.

If an Arduino gets hot with nothing connected => bin :D

New Arduino's should work fine with CH340 driver :)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

rynd2it

I understand. But you still need the pull down resistor (close to the Nano) and power it the right way, don't you? Needing that diode tells me something is off.

If an Arduino gets hot with nothing connected => bin :D

New Arduino's should work fine with CH340 driver :)
The 5vdc on the un-powered pin seems to be a function of the Nano - most of what I have read says 'undefined'. Using INPUT PULLUP would cause it to be always 5v - not what is required, I need it to go to 0v.

 The only way I could find to do that was to install the 10k resistor on the pin which prevents unpredictable state changes in the code and thus unwanted servo movements.  It probably also prevents the LED problem but that was already cured by the diode. The 10k resistor is actually connected to the edge connector on the expansion board (as is the diode) and it works a treat.

Like I said, my problem is the COM ports which is where we came in ;-)

David

septillion

Let's go backwards :D

Like I said, my problem is the COM ports which is where we came in ;-)
Yep, but that should be fixed with the new Arduino's. I think it's not worth trying the old once if you can not make them show in Device Manager :)

The 10k resistor is actually connected to the edge connector on the expansion board (as is the diode) and it works a treat.
It was just a suggestion. That way they edge connector is free for wires. 8)

[...] but that was already cured by the diode.
Like I said, it should not happen. And it happening tells me there is an error somewhere. I would rather fix that (and the 10k might indeed fix it if it's just coupling) than just slamming in components. But that might just be my engineering mind :smiley-grin:

The only way I could find to do that was to install the 10k resistor on the pin which prevents unpredictable state changes [...]
That is completely normal way of doing so. A switch can only pull the line in one direction and let it float in the other (at least normal single pole buttons etc). You need a pull resistor. This can be a pull up (and you connect the switch to gnd) or a pull down (and connect the switch to Vcc). The pull up has a couple of advantages of which one is you can use the build in ones (from software) and save time and money. I do get that station is passed (because of the led) but only try to say it's normal.

The 5vdc on the un-powered pin seems to be a function of the Nano - most of what I have read says 'undefined'.
What do you mean? If you don't set the function or state of a pin from code a pin defaults to an INPUT. And an input is high impedance, it can be any voltage. It's like a ball in a rally car aka all over the place. :smiley-mr-green:
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

rynd2it

What do you mean? If you don't set the function or state of a pin from code a pin defaults to an INPUT. And an input is high impedance, it can be any voltage. It's like a ball in a rally car aka all over the place. :smiley-mr-green:
Agreed , but these are becoming OUTPUT at 5v and that is why we have the diode and the 10k.


Go Up