<div dir="ltr">Roman Haefeli,<div><br></div><div>It turns out, your solenoiduino code was useful in this project. the handshake stuff is very convenient and all i had to modify was the duty cycle in the arduino code. Instead of &quot;how many milliseconds will the solenoid be activated?&quot;, i just re-purposed the data for the pwm values (velocity) in the Tlc5940 library&#39;s Tlc.set(pin,pwmValue); function. If you don&#39;t mind, i would like to release the code as part of the project&#39;s documentation, giving you credit for you contribution, of course.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 8, 2013 at 5:59 PM, Epic Jefferson <span dir="ltr">&lt;<a href="mailto:jeffreyconcepcion@gmail.com" target="_blank">jeffreyconcepcion@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">it works! i had forgotten to ground the arduino to the circuit. Here&#39;s the circuit.<img src="cid:ii_1405fe817c24f82f" alt="Inline image 1" width="420" height="314"><div>
<br></div><div>2 practical maker pwmshields &gt; Arduino&#39;s 5 volts through PNP 4403 transistors &gt; TIP102 transistors to drive the solenoids with ~18 volts. I still have to check the resistors because I&#39;m only getting about 4 or 5 volts at the end (it drives the motor but not the solenoids). Getting closer.</div>

<div><br></div><div>If anyone&#39;s interested, I&#39;ll be posting photos and updates on twitter and fb as &#39;Epic Jefferson&#39;. Full documentation will be released a bit later.</div><div><br></div><div>Thanks again, you guys are the greatest. Special thanks to Charles Goyard for the PNP tip.</div>

</div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On Wed, Aug 7, 2013 at 8:21 PM, Martin Peach <span dir="ltr">&lt;<a href="mailto:martin.peach@sympatico.ca" target="_blank">martin.peach@sympatico.ca</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It depends on the colour and the LED technology. The energy of red light is about 1.5eV and blue is 3eV. Add to that internal resistance of the device. An ordinary diode (not a LED) emits infrared around .6eV, which is the voltage drop of a silicon junction.<br>


<br>
Martin<div><br>
<br>
On 2013-08-07 20:02, Ed Kelly wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
Oh, thanks.<br>
<br>
That was dumb I didn&#39;t remember that!<br>
<br>
Is it really 2 volts drop for an LED? I should know this stuff...<br>
Ed<br>
Ninja Jamm - a revolutionary new music remix app from Ninja Tune and<br>
Seeper, for iPhone and iPad<br>
<a href="http://www.ninjajamm.com/" target="_blank">http://www.ninjajamm.com/</a><br>
<br>
<br>
Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!<br>
<a href="http://sharktracks.co.uk/" target="_blank">http://sharktracks.co.uk/</a><br>
<br></div>
    ------------------------------<u></u>------------------------------<u></u>------------<br>
    *From:* Mikael Fernström &lt;<a href="mailto:mikael.fernstrom@ul.ie" target="_blank">mikael.fernstrom@ul.ie</a>&gt;<br>
    *To:* Ed Kelly &lt;<a href="mailto:morph_2016@yahoo.co.uk" target="_blank">morph_2016@yahoo.co.uk</a>&gt;<br>
    *Cc:* Charles Z Henry &lt;<a href="mailto:czhenry@gmail.com" target="_blank">czhenry@gmail.com</a>&gt;; Epic Jefferson<br>
    &lt;<a href="mailto:jeffreyconcepcion@gmail.com" target="_blank">jeffreyconcepcion@gmail.com</a>&gt;; pd-list &lt;<a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a>&gt;<br>
    *Sent:* Thursday, 8 August 2013, 0:26<br>
    *Subject:* Re: [PD] electro-mechanical piano (player piano) -<div><br>
    Arduino, Solenoid Issue<br>
<br>
    note that you have to subtract the voltage drop over the LED, hence<br>
    it&#39;s R = (Vsupply - Vled)/ Iled, e.g. (5-2)/0.02 = 150 Ohm<br>
<br>
    /Mikael<br>
<br>
<br>
    On 8 Aug 2013, at 00:19, Ed Kelly &lt;<a href="mailto:morph_2016@yahoo.co.uk" target="_blank">morph_2016@yahoo.co.uk</a><br></div>
    &lt;mailto:<a href="mailto:morph_2016@yahoo.co.uk" target="_blank">morph_2016@yahoo.co.uk</a><u></u>&gt;&gt; wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
    Check Ohm&#39;s law.<br>
