Arduino with a 24VDC power supply

Hello everyone, I have a question for you, it's something strange happening with my project. I have 2 motors, a DC (24VDC) and a stepper(12VDC), they are doing something here, it's not important what, and I have a measurement device like this: https://www.google.rs/search?q=digital+indicator&espv=2&biw=1280&bih=923&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwjr9LWjvrrJAhUGchQKHVpMBOsQsAQIJQ#imgrc=f6a1ZAMwv7R3RM%3A and I am measuring something with it. So, my motors are drived with a H-bridge L6203 (DC motor) and L298N (stepper) and I am reading values from my digital indicator (link above) at this way: https://www.google.rs/search?q=digital+calliper+arduino+reading+values+circuit&espv=2&biw=1280&bih=923&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjcjunMv7rJAhXDzRQKHdUzCbIQ_AUIBigB#imgrc=KNlYlo-r1twoOM%3A Ok, so what is the problem? The problem is when I turn on the power supply my measuring device just starts to change the values on the display like crazy :smiley: I am using this power supply: https://www.google.rs/search?q=digital+calliper+arduino+reading+values+circuit&espv=2&biw=1280&bih=923&source=lnms&tbm=isch&sa=X&ved=0ahUKEwjcjunMv7rJAhXDzRQKHdUzCbIQ_AUIBigB#tbm=isch&q=phoenix+contact+trio+power+supply+&imgrc=8_fXC2-nEFhaAM%3A and I need to say taht there is no software problems because everything worked well and one moment it just starts to change values on the display. I am converting a 24VDC to 5VDC with a 7805 and a 24VDC to 12VDC with LM2576. I also have connected my arduino GND to a 'V-' on a power supply.

OK, that is just so completely illegible that I will take pity and help you with it! :astonished:

thedoctor46:
Hello everyone, I have a question for you, it's something strange happening with my project.

I have 2 motors, a DC (24VDC) and a stepper(12VDC), they are doing something here, it's not important what, and I have a measurement device like this and I am measuring something with it.

So, my motors are driven with a H-bridge L6203 (DC motor) and L298N (stepper) and I am reading values from my digital indicator (link above) at this way.

Ok, so what is the problem? The problem is when I turn on the power supply my measuring device just starts to change the values on the display like crazy :smiley: I am using this power supply and I need to say that there is no software problems because everything worked well and one moment it just starts to change values on the display.

I am converting a 24VDC to 5VDC with a 7805 and a 24VDC to 12VDC with LM2576. I also have connected my Arduino GND to a 'V-' on a power supply.

Even then it does not make sense. :astonished:

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

Can you please post a picture of your project?
What model arduino are you using?

WHY???
You have the project infront of you, we don't.
You know how it is wired, we don't.
You know how you are powering the motor and arduino, we don't.
You know how you are outputting digital logic to the H-Bridge, we don't.

A picture, a circuit diagram and a sketch is worth a thousand words and can save a thousand ill informed posts.

Thanks.. Tom.... :slight_smile:

Well I am sorry because of my bad english knowledge. Here is my diagrams. I have connected all the GND's to the same point as well as the arduino's and the power supply negative voltage. There is no problem with my code, and it would take too long to convert it to english. I am useing a simple digitalWrite for the DC motor and a stepper library for the stepper and there is no problem with them. There is no problem with reading the values from my measureing device too, the problem is that the values changing although there is nothing moving. I have tried to connect a digital caliper (same reading system) and then everything is fine. Ok, somebody will say just change a digital indicator, but it is very strange that the whole project works well a few days ago. I am useing a Yun model powered with my laptop.

20151201_140040.jpg

20151201_140102.jpg

20151201_140127.jpg

Firstly you'd do better to drive the 7805 from 12V than 24V, much less dissipation.

