Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:48 28 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Micromite: connect several digital out pins together for more current?

Author Message
Vampire05
Regular Member

Joined: 06/12/2020
Location: Germany
Posts: 88
Posted: 07:51pm 11 May 2023
Copy link to clipboard 
Print this post

Hi all, is it possible to connect several digital out pins together on the Micromite in order to be able to draw more current? I have a HC-12 module here that runs in FU2 mode and consumes 16mA when transmitting. The Micromite can only supply 10mA per pin. Instead of putting the HC-12 module into sleep mode, I would rather control VCC from the HC-12 module via DOUT pins on the Micromite. Is that possible?

Best regards Artem
Edited 2023-05-12 05:52 by Vampire05
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 284
Posted: 08:13pm 11 May 2023
Copy link to clipboard 
Print this post

You could use a relay or better still a transistor.
Here is a video on how to use a transistor as a switch to power your hc-12.
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 722
Posted: 08:15pm 11 May 2023
Copy link to clipboard 
Print this post

Use a transistor or a logic level mosfet.
 
Vampire05
Regular Member

Joined: 06/12/2020
Location: Germany
Posts: 88
Posted: 08:35pm 11 May 2023
Copy link to clipboard 
Print this post

I forgot to mention that I have to save every mA because I operate the Micromite with 1MHz from a LiPo (without DC-DC converter) and solar cell. So relay does not work. Transistor or Mosfet would be plan B. Would it work without a transistor?
 
Vampire05
Regular Member

Joined: 06/12/2020
Location: Germany
Posts: 88
Posted: 08:43pm 11 May 2023
Copy link to clipboard 
Print this post



Absolute max rating per pin is 15mA and for all ports 200mA.... I think i will give it a try.

Is it possible to switch several pins to output high at the same time?
Edited 2023-05-12 06:44 by Vampire05
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6800
Posted: 09:25pm 11 May 2023
Copy link to clipboard 
Print this post

Please, don't do it. It can so easily end in tears. A MOSFET is the way to go if you absolutely have to switch VCC. The Micromite pins can't reach 3V2 with any amount of load on them anyway. The very best way is to put the HC-12 into sleep mode, but it will draw a tiny bit of current (22uA).

If you must switch VCC consider a P-channel mosfet with a 100k turn-off resistor from gate to source. Pull the gate down through a 10k resistor to switch on. The mosfet will have a far lower voltage drop than the output pins of the Micromite. Resistor values are  guess and will probably vary with your mosfet. Battery goes to source & turn off resistor. Load is from drain to ground.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Vampire05
Regular Member

Joined: 06/12/2020
Location: Germany
Posts: 88
Posted: 09:31pm 11 May 2023
Copy link to clipboard 
Print this post

You are absolutely right Mick, I can see that mosfet is the sensible solution.

Sometimes I tend to go for experimental solutions    

For a moment I thought that theoretically you could connect two dout pins and switch them one after the other if the second one is protected by a Schottky diode...  
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6800
Posted: 09:55pm 11 May 2023
Copy link to clipboard 
Print this post

You *can* parallel outputs, don't get me wrong, but you may have to write a port driver for the Micromite to make sure that all paralleled pins switch at the same time. You will need more than 2 pins though as each pin will have it's own volt drop from its own little mosfet so you need a few to reduce that. A single mosfet is far easier and will have a lower volt drop than several pins in parallel. By the way, to turn the mosfet off change the pin into an input rather than setting it high. You will save about 1uA :)

The PicoMite PORT command does switch all pins at the same time, but I don't know about the Micromite.

Put a big enough capacitor for the HC-12. They can draw a lot more than 16mA when first switched into transmit mode.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
oh3gdo
Regular Member

Joined: 18/11/2021
Location: Finland
Posts: 47
Posted: 05:35am 12 May 2023
Copy link to clipboard 
Print this post

Vampire05

I had a similar problem with my servo device.
It has a PIC CPU and a servo.
I tried to turn power switch on with USB power, but it was only 0.5A capacity and servo doesn't work. I tried to add normal capacitors up to 2000uF.
Doesn't helped.
Then I ordered a super capacitor 0.3F 5.5V from Alibaba.
This helped me.
There are lot of super capacitors for example

https://www.alibaba.com/product-detail/new-and-original-ultracapacitor-super-farad_1600831512894.html?spm=a2700.galleryofferlist.normal_offer.3.5c567786Vg1Q6d
___________
Pekka
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6800
Posted: 07:14am 12 May 2023
Copy link to clipboard 
Print this post

If you put a supercap in and switch it via a mosfet then you must fit a surge limiting resistor to keep the charging current below the maximum rating of the mosfet. It's like switching into a dead short.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
oh3gdo
Regular Member

Joined: 18/11/2021
Location: Finland
Posts: 47
Posted: 11:02am 12 May 2023
Copy link to clipboard 
Print this post

Mixtel90

No, I just put a super capacitor and tested it.
I works.
The PC limits USB current to 0.5A.
I used my old PCB and removed old power supply and replaced it with USB cable.

When the PC is sleeping, my PIC clock was looking the time with USB power and when
the time starts at morning, my PC starts with servo.
It pushed the on/off switch.
When we went to sleep. it pushed again the same switch.
Later I found a similar function in the PC, but it doesn't put PC off.
I found the same thing, which worked with HP PCs, but not with my HP550.
It is very slow PC, but suits for me. It sends the results to my Internet place and I can follow data at works.



It is used to log with my data logger.



____
Pekka
 
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 572
Posted: 11:30am 12 May 2023
Copy link to clipboard 
Print this post

I have been using the AP2112K-3.3TRG1 enable pin to turn on/off
  a group of relays they have their own power feed.

 
AP2112.pdf

 
 Quazee137
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3150
Posted: 12:32pm 12 May 2023
Copy link to clipboard 
Print this post

  Quazee137 said  I have been using the AP2112K-3.3TRG1 enable pin to turn on/off a group of relays they have their own power feed.


That looks like a good find. I've ordered some.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024