<br>
    V=IR, so the resistor you choose is the voltage you provide to the<br>
    LED divided by the current it draws.<br>
<br>
    e.g. if the LED draws 20mA and you power it from 5V, then the<br>
    resistor you need is 5/0.02 = 250 ohms in series with the LED.<br>
    This current is drawn from the positive voltage supply through the<br>
    resistor and then the LED, and then the transistor.<br>
<br>
    This is a fairly good tutorial:<br>
    <a href="http://www.ehobbycorner.com/pages/tut_transistors.html" target="_blank">http://www.ehobbycorner.com/<u></u>pages/tut_transistors.html</a><br>
    Ninja Jamm - a revolutionary new music remix app from Ninja Tune<br>
    and Seeper, for iPhone and iPad<br>
    <a href="http://www.ninjajamm.com/" target="_blank">http://www.ninjajamm.com/</a><br>
<br>
<br>
    Gemnotes-0.2: Live music notation for Pure Data, now with dynamics!<br>
    <a href="http://sharktracks.co.uk/" target="_blank">http://sharktracks.co.uk/</a><br>
<br></div>
        ------------------------------<u></u>------------------------------<u></u>------------<br>
        *From:* Charles Z Henry &lt;<a href="mailto:czhenry@gmail.com" target="_blank">czhenry@gmail.com</a><br>
        &lt;mailto:<a href="mailto:czhenry@gmail.com" target="_blank">czhenry@gmail.com</a>&gt;&gt;<br>
        *To:* Epic Jefferson &lt;<a href="mailto:jeffreyconcepcion@gmail.com" target="_blank">jeffreyconcepcion@gmail.com</a><br>
        &lt;mailto:<a href="mailto:jeffreyconcepcion@gmail.com" target="_blank">jeffreyconcepcion@<u></u>gmail.com</a>&gt;&gt;<br>
        *Cc:* pd-list &lt;<a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a> &lt;mailto:<a href="mailto:pd-list@iem.at" target="_blank">pd-list@iem.at</a>&gt;&gt;<br>
        *Sent:* Wednesday, 7 August 2013, 20:41<br>
        *Subject:* Re: [PD] electro-mechanical piano (player piano) -<div><br>
        Arduino, Solenoid Issue<br>
<br>
        On Wed, Aug 7, 2013 at 12:05 AM, Epic Jefferson<br>
        &lt;<a href="mailto:jeffreyconcepcion@gmail.com" target="_blank">jeffreyconcepcion@gmail.com</a><br></div><div><div>
        &lt;mailto:<a href="mailto:jeffreyconcepcion@gmail.com" target="_blank">jeffreyconcepcion@<u></u>gmail.com</a>&gt;&gt; wrote:<br>
<br>
            Hey Charles,<br>
<br>
            it seems like this might work. i got some pnp transistors<br>
            and built the circuit from julianvogels site.<br>
            The only problem is that the LED on the test circuit<br>
            barely lit up. I think it&#39;s because the transistors are<br>
            not for 20mA, none were available. i&#39;ll check another<br>
            electronics store to see if i find some.<br>
<br>
<br>
        I think you just need smaller resistors.  Every transistor in<br>
        a 3-pin package I&#39;ve ever seen could run 20mA or much<br>
        greater.  Swapping the transistors will have no effect on the<br>
        amount of current.<br>
<br>
        Chuck<br>
<br>
<br>
                There are two ways to solve your problem:<br>
<br>
                The proper one is to use PNP transistors or P-channel<br>
                mosfets (remember<br>
                I already told you about that ? :))<br>
<br>
                See this document, you can find the wiring at the end:<br>
                <a href="http://julianvogels.de/wp-content/uploads/2013/06/stromkreis_transistorschaltung_final-1024x627.png" target="_blank">http://julianvogels.de/wp-<u></u>content/uploads/2013/06/<u></u>stromkreis_<u></u>transistorschaltung_final-<u></u>1024x627.png</a><br>


<br>
                <a href="http://julianvogels.de/extending-pwm-output-pins-with-a-texas-instruments-tlc5940-led-driver/" target="_blank">http://julianvogels.de/<u></u>extending-pwm-output-pins-<u></u>with-a-texas-instruments-<u></u>tlc5940-led-driver/</a><br>


<br>
<br>
                The good enough one is to put a pull-up resistor (10k<br>
                works) on every<br>
                NPN transistor base, and use the TLC as a pull down.<br>
                In this case, the<br>
                on-time on the TLC corresponds to the off-time on the<br>
                solenoid. Also<br>
                when the arduino reboots and every time the BLANK is<br>
                issued, every<br>
                solenoid will act for a veeeeery short time. This can<br>
                be a big problem<br>
                in your project. I did this for a 96 channels<br>
                motor+led strip system,<br>
                and I regret not using PNPs instead.<br>
