RocNetNode and PCA9685 PWM controller

http://wiki.rocrail.net/doku.php?id=roc ... netnode-en
Post Reply
Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

RocNetNode and PCA9685 PWM controller

Post by Richard-TX » 09.11.2013, 16:57

Rob,

Is there anything in the works for a semi-self configuring Rocnetnode on the RPI? Scanning and querying the bus for various devices should be relatively easy due to the I2C standards for devices.
You do not have the required permissions to view the files attached to this post.

rjversluis
Site Admin
Posts: 42343
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 09.11.2013, 22:00

I do not see any usable I2C units for model railroading except for the I/O expanders.

Liviu M
Posts: 949
Joined: 03.12.2011, 20:44

Post by Liviu M » 09.11.2013, 23:14

Hello Rob,

There are some others interesting i2c devices which can be used.
PCF8574 (8 IOs expander) for example is, in my oppinion, easier to use than the the MCP.
Very interesting is looking also the PCA9685 -16 Channels, 12-bits pwm controller - used as servos controller.
I don't have any idea if it is possible to implement a 'generic' i2c control and how complicated is to implement it, but in my opinion it wil be an nice feature ( at least fot the DIY kind of users). :)

Regards,
Liviu

rjversluis
Site Admin
Posts: 42343
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 10.11.2013, 07:28

The PWM controller is only available in SMD. (DIY??)
But its an interesting device.

The Adafruit did not documented the header pins. At least I did not find any.

rjversluis
Site Admin
Posts: 42343
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 10.11.2013, 07:56

I have totally forgotten the PCA9685 you send me.

It is planned to support the PWM I2C chip in RocNetNode.
If you have any example code, in what ever language, you can post it here.

Liviu M
Posts: 949
Joined: 03.12.2011, 20:44

Post by Liviu M » 10.11.2013, 08:54

Hello Rob,

Adafruit link was just an example why some flexibility in using the i2c interface would be nice.
If you are interrested in this board, just look the board's pictures on the site - all the needed information needed to conneect it is printed on the board. Adafruit also has a raspberry example in python; maybe you can find there the needed info.

Regards, Liviu

PS Yes, I can solder such chips. :)

rjversluis
Site Admin
Posts: 42343
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 10.11.2013, 09:21

OK, Rich its module is online (44):

Code: Select all

pi@raspberrypi ~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: 20 21 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- 44 -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: 70 -- -- -- -- -- -- --                         

Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

Post by Richard-TX » 10.11.2013, 19:49

rjversluis wrote:The PWM controller is only available in SMD. (DIY??)
But its an interesting device.

The Adafruit did not documented the header pins. At least I did not find any.
VCC = +3v
V+ = +5v


Image
Last edited by Richard-TX on 10.11.2013, 19:55, edited 1 time in total.

rjversluis
Site Admin
Posts: 42343
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 10.11.2013, 19:53

Rich, I already find out. ;) See the i2cdetect trace in my previous posting.

Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

Post by Richard-TX » 10.11.2013, 19:58

Very good. The more I read about the chip the more uses I see for it.

Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

Post by Richard-TX » 10.11.2013, 20:01

The default address (no solder jumpers) is 0x40

Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

Post by Richard-TX » 10.11.2013, 20:11

Have you hooked up some leds or servo motors to it yet?

As an experimenter who has tried controlling the brightness of leds in the past, I consider the device to be almost pure magic. :D
Last edited by Richard-TX on 10.11.2013, 20:41, edited 1 time in total.

rjversluis
Site Admin
Posts: 42343
Joined: 10.04.2006, 08:48
Location: Speyer, Germany
Contact:

Post by rjversluis » 10.11.2013, 20:39

Richard-TX wrote:did you hooked up some leds or servo motors to it yet?

As an experimenter who has tried controlling the brightness of leds in the past, I consider the device to be almost pure magic. :D
Take it easy; Rome was not build in one day.

Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

Post by Richard-TX » 10.11.2013, 21:36

Agreed!

I predict that you will have fun with this peripheral.

Add a single transistor to an output and you can control large arrays of LEDs, incandescent lights etc.

I am trying to get Adafruit to make a 16 channel ADC board. For what? A zero insertion loss occupancy sensor. The chip would be a LTC2499.

http://www.linear.com/docs/17859

Richard-TX
Posts: 1320
Joined: 10.07.2012, 04:00
Location: Texas, USA
Contact:

Post by Richard-TX » 11.11.2013, 00:04

Rob,

What's with pwm.py in version 6252? Is there going to be a python (external executable) gateway for rocnetnode and the 16 channel LED Servo controller?

Richard

Post Reply

Return to “RocNetNode”