Go Down

Topic: Making a sliding mechanism (Read 2038 times) previous topic - next topic

sugar0

Hi,

I already made use of this type of motor, I used PIC microcontroller and H bridge made with transistors MOSFETs.

I also used gears from the glass machine of a car.



Along with that I used a potentiometer. So the system looked like a servo motor.

Using Relays for this type of motor can cause low life for the relay contacts.

Also note that there is a thermal protector inside this motor. if shaft locking occurs, or excessive heating, the motor will stop responding for a while.
Thanks for the suggestion. Note that my use of the motor is for small portions of time and not very often. Maybe 30 times a week of open/close ? i don't think relays will degrade .. they are also heavily used here (italy) for home light systems.

You need two relays, K1 and K2.

K1 is SPDT

K2 is DPDT

However,  with K1, a SPDT, you 'can' use a DPDT instead; just don't use one pair of the two contacts.

SPDT relays are some times hard to find and are more expensive than DPDT, so I just use a DPDT.

Might be nice to have a few spares too as with all components, not that expensive. ;)


Remember to use data sheets to confirm which pin is which.





Yes i know there are 2 relays but i didnt that the single one were less common and more expensive. so thanks for the tip.

For one of a kind boards, these types of perf boards are great. Lots on the internet.

https://www.jameco.com/z/PB-456-PT-Series-Prototyping-Board-3-Power-Buses-3-5-x-2-5-_645677.html   







Today is the day i go to an electronic dealer and buy all the stuff! Thanks

sugar0

i'v been to the electronic store and it gave me weird looks  :smiley-sweat:
i printed your circuit larry and said that there are 30 types of npn transistor and like 10 of TVS or MOV and also diodes. Can we hunt down more detailed part so i can tell him what i need in particular? Thanks!

larryd

#32
Jun 18, 2019, 03:02 pm Last Edit: Jun 18, 2019, 03:26 pm by larryd
Links were offered already for the components in question.

TO92     2N2222 for transistors

Almost any diode, example 1N4007 for D1 and D4

LED, any T1 3/4 red for two LEDs

Relays DPDT 2amp contacts 12vdc coil ~700ohm, similar to https://www.jameco.com/z/DS2Y-S-DC12V-NAIS-Aromat-Electromechanical-Relay-DPDT-2A-12-Volt-720-Ohm-Through-Hole_99311.html     

MOV ~30 volt, similar to https://www.jameco.com/z/ERZ-V10D470-Panasonic-Varistor-30V-5A-Clamp_1384536.html     

Push button switch normally open, as needed.

PCB, similar to the one shown.

.1uf capacitor, greater than 35 volt DC rating.








No technical PMs.
The last thing you did is where you should start looking.

sugar0

here's my list:

https://www.ebay.it/itm/10-PEZZI-CONDENSATORE-ELETTROLITICO-1uF-1-uF-100V-105/251909536626
https://www.ebay.it/itm/10-PEZZI-Varistore-S07K275-275Vac-350Vdc-MOV-soppressore-EPCOS/263601284462
https://www.ebay.it/itm/Rel%C3%A8-Doppio-Scambio-HK19F-DC-12V-SHG-12VDC-5V-DPDT-2A/254093707143
https://www.ebay.it/itm/100-PEZZI-DIODI-DIODO-1N4007/251941100052
https://www.ebay.it/itm/10-pezzi-Transistor-2N2222A-2N2222-Bjt-npn-75V-0-6A-625mW-3-Pin-TO-92/254223631987

i already got the button (NO) and the board (called millefiori or preforata in italian)

The only thing i'm not sure are the MOV that it seems they are rated for 350V ? Coudln find on ebay 30v ones" are they ok or i need to find em elsewere? Thanks

larryd

#34
Jun 18, 2019, 04:55 pm Last Edit: Jun 18, 2019, 05:01 pm by larryd
350v would be too high.
See if you can find some between 25v to 60v.


You need a .1uf capacitor.
The one you show will not work as it is polarity sensitive.



No technical PMs.
The last thing you did is where you should start looking.

sugar0

http://www.ebay.it/itm/2-Pezzi-condensatore-in-Polipropilene-100nF-0-1uF-250Vdc-160Vac-passo-5mm-R79-KE-/263994350015?hash=item3d774a19bf
 and

https://www.ebay.it/itm/5-Varistori-S10K30-30V-varistore-soppressore-protezione/151115569809?hash=item232f309a91:g:WukAAOSwqu9VMCJZ

larryd

No technical PMs.
The last thing you did is where you should start looking.

larryd

http://www.ebay.it/itm/2-Pezzi-condensatore-in-Polipropilene-100nF-0-1uF-250Vdc-160Vac-passo-5mm-R79-KE-/263994350015?hash=item3d774a19bf
 and

