# How to ground a wire programatically with MDBT42Q?

• Sun 2020.05.03

Good Evening Marek and I realize this might not get to you tonight.

'the AC standards is 230 V / 50 Hz'

Well, that explains that humongous square boat anchor next to the fuse holder! Now when we brush up against 120VAC, it is annoying. I imagine you only ever touch 230VAC once!!!

'think there is no standard and engineers just make it up as they go'

Isn't that what they always do? They earned the piece of paper indicating they learned all the maths, so their right? ;-)

As there is R18 180 ohm resistor connected to X2-4 MK then there should be around nine volts or so depending on position of PK2 10K ohm.

Initial impressions are that the collector and emitter are reversed in that diagram. I need more time to study.

See heading 'Transistor Switch' halfway down page

https://learn.sparkfun.com/tutorials/tra­nsistors/all

X2-4 MK would be connected to where the LED is in the diagram the collector. The emitter would connect to X2-6 MASA

R18 should protect the transistor collector, otherwise we may need an additional resistor there. Make the resisitor on the base 5K to 10K or something around that. Then don't connect to the Espruino MDBT42Q just yet. We'll connect a piece of wire in place of the Espruino, our human version to that base resistor and just touch it between X2-6 ground and X2-1 the 11V supply. This should toggle as if you were using the wire only method. Lets get that to function without smoke, then off to the fun part connecting the Espruino and writting code.

@allObjects would you agree on that assessment? I'd use a generic NPN 2n2222 as there are inexpensive. (or T5 BC550 should that be common) I know you always have the best diagrams, otherwise I'll have to resort to your famous ASCII method.

If that doesn't pull X2-4 MK to near ground, then we may need a slight modification to where the collector is tied to.

• Hey Robin,

Thank you for your suggestion on how to test it without endangering MDBT42Q.
I will try to do some shopping for parts tomorrow and give it a try in the evening.

I do and I was trying to confirm your deduction of what the voltage drop on R18 is. Unfortunately to no avail. I have a trouble identifying this resistor. Unfortunately the labels are just below of them and are not readable. I was trying to recognize it by the color code, but also there doesn't seem to be any that has brown-gray-brown.

If you could pull the circuit out I could inspect the connection on the bottom side, however this is out of question - as I'm not sure I would put it back together :)

Do you have an idea which resistor would it be on the photograph without the wires?

it between X2-6 ground and X2-1 the 11V supply

Just to confirm, the X2-1 will be the black slot with label "1" on top - the one on the bottom of the picture to the right of the slots labeled "EZ". I'm I right?

Thank you Robin :) Have a good night!