<br>
<br>
                Enjoy,<br>
<br>
                --<br>
                Charles<br>
<br>
<br>
<br>
                Epic Jefferson wrote:<br>
                &gt; Hey guys,<br>
                &gt;<br>
                &gt; updating on this project. I got the pwm shields and<br>
                i&#39;ve hit a wall. The<br>
                &gt; driver circuit I&#39;m using to control the solenoids<br>
                via arduino is this one<br>
                &gt; from instructables<br>
                &gt;<br>
                (link&lt;<a href="http://www.instructables.com/id/Controlling-solenoids-with-arduino/" target="_blank">http://www.<u></u>instructables.com/id/<u></u>Controlling-solenoids-with-<u></u>arduino/</a>)&gt;)<br>


                &gt; and<br>
                &gt; it uses a single pin to control the pwm signal.<br>
                &gt;<br>
                &gt; The pwm shield<br>
                (link&lt;<a href="http://www.practicalmaker.com/products/arduino-shields/pwm-shield-assembled" target="_blank">http://www.<u></u>practicalmaker.com/products/<u></u>arduino-shields/pwm-shield-<u></u>assembled</a>&gt;)<br>


                &gt; is<br>
                &gt; based on the tlc5940 which requires each pin to have<br>
                it&#39;s own ground<br>
                &gt; instead of a common ground across all drivers. This<br>
                is a problem because<br>
                &gt; all of the information i&#39;ve found suggest that the<br>
                signal from the pin<br>
                &gt; controls the gate (transistor - TIP102). But i<br>
                think, in the case of the<br>
                &gt; tlc5940, the 5v supply is constant and the ground is<br>
                being controlled,<br>
                &gt; that&#39;s why it works perfectly for LED&#39;s but seems to<br>
                be ill suited for this<br>
                &gt; circuit.<br>
                &gt;<br>
                &gt; Any suggestions on how to modify the instructables<br>
                circuit for use with the<br>
                &gt; shields? or would the circuit have to completely change?<br>
<br>
                ______________________________<u></u>_________________<br></div></div>
                <a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> &lt;mailto:<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>&gt; mailing list<div><br>
                UNSUBSCRIBE and account-management -&gt;<br>
                <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
<br>
<br>
<br>
<br>
            --<br></div>
            <a href="http://www.epicjefferson.com" target="_blank">www.epicjefferson.com</a> &lt;<a href="http://www.epicjefferson.com/" target="_blank">http://www.epicjefferson.com/</a><u></u>&gt;<br>
            <a href="http://www.avmachinists.org" target="_blank">www.avmachinists.org</a> &lt;<a href="http://www.avmachinists.org/" target="_blank">http://www.avmachinists.org/</a>&gt; Puerto<div><br>
            Rico based Art Collective/ Non-Profit Org<br>
<br>
            ______________________________<u></u>_________________<br></div>
            <a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> &lt;mailto:<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>&gt; mailing list<div><br>
            UNSUBSCRIBE and account-management -&gt;<br>
            <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
<br>
<br>
<br>
        ______________________________<u></u>_________________<br></div>
        <a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> &lt;mailto:<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>&gt; mailing list<div><br>
        UNSUBSCRIBE and account-management -&gt;<br>
        <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
<br>
<br>
    ______________________________<u></u>_________________<br></div>
    <a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> &lt;mailto:<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a>&gt; mailing list<div><br>
    UNSUBSCRIBE and account-management -&gt;<br>
    <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</div></blockquote><div>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
<br>
</div></blockquote><div><div>
<br>
<br>
______________________________<u></u>_________________<br>
<a href="mailto:Pd-list@iem.at" target="_blank">Pd-list@iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -&gt; <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/<u></u>listinfo/pd-list</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><a href="http://www.epicjefferson.com" target="_blank">www.epicjefferson.com</a><br><a href="http://www.avmachinists.org" target="_blank">www.avmachinists.org</a> Puerto Rico based Art Collective/ Non-Profit Org
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><a href="http://www.epicjefferson.com" target="_blank">www.epicjefferson.com</a><br><a href="http://www.avmachinists.org" target="_blank">www.avmachinists.org</a> Puerto Rico based Art Collective/ Non-Profit Org
</div>