Wiring question

55 views
Skip to first unread message

hoang....@gmail.com

unread,
May 1, 2014, 1:05:06 PM5/1/14
to open...@googlegroups.com
Hi,
I was looking at using the EPM3 for a robot lifter.

now is there a way to wire it in such a way where the EPM is only linked to the main robot via Vcc/Gnd, and in such a way that when Vcc is cut, then the EPM turns off? 
I have a hard time understanding how the EPM does state changes, and what happens when it's not powered.

that also, there seems to be conflicing information about the load capacity, on the page it say
Under ideal conditions it can hold 6kg and can clamp a payload of 0.5 -1kg securely

what is ideal conditions? and what is defined as hold and what is defined as clamp?

if the EPM3 requires power to change state, then maybe i could use a supercap to power it in the interval between vcc cut and state change?

ctech

unread,
May 1, 2014, 4:51:24 PM5/1/14
to open...@googlegroups.com
Hello,

>now is there a way to wire it in such a way where the EPM is only linked to the main robot via Vcc/Gnd, and in such a way that when Vcc is cut, then the EPM turns off?
Not without rewiring the code.
>that also, there seems to be conflicting information about the load capacity, on the page it say
Under ideal condition you should be able to lift ~6kg, or 60N. Force=acceleration*mass. So if you have the slightest bit of vibration even for very very short periods of time the cargo will drop. In reality there will always be vibration. The 1kg figure is what you should be able to hold under any normal*** circumstances.

> if the EPM3 requires power to change state, then maybe i could use a supercap to power it in the interval between vcc cut and state change?
You sure could power it that way but unless you also implement a wireless communications, I see no point to it.

A better approach might be to change the code, when the PWM pin goes low turn EPM off. Connect a ~100uF Elco on VCC to GND so that the PIC controller runs just long enough to detect logic low on the PWM pin, 5us should be plenty

line 257
PWM

BTFSS GPIO_Current,GP3 ;
goto Falling_Edge ;we got the falling edge on the PWM pin (GPIO,3) //change this to call Turn_Off




--
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.

hoang....@gmail.com

unread,
May 1, 2014, 5:09:48 PM5/1/14
to open...@googlegroups.com
ahh
I think you misunderstood my use of the capacitor, it seemed to me that the circuit still needs power to turn off the magnet, and thus the capacitor is there to power the circuit, I said supercap because I thought you needed the 600mah for 0.3s as per spec to do this. 
I suspected you'd have to require the PWM logic, which is fine, I just don't understand PIC assembly so I'll have a look at it.

so the best option would to be reprogram the PIC, but also connect the cap so that the circuit stays alive to reset?
in the case of having a design factor, we would just oversize that capacitor to make sure that yes, the PIC does turn off the magnet?

in my design it's just a pick and drop system, so once the EPM is off, it won't need to be turned back on without external intervention. 

that said how would i go about energizing the magnet again? just apply a high to the PWM pin again?

hoang....@gmail.com

unread,
May 1, 2014, 5:10:24 PM5/1/14
to open...@googlegroups.com
oh and also, what would you recommend to use to reprogram the PIC? 


On Friday, May 2, 2014 6:21:24 AM UTC+9:30, Andreas Jochum wrote:

ctech

unread,
May 1, 2014, 5:49:11 PM5/1/14
to open...@googlegroups.com
Hmm,
If you want PWM to work as well, there is a timer programmed to detect missing PWM signals and blink the LED, you could use that but you would have to keep the PIC running for 20ms I believe. Still a 100uF capacitor should* do if you desolderer the LED, stick a 10mF on if you don't want to cut it that close....


The main capacitors are charged at all times, so you can run one extra cycle and you need to do is convince the PIC to command the switch

>, I just don't understand PIC assembly so I'll have a look at it.
here I done for you....just make this change

Timer
   
        DECFSZ PWM_timout_counter_rollover,1
            goto blah
        call PWM_warning                    ;Blink LED

to:

Timer
   
        DECFSZ PWM_timout_counter_rollover,1
            goto blah                     ;yeah I probably was to tired to think of a better name
        goto Turn_Off                  ;turn off

build it, flash the PIC, make sure it keeps running for 20ms and you should be good to go

hoang....@gmail.com

unread,
May 1, 2014, 6:17:54 PM5/1/14
to open...@googlegroups.com
alrighty.
last question i hope
...how do you flash the pic?
it seems to use some sort of serial interface, but then if i recall the pic's generally need programmers? (since they don't carry onboard the ability to program themselves)

ctech

unread,
May 1, 2014, 6:36:44 PM5/1/14
to open...@googlegroups.com
The 10USD ones from china work 90% of the time  but you need to be really good at goggling, (translating scanned Chinese documentation hehehe) and maybe spend 3 days to get them to work
PICKit from Microchip is the preferred one, good documentation etc...I believe version 1-3 are compatible...
btw power the EPM externally while programming, the usb programmers can't deliver that much current ...
There are plenty of tutorial available for first timers,...

also if you prefer I can ship you a custom version

Kind regards
Andreas

hoang....@gmail.com

unread,
May 1, 2014, 6:42:42 PM5/1/14
to open...@googlegroups.com
okay all good!
probably be best to mention that in the datasheet, the actual pic used.
i read through it earlier but it just said 12F.

I think i'll have a whack at programming it myself :)

that also said it was kind of amusing to realize that where I live (Australia) seems to have the only reseller of the EPM. 

hoang....@gmail.com

unread,
May 6, 2014, 12:03:53 PM5/6/14
to open...@googlegroups.com
Hi andreas,

I recently received my EPM, however i can't seem to get it to toggle consistently with the button, or is the button for testing once it's wired up completely?

I wired up ground and vcc, it seems to charge up, and sometimes the magnet activates, sometimes it doesn't. 
I do wait 2-3 seconds for the capacitors to charge up, my voltage line is 6v out of a switching regulator supply. 

ctech

unread,
May 6, 2014, 1:00:56 PM5/6/14
to open...@googlegroups.com
Hmm,...
So first, the button is on the same GPIO then the LED, so that means sometimes when you push the button when the LED is driven the PIC will not recognize the button action. If you hold the button for 0.25s minimum it should work fine.
You don't have to wait 3s, 0.5s is enough
The LED should go on when you hold the button down. The button is really only there for testing so you don't have to wire everything up to see it working and makes trouble shooting your setup easier

My bet would be on too much noise or to high impedance of the power supply or wiring/connector causing the PIC to brown out.  Some SMPs are very very nosy, the noise is often cause by inadequate filter capacitor or an inability to correct the output voltage quickly  enough after a quick rise in current. The current rise time of the EPM is quit sharp, from almost 0 to 600mA in a few micro seconds.

Try this:
check the wiring, make sure the connector fits tight and is not lose
add a 100-1000uF filter capacitor on the input of the EPM
or try it with an other power supply or battery

Kind regards
Andreas





Reply all
Reply to author
Forward
0 new messages