Go Down

Topic: power supply for Due (Read 5425 times) previous topic - next topic

WayneThresher

Sep 01, 2016, 02:41 pm Last Edit: Sep 01, 2016, 03:38 pm by WayneThresher
I wrote a sketch for a Due to receive data via I2C as Master and display on a screen and also on the serial monitor.

Now that I have it the way I need it I wish to supply the Due/shield/Screen via the 12V jack.  When I do this the screen lights up and shows the display template as I have it laid out in void setup.

But that is as far as it goes.  It does not update with new data from the slave. 

If I switch back to the USB power it runs fine.  I severed the serial lines in the usb cable so that the only thing the computer supplies is 5V via USB and the sketch runs and the screen updates normally.

The 12 volt power supply is 12V, 1 amp (Triad mfr).  My voltmeter says 11.90 open circuit.
I also tried a modified computer power supply that has a 12V 10 Amp very clean DC.  Same result, only the template shows up.

So I am wondering if anyone has an explanation or had similar trouble trying to supply a Due via the 12V jack?

The 7" display data sheet is here:  http://www.datasheet4u.com/datasheet-pdf/Innolux/AT070TN92/pdf.php?id=775300

WayneThresher

This is kind of interesting.  I borrowed a very good variable voltage, 15 amp lab powersupply. 

I adjusted the voltage potentiometer to 5.10 VDC and connected that to the 5V power pin of the Due.  The display lit up but Master did not acquire data from the Slave.  While under power, I reduced the voltage until the meter read 5.01 volts.  As I did that the display started updating with new data from the Slave.

It seems as though the Due is very sensitive to precise voltage input.  I guess this is more an FYI than a question, although I would be grateful for any deeper explanation for this result...

Oh, one other thing...I got the same results when I used another Due right out of the anti-static bag.


MorganS

It can't have been "right out" of the bag as you must have programmed it first?

It is unusual that high voltage appears to stop it from working. Did you notice any difference in current draw? As if there was one component drawing 'too much' current at high voltage or some subsystem that was shut down at high voltage then became active as the voltage then came back into the acceptable range? Did you notice any variation on the 3.3V rail in these two conditions?

Which I2C lines were you using? Remember that only one of the two pairs has pullup resistors on the Due board.

Were you able to see I2C requests going out in the non-working condition (and the slave not hearing or not replying) or was the master I2C silent in that condition? This is best observed with an oscilloscope but a logic analyzer is also good.
"The problem is in the code you didn't post."

WayneThresher

It can't have been "right out" of the bag as you must have programmed it first?

YES, you are correct.

It is unusual that high voltage appears to stop it from working. Did you notice any difference in current draw? As if there was one component drawing 'too much' current at high voltage or some subsystem that was shut down at high voltage then became active as the voltage then came back into the acceptable range? Did you notice any variation on the 3.3V rail in these two conditions?

No I did not see a difference in current but I did notice that it was not dead steady.  The current varied around 560 to 580 mA.

Which I2C lines were you using? Remember that only one of the two pairs has pullup resistors on the Due board.

In this case I was using 20 (SDA) and 21 (SCL). 

Were you able to see I2C requests going out in the non-working condition (and the slave not hearing or not replying) or was the master I2C silent in that condition? This is best observed with an oscilloscope but a logic analyzer is also good.

Well, after a fashion.  The slave (uno) is programed to output its data both I2C and Serial.  Even when the slave is powered via the 12 jack with no connection to laptop the TX led flashes in sync with the I2C signal.

I can borrow a good Fluke oscilliscope but i have never used one before.
All I want to do is get this to run using a 12V or 5 volt power supply.  preferably the 12 volt jack.

Thanks for reply

btw/ the forum seems bogged down and I get frequent 502 errors

promacjoe

how are you powering the slave. On the Due, the 12V power input goes through a 5V regulator before it does anything else. When you power up to do, you should be getting 5V at the 5V pin, And 3.3V at the 3.3V pin. you should also get 12V, at the VIN pin. And other than the VIN in, There should be no difference between using the USB port or the power port when powering the Due. And unless you are powering the I2c slave unit with the VIN pen, it should work the same. check your voltages on your Due board.

WayneThresher

how are you powering the slave.

Either a Laptop USB or 12V Jack.  I am now using DC-DC down converters from CUI

