Switch to make Arduino controll a VFD

TEK73,
Sorry . Didn't mean to seem like I was shouting. I was just trying to emphasize . Next time I'll use bold instead.

O2660,

Why not just add three relays and run the VFD logic through them?

Been there , done that. It was discussed in Reply#12 and yes that is exactly what the OP is going to do.

TEK73,
Let me know if you need anything further. Good luck with that.

There is something else, related to the same project.
I have these mechanical endstoppers:

This one has 4 connectors, I expected 3.
My expectation is that I, from the arduino, can read if the endstopper is closed, and then stop the stepper motor that moves my spindel motor to the wanted position.

Put then there are some areas I have not yet solved:

  • why is there 4 connectors?
  • how do I know what connector is what, and especially - where GND are?
  • can the Arduino be used as the power source for this endstopper (I assume it can, but after the previous discussions I dont take anything for granted

I have tried to find som sample peojects to look at, but havent found any. Maybe I'm searching for the wrong terms?

No problem. This one is simple. I'll answer your question, but more importantly I'll teach you how to figure this kind of thing out by
yourself. You start with the your initial assumptions (what you expected)
A. A micro-switch has three connections: (one COMMON, a NO (normally open) an a NC (normally closed)
What does that mean? What does "normally" mean ? Normally means the state it is in when you take it out of the package. So
NO means if you take out of the package and measure COM to NO , it will be open. NC , the exact opposite, continuity.

B Add the new factor, the 4th contact. What is that for ?
C You're given 4 photos.
http://www.geeetech.com/index.php?main_page=advanced_search_result&search_section=products&search_in_description=1&keyword=DPA-06663&x=0&y=0

Description:
The mechanical endstop uses a lever switch to detect when it is activated. The switch is wired up so that when activated, it pulls the signal to LOW. There is also an LED on the board that will light up when the switch is activated.It uses a standard 4 pin .100" pitch header and accepts a standard, old-style CD-ROM audio connector cable.

http://reprap.org/wiki/Mechanical_Endstop#Switch_wiring

In a previous message Cefiar identifies the RAMPS 1.4 pins as

  1. VCC
  2. Gnd
  3. SIG

Many generic' RAMPS 1.4 boards lack specific screened letters identifying X, X', Y, Y', Z & Z' Endstop pins. Neither do they identify VCC, GND pins. Mine offers a +', -' and an S' . Am attaching the following sketch/illustration which loosely illustrates the wiring connection between the X rows, and a generic X MakerBot 1.2 Endstop.board.

As illustrated:
Yellow (SIG) from RAMPS 1.4 to Top PIn (1?) on Endstop connector
Black (GND)from RAMPS 1.4 to Second PIn (2?) on Endstop connector
(GND) Pin (3?) on Endstop ignored
Red (VCC) from RAMPS 1.4 to Last PIn (4?) on Endstop connector

So the first thing you do is stop and ask yourself. Am I the only person who thinks this strange ?
If the answer is "NO" , then ask yourself. What would someone else do (in the 21st Century) when confronted with this situation?
If the answer is "search the net for forum discussions on this issue" then maybe someone has posted a schematic.
Obviously the mention of the LED in the DESCRIPTION should lead you to wonder how it could be powered ? The schematic I found at the above link and the pinout listing explaining that the pin on the same side as the spring is SIGNAL, the two middle pins are GND and the pin on the side opposite the spring is Vcc (+5Vdc) and the schematic shows the SIGNAL pulled to ground (I am pretty sure the "kink" in the spring symbol is supposed to represent a depressed spring making contact as opposed to a relaxed spring. The only way to be sure is to look at the microswitch to see if it actually has the 1,2, & 3 numbers on it. Of course you will want to ohm it out from the pins on the connector to the pins of the microswitch to see if it matches the schematic. but if the wiring list is correct, the only pins intended for use are +5V, GND, and NO. When you connect power to +5V & GND and depress the spring , the led will light and the SIGNAL pin will be pulled LOW. (according to the above info) If you want to invert the logic you can do it in software.

Makerbot endstop diagram.jpg

Mechanical_endstop_wiring.png

Thanks for the great input.
I got it to work now :slight_smile:

The drawing you found was correct.
I had some trouble finding it as most of the result I got drowned in a lot of reprap stuff and design of how the to build a endstop.

This is what I did:
Arduino GND pin to endstop GND
Arduino 5V pin to endstop Vcc
Arduino pin D7 to endstop Signal
Tested it with a small test program that lit the Arduino onboard LED when the endstop is pressed (a HIGH signal occured on pin D7).
First I tried pin D12, but did not get it to work - not sure why, maybe I just had a bad connection somewhere.

I guess this will be easier and easier as I go along and more bit's fall into place. Currently I do not have a breadboard, making it hard do know it is bad wiring or wrong connections that is causing stuff not to work. Looking forward to getting a breadboard (in the mail now).

A different question. One thing is prototyping, then a breadboard will do just fine. But afterwards, when this is going to be used, how do you connect the different parts? Do you solder or use special connectors? Do you cover the circuits in something (for example heat glue) or just use the "raw"?
My build will be used in quite a dusty environment.

Tested it with a small test program that lit the Arduino onboard LED when the endstop is pressed (a HIGH signal occured on pin D7).

Can you confirm this ? The post I pasted said that the SIGNAL pin is pulled LOW when the ENDSTOP is depressed, and has a pullup resistor to keep it high when it is not making contact, which is exactly opposite what you described.

One thing is prototyping, then a breadboard will do just fine. But afterwards, when this is going to be used, how do you connect the different parts? Do you solder or use special connectors? Do you cover the circuits in something (for example heat glue) or just use the "raw"? My build will be used in quite a dusty environment.

Not sure what parts you are referring to . Please post a list of all the sub assemblies and their approximate dimensions (this question should be interpreted to mean "what is the smallest size box the subassemply would fit in ?"
Please list any sub-assemblies that need to be kept together in the same box.List them as "GROUPS" (ie: Group-A,B,C etc..)
List the total power consumption for each group.
List the Power supply voltages required for each group. (this means if Group-A requires +5Vdc & 12Vdc, list those . Unless otherwise stated all power supply voltages will share a COMMON GND within their group), so the actual wires going to the above example would be 3 power wires (+5,+12, & GND)
List all I/O lines for each group on a separate line from the power supply lines.
ie: THREE I/O Lines (D3,D4<& D5) (unless otherwise stated it is assumed the GND for the +5V is the RETURN line for the I/O)

Please specify which groups require rubber gaskets or dust proof seals.

raschemmel:

Tested it with a small test program that lit the Arduino onboard LED when the endstop is pressed (a HIGH signal occured on pin D7).

Can you confirm this ? The post I pasted said that the SIGNAL pin is pulled LOW when the ENDSTOP is depressed, and has a pullup resistor to keep it high when it is not making contact, which is exactly opposite what you described.

No, I cannot confirm it. I can however confirm that you are correct. The LED is on (HIGH signal on pin D7) as long as the endstopper is not pressed. When the endstopper is pressed the LED is off (LOW signal on pin D7).
I mixed it together in my first post.

I will need some more time to come up with a full overview over all parts.

Yeah , that's a little confusing if you read fast a couple of times but basically it means if you see the led go off you know you have hit the endstop. Do you see what I mean about sometimes you have to put on your Detective hat and try to solve the mystery ?

Before I start on a list of all stuff...

I want to know if the water in the cooling system stops flowing, so that I may stop the motor and awoid damages to it.
My water pumps 500liters pr. hour and the tubes has a inner diameter of 6mm.
Does anyone know about a place where I can find a water flow censor that I can connect to the Arduino?

Whenever requesting sensors it is customary to state the specifications for the sensor in standard units.
500 liters per hour is 30,000 liters per minute =8000 GPM
You can convert here:

500 liters per hour is 30,000 liters per minute

Right.

= 2201 GPM

Hi

500 litre/hr = 500/60 litre/min = 8.333 litre/min = 1.833 UK Gal/min = 2.201 US Gal/min

tut tut tut....... :astonished: :astonished: :astonished: :astonished: 2201????????????????????

Tom....... :slight_smile:

= 2201 GPM

2201????????????????????

OOPS...! (I didn't see the decimal point on this page:

raschemmel:
Whenever requesting sensors it is customary to state the specifications for the sensor in standard units.
500 liters per hour is 30,000 liters per minute =8000 GPM
You can convert here:
http://www.convert-me.com/en/convert/flow_rate_volume/liter_min.html

I think your math is a bit off... I belive 500 liters per minute would compute to 8,33liters pr minute = 2.2 gallons pr minute (if thats what GPM means)
I had no idea that there was a standard unit for a water flow sensor. Where is that defined?

Anyway, now when that important conversion is done (hopfully correct this time), dose anyone know if there is any waterflow sensor for the arduino that may fit my usage, that is for 2.2 GPM and 6mm tubing (or 0,06m or 0,236 inches or whatever)

Edit: missed the others post about the math - not sure why

This is Reply#34. Read Reply#32. (Ignore the previous post about 8000 GPM , I don't know where I was looking when I got that number) 2.2 is the correct number.

I'm having trouble finding flowmeters with metric diameters. All I can find is 1/2" (or larger)

PWM output signal. (SEE ATTACHED EXAMPLE CODE )

The sensor comes with three wires: red (5-18VDC power), black (ground) and yellow (Hall effect pulse output). By counting the pulses from the output of the sensor, you can easily track fluid movement: each pulse is approximately 2 milliliters. Note this isn't a precision sensor, and the pulse rate does vary a bit depending on the flow rate, fluid pressure and sensor orientation. It will need careful calibration if better than 10% precision is required. However, its great for basic measurement tasks!

FLOWMETER.ino (3.09 KB)

Hmm, thanks - but I dont think I can use that type. Seams to be for mounting on regular water plumming.
I need something much smaller - something that typically would be suited to use within a PC. My cooling system will in fact be a PC cooling system, using a PC cooling water pump and radiator. The nippels on the pump, radiator and spindle motor is all 7mm outer diameter (a 6mm inner diameter silicon house mounts nicly on that).
Seems to be hard to find.

I could of course use only a temperature sensor - but I'm afraid that by the time I'm reading higher temperatures om the outside of the spindle, the inside may already have burned - if a stop in the waterflow is the reason.
And of course, measuring water temperature will be of little value if the waterflow is stopped as the heat will stay within the spindle.

Hi again

I have looked more into this.
I have found some smaller flow sensors, like this one:
http://www.ebay.com/itm/Water-Flow-Sensor-Fluid-Flowmeter-Switch-Counter-0-3-6L-min-for-Imprinter-T1K-/380746990720?pt=LH_DefaultDomain_2&hash=item58a64a0480

However, that one is only rated for 0.3-6L/min, while I need one that goes up to 8L/min - as that's what my water pump is rated to.
So, after looking some more I have found this one:
http://www.ebay.com/itm/G1-2-Water-Flow-Sensor-Fluid-Flowmeter-Switch-Counter-1-30L-min-Meter-hv2n-/251381716983?pt=LH_DefaultDomain_2&hash=item3a878497f7

And I I also found these
http://www.ebay.com/itm/Druckluft-Stecker-Einstecknippel-1-2-IG-Stecknippel-Schnellkupplung-Adapter/261241389300?_trksid=p2047675.c100010.m2109&_trkparms=aid%3D555012%26algo%3DPW.MBE%26ao%3D1%26asc%3D20131231084308%26meid%3D6108937857021433824%26pid%3D100010%26prg%3D20131231084308%26rk%3D6%26rkt%3D24%26sd%3D400449440978

With those combined I think I should be all good to go.

I assume that the code provided by raschemmel in his last post can be tuned for use with this sensor as well. Especially as I have no need for any precision reading. I just want to know if there see if the water flow is over some threshold level. By testing a bit I assume I quite fast will be able to find a level to use.

-TEK

flowmeter.jpg

nipple.jpg

Wonder if some of you could help me with something else for this project.

From what I find out, a stepper motor with 1.8 degree step should have 200 steps per motor revolution.
I have not found out how to figure out the steps per output revolution, but I assume that if you have the correct steps per motor revolution that could be found out quite easy by observing the stepper motor.
Or - more likely - there is something here that I have misunderstood.

When you initialize the stepper motor, you define steps per motor revolution.
#define STEPS_PER_MOTOR_REVOLUTION 64
and steps per output revolution.
#define STEPS_PER_OUTPUT_REVOLUTION 3404
Steps per output revolution seems to me to be more to be able to define how many steps you should run the motor to get one full revolution. 3404 because is said 17HS3404N on the motor. From some spec I read that might mean something, but I really is not sure.

As said above, I expected this number to be 200. But if I use 200, the motor will not move.
If I use 64 and 3404 the motor will run approximate 1 1/2 revolution for each loop.
If I use 34 and 3404 the motor will run approximate 15 revolutions for each loop.
And I now see that if I use 60 the motor will also run approximate 15 revolutions for each loop.

So, the question is, how do I find the correct number for STEPS_PER_MOTOR_REVOLUTION?

I have this stepper motor:
http://www.ebay.com/itm/281163450994?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
And this controller:
http://www.ebay.com/itm/181297058881?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

And the sketch
#include <Stepper.h>
#define STEPS_PER_MOTOR_REVOLUTION 64
#define STEPS_PER_OUTPUT_REVOLUTION 3404
Stepper small_stepper(STEPS_PER_MOTOR_REVOLUTION, 4, 5, 6, 7);
int Steps2Take;

void setup(){}
void loop()
{
Steps2Take = STEPS_PER_OUTPUT_REVOLUTION ; // Rotate CW 1 turn
small_stepper.setSpeed(500);
small_stepper.step(Steps2Take);
delay(1000);
}

Have you already looked at this ?
Have you tried it using 200 for steps ?