I/O Expansion Issue?

Expansion modules and attachments

Posts: 34
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614
PostPosted: Mon Mar 26, 2018 7:41 am
Hello,

I have an I/O expansion that I can't seem to get working as expected. The chip is the 328P, which, I believe, indicates this is a v1.0 module, correct?

When I load up the I/O expansion example code and hook up a float switch to one of the inputs, I don't seem to see any change to the status of the input represented on the display. They all continue to show green. I have also tried multiple float switches, so I don't believe they are the issue.

If I disconnect the module, all of the inputs turn red, so I assume it's recognizing the module itself.

I am happy to debug further if someone is able to provide some next steps.

Thanks,
-Steve

Posts: 12310
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon Mar 26, 2018 3:06 pm
Are you closing the i/o channel to ground?
Roberto.

Posts: 34
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614
PostPosted: Mon Apr 02, 2018 2:25 pm
I have one side of the switch in I/O port 0 and the the other side connected to ground, so yes, it should close to ground. I have also tried just jumping between the I/O port and ground, and I still see no indication of it working.

With the I/O expansion connected and no switches attached, should all the inputs on the display show green in the example code? I would think they'd turn green only when a switch is activated.

Thanks,
-Steve

Posts: 34
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614
PostPosted: Mon Apr 09, 2018 11:23 am
Anyone have any thoughts?

I picked this expansion module up from another reefer, but it's the old style (v1.0) and has no exterior labels.

Looking at the "documentation" for the I/O expansion on the website, it shows that it now has a DC connector input. However, this older style module only has a USB connector.

Opening it up, I see that it has the 328P chip, which I assumed meant that it's an I/O expansion. And the inputs in the example code turn green when I plug the module in, reinforcing this.

Is there any chance that this is a dimming expansion and not an I/O expansion? They look very similar from the outside.

Posts: 34
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614
PostPosted: Sun Sep 23, 2018 10:07 pm
Is anyone able to help out here? What additional debugging can I do? Can anyone point me to another thread, for example? I really need this module working in order to move my project forward. Thanks.

Posts: 12310
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun Sep 23, 2018 11:24 pm
Can you send me a photo of the board?
Roberto.

Posts: 34
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614
PostPosted: Tue Sep 25, 2018 12:39 pm
Exterior:

Image

Board:

Image

Posts: 12310
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Sep 25, 2018 1:41 pm
Looks like it is configured to be I/O.
Not sure what is going on.
Roberto.

Posts: 34
Joined: Mon Sep 17, 2012 12:41 pm
Location: Lincoln Park, Chicago, IL, USA 60614
PostPosted: Tue Sep 25, 2018 1:47 pm
Any further way to debug, other than hooking it up to the controller?

Posts: 12310
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Tue Sep 25, 2018 2:31 pm
If you want, you can debug just the module using Arduino, since this old module has a built-in mcu in it.
The original firmware is:
Code: Select all
#include <Wire.h>
#include <avr/wdt.h>

byte IOports[] ={
  3,5,6,9,10,11};

byte IOOut=0;
void setup()
{
  wdt_enable(WDTO_1S);
  Wire.onReceive(NULL);
  Wire.onRequest(requestEvent);
  Wire.begin(9);
  for (int a=0;a<6;a++)
  {
    pinMode(IOports[a],INPUT);
    digitalWrite(IOports[a],HIGH); //pull up resistor
  }
}

void loop()
{
  wdt_reset();
}

void requestEvent() {
  IOOut=0;
  for (int a=0;a<6;a++)
  {
    IOOut+=digitalRead(IOports[a])<<a; //pull up resistor
  }
  Wire.write(IOOut);
}

Roberto.

Return to Addons

Who is online

Users browsing this forum: No registered users and 4 guests