Arduino Forum

Using Arduino => General Electronics => Topic started by: amine2 on Aug 30, 2018, 07:45 pm

Title: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Aug 30, 2018, 07:45 pm
Hello guys , i have this motor right here  :

motor encoder  (https://www.aliexpress.com/item/Bringsmart-GA12-N20-DC-Motor-6V-Encoder-Motor-3V-Gear-Motor-Electronic-Lock-Motor-Monitoring-Equipment/32720616488.html?spm=a2g0s.13010208.99999999.262.yllrJ0)

the motor has an encoder wired to it .
these encoders tend to usually either be 5v encoders or 3.3v encoders .
at first i didn't think much of it , and powered the encoders with the Arduino's 5v power line .
and everything worked well .

then i tried to test it and powered them with the arduino's 3.3v power line , and surprisingly it also worked well !

both 5v and 3.3v gave me the same result . this god me worried that if it's meant to be powered by the 3.3v power line , it might get damaged on the long run .

i sent an email to the seller about 2 weeks ago and he doesn't seem to be willing to respond , is there any way i can practically tell whether this device is rated for 5v or 3.3v ?

thank you
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: larryd on Aug 30, 2018, 08:22 pm
I do not see any data on this.

Quite expensive.

You may have to experiment to see if it works at the voltage you want to use.  :smiley-confuse:


Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: DVDdoug on Aug 30, 2018, 08:53 pm
Quote
how can i tell if device is rated for 5v or 3.3v ?
Buy from reputable suppliers that supply a datasheet, or a link to the datasheet, or a manufacturer's part number where you can find the datasheet.

If you can't find complete specs, you're taking a risk.    (There's nothing wrong with taking a risk, and long as you understand and accept the risk.)

I actually found the manufacturer's datasheet (http://www.bringsmart.com/pd.jsp?id=154#_jcp=3_25) .

The motor is nominally rated for 6V but it says, "Usage 3-12V".  There is no information about what happens at the minimum & maximum but I assume the torque & speed specs are for 6V.

There's no information about the encoder.  And, the heading on the web page shows a different part number than the chart so that's not a good thing.  (I found it by clicking on a similar looking picture.)

Quote
i sent an email to the seller about 2 weeks ago...  
The seller probably doesn't know.

The manufacturer has an email contact form at the bottom of the datasheet page.    It's worth a try, but they may not respond to an end-user that bought one motor.    ...If they had the information "handy" it would probably be on the datasheet.
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: CurtCarpenter on Aug 30, 2018, 09:52 pm
Your motor uses hall effect sensors to detect speed and direction of rotation, so this article may be of some help: https://www.electronics-tutorials.ws/electromagnetism/hall-effect.html. 

The data sheet DVDdoug provides (well done!) indicates that you can connect the sensors to any 3.3v - 5v supply without worry.  Using 5v may offer you a little more noise margin over the 3.3V, and that might matter.

Curious:  do your sensors generate pulses of 5v or 3.3v depending on the supply voltage you use?

Looks like a nice motor!

Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Aug 31, 2018, 12:38 am
Your motor uses hall effect sensors to detect speed and direction of rotation, so this article may be of some help: https://www.electronics-tutorials.ws/electromagnetism/hall-effect.html. 

The data sheet DVDdoug provides (well done!) indicates that you can connect the sensors to any 3.3v - 5v supply without worry.  Using 5v may offer you a little more noise margin over the 3.3V, and that might matter.

Curious:  do your sensors generate pulses of 5v or 3.3v depending on the supply voltage you use?

Looks like a nice motor!


hello Sir , thank you for your attention .
the pulse that the encoder outputs is a 5v one .
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Aug 31, 2018, 12:40 am
thank you very much Sir !
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Aug 31, 2018, 12:41 am
I do not see any data on this.

Quite expensive.

You may have to experiment to see if it works at the voltage you want to use.  :smiley-confuse:



Hello sir , thank you very much for your attention .

the encoder seems to work at a voltage of 5v . and gives the exact same output at 3.3v .
the edifice even has an LED diode , the diode lights up the exact same way with 5 and 3.3v .
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Sep 03, 2018, 08:47 pm
Hello guys , i thought i'd just post here instead of creating a new thread .

 - i am opting to make a printed circuit out of my design , and i don't know whether or not i should add the 3.3v line for the encoders  , it currently works well with 5v but who knows , what's the most reasonable thing to do ?

- a guy said to me that Hall sensors (such as the ones in the encoder) require 4.7K pull-up resistors . but for now everything seems to be working without those , should i add them anyway in my printed circuit design ?

- also about pull-up resistors , let's say i am willing to feed an arduino signal to 3 chip pins . which means that i am going to connect the same arduino pin to 3 different chip pins where the connection requires a pull-up resistor , should i use a single one on the arduino pin , or 3 different resistors on each and every one of the chip pins ? as some documents got me confused .

-since i am working with 5v and a maximum output frequency of about 10Khz , i won't be needing to modify the Clearance and drill parameters right ?

-one last thing , i have a 12V line in my circuit , so i need it to be extra wide . i can't find any document online that shows a clear correlation between voltage and line width though , can someone point me at the right direction to figure that out ?


thank you very much .


 

Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: CurtCarpenter on Sep 03, 2018, 09:21 pm
It looks to me (from the data sheet photo) like your motor encoder has the pull-up resistors already installed, and the fact that you are seeing 5V pulses from the encoder seems to confirm this.  So no, I   don't believe you need to provide the 4.7K pull-up resistors.

A single pull-up resistor at your Arduino pin should be adequate -- if you need it at all.  Check your Arduino datasheet to see if you can't enable an on-chip pull-up resistor.  But note:  we don't know what you're trying to connect that Arduino pin TO, and that could cause difficulties!

Since we don't know how much current you are trying to source at 12V, there's no way to determine whether you need to use a bigger line width or a smaller one.

I'd advise you to get everything working on a breadboard before you start thinking about making a printed circuit board.  Without more detail about what you're working on, I don't think anyone can help you in that area.  We're already guessing a lot  :) 
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Sep 08, 2018, 03:31 pm
Hello again Curt , thank you again for your attention ! and i am sorry for my late feed-back as i've been highly over-burdened this past time .

the circuit indeed works on the breadboard . even without the pull- resistors for the encoder pins . only at very high motor speeds does the readings become rather erroneous . sometimes the Microcontroller skips pulses or reads pulses in reverse . though at low speeds the readings are very accurate . since i have 6 encoders and am using other interrupts to create PWM signals i don't have the luxury of Hardware PWM , therefore i am taking readings using a timer interrupt at nearly 10Khz . yet surprisingly at high motor speeds i still get incorrect reads (faulty by a limited margin) .

here is the schematic :
(https://forum.arduino.cc/index.php?action=dlattach;topic=566259.0;attach=273371)


currently i removed the pull- resistors that were connected to encoder pins from the design .

i am using the 5V rail to feed the encoders . and i removed the 3.3v signal line , i also am worried about that .

i am also worried about there not being any capacitors  near the atmega328 (not an arduino board , the printed circuit has a standalone Atmega chip) is that really required ?

the 5V and 12V signals are provided by an other independent circuit .

there are some missing connections in the schematic but they are straightforward , from the 74HC595 to the L293D and then from that to the pin-header .

 so my questions are :

          - the manufacturer says the maximum continuous draw per motor is 60mA , the 12V rail is only used to power 6 Motors through the L293D chips . though i get a reading of nearly 1A when all of the motors are ON during a test . so how wide should the 12V rail be ?
          - is it necessairy to have a 10uf capacitor near the Atmega IC ?
          - can i get away with powering the encoders with 5V ? or must i add a 3.3v line ?
          - is there anything else you may recommend to be added to the circuit ? maybe an other capacitor somewhere ?


thank you very much .

Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: CurtCarpenter on Sep 08, 2018, 04:31 pm
Looks interesting!

1) About circuit board trace width on your 12V line, look here:  https://www.7pcb.com/trace-width-calculator.php (https://www.7pcb.com/trace-width-calculator.php) .  Note that the width depends on how thick the copper layer is on your circuit board.  Play with the calculator a little bit and it will help you get comfortable with some choice of width.  (It looks to me like a 15mil trace on 2oz copper would give you plenty of safety margin -- but play with the calculator -- its cool!  :)

2) It can't hurt to put a 10uF (more or less) capacitor, in parallel with a 0.1uF capacitor (more or less), close to your ATMega.  The big capacitor helps smooth out any slow fluctuations that might happen on your power rail, and the 0.1uF capacitor can help with any high-frequency noise from your circuit.  Look at the capacitors as insurance.

