Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

help with circut

  • 08-04-2018 9:22pm
    #1
    Registered Users, Registered Users 2 Posts: 212 ✭✭


    Hi guys. Could anyone help a noob out. I have a 24v 100ma power supply and I need to power a micro usb for a microcontroller (5v 1amp). I have been reading about transistors but just don't know enough. I have a second 24v 100ma supply there too to power the transistor if I need to. Could anyone point me in the right direction? Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 3,888 ✭✭✭ozmo


    What kind of input is it that you want to use to turn on the micro usb - a switch or a signal from another device?

    Do you need disconnect the data lines of the USB also - or is it just to make/break the power line?

    “Roll it back”



  • Registered Users, Registered Users 2 Posts: 9,514 ✭✭✭TheChizler


    The simplest thing to do would be to use a linear regulator like this:

    L7806

    It'll generate quite a bit of heat with 1 A out though, for a few more quid you could get an appropriate switched DC-DC regulator:

    DC-DC Converter

    Or if you like convenience:

    https://www.amazon.com/HOMREE-Converter-Voltage-Regulator-Standard/dp/B01MEF293V


  • Closed Accounts Posts: 3,478 ✭✭✭eeguy


    Don't bother messing with transistors or whatever. Just buy a module like the one above and give it a shot.

    Though if all you have is 100ma at 24v (2.4W) you won't be getting an amp at 5v (5W)

    Now chances are that microcontroller spec for whatever you're running is worst case so it might work...


  • Registered Users, Registered Users 2 Posts: 212 ✭✭leonffrench


    Thanks for the replies. the power is from another device. I butchered a car phone charger to step down from 24v to 5v which I think is the same thing as you linked but there isn't enough current passing through to power the microcontroller. The LED on the converter lights but microcontroller won't power up. I thought I could amplify the current with a transistor.


  • Registered Users, Registered Users 2 Posts: 9,514 ✭✭✭TheChizler


    Check the voltage on the microcontroller supply before and after connecting the micro. If before it's ~5V and after much less it's a current supply issue.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 212 ✭✭leonffrench


    TheChizler wrote:
    Check the voltage on the microcontroller supply before and after connecting the micro. If before it's ~5V and after much less it's a current supply issue.

    Thanks will try that. Appreciate all the replies


  • Registered Users, Registered Users 2 Posts: 3,888 ✭✭✭ozmo


    Thanks for the replies. the power is from another device. I butchered a car phone charger to step down from 24v to 5v which I think is the same thing as you linked but there isn't enough current passing through to power the microcontroller. The LED on the converter lights but microcontroller won't power up. I thought I could amplify the current with a transistor.

    Ahh - when you mentioned transistor - I assumed you wanted to switch it on and off using a transistor.

    But if you want to change the voltage from 12V to 5V - your best bet is as the other emails here suggest - is to use a good DC-DC converter.

    This part is only €3
    https://www.adverts.ie/other-electronics/lm2596s-dc-dc-adjustable-step-down-power-supply-module/9024399


    The Car USB chargers could be failing because
    1. Voltage is too low - or too high
    2. Voltage has a high Ripple (most likely reason - the voltage from a cheap car adapter could be fluctuating really fast between say 4.5 and 5.5 v- but a multimeter will show it as 5v average - this will cause the micro to keep resetting)

    It's unlikely to be because its not delivering enough amps - any charger should do at least 1A to power a phone. Wont power a Raspberry Pi or other high current micros though.

    If you really want to use your car usb charger Try putting a cap (100uF 16V or so) across the +ve and Gnd - and see if it helps.

    “Roll it back”



  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,565 Mod ✭✭✭✭Capt'n Midnight


    Change the power supply if you can.

    Pound shops do USB chargers.

    +1 on the smoothing capacitor

    They also do small power banks if the controller is on too long.



    Check out what chip is in the car adaptor it's likely to be a 500mA one.

    Maybe see if you can get a lower powered microcotroller


  • Registered Users, Registered Users 2 Posts: 212 ✭✭leonffrench


    Thanks for all the help guys. I plugged the micro in to a 5v wall adapter and measured what current it's pulling and it's only 100ma - the same as my supply. So I think I just need to lose the car charger and get the dc-dc converter to drop from 24v to 5v. Does the dc-dc converter only drop the voltage and leave the current as is? And with this set up would you still recommend a cap? If anyone is curious it's a sonoff inching relay which I am wiring into a button on my intercom to open and close the electric gates with alexa and by app.

    Should also add that I tried micro connected to the car charger connected to an 18v drill battery and it worked perfect so I think with the low current in my supply the car charger isn't letting enough thru. (Or something...I'm a noob)


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,565 Mod ✭✭✭✭Capt'n Midnight


    Thanks for all the help guys. I plugged the micro in to a 5v wall adapter and measured what current it's pulling and it's only 100ma - the same as my supply. So I think I just need to lose the car charger and get the dc-dc converter to drop from 24v to 5v. Does the dc-dc converter only drop the voltage and leave the current as is?
    A good voltage regulator should give a steady voltage regardless of the current drawn.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 212 ✭✭leonffrench


    A good voltage regulator should give a steady voltage regardless of the current drawn.

    Sorry to be annoying. But with the voltage regulator if I input 24v 100ma can I get 5v 100ma out?


  • Registered Users, Registered Users 2 Posts: 9,514 ✭✭✭TheChizler


    Sorry to be annoying. But with the voltage regulator if I input 24v 100ma can I get 5v 100ma out?

    Should be able to do it no problem if it's within the spec of the converter. Remember that's the max current you might need, you wouldn't expect it at all times.


  • Registered Users, Registered Users 2 Posts: 6,163 ✭✭✭ZENER


    Thanks for all the help guys. I plugged the micro in to a 5v wall adapter and measured what current it's pulling and it's only 100ma - the same as my supply.

    How did you measure this current ?

    So I think I just need to lose the car charger and get the dc-dc converter to drop from 24v to 5v.

    Do you have anything smaller than 24V ? If you need 5V 1A and use 24V 1A supply you have to drop 19 V across the regulator meaning up to 19Watts of heat to dissipate, very inefficient and it would require a decent heatsink so a voltage in the range of maybe 8 to 12 VDC would be better.
    Does the dc-dc converter only drop the voltage and leave the current as is?

    The converter provides a stable output voltage given a range of input voltages, the current provided will depend on the load you apply - I = V/R (Ohms Law). There will usually be some form of current limiting to protect the converter/regulator. this could be dynamic protection or a simple fuse. The converter will be designed to provide a certain amount of current, choose one to suit your needs. A 5V 100 mA supply will provide up to 100 mA.
    And with this set up would you still recommend a cap?

    If it's a proper converter then there should be no need for external smoothing
    If anyone is curious it's a sonoff inching relay which I am wiring into a button on my intercom to open and close the electric gates with alexa and by app.

    It's not clear where this relay will live or if it's even an external item to all the parts you're using ? If you are using an output from a USB controller to power this relay be sure to choose a relay whose coil voltage and current requirements are within the capabilities if the controller output. Also to prevent damage to the controller you may need to fit a flywheel diode across the relay coil. More on this if needed later.

    Ken


  • Registered Users, Registered Users 2 Posts: 9,514 ✭✭✭TheChizler


    Those Sonoff modules are integrated units aren't they? Just power and relay switch connectors. No need to worry about inductive voltage spikes as they've taken care of all that.

    https://www.itead.cc/inching-self-locking-wifi-wireless-switch.html


  • Registered Users, Registered Users 2 Posts: 212 ✭✭leonffrench


    Hey guys. Got another sonoff relay, one that I can input 7 to 30v. Wired it to my power supply and it fired up straight away. I wired the relay to the push button contracts inside the intercom and the sonoff fits nicely inside. Can now control my gates with Alexa and a widget on my home screen. Thanks for all the help guys. Those sonoff are great little things. Going to attempt to reflash the spare one I have just to experiment. Thanks again


  • Registered Users, Registered Users 2 Posts: 9,514 ✭✭✭TheChizler


    That was the tidiest solution probably...


Advertisement