Arduino HC 12 Power Supply

Discussion in 'Power Electronics' started by Laram, Oct 9, 2017.

  1. Laram

    Thread Starter New Member

    Oct 8, 2017
    8
    0
    Connection.jpg
    Can I safely connect my Arduino to my PC using the USB port at the same time the Arduino is connected to an external power power source? Will it destroy my Arduino ?

    Basically I need to plug it into my PC USB port while its being powered from an external source. I need to run my Arduino and HC 12 off power supply and at the same time I need to use the serial monitor screen to send and receive Text typed.

    I am following the following tutorial by Mark Huges: "Understanding and Implementing the HC-12 Wireless Transceiver Module"

    https://www.allaboutcircuits.com/pr...enting-the-hc-12-wireless-transceiver-module/

    Before I connect the circuit to the PC I want to clear the following doubts. As indicated by Mark, to connect to external 5 V (Do not power over USB.), I am using 9V/4AA batteries fed to 1117 5V module to give 5V regulated supply to Arduino and the HC 12. I'll also be connecting a 1N4007 between the 5V and the Vcc of the HC 12 and a 1000uf capacitor between Vcc and Gnd.

    My doubt is as I'll be connecting the USB cable from PC to Arduino for Send Receive sketch (Serial Monitor to type),

    1) Do I need to connect the Gnd of the battery and Gnd of Arduino to the Gnd of the USB port for common ground (indicated in Green Color ???? in the image)?

    2) Do I need to connect 5V output from the regulator to the "Power Jack" of Arduino or do I need to connect to Vin and Gnd (Indicated in Pink Color ???)

    Thanks Laram
     
  2. Mark Hughes

    Member

    Jun 14, 2016
    376
    54
    Hi @Laram,
    Thanks for coming to the forums!
    @Raymond Genovese, @Robin Mitchell , @Charles R. Hampton, @Jeremy Lee -- I'd love for one of you to weigh in here as well. I don't use the Arduino boards much and I'm sure one or all of you know more about the Arduino board wiring than I do. The question relates to creating a common ground point.

    1) Do you need to connect all the GNDs. I do not believe that is necessary. The ground potential of the USB shield should be irrelevant. There is an internal digital ground, as well as D+, D-, and Vbus pins that connect to a mcu that converts the USB signal to serial and communicates with the ATMega chip that actually runs the code. Those data pins are not directly connected to anything that you are directly interfacing with.

    Additionally, the USB shield might in fact be already connected to those ground pins through the Arduino board via a resistor of ferrite bead on the board. You can verify this -- hook up the circuit without that green wire and use a voltmeter to determine the potential difference between those two points -- it will likely show 0 V, which means they have the same ground potential.

    With all that said :) It is always a good idea to tie together common grounds whenever possible, but you are correct to be concerned -- if you tie together ground wires that are at a different potential, current will flow in unhelpful ways. I hope one of the members I pinged will see this message soon and can jump in with an authoritative answer.

    2) I believe the two locations are electrically identical. You can hook up anywhere.

    What are you making with your project?

    Mark
     
  3. Laram

    Thread Starter New Member

    Oct 8, 2017
    8
    0
    Hi Mark,

    Thank you so much for the detailed explanation. I am new into this and I am making "HC12 Send/Receive Example Program 1". As you suggested I'll wait till some one replies. There was one more question I asked. As you have mentioned in the Tutorial "Do not power over USB" I am using 4AA Batteries connected to DC-DC Booster fed to 1117-5V Regulator. Where do I connect this regulated 5V?

    To the Power Jack on Arduino board OR to the Vin and Gnd Pins, keeping in mind, USB cable is also connected to PC to view the transfer of text sent and received. Thanks Again!! Appreciate it!! :)
     
  4. Mark Hughes

    Member

    Jun 14, 2016
    376
    54
    @Laram,
    If the HC12 is set at low power mode, you can actually squeak by on USB. On high power mode, the HC12 can draw up to 100 mA, and the LDO on the Arduino Uno R3 is 50 mA max (not including the power draw from the ICs on the circuit.) That's why I insisted on the external power supply -- the HC12 can draw too much current when it transmits at max power.
    Your 4AA power supply can certainly deliver the current needed. So, you connect that battery pack to your external regulator (1117-5V), and the output from that regulator provides you with 800 mA of current at 5V. You can then connect the regulator to the HC12 (with diode), and the Arduino Uno R3 power jack or the Vin and Gnd -- I believe they are electrically identical.
    Let me summon a few more participants @GopherT, @crutschow, @Hypatia's Protege, @BR-549, @RK37, @MrChips,
    Contributors -- we have a new member who is concerned about ground reference potentials and I'm not confident enough to instruct him. Can any of you jump in and help us both out? My instinct tells me that he can hook everything up and he'll be just fine. But I'd appreciate an authoritative answer and I don't know enough about Arduino's circuitboard to offer one.
    Thanks,
    Mark
     
  5. GopherT

    AAC Fanatic!

    Nov 23, 2012
    7,983
    6,786
    The green wire is not needed. The ground of the Arduino is already connected to the ground of the USB connector.

    4CE40BCB-C382-4F07-A730-BCC0302564EA.jpeg
     
  6. Mark Hughes

    Member

    Jun 14, 2016
    376
    54
    GopherT likes this.
  7. BR-549

    AAC Fanatic!

    Sep 22, 2013
    4,936
    1,348
    I am not familiar with that unit....but it looks pretty nifty. I would guess the GRD term at antenna is for a transmission line. If antenna is directly connected......ignore it.

    IF the signal is weak..... connect an equal length but opposite orientation to the GRD term. The GRD term I am referencing is at the antenna term, not the power term. In other words.....a dipole antenna.

    AT that FX....tv twin lead makes a good feed line into a folded dipole for elevation.

    In older times....I would worry about common supplies......but today with the chips, boards, filter, regulars.....you should be ok. But double check that if problems appear.

    That's all I got.

    EDIT: make sure antennas have same orientation.
     
  8. Laram

    Thread Starter New Member

    Oct 8, 2017
    8
    0

    Thank you All!! :) @gopher T, @Mark Hughes, @BR-549
    Appreciate your time and help!! One part of my doubt got cleared that there is no need to connect Gnd of USB as it is already connected internally.

    Other part of the question which I posted yesterday:
    Can I safely connect Arduino to my PC using the USB port and connect to an external power power source (6AA Batteries) simultaneously?

    I need to use the Serial Monitor screen to send/receive text continuously. (Article by Mark:
    Understanding and Implementing the HC-12 Wireless Transceiver Module -- HC12 Send/Receive Example Program 1)
    What I found while searching on the Internet is once the external voltage is more than 6.6V, Arduino automatically switches from USB to external supply. It means that USB supply will be cut off and the batteries will power the Arduino. My question is, when the USB Power is cut, will the text I type and receive in Serial Monitor will also stop flowing?

    In Short I want 6 AA Batteries to Power Arduino and USB connected to PC to monitor the text I type and receive in Serial Port Monitor.

    Thank you so much!!
     
  9. GopherT

    AAC Fanatic!

    Nov 23, 2012
    7,983
    6,786
    Yes, the battery pack is “floating” relative to the computer’s power supply that is grounded by the chassis ground (and grounded to the ground terminal (ground rod) in your house or office. The negative terminal will just match the chassis ground reference once the two are connected. All will be fine when one (or both) is a battery pack (I.e. battery packs do not have a firm reference voltage reference)
     
  10. Mark Hughes

    Member

    Jun 14, 2016
    376
    54
    Yes -- you should still be able to communicate with the computer via USB.
     
  11. BR-549

    AAC Fanatic!

    Sep 22, 2013
    4,936
    1,348
    Check your Arduino board paperwork. It should explain ext power connections while maintaining USB communications. I am not familiar with all the Arduino boards.
     
  12. Raymond Genovese

    Well-Known Member

    Mar 5, 2016
    1,643
    990
    1) Do I need to connect the Gnd of the battery and Gnd of Arduino to the Gnd of the USB port for common ground (indicated in Green Color ???? in the image)?

    For an Arduino UNO R3 (assuming that is what you are using), The USB in GND connection goes to the ATMEGA16UT UGND (pin 28) and not GND (pin 3). However, see the schematic and the pad between UGND and GND - that pad is connected - so, as already stated, you do not have to provide a second GND from USB GND to the board GND.

    "Can I safely connect my Arduino to my PC using the USB port at the same time the Arduino is connected to an external power power source? Will it destroy my Arduino ?"

    That's a problem if you mean that you will try to use the USB port and the external power jack simultaneously, both of which are on the UNO board. I don't think it will fry the UNO, but I don't believe that you can use both power supplies at the same time (your diagram seems to indicate that is an option). I could be wrong, but I believe the UNO will use the external jack power and switch off the USB power - advise that you search on this issue (e.g., here and here). IOW: it's going to be one OR the other if you use both power input ports on the board. This does not, however, mean that you can't have a separate power supply for an external board - folks do that all the time for motors and other devices that want more current than the UNO can provide.


    Hope this helps.

    Edited to add: This might work...
    HC-11.jpg
     
    Last edited: Oct 11, 2017
  13. Mark Hughes

    Member

    Jun 14, 2016
    376
    54
    @Laram Any update? How are things going?
     
  14. jnbkeller

    New Member

    Oct 31, 2017
    1
    0
    On a related note- I'm interested in using the HC-12 with a 3V button cell to make a small remote transmitter with a range of ~100meters.
    It needs to be very low cost, so I want to avoid up converters, etc.

    All indications suggest 3V is not enough (need 3.3). I could use a capacitor to help provide current during transmissions, but I'd still be sort a few tenths of a volt.

    Question: Does anyone have any experience trying to run these at 3V, or suggestions on circuits.
    I've also considered two 3V stacked button cells, but now I seem to have too much voltage. I'll have similar challenges with arduino power...

    I'd appreciate any thoughts - here's the criteria
    - arduino preferred, but not required.
    - 100m distance
    - 3V power from small button cell.
    - transmissions are very infrequent, so I'm thinking the transmitter circuit only be powered when the button is pressed.

    I'm new to the forums, so if I should post this a different way, let me know.
    Thanks for your insight and advice.
    Brian
     
  15. Marco Carlini

    New Member

    Nov 3, 2017
    2
    0
    Sorry if you do not speak English well, and use google translator.
    If I use 3,7v lipo cell to power hc12, can I leave directly connected rx and tx to arduino at 5v levels?

    Arduino would be powered with 5V booster.

    Sorry if I did not respect the rules of the forum.

    Thank you

    Marco
     
  16. Marcomulino

    New Member

    Nov 3, 2017
    3
    0
    It's always me

    Marco
     
  17. Marcomulino

    New Member

    Nov 3, 2017
    3
    0
    I attach a drawing to better explain.



    Thank You
    Marco
     
  18. Mark Hughes

    Member

    Jun 14, 2016
    376
    54
  19. Mark Hughes

    Member

    Jun 14, 2016
    376
    54

    Marco,
    It's never a good idea to have signal levels that exceed power supply levels -- it can cause currents to flow in unpredictable ways inside the chip. Use a level shifter.
    https://www.mouser.com/ProductDetai...MIysbLmPei1wIVgXx-Ch2NHQ9WEAQYAiABEgIyGvD_BwE

    Mark
     
  20. Marco Carlini

    New Member

    Nov 3, 2017
    2
    0
    The project is almost over, but I have noticed that the transmission distance does not exceed 15 meters, because of insufficient power (at least I think)

    This is a wireless stopwatch,(image in attachment) and must be at least 50/60 meters. Using HC12 in FU3 mode at 4800BPS, I have already installed a 3.7 volt cell and use a 100 uF decoupling capacitor.

    But I think it's inadequate, and I hoped I could adjust the RX, TX output levels simply with resistors. I wanted to ask if you think it is possible.

    I would not like to resume the project from the beginning

    I could also set FU4 power but I hoped to do it differently

    Marco
     
Loading...