On the Due, the 12V power input goes through a 5V regulator before it does anything else. When you power up to do, you should be getting 5V at the 5V pin, And 3.3V at the 3.3V pin. you should also get 12V, at the VIN pin.

5V pin = 4.99
3.3      = 3.25
Vin      =11.96


 And other than the VIN in, There should be no difference between using the USB port or the power port when powering the Due. And unless you are powering the I2c slave unit with the VIN pen, it should work the same. check your voltages on your Due board.
I just built an lm317 power supply adjusted to 5.00 volts.  When I supply using this via a usb cable into the due programming port it runs the sketch and shows the display updating with new I2C data.

I will go ahead with this config since it is doing the job.  I hope to figure out the problem with that 12V supply.  I've tried it with 3 different 12VDC supplies (of increasng quality) and none of them have worked.

Thanks very much for your comments

promacjoe

How are you powering the slave. If your power It buy a USB port as well, the grounds will automatically be common to each. Take a look at the common "-", between the Arduino and the slave.

 If the regulated power is the same from each power supply, and the negatives are properly connected together, There should be no difference between how they work whether their use a USB connection or a 12V power supply.

Note: only use regulated power supplies with the Arduino. And it is never a good idea to use a high current power supply, or a power supply that does not have current regulation, for low current application, such as the Arduino. especially for test purposes. If something happens it is more likely to seriously damage your board, or even catch fire. I recommend using a power supply that is rated for the current you need +50% for low current applications. And for higher current applications, this percentage should be reduced considerably.

The problem is probably in how your connecting the boards through the power pins. Hope you find the problem.

Joe.

WayneThresher

I am powering the Slave(Uno) via 12V jack, the Master Due with a 5V power supply through the programming port.  I understand that there must be a common ground for both. 

This is working now and I am getting good results.  I was never able to resolve the issue which was to power the due with a 12VDC input through the barrel jack. 

Thanks for the help.

Wayne

promacjoe

This just doesn't make sense to me. There should be no difference between powering your circuit using the USB port or using the power port.


So we could all learn what's going on, and maybe figure out how to fix the problem, Or at least steer someone away from this problem that you're having, could you please post a schematic of what you have or at least the power supply parts for both circuits.

Joe.



Magician

Quote
Well, after a fashion.  The slave (uno) is programed to output its data both I2C and Serial.  Even when the slave is powered via the 12 jack with no connection to laptop the TX led flashes in sync with the I2C signal.
Hope you aware that UNO is 5V device and DUE 3.3V. You can't communicate each other w/o logic converter module.

jlsilicon

#10
Nov 30, 2017, 04:00 pm Last Edit: Nov 30, 2017, 04:17 pm by jlsilicon
Quick Info Update FYI :

Testing from another Site :

Arduino DUE Power Consumption:

at 7V Supply:
Full Load:    94mA
NOP:       92mA
Sleep:       70mA
Backup Mode:    21mA

at 9V Supply:
Full Load:    74mA
NOP:       72mA
Sleep:       55mA
Backup Mode:    18mA

at 12V Supply:
Full Load:    55mA
NOP:       55mA
Sleep:       40mA
Backup Mode:    14mA

-> So, a 9V Battery (at 300-450mAh with ~70mA Load) might last from 4-6 hours in FullLoad mode or 16-25 hours in Backup mode.
  - not bad compared to UNO at 45mA drain - making DUE about half the UNO Hours

- from :
https://electronza.com/power-guzzlers-testing-arduino-boards/

promacjoe2

First of all there is a difference between using the USB port, And the power port. It's called a 5 V regulator which is not used by the USB port, but is used for the power port. Connect the 12 V to the Arduino and check the voltage of the 5V pin.

Next, You do not have to  modify a USB cable to isolate the date of pins. A USB power meter can do this for you, At least mine does.

jlsilicon

As far as I see in the Article, Testing is mA from the Power Source (like a Battery) compared with its Source Voltage - connected to the VIn pin.

Quoted from the Article:
"In this blog post I will test some of my commercially available Arduino and Arduino-compatible boards, focusing on their current draw in some of the most frequent power configurations."
... "Sometimes six AA batteries" ... "Also ... use 9V wall warts".

- I do Not see Any mention of USB Power used in the Tests in the Article source.
Please at least READ the Article Source before Critiquing the Tests / Info Posted here ...

Looks like a good Source of Tests to me.
I am using them for my Projects - no problems yet.
:)

Go Up