Can't Get EPM to Work Properly

129 views
Skip to first unread message

healthyfatboy

unread,
Sep 5, 2014, 10:42:14 PM9/5/14
to open...@googlegroups.com
Alright, I finally (after a year or two) got around to trying out my EPM units and found that I can't get either to work properly. I'm using V1.2 at the moment and connected up ground to a UBEC and Arduino, VCC to the 5V UBEC, Son and Soff to pin 5 and 6 on the Arduino, and then wrote a short program to turn the EPM on and off to try to make sure it works before I do anything with it. However, it doesn't seem to work. When I put it on a small metal plate, it will basically pick it up but any movement or a very light tap will make it fall, whether or not I'm in the on or off state.
Here's the code I wrote for an Arduino Pro. I also attached it but I figured a copy/paste would be just as quick for someone to take a look at to see if I'm doing something wrong.
Any ideas what I might be doing wrong? At some point, I would like to get a V2.0 as it just seems much easier to deal with but I want to get these working first before moving on to the next version.
Thanks!

int epm_on = 5;
int epm_off = 6;
int state = 0;

void setup(){
  Serial.begin(38400);
  pinMode(epm_on,OUTPUT);
  pinMode(epm_off,OUTPUT);
  digitalWrite(epm_on,LOW);
  digitalWrite(epm_off,LOW);
}

void loop(){
  Serial.print("Current State: ");
  Serial.println(state);
  
  if (state == 0) {
    Serial.println("Charging");
    digitalWrite(epm_on,HIGH);
    delay(3500);
    digitalWrite(epm_on,LOW);
    Serial.println("Ready to turn on");
    Serial.println();
    state += 1;
  }
  else if (state == 1) {
    delay(1000);
    digitalWrite(epm_on,HIGH);
    delay(500);
    Serial.println("Turned on");
    Serial.println();
    digitalWrite(epm_on,LOW);
    state += 1;
    delay(8000);
  }
  else if (state == 2) {
    Serial.println("Charging");
    digitalWrite(epm_off,HIGH);
    delay(3500);
    digitalWrite(epm_off,LOW);
    Serial.println("Ready to turn off");
    Serial.println();
    state += 1;
  }
  else if (state == 3) {
    delay(1000);
    digitalWrite(epm_off,HIGH);
    delay(500);
    Serial.println("Turned off");
    Serial.println();
    digitalWrite(epm_off,LOW);
    state = 0;
    delay(8000);
  }
}

ctech

unread,
Sep 6, 2014, 4:41:43 PM9/6/14
to open...@googlegroups.com
Hello healthyfatboy,

Can you check that there is ~300V on the capacitor before you run a switch cycle 


--
You received this message because you are subscribed to the Google Groups "OpenGrab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opengrab+u...@googlegroups.com.
To post to this group, send email to open...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kenta Hood

unread,
Sep 6, 2014, 5:06:16 PM9/6/14
to open...@googlegroups.com

Do I just put my DMM across the terminals of the big cap? I assume it should be set to DC, not AC on the meter right?

You received this message because you are subscribed to a topic in the Google Groups "OpenGrab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/opengrab/oAPMMw59h2o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to opengrab+u...@googlegroups.com.

ctech

unread,
Sep 7, 2014, 1:20:50 PM9/7/14
to open...@googlegroups.com
Yeab,...just put the DMM on the leads of the big cap, make sure you set the measurement type to VDC and >400V 

healthyfatboy

unread,
Sep 7, 2014, 8:25:15 PM9/7/14
to open...@googlegroups.com
Alright, I must not be getting something right.
The cap charges just fine. I get around 318 V peak and then it starts to go down about 0.2 V a second or so after that. It was a bit hard getting to the cap leads to measure the voltage so I took the 3D printed mount off and was able to hold on to it to measure. One time, I must have had my fingers on the leads of my Fluke while trying to hold them steady and got a pretty hefty shock. Yeah, that one hurt!
Going off the ArduCopter manual (http://copter.ardupilot.com/wiki/common-electro-permanent-magnet-gripper/), I looked at the code there and found all it does when it turns on/off is as follows.

1. Flip switch on for 3 seconds
2. After 3 seconds, bring switch low
3. Cap is charged and ready to cycle
4. Then it says to pull S_on or S_off high using the channel 7 or 8 switch. However, the code only supports on/neutral/off via a single channel so you can't pull either one on or off. That is, unless after you pull it low, you're supposed to go to the neutral position and then choose either on/off using the up/down switch position of a 3 position switch. It's just not clear.

In code speak, 1-4 is as follows from what I understand from the code online for ArduCopter:
1. Set S_on high, S_off low for at least 3 seconds
2. Set S_on low, S_off high after 3 seconds,
3. Cap is ready
4. At this point, S_off is already high and S_on is low. All you can do is flip the switch to set S_on high and S_off low.

For me, it seems there is a disconnect between the manual, the ArduCopter code, and what I wrote in Arduino that's not working.
I found that the latest iteration of what I'm doing seems to at least do something close to right as each time I turn it on/off, I hear something turning on, which could be my BEC going under load temporarily. The voltage will spike back to 317 V at that point but after that, it just drops.
I'm really confused at this point and am not sure what else I can do with it.
I attached the latest version of the code I'm using in Arduino but at this point, I'm stuck and can't think of anything else.
Thanks.

Oh, and that shock really hurt! I'm not sure what I touched but it would be nice to confirm where NOT to touch while it's charged.
Also, how long does it take to discharge? I'm hesitant to pick it up now to move it because I don't want another shock!
EPM_Test.ino

ctech

unread,
Sep 8, 2014, 12:40:21 PM9/8/14
to open...@googlegroups.com
Hahahaha, yeah when I tested them I got sapped 5 times a day, you get used to them after a while

Those saps from the 1000V power supply are kind of harsh,..a couple of those and I have to lay down

So it looks too me that your unit is not working, I can send you a replacement version 2 if you like. 
I didn't think of including a discharge resistor in the design so it could take days hahahaha, what you can do is manually touch the leads of the capacitor with a tool. 

Anywho send me your address and I'll ship you out a new unit

Andreas 

Donald D. Parker

unread,
Sep 8, 2014, 1:16:30 PM9/8/14
to open...@googlegroups.com
When I was a young guy taking an electronics and tv servicing course they always instructed us to keep one hand in your pocket as the old cathode ray tube tv's had 60000 volt potential, we always lead with a screwdriver to discharge them. Anything connected to the lead has the cap potential, we used to charge caps and toss them to another student.

"Learn from those less fortunate, listen to those who have nothing to say..."

Don Parker

ctech

unread,
Sep 8, 2014, 3:41:00 PM9/8/14
to open...@googlegroups.com
"we used to charge caps and toss them to another"

we do that a lot to it is a lot of fun!

Reply all
Reply to author
Forward
0 new messages