Adafruit Trinket 12V: Understanding insufficient signal output

Hello Everyone,

I'm having trouble shrinking a project of mine from Arduino Uno to an Adafruit Pro Trinket 12V.
I just want to control a Relais and some status LEDs.
And yet it seems like the digital out signals do not supply enough power to run the circuit properly.
In fact, the Relais does not work anymore at all and the LEDs are much darker, just barely noticable.

I'm powering the trinket via an external 12V, 3A power supply connected to the "Battery" Pin.

If I use an external 5V power supply to simulate the signal output (istead of the trinket), everything in the circuit works fine. The displayed current never goes above 8mA.

I measured the voltage of the Adafruit trinket outputs to be close to the expected 5V. Maximum current I measured was around 100 mA, as expected from the datasheet. So this shouldnt be a problem in the first place.....

What am I missing folks?
In the IDE the adafruit package only contains the Trinket 5V, which I select for compiling and uploading the sketch, this cannot have something to do with it right?

Thanks so much in advance for any advice.
Best regards

Quote:“And yet it seems like the digital out signals do not supply enough power to run the circuit properly.
In fact, the Relais does not work anymore at all and the LEDs are much darker, just barely noticable.”.

Do not ever confuse “signals” with “power”!!! Signals are for controlling something. Power is for powering something. Your Arduino is made to control something. Yes, it can power something like a LED with a series resistor to limit the current, but a signal cannot power much else.

Please show a schematic of your project and perhaps we can help solve the problem.

Paul

Hello,

With "powering the circuit" I of course meant activating the relais which in turn sends the current to the actual circuit components.
The Relais activation should not take that much power (i assumed).
I attached an image of the circuit (circles are actual solders to the circuit board). I did only do the displayed part of the circuit yet, the connections running out of the image shouldnt have any impact.

Additionally I tried to power the circuit with 6V, with the same results.

Thanks for any advice!

Best regards:)

Still no image or schematic. Did you test all the grounds for continuity back to the power source?

Paul

Adafruit Pro Trinket 12V.

I can find no trace of the existence of this board. Can you post a link to that? There is Adafruit Pro Trinket 3V 12MHz. Is that what you meant?

Sorry, pls see the circuit in the attachment.

In the meantime I recreated my circuit, so that it JUST contains the components displayed in the picture. Still not working.

I of course meant the Adafruit pro trinket 5V, (not 12). I'm just powering it with 12V because my two valves use 12V as well.

Best regards

Looks like you’re trying to source coil current from D and A0D.
The Trinket can’t output too much current on the IO pins. I’d suggest adding a current buffer.

I would connect one end of the coil to the + supply (5V, 12V, whatever they need) and use a simple NPN transistor to sink current thru the coil. IO pin to a 150 ohm resistor to the NPN base, NPN emitter to Gnd, and NPN collector to the coil.
Add a diode from the collecter side of the coil to the supply; anode on the collector side, cathode to the supply side.

Which Relay are you using - data sheet, or part number would be great.

I guess you're right. I was trying to avoid another "layer" of transistors.
Right now I'm using this Relais:

But if I have to use a transistor anyway, can't I just replace the relais completely by one transistor each?
(assuming I find the proper voltage configuration)
Do I still need protection diodes if there are no more coils but only transistors involved?

Thanks already and best regards.

That relay (assuming you are using the 5V coil variant) has a coil resistance of 500R, which would mean a current of only 10mA and no need for a transistor. It may also have a protection diode built in. What is the exact model number printed on the relay?

Using a transistor instead of the relay depends on what you are switching with the relay. You mentioned “valves” earlier but gave no detail. I would think a logic-level n-channel mosfet could replace the relay, such as stp16nf06l or similar. But need more details to be sure.

Right now, I can’t understand why your circuit is not working with the relay.

Ok sorry I thought I could spare you some details, but let me summarize my project:
An Adafruit Pro Trinket 5V shall control two Water-valves (12V 0.5A).
Due to the signal ports being way too weak to power something this big and relais seemingly not working as intended, I now want to try NPN transistors like this:

They are capable of 20V, 1A. That should work right?

(See planned circuit attached)

No, with npn.transistors, you must have a resistor for the base pin to limit the current, otherwise the transistor or Arduino pin will be damaged. 220R should be ok.

I'm gonna try to adapt the circuit according to your comments. Missing some parts though, gonna report back, once I have all the components.
THX a lot :slight_smile:

Sooooooo
I made a small circuit to break down my problem (see sketch below).
Still not working.
I feel like I lack some minor understanding of transistors themselves but I just cannot figure out what I am missing.
By the way: The valve operates at 12V and requires about 0.15A while active.
I use the transistor BC368 in case that matters: Datasheet

Any other ideas?
Getting a little frustrated, but not yet willing to give up :slight_smile:

Best regards!

One thing missing from your diagram is a “flyback” diode. There may be such a diode fitted internally to the valve, but unless you are 100% certain of that, you should assume there is not and add one yourself. Without this diode, the transistor can be damaged by negative voltage from the valve’s coil when it is deactivated. 1N4001 should be OK, connected across the valve terminals, cathode to 12V.

Once you have fitted the diode, try disconnecting the 220R from Dout and connect it to 5V.

Ok I'll try that!
The problem is though that the valve does not even trigger once. So in theory there cannot be any harmful "back-current"

Update: Partial success here.
Using a flyback diode (thanks for the hint!) the circuit I posted earlier now works but only if I connect the transistor base directly to the 5V output.
Does not work with signal pins as intended.
How can I get them to work?

Already tried several resistor sizes, I dont have more than 10k here though. Would it help to increase the resistor even further?

I suggested

disconnecting the 220R from Dout and connect it to 5V.

I did not say

boredengineer:
connect the transistor base directly to the 5V output

That would damage the transistor, because there is nothing to limit the current through the transistor base.

Replace the transistor and try using a different Uno pin. 220R should be fine. 10K much too high.

I'm sorry I said it wrong. I did not connect the 5V directly to the transistor. I did use the 220R in between.
I will try some other pins this evening and report back :slight_smile:
Thanks so far for you time everyone!

Also you have not shared any code so that we could check it for you. Suggest using the standard blink sketch to test your circuit.