Secondly the interference is likely due to poor layout - how you run your power wiring
is vital to keeping interference in check - use twisted pair whereever you can, never run
sensor and power/motor cables alongside one another, try to have a star-ground setup
and never share high current wires with sensor ground/supply. Good decoupling on the
motor supplies and interference suppression on the motor terminals may be appropriate
too.

Hi,

There is no problem with reading the values from my measureing device too, the problem is that the values changing although there is nothing moving.

The values from the measuring devices change, is that right?
What are your measuring devices?
Not telling us the type and model will not help us help you.
What values change?
A picture of your project will help if it is a layout problem.

Thnaks.. Tom... :slight_smile:

7b11618153e42cc574493ca1bdf77cdbb3f68fdb.jpg
a3fe816d26b1b583713a5cc22e2cdf75f33899e7.jpg
cb667b1a08e1028c52a3b3688d83b434f8457327.jpg

Massive heatsink needed for linear 7805.

Make sure you get the right model - not all will handle 24V input.

Better would be a DC-DC Converter, thick-7805 size switching regulator to make 5V from 24V.

Every time you use this, an angel gets it's wings:

pwillard:
Massive heatsink needed for linear 7805.

I am useing a heatsink with the 7805, and it works fine.

TomGeorge:
Hi,

The values from the measuring devices change, is that right?
What are your measuring devices?
Not telling us the type and model will not help us help you.
What values change?
A picture of your project will help if it is a layout problem.

Thnaks.. Tom... :slight_smile:

This is my measureing device: http://www.ebay.com/itm/Digital-dial-indicator-0-01mm-0005-Range-0-25-4mm-1-Gauge-/331717388927
The values on the display starts to change when I turn on the power supply.

MarkT:
Firstly you'd do better to drive the 7805 from 12V than 24V, much less dissipation.

Secondly the interference is likely due to poor layout - how you run your power wiring
is vital to keeping interference in check - use twisted pair whereever you can, never run
sensor and power/motor cables alongside one another, try to have a star-ground setup
and never share high current wires with sensor ground/supply. Good decoupling on the
motor supplies and interference suppression on the motor terminals may be appropriate
too.

There is 3 GND pins on the Yun model (and I thin they are connected), so how am I need to connect them with my circuit? I need to connect 1 to my measureing device and I need to connect 1 to my H-bridges and also I need to connect a V- (negative voltage) from a power supply to my H-bridges. The LM2576 and the 7805 are also connected to these wires. Could this be a problem? If the answer is 'yes' then how should I wire all of them?

Hi,

Have you a manual for the guage to tell you how to interface it?

Tom.... :slight_smile:

I have worked before with a digital caliper and it's the same technology and value reading, you can see it here

Hi,
What are your component values in your circuit diagram, please?
Are you leaving the battery in the gauge and using its power, and leaving the power connection to the gauge through the socket open?

Thanks .. Tom..... :slight_smile:

I have just connected my project to GND and everything works fine.

@thedoctor-46,
If you use the LINKS toolbutton, (chain link symbol just to right of computer monitor symbol) you can enter links with a label and hide the actual link.

Step-1 : click the LINKS button
2 Paste the link into the FIRST box that appears
3 click OK
4 Type in the link label in the SECOND box that appears
5 click OK

This is your Original Post , done right:
Hello everyone, I have a question for you, it's something strange happening with my project. I have 2 motors, a DC (24VDC) and a stepper(12VDC), they are doing something here, it's not important what, and I have a measurement device like this:

and I am measuring something with it. So, my motors are drived with a H-bridge L6203 (DC motor) and L298N (stepper) and I am reading values from my digital indicator (link above) at this way:

Ok, so what is the problem? The problem is when I turn on the power supply my measuring device just starts to change the values on the display like crazy :smiley: I am using this power supply:

and I need to say that there is no software problems because everything worked well and one moment it just starts to change values on the display. I am converting a 24VDC to 5VDC with a 7805 and a 24VDC to 12VDC with LM2576. I also have connected my arduino GND to a 'V-' on a power supply.