Single addressable transistor

Thread Starter

Stan van der Ven

Joined Oct 25, 2017
7
Hello,

I am involved in a project which at this moment controls 12 solenoids. However each of these solenoids are controlled with a wire from a shift register to the transistor connected to the solenoid. I would like to make it easier to add solenoids by making a module that fits on the solenoids and can be communicated with using i2c or 1-wire for example.

Its control should me something similar to the widely supported ws2812. I thought about using this chip, but it had an on board led drive which does not allow me to solder other things to the signal pins going to the leds. The older ws2801 also crossed my mind but this seems only meant for LEDs and is not optimal since the fact it has three outputs, its input voltage is 3.3 to 5v and mainly because the ws2801 ic itself is hardly available on any site I was looking for.

In short does anyone know an IC which control is similar to the ws2812 that is also cheap and acts as a transistor which would allow me to connect multiple of these modules to each other while these transistors are still individually addressable?
 

dendad

Joined Feb 20, 2016
4,637
Maybe something like this???
https://www.maximintegrated.com/en/products/interface/controllers-expanders/DS2413.html

And maybe the DS2405 but it looks like it is pretty rare. One place I found is...
https://buy.rocelec.com/parts/MAX/DS2405AR-100-550_T/MAXMAXDS2405AR-100-550888T

These are both possibly discontinued parts.

A good parts search is...
http://www.findchips.com/

You could roll your own with an 8Pin (or less) processor and a FET.

If anyone else has some ideas I'd be interested to see them as it sounds like a great product.
 
Last edited:

Thread Starter

Stan van der Ven

Joined Oct 25, 2017
7
Maybe something like this???
https://www.maximintegrated.com/en/products/interface/controllers-expanders/DS2413.html

And maybe the DS2405 but it looks like it is pretty rare. One place I found is...
https://buy.rocelec.com/parts/MAX/DS2405AR-100-550_T/MAXMAXDS2405AR-100-550888T

These are both possibly discontinued parts.

A good parts search is...
http://www.findchips.com/

You could roll your own with an 8Pin (or less) processor and a FET.

If anyone else has some ideas I'd be interested to see them as it sounds like a great product.
Thanks for your reply!
I already came across the ds2405 and ds2413, however they each have their own adress which is not that much of a problem, but I do not know how to read the adress of a single chip and the number of slave devices when starting up the program.

However I came across this link:
https://www.maximintegrated.com/en/app-notes/index.mvp/id/187

This algorithm could be executed when starting up the device. However it would cost a lot of computation power. The same problem would occur with i2c because there is a bus adress that has to be known in order to control the device. The big advantage with the use of the 1-wire of the ws2812 is that it reads the first part of the data sent and sends the rest of the data through to the next ws2812 chip which on its turn does exactly the same until the end of the chain is reached.

Maybe an ATtiny13 or ATtiny85 could be programmed in such a way it acts similar to the ws2812, however this chip is relatively expensive. Since I will be making 16 to 20 of these a small change in price would make a large difference.
 

AnalogKid

Joined Aug 1, 2013
12,130
Since you already know how to program a microcontroller, try this. For less cost than any of those parts, you can take the most simple, slowest, dumbest 14-pin PIC and program it to be a single I2C port with many address pins and one output pin to drive the solenoid transistor driver.

ak
 

dendad

Joined Feb 20, 2016
4,637
For something out of left field, how about just using the WS2812 LEDs and having a photo transistor or just a plain LDR triggering the solenoid FET?
That way you get opto isolated drivers into the bargain.
 

Thread Starter

Stan van der Ven

Joined Oct 25, 2017
7
For something out of left field, how about just using the WS2812 LEDs and having a photo transistor or just a plain LDR triggering the solenoid FET?
That way you get opto isolated drivers into the bargain.
Thanks for thinking with me to find a solution to my problem!

That was my first thought as well but I think there should be a more convenient solution which looks less amateurish. Instead of doing this I would rather use the older ws2801 which is just the plain chip without an RGB LED soldered to it and control a transistor with the constant current output of this chip.
 

Thread Starter

Stan van der Ven

Joined Oct 25, 2017
7
Since you already know how to program a microcontroller, try this. For less cost than any of those parts, you can take the most simple, slowest, dumbest 14-pin PIC and program it to be a single I2C port with many address pins and one output pin to drive the solenoid transistor driver.

ak
Thanks for replying!

This seems like a solution that could totally work. Which cheap widely available IC would you recommend?

I'm thinking about not using I2c with this but some kind of custom communication that does the same as the ws2812, but also counts the number of modules attached and does not require an address (like the ws2812).
 

Thread Starter

Stan van der Ven

Joined Oct 25, 2017
7
I just discovered there is a function which checks connected I2c slaves for Arduino.

https://playground.arduino.cc/Main/I2cScanner

In combination with a cheap PIC controller or other i2c controller I could run this code at the start of each execution and count the number of slaves and with this the control for the solenoids.

Each slave could be a chip that is able to turn one output pin HIGH or LOW and can be controlled through i2c like AnalogKid advised me and a custom bus adress. Does anyone know what is the cheapest possible (available) chip able to do this?
 

Thread Starter

Stan van der Ven

Joined Oct 25, 2017
7
I decided that i wanted to adapt the i2c address of each module without the need to program another address onto each module. This is done by a button which increases the i2c adress between 8 and 119. the leds on the picture show the i2c address in binary. This a picture of the setup:
 

Attachments

Thread Starter

Stan van der Ven

Joined Oct 25, 2017
7
Additional information: because the code is using the TinyWireS library which supports only attiny25/45/85 24/44/84, i chose the attiny85 because its flash memory allows for future additions to the code as well as it turned out to be the cheapest in DIP size on aliexpress (probably due to the larger demand for this well known chip). Thanks for the feedback from you all and I will show the modules when soldered on a pcb or maybe even on a custom pcb since i plan on making a few dozen of these.
 

Attachments

Top