3) Based on everything you've told us, powering your encoder with 5V ought to be just fine -- no worries.

4) I'm not sure why you need R1 and R3.  Why not just ground those two pins on the ATMega if they need to be held low?  Otherwise, looks good to me, and as the old saying goes, if it works, don't fix it!

If the problem you're having with skipped pulses seems random, it may be timing related.  Too many things happening all at once.  Maybe a way to check would be to see if the problem changes if you turn off two or three of your encoders? 

Hope that helps.





Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Sep 08, 2018, 05:32 pm
4) I'm not sure why you need R1 and R3.  Why not just ground those two pins on the ATMega if they need to be held low?  Otherwise, looks good to me, and as the old saying goes, if it works, don't fix it!


thank you very much sir . this project is a Bionic upper hand . it has 5 fingers but the thumb also does adduction and abduction and therefore it needs two motors . so in total we have 6 motors and 6 encoders . i will post all about it in the forum when done and will sure give you credit for this valuable help .

yes that helps very very much , i will make sure to add the two capacitors .
though about R1 and R3 :

          - one of them is connected to the ENABLE pin . the motors i have don't support 12V very well , so the PWM signal from the arduino has a duty cycle that doesn't surpass 50% for me to get a maximum voltage of 6v . the thing is on bootup , the arduino pins turn to high impedance , therefore the 74HC595 starts to get random signals and i always end up with 12V being fed to the motors for a very short amount of time .