https://www.ebay.it/itm/5-Varistori-S10K30-30V-varistore-soppressore-protezione/151115569809?hash=item232f309a91:g:WukAAOSwqu9VMCJZ
Yes



No technical PMs.
The last thing you did is where you should start looking.

sugar0

Hello! I managed to de-solder these components from older boards. Do you think i'm ok with parts? expecially the relays?(i forgot to take a pic of the capacitor).
Also i wanted to try to wire up all on a breadboard (the white ones) before anything. do you think is a good idea to understand more ? Thanks!




sugar0

#39
Jun 21, 2019, 12:28 am Last Edit: Jun 21, 2019, 12:31 am by sugar0
i tried to reproduce your design onto a breadboard but without success! Let me know what you think



Here's the code:

Code: [Select]
void setup()
{
  pinMode(2, INPUT);
  pinMode(8, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(4, INPUT);
}

void loop()
{
  if (digitalRead(2) == HIGH) {
    digitalWrite(8, HIGH);
    delay(200); // Wait for 200 millisecond(s)
    digitalWrite(7, HIGH);
  }
  if (digitalRead(4) == HIGH) {
    digitalWrite(8, HIGH);
    delay(200); // Wait for 200 millisecond(s)
    digitalWrite(7, HIGH);
  }
}

larryd

#40
Jun 21, 2019, 01:29 am Last Edit: Jun 21, 2019, 03:24 am by larryd
Parts look reasonable (as long as they still function).

At first glance, the crappy Fritzing diagram looks okay.
Edit, if the VN2222 is a MOSFET, the source goes to GND, the drain goes to load, i.e. turn the transistors 180°.

You have to confirm the relay pins are correct.

Notice, the schematic on the relay top is the bottom view.

There should be a short between the Com and N.C. when no power is placed on the coil.

If you place a 12V supply across the coil you should hear a faint click.


Confirm with a DVM that D2 and D4 go between 5V to 0V on a push.



For testing try:
Code: [Select]

void setup()
{
  pinMode(2, INPUT_PULLUP);
  pinMode(4, INPUT_PULLUP);

  pinMode(8, OUTPUT);
  pinMode(7, OUTPUT);

}

void loop()
{
  digitalWrite(8, digitalRead(2));
 
  digitalWrite(7, digitalRead(3));

}




No technical PMs.
The last thing you did is where you should start looking.

larryd

#41
Jun 21, 2019, 01:35 am Last Edit: Jun 21, 2019, 03:27 am by larryd
It appears the Zettler relays have a polarity marking on the coil pins (WATCH FOR POLARITY).
https://ca-en.alliedelec.com/m/d/af053134ce9a0129561442872651e3f8.pdf     

The + pin will have to go +12V power.



EDIT
That transistor is a VN2222 which could be a MOSFET, if so, you may need to check the pin-out from a data sheet to get the S/G/D (left to right in your image) correctly connected.

https://www.mouser.ca/datasheet/2/268/VN2222LL%20B082013-596825.pdf     



 









No technical PMs.
The last thing you did is where you should start looking.

sugar0

Many thanks Larry. I'll report back!

sugar0

Parts look reasonable (as long as they still function).

At first glance, the crappy Fritzing diagram looks okay.
Edit, if the VN2222 is a MOSFET, the source goes to GND, the drain goes to load, i.e. turn the transistors 180°.
Can i check it with DVM?

You have to confirm the relay pins are correct.

Notice, the schematic on the relay top is the bottom view.

There should be a short between the Com and N.C. when no power is placed on the coil.

If you place a 12V supply across the coil you should hear a faint click.


Confirm with a DVM that D2 and D4 go between 5V to 0V on a push.
By D2 and D4 which one do you intend?



For testing try:
Code: [Select]

void setup()
{
  pinMode(2, INPUT_PULLUP);
  pinMode(4, INPUT_PULLUP);

  pinMode(8, OUTPUT);
  pinMode(7, OUTPUT);

}

void loop()
{
  digitalWrite(8, digitalRead(2));
 
  digitalWrite(7, digitalRead(3));

}





ok!

larryd

#44
Jun 21, 2019, 04:24 pm Last Edit: Jun 21, 2019, 08:46 pm by larryd
Check a MOSFET with a DVM:
If the transistor is a MOSFET, the pinout is Source/Gate/Drain left to right in your image.
https://youtu.be/gloikp9t2dA    


Checking your switch wiring:
With a DVM, you measure the DC voltage between D2 to GND.
This should normally be 5v.  Use the sketch offered to you in previous post.
A switch closure will give you 0v.
If you do not see this change, your switch is not wired properly.
D4 should act the same.

As seen in the relay diagram, + pin 1 must be connected to +12v.
Pin 16 connects to the transistor drain or collector.

EDIT
Suggest you get a dual beam I.C. socket for each relay.
Sockets make your project much more maintainable.


Updated:








No technical PMs.
The last thing you did is where you should start looking.

Go Up