TM1638 - 8x 7-segment LED modules with 8x buttons

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
User avatar
mcauser
Posts: 400
Joined: Mon Jun 15, 2015 8:03 am

TM1638 - 8x 7-segment LED modules with 8x buttons

Post by mcauser » Tue Mar 13, 2018 3:51 pm

I created a library for LED&KEY modules with 8x 7-segment decimal LED modules, 8x individual LEDs and 8x switches using the TM1638 LED driver.
https://github.com/mcauser/micropython-tm1638

Quite similar to my TM1637 and TM1640 drivers.

Image

Press button, receive LED.
Last edited by mcauser on Mon Aug 19, 2019 5:53 am, edited 1 time in total.

User avatar
mcauser
Posts: 400
Joined: Mon Jun 15, 2015 8:03 am

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by mcauser » Tue Mar 13, 2018 3:52 pm

I found a similar module, with 16x buttons and no individual LEDs at the top.
I'll add support once it arrives.

RobH
Posts: 16
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by RobH » Fri Mar 23, 2018 4:01 pm

Your TM1638 driver works fine here, thanks.
Now I'm looking for a similar driver for a board with 16 7-segment digits with a TM1640 chip (no leds or buttons on these boards). I have written drivers for TM1638 and TM1640 displays in JAL (for Microchip PICs), but I'm rather a beginner with Micropython. So I might be able to modify the TM1638 driver to get where I'm looking for. That would probably be a good learning experience, but I expect it to become pretty time consuming for me. I would appreciate some help. Thanks in advance.
Regards, Rob.

RobH
Posts: 16
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by RobH » Fri Mar 23, 2018 8:25 pm

Forgot to mention a typo in your first line: "TM1738"

User avatar
mcauser
Posts: 400
Joined: Mon Jun 15, 2015 8:03 am

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by mcauser » Fri Mar 23, 2018 9:51 pm

Have a look at my tm1640 driver:
https://github.com/mcauser/micropython-tm1640
It’s geared towards 8x8 led matrices as that’s the only device I have using that chip. You could use it to run 7segments. Each row in the matrix translates to a single digit 7segment module. Maybe add some convenience methods from my tm1637 driver.

The tm1640 is very similar to the tm1638 and tm1637. Just more outputs.
https://github.com/mcauser/micropython-tm1640
https://github.com/mcauser/micropython-tm1638
https://github.com/mcauser/micropython-tm1637

Which tm1640 board are you using?

User avatar
fos
Posts: 42
Joined: Sat Feb 18, 2017 3:05 pm
Location: Texas and Kansas
Contact:

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by fos » Fri Mar 23, 2018 10:45 pm

I found one of these displays available from banggood available for less than $5!

I have one on order. Thanks for the library.

MicroPython and its developers are amazing.

Thank you,
v/r
Jeff

RobH
Posts: 16
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by RobH » Sat Mar 24, 2018 9:23 am

Thank you for the hints.
I have 2 boards with 16 7-segment digits controlled bij a TM1640 for a log time, probably acquired via eBay. But I cannot find these back anymore. I found a msg on an Arduino forum with a picture. This is exactly the same as mine:
https://forum.arduino.cc/index.php?topic=81751.0
I think I can manage to build a driver with the material I have now.

RobH
Posts: 16
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by RobH » Fri Apr 06, 2018 12:39 pm

I'm happy to inform you that I managed to build a Micropython library 'tm1640.py' for the ESP32 (and probably ESP8266 too) to control a 16-digits 7-segment display module. It is derived from Mike's tm1638.py and as far as controlling 7-segment display it has the same functionality. Major differences are mentioned in the header of the library. A sample for the ESP32 is provided.
See http://github.com/robhamerling/micropython-tm1640
Note: Moved library to Gitlab! https://gitlab.com/robhamerling/micropython-tm1640

ptarjan
Posts: 3
Joined: Fri Aug 16, 2019 12:38 pm

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by ptarjan » Fri Aug 16, 2019 12:52 pm

I am using a tm1638 board with a Wemos D1 mini and I have a persistent (probably hardware) issue.

Whenever I plug in the Wemos D1 mini, I either don't get a REPL prompt or get garbled output instead.

If I start with the VCC and GND wires disconnected from the TM1638, plug the USB cable to my computer, connect to REPL, *then* connect VCC and GND, then there is no problem. (VCC is connected to 3V3 pin on the Wemos.)

Anyone else encounter this? Any idea is appreciated.

Online
User avatar
Roberthh
Posts: 1572
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: TM1638 - 8x 7-segment LED modules with 8x buttons

Post by Roberthh » Fri Aug 16, 2019 1:01 pm

How do you connect the TM1638 board?

Post Reply