to fix that i added a pull- resistor on the enable pin . that totally fixed the problem , you told me about the innate option to add that in the Atmega datasheet and thank you for that . but i had already added the resistor in the board by then and as long as it solved my problem i kept it (thank you very much though i learned that option from you and i didn't know it existed)

          - now MISO seems to receive some random signals if kept un-wired and therefore rendering the SPI transmission more prone to Noise , so therefore i connected it to ground . but then i remembered that i may have to reburn the bootloader on the chip , so i might need to actually use MISO . so i added a resistor . so that when i place wires to program the CHIP via SPI i'd have access to the MISO pin and when the wire isn't there the MISO would be reconnected to ground .

i didn't route the MOSI and SCK pins out , if i'd ever need them , i thought i'd just attach a snapper to the DIP pins and use those , since those signals are connected to the 74HC595 chips .



Thank you very much sir (y)

 
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: CurtCarpenter on Sep 08, 2018, 05:49 pm
Sounds like an amazing project!  I'll look forward to your post about it.
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: MarkT on Sep 08, 2018, 11:10 pm
Flippant answer to the original question:  Power it from 7V, if it blows up its a 3.3V part, if it works its a
5V part (probably a somewhat damaged 5V part, but hey).

Slightly less flippant answer:  Test a bunch of them at a range of voltages and plot the results.  In other
words do the work of characterizing the parts in detail.
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: Paul__B on Sep 10, 2018, 10:38 am
Thank you very much sir.  This project is a Bionic upper hand.  It has 5 fingers but the thumb also does adduction and abduction and therefore it needs two motors.  So in total we have 6 motors and 6 encoders.
Of course you realise that to do a real hand, you arguably need twin motors for each finger - the superficialis (https://en.wikipedia.org/wiki/Flexor_digitorum_superficialis_muscle) and profundus (https://en.wikipedia.org/wiki/Flexor_digitorum_profundus) for each finger, not to mention the lumbricals (https://en.wikipedia.org/wiki/Lumbricals_of_the_hand) and interossei (https://en.wikipedia.org/wiki/Dorsal_interossei_muscles_(hand)).   :smiley-lol:

Cannot live long and prosper without.
(http://www.todayifoundout.com/wp-content/uploads/2010/06/Spock_vulcan-salute.png)
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: Southpark on Sep 10, 2018, 11:24 am
- a guy said to me that Hall sensors (such as the ones in the encoder) require 4.7K pull-up resistors . but for now everything seems to be working without those , should i add them anyway in my printed circuit design ?

One way to find out is to measure the DC voltage at one of the hall sensor output pins (relative to the gnd pin) for a case where the hall sensor supply voltage is 3.3V. As you rotate the disk, the voltage will probably switch from 0V to 3.3V or vice versa. Then do the same thing for a hall sensor supply voltage of 5V. If you get sensor output voltages that switch between 0V and 5V, then chances are that your hall sensor can work with either 3.3V or 5V. This means that you would be free to choose what voltage you want to operate with, by choosing your hall sensor supply voltage.

Those pin-out sheets are at least helpful in that they tell you what the wires are, and provide some clues about voltage levels. Otherwise, it's a bit of fail on their part on providing adequate details. It's probably a fail on their suppliers.

The other thing is ..... maybe you've thought about it already ---- such as what sort of measurements are planned for those encoders. Relatively constant angular velocity measurements?
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Oct 18, 2018, 04:41 pm
Flippant answer to the original question:  Power it from 7V, if it blows up its a 3.3V part, if it works its a
5V part (probably a somewhat damaged 5V part, but hey).

Slightly less flippant answer:  Test a bunch of them at a range of voltages and plot the results.  In other
words do the work of characterizing the parts in detail.
Yes thank you very much Sir ! i am sorry for the late response
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Oct 18, 2018, 04:42 pm
One way to find out is to measure the DC voltage at one of the hall sensor output pins (relative to the gnd pin) for a case where the hall sensor supply voltage is 3.3V. As you rotate the disk, the voltage will probably switch from 0V to 3.3V or vice versa. Then do the same thing for a hall sensor supply voltage of 5V. If you get sensor output voltages that switch between 0V and 5V, then chances are that your hall sensor can work with either 3.3V or 5V. This means that you would be free to choose what voltage you want to operate with, by choosing your hall sensor supply voltage.

Those pin-out sheets are at least helpful in that they tell you what the wires are, and provide some clues about voltage levels. Otherwise, it's a bit of fail on their part on providing adequate details. It's probably a fail on their suppliers.

The other thing is ..... maybe you've thought about it already ---- such as what sort of measurements are planned for those encoders. Relatively constant angular velocity measurements?
Yes that actually did work !
it turned out that encoders were equally rated for 3.3v or 5v .
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Oct 18, 2018, 04:45 pm
Of course you realise that to do a real hand, you arguably need twin motors for each finger - the superficialis (https://en.wikipedia.org/wiki/Flexor_digitorum_superficialis_muscle) and profundus (https://en.wikipedia.org/wiki/Flexor_digitorum_profundus) for each finger, not to mention the lumbricals (https://en.wikipedia.org/wiki/Lumbricals_of_the_hand) and interossei (https://en.wikipedia.org/wiki/Dorsal_interossei_muscles_(hand)).   :smiley-lol:

Cannot live long and prosper without.
(http://www.todayifoundout.com/wp-content/uploads/2010/06/Spock_vulcan-salute.png)


Well yeah in the human body that's how it works xD the superficialis and profundus are for finger precision , while when it comes to extension and flexion it depends on the muscle group ! either the flexors or the extenders . that's mainly because muscle can only apply force when they contract . there for a single muscle can only move the joint in one direction ! though Motors can turn in both directions . i am using a 4 Bar linking mechanism . the motor motor flexes and extends the finger . in other designs they use an elastic substance to extend the finger , and a motor to flex it !

Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Oct 18, 2018, 04:57 pm
Hello again :) since its the same project i didn't want to make an other thread .
ima just post my question here .

it is time now to make a printed circuit for the hand . and we're gunna get the made in china . the making doesn't take more than 2 days but the delivery takes more than a month ! that's why i wanna make sure that everything is done correctly to avoid a major delay of an other month after the  circuit comes in !

the PCB house has two parameters in the making process that i can't quite grasp :

 - the copper weight and the surface finish , i have no idea how to pick the right ones . i even tried searching online without any hope .
(https://forum.arduino.cc/index.php?action=dlattach;topic=566259.0;attach=278373)


- the clearance for everything on the board is 0.2mm which is around 6mil . even with the +12V line the clearance is also 6mil .  that wouldn't cause any problems right ?


-for a copper weight of 1oz , the width of the 12V line is 1.7mm . i just wanted something more than enough to avoid problems , that would work right ?
when it comes to the 5v line , i used used the standard width of 0.4mm .


- one last thing , i used many connectors on this board , the thing is : two of them are not on the edge of the board , they are inside it as you can see , i marked them with green arrows in this photo :

(https://forum.arduino.cc/index.php?action=dlattach;topic=566259.0;attach=278371)

the connectors will still snap correctly right ?




Thank you very much for your attention .


Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: srnet on Oct 18, 2018, 08:44 pm
the connectors will still snap correctly right ?
How can anyone know, without knowing exactly which connectors they are, and the other exact components that are nearby ?

Print out the board, at 1:1 scale, stick the printout to a bit of foam and actually check that all the actual components that you are using will fit, simple.
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: srnet on Oct 18, 2018, 08:52 pm
- the copper weight and the surface finish , i have no idea how to pick the right ones . i even tried searching online without any hope
Where were you searching ?

If you type 'HASL with lead'

Into Google is already knows you are asking about PCB surface finishes, and suggests several explanatory links.

For the full answers however, you should tell us if this is  DIY project or something you intend to sell.
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Oct 20, 2018, 03:31 pm
Hello , thank you very much for your Attention Srnet , i am sorry for the lack of detail .

this is the exact connector that i have :
connector (https://www.aliexpress.com/item/1set-Connector-2510-2P-20P-2-54-pitch-connector-connector-terminal-male-bent-pin-female-head/32823429106.html?spm=2114.search0104.3.44.12c41fa9hOIG6P&ws_ab_test=searchweb0_0,searchweb201602_3_10065_10068_318_319_317_10696_450_10084_10083_10618_452_535_534_533_10307_532_5023915_204_10059_10884_323_10887_100031_320_321_322_5727715_10103_448_449_5727815,searchweb201603_45,ppcSwitch_0&algo_expid=4e353df2-5d99-4f1b-905e-021f8af7a71d-6&algo_pvid=4e353df2-5d99-4f1b-905e-021f8af7a71d)



you can ignore all the nearby components , my question is whether or not it can slide on the surface . because the connector is in the middle of the board and not on any of the edges .




- i am not intending to sell this , neither is it for a DIY project . we are constructing these hands for local amputees . so it must be long lasting and the design has to be as reliable as it can be .



- what about the clearance and the routing width sir ?
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: MarkT on Oct 20, 2018, 06:09 pm
Maybe go for gold plating and conformal coating for reliability - will be more robust to getting
damp and less likely to corrode if it does.  Certainly all connectors must be gold plated sort
for long term reliability in harsh environments.
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: srnet on Oct 20, 2018, 08:44 pm
my question is whether or not it can slide on the surface . because the connector is in the middle of the board and not on any of the edges .
They will (normally) fit flush, but it depends on the wires used and other stuff nearby.

But as I am sure you were going to do a trial component fit (see post #20) you can check at that time if the wires are intefering with other stuff.
Title: Re: how can i tell if device is rated for 5v or 3.3v ?
Post by: amine2 on Oct 23, 2018, 12:04 am
Thank you very much guys , this is what i finally went with for the design .

- 2oz copper is an extreme , and this design can do well with just 1oz
.
- i went with HASL with lead , it seems to have sufficient endurance . also went with that to avoid the higher temperatures and lack of compatibility of some parts with ROHS surface finishes .

- a 0.2mm clearance is more than enough for this application , even near the 12v+ rail .

- i ramped the 12V line width to 2.1mm just for extra safety .
 
- the connector will fit just fine .


if you guys have any remarks i would like to hear them .
thank you .