# A New Tiny ML Invention

**URL:** <https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690>\
**Category:** Projects\
**Created:** [May 15, 2021, 11:53pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690 "2021-05-15T23:53:43Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [May 28, 2021, 1:14am UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/21 "2021-05-28T01:14:31Z")

</div>

> **[TO-220](https://en.m.wikipedia.org/wiki/TO-220)**
>
> The TO-220 is a style of electronic package used for high-powered, through-hole components with 0.1 inches (2.54 mm) pin spacing. The "TO" designation stands for "transistor outline". TO-220 packages have three leads. Similar packages with two, four, five or seven leads are also manufactured. A notable characteristic is a metal tab with a hole, used in mounting the case to a heatsink, allowing the component to dissipate more heat than one constructed in a TO-92 case. Common TO-220-packaged The T...

“When a TO-220 package is used without a heatsink, the package acts as its own heatsink, and the heatsink-to-ambient thermal resistance in air for a TO-220 package is approximately 70 °C/W.”  
That’s what scared me about the mosfet. I didn’t understand all the language that was used, but thought that it would heat at a rate of 70 °C per watt. With such a low resistance fully on, I can’t imagine it dissipating that much heat.

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [May 28, 2021, 1:22am UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/22 "2021-05-28T01:22:36Z")

</div>

The mosfets I have are part number:RFP30N06L brand: P30N06LE

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [May 28, 2021, 2:48am UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/23 "2021-05-28T02:48:38Z")

</div>

![Screenshot_2021-05-27-21-24-10-904](https://canada1.discourse-cdn.com/flex027/uploads/tinyml1/original/1X/c1daf665e3ec2106a8af60682671e6d7a51e9390.jpeg)

 ![IMG_20210527_192937_535](https://canada1.discourse-cdn.com/flex027/uploads/tinyml1/original/1X/9d5e14b0ddaf8eb2d7c14705df619a70135784c3.jpeg)

This is what I have Jes. I got it to work at first, but it wouldn’t shut off. Then I added a 10K pull-up resistor between the gate and source. Now it won’t work at all.

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [May 28, 2021, 3:02am UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/24 "2021-05-28T03:02:35Z")

</div>

The 2N222 BJT is most likely saturated if it has the specs from the book that goes with it. I think it actually saturates at .12 mA. So, the thing is that this is still progress because it did turn on. However, it’s only supposed to turn on for about 1-3 seconds from what I can remember. It was staying on forever. I thought I could mitigate this by tying the gate to the source and ground. The mosfet did get a little hot, but under normal operation it shouldn’t be run constantly. Really, as far as I know, the current coming out of the collector/emitter of the BJT shouldn’t really matter since this mosfet activates on voltage only. From what I can remember, before when I tied the gate to source it did make it only operate when the signal from the Arduino nano went through.

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [May 28, 2021, 3:43am UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/25 "2021-05-28T03:43:36Z")

</div>

There is a diode in the circuit, too.

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [May 28, 2021, 7:30pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/26 "2021-05-28T19:30:08Z")

</div>

I wonder if there is a certain amount of current the BJT would need to put through its emitter to overcome the pull-up resistor ground. Since electricity follows the path of least resistance it seems like all of the BJT emitter current would flow from the emitter through the pull-up resistor to ground. However, without having it pulled to ground the mosfet never switches off.

I went by the following circuit diagram to connect the FET:

 ![MOSFET-as-a-Switch](https://canada1.discourse-cdn.com/flex027/uploads/tinyml1/original/1X/72846a1dc40ba324cecbc6f3586682f1500248e2.png)

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [May 30, 2021, 11:04pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/27 "2021-05-30T23:04:48Z")

</div>

One step forward two steps back:

So, I tried my own way of connecting the BJT to the Fet. I ended up being able to get 5v on the the drain, but with no measurable current. This was after I saw a post in a forum advising to connect a ground resistor before the arduino pin to mosfet gate. It was fiendishly complex, because if it is connected in front of the Arduino pin it acts as a voltage divider. I guess the devil is in the details. Anyway, I then tried Jesmiths’ method, but I found that the configuration must be normally on. Since the emitters of the entire H-bridge are tied to ground. This may have worked if the inference was set up to throw a low signal instead of a high. The problem with that, is it would be wasting power. Of course, I could be wrong about something but at this point I’ve explored so many different options and assumptions it boggles my mind.

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [May 30, 2021, 11:07pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/28 "2021-05-30T23:07:11Z")

</div>

[http://www.gammon.com.au/motors](http://www.gammon.com.au/motors)

 ![MOSFET_low_side_driver](https://canada1.discourse-cdn.com/flex027/uploads/tinyml1/original/1X/d66fb727d7d861aa8a912dad8a694efdd730d6a6.png)

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [June 1, 2021, 6:52pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/29 "2021-06-01T18:52:52Z")

</div>

Assuming I could get it to work, the heat at the junctions would be approximately 83.72 °F in the best case scenario and 246 °F in the worst (stalled case). This doesn’t seem like a viable option for a consumer product. However, I have read that mosfets can be connected in parallel to distribute the current. This would hopefully make them heat up less. Then the problem of getting the circuit to work remains.

---

<div class="post-metadata">

**Author:** ![aquacalc](https://yyz1.discourse-cdn.com/flex027/user_avatar/discuss.tinyml.seas.harvard.edu/aquacalc/32/223_2.png) [@aquacalc](https://discuss.tinyml.seas.harvard.edu/u/aquacalc)\
**Post date:** [July 31, 2021, 12:16pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/30 "2021-07-31T12:16:17Z")

</div>

I’ve learned a lot from DroneBot videos, but I hadn’t seen that one. Like his others, it’s excellent. Thanks for passing it along.

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [October 16, 2021, 10:58pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/31 "2021-10-16T22:58:52Z")

</div>

A power transistor works! I used a TIP120 with heatsink.

> **[The Key Selector -- Tiny Ml Test](https://www.youtube.com/shorts/r6nWv4Dzz4o?feature=share)**

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [October 19, 2021, 11:36pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/32 "2021-10-19T23:36:09Z")

</div>

Here is the kickstarter campaign: [The Key Selector by Brock Lynch — Kickstarter](http://kck.st/3n6QDzi)

---

<div class="post-metadata">

**Author:** ![macammacam84](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@macammacam84](https://discuss.tinyml.seas.harvard.edu/u/macammacam84)\
**Post date:** [March 16, 2022, 5:43pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/33 "2022-03-16T17:43:56Z")

</div>

your informati[o](https://id.cafelagu.me/)n very helpfull 🙂 have [a](https://gudanglagu456.cc/) nice day !

---

<div class="post-metadata">

**Author:** ![Xen](https://avatars.discourse-cdn.com/v4/letter/x/c77e96/32.png) [@Xen](https://discuss.tinyml.seas.harvard.edu/u/Xen)\
**Post date:** [March 16, 2022, 6:43pm UTC](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690/34 "2022-03-16T18:43:09Z")

</div>

You are welcome, have a wonderful day.

[Previous page](https://discuss.tinyml.seas.harvard.edu/t/a-new-tiny-ml-invention/690.md?page=1)
