TeensyLights16 not dimming

69 views
Skip to first unread message

Aaron VerDow

unread,
Aug 15, 2012, 10:01:30 PM8/15/12
to lv...@googlegroups.com
I got my TeensyLights working but dimming isn't working.  I uploaded TeensyLights16_V2_dimmable_04.pde to it, but it still always turns off at #EE.  Any ideas for getting dimming to work?

Oh, btw this is the bash command I use for sending stuff to the Teensy, hopefully soon I'll have a full web interface for it that I'll share later.

sudo echo $'\x7E\x80\x01\xFF' > /dev/ttyACM0

Just repeat \xFF for each channel and change /dev/ttyACM0 to the USB serial interface to the Teensy.  You can also add yourself to the dialout group to write to the Teensy without root.

Aaron VerDow

unread,
Aug 15, 2012, 10:05:51 PM8/15/12
to lv...@googlegroups.com
Oh, another question:  can I use 12v dc on one half of it instead of 120v ac?

Brian Wagner

unread,
Aug 16, 2012, 7:21:20 AM8/16/12
to lv...@googlegroups.com
Bill gave me some replacement optocouplers  he had a bad batch. I have not installed them yet so I do not know if that fixes the dimming issue. 

Brian


--
Sent from Gmail Mobile

Bill Piepmeyer

unread,
Aug 16, 2012, 9:02:19 AM8/16/12
to lv...@googlegroups.com
I am guessing you have the defective moc2023 opto couplers if the data
code on them i 1121 then they are bad. I sent out an email on those
shortly after the class when I found out about them. I have
replacements and I will bring them with me next time I am there. If you
aren't around I will put them somewhere you can get to them and you can
just get me back the old ones sometime.


Thanks for sharing the bash command info.

--Bill

Bill Piepmeyer

unread,
Aug 16, 2012, 9:18:37 AM8/16/12
to lv...@googlegroups.com
Unfortunately the triacs and the dimming depend on the zero crossing in
the AC waveform to turn off. Triacs are a bit odd in that they latch on
when the current passing through them exceeds a certain threshold. With
AC, the voltage every 180 degrees through goes to 0v, thus the current
goes to 0. This allows it to turn off.

However there might be some modifications we could make to the board to
do that if you need. You could provide 12v AC in to the board and then
rectify and filter (if needed) the output. This would only require that
the resister between the opto-triac and the triac be changed. You would
want to do this on bank 9-16. If you don't provide 120v AC to bank 1-8
then the zero crossing circuit will not work. The zero crossing circuit
could be modified to work with 12v AC by changing the 2 resisters in
that circuit.

--Bill

Brad Luyster

unread,
Aug 16, 2012, 9:22:27 AM8/16/12
to lv...@googlegroups.com
As an aside, here is a really great article on how Triacs work: http://ch00ftech.com/2012/08/09/method-1571-for-not-dimming-an-el-panel-triac/

Aaron VerDow

unread,
Aug 16, 2012, 9:52:18 AM8/16/12
to lv...@googlegroups.com
I have a question about the programming... is there way to change the state of one channel without knowing the state of the other channels?  For example, to change the second channel I have to pass a byte for the first channel and if I don't know it's state I can accidentally change it. 

echo $'\x7E\x80\x01\xFF'

Is there a way to get the current values of each channel or is it possible to pass a padding byte to the controller?  I noticed in the instructions 0x7D is a pad byte but didn't know if it could be used like this:

echo $'\x7E\x80\x7D\xFF'

Hopefully this should set channel 2 to FF and leave channel 1 alone.  If not I might try to add another special byte to the firmware that does this.
Reply all
Reply to author
Forward
0 new messages