Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

I become crazy because wiring?


  • Please log in to reply
29 replies to this topic

#1 dops

dops

    Member

  • Members
  • PipPip
  • 28 posts

Posted 25 October 2011 - 04:09 PM

Hi, i'm serious.. i can't become crazy.. so i have faithfully reproduced a simple circuit. This is: http://wiki.netduino...ter.ashx?Code=1 You can see image of circuit here: http://unexpecteddev...ino/circ-05.jpg and a video of result here: http://www.youtube.c...bed/40u1nfyqIhY Obviously the result on the video isn't my result. Pratically not a single led lights. When i talk about faithfull reproduction, i'm serious, maybe except for cables used. I don't know the section of wire used in the example circuits i see on the internet, but i've used simple utp wire.. the same we can see on a network cable. I've used this because colors. Since i had problems piloting 74hc595 shift register on another more complex circuits i decided to try with simple circuit lighting leds directly on a bread board. But same things!! not work!! or in some case work in unespected mode.. like some led light some not.. I try with other examples like this: http://netmftoolbox....OutputPortShift but nothing.. so I have some doubts arose.. can be wire used the problem? maybe on data pin or 5v and gnd? What you thing about? I'm going out crazy, please help me.

#2 Stefan W.

Stefan W.

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts

Posted 25 October 2011 - 04:12 PM

Can you take a picture of your setup, and post it along with the code you've used?
I believe that no discovery of fact, however trivial, can be wholly useless to the race, and that no trumpeting of falsehood, however virtuous in intent, can be anything but vicious.
-- H.L. Mencken, "What I Believe"

#3 dops

dops

    Member

  • Members
  • PipPip
  • 28 posts

Posted 25 October 2011 - 05:23 PM

Can you take a picture of your setup, and post it along with the code you've used?

Absolutely yes. This pictures refer to this project: http://wiki.netduino...ter.ashx?Code=1
I've also tried for first this: http://netmftoolbox....OutputPortShift with same negative result :( In this case i've tried with two and one shift register.. but nothing.. Obviously for this i've also used Ic74HC595, Ic74HC595Chain etc.. classes.
Code in both cases are the same described on the tutorials. I reproduce all faithfully, wiring and coding.
Attached File  WP_000097.jpg   119.88KB   56 downloadsAttached File  WP_000098.jpg   106.81KB   72 downloadsAttached File  WP_000099.jpg   96.77KB   76 downloadsAttached File  WP_000100.jpg   124.52KB   62 downloadsAttached File  WP_000101.jpg   102.53KB   54 downloadsAttached File  WP_000102.jpg   84.23KB   46 downloadsAttached File  WP_000103.jpg   109.13KB   41 downloadsAttached File  WP_000104.jpg   98.52KB   35 downloads

Thank you in advance

#4 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 25 October 2011 - 05:40 PM

This will sound utterly stupid, but on your photos there is no power supply cable (USB or barrel jack) connected to Netduino (?)

#5 dops

dops

    Member

  • Members
  • PipPip
  • 28 posts

Posted 25 October 2011 - 08:20 PM

This will sound utterly stupid, but on your photos there is no power supply cable (USB or barrel jack) connected to Netduino (?)

haha.. you said yourself :D

#6 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 25 October 2011 - 08:44 PM

Solved by putting it on power? :D
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#7 dops

dops

    Member

  • Members
  • PipPip
  • 28 posts

Posted 25 October 2011 - 09:15 PM

Solved by putting it on power? :D

hahaha.. no Stefan, unfortunately not :angry:
I don't undestand.. Stefan, please, may be stupid question, but.. are you sure that this schema http://netmftoolbox....OutputPortShift and your classes works? Sorry, but please belive me, i've faithfully reproduced your schema on the bread board, with your same code, but don't want work .. i'm almost desperate. I changed shift registers, bread board and even microcontroller (yes i also used a Fez panda 2 thinking netduino broke).
My only doubt remain wire size, but honestly do not believe much :(
Please help giving me a possible error :( If you want i can reproduce your connections schema and making a video, i can't go crazy because see on the internet many people driving a 74hc595 and i not :(

#8 Stefan W.

Stefan W.

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts

Posted 25 October 2011 - 10:01 PM

Okay, a few wild shots to rule things out ... if you remove the 74hc595 and then connect the 3.3v rail to the places where its output legs are, do the LEDs light up? (just to rule out a problem with the wiring ...) Are you sure that you have a 74HC595 and not a 74HCT595 - can't read that on the images? (the latter needs a supply voltage >= 4.5V, you're providing 3.3V - nothing wrong when you use a 74HC595, but won't work with 74HCT595). If that's the case, you can try powering it via the 5V line - should work, but you're scratching the edge of the specs then (regarding signal voltage levels).
I believe that no discovery of fact, however trivial, can be wholly useless to the race, and that no trumpeting of falsehood, however virtuous in intent, can be anything but vicious.
-- H.L. Mencken, "What I Believe"

#9 dops

dops

    Member

  • Members
  • PipPip
  • 28 posts

Posted 25 October 2011 - 10:45 PM

Okay, a few wild shots to rule things out ...

if you remove the 74hc595 and then connect the 3.3v rail to the places where its output legs are, do the LEDs light up? (just to rule out a problem with the wiring ...)

Are you sure that you have a 74HC595 and not a 74HCT595 - can't read that on the images? (the latter needs a supply voltage >= 4.5V, you're providing 3.3V - nothing wrong when you use a 74HC595, but won't work with 74HCT595). If that's the case, you can try powering it via the 5V line - should work, but you're scratching the edge of the specs then (regarding signal voltage levels).


If you look carefully the pictures, you can see that i use 5V line.
Yes i'm sure, i use an ST M74HC595B1, this: http://www.st.com/in...oduct/69791.jsp
Yes if detach shift register and connect 5V rail directly, i see led light up.
However tomorrow upload detailed images of bread board setup with your schematics provided here http://netmftoolbox....OutputPortShift with various steps like setup with one and two shift registers (chain), light up leds without shift register, providing netduino with usb or battery power etc..
Thank you ;)

#10 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 26 October 2011 - 04:31 AM

I guess you swapped the clock and the latch wires: check the wiring once again. Just a question: why do you use a so thick+long wires on the breadboard? Many years ago I've found a bunch of phone cable wires: it looks absolutely perfect for the breadboard. Thin, but robust enough. I guess also it stresses a lot fewer the holes of the BB. Cheers
Biggest fault of Netduino? It runs by electricity.

#11 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 26 October 2011 - 06:30 AM

I don't undestand.. Stefan, please, may be stupid question, but.. are you sure that this schema http://netmftoolbox....OutputPortShift and your classes works? Sorry, but please belive me, i've faithfully reproduced your schema on the bread board, with your same code, but don't want work .. i'm almost desperate.

The classes and schematic are tested. A lot! :)

If I'm not mistaken, I see wires on the netduino going to pins 11, 12 and 13, am I correct?

Can you show me the first few lines of your code, especially how you initialize the Ic74HC595Chain and Ic74HC595 class?
I'm curious, I have the feeling you used pin 12 as chip select, which will not work as chip select. The reason for this is because pin 12 is reserved as SPI MISO and when using the SPI bus, that pin is locked out for SPI.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#12 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 26 October 2011 - 07:04 AM

The classes and schematic are tested. A lot! :)

If I'm not mistaken, I see wires on the netduino going to pins 11, 12 and 13, am I correct?

Can you show me the first few lines of your code, especially how you initialize the Ic74HC595Chain and Ic74HC595 class?
I'm curious, I have the feeling you used pin 12 as chip select, which will not work as chip select. The reason for this is because pin 12 is reserved as SPI MISO and when using the SPI bus, that pin is locked out for SPI.

Check the pictures: the wires comning from the N to the HC595 are swapped. Compare them with the code of the Wiki.
Cheers
Biggest fault of Netduino? It runs by electricity.

#13 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 26 October 2011 - 07:28 AM

Check the pictures: the wires comning from the N to the HC595 are swapped. Compare them with the code of the Wiki.
Cheers

Didn't looked that closely, but on the photo with the netduino:
- Pin 11 (SPI MOSI): Yellow wire
- Pin 12 (SPI MISO): Blue wire
- Pin 13 (SPI Clock): Green wire

Then to the IC:
- Pin 11 (SPI Clock): Yellow wire
- Pin 12 (SPI Latch): Blue wire
- Pin 14 (SPI MOSI): Green wire

You and me are both correct Mario!

He connected the SPI Latchpin (Chip select) to MISO and reversed MOSI and Clock.

So, Dops, this is what to do (on your Netduino!):
1. Swap pins 11 and 13
2. Put the wire in pin 12 in another hole, pin 9 for example
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#14 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 26 October 2011 - 08:10 AM

You are right: I mis-read your post! Sorry!
Biggest fault of Netduino? It runs by electricity.

#15 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 26 October 2011 - 08:47 AM

You are right: I mis-read your post!
Sorry!

No problemo :)
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#16 dops

dops

    Member

  • Members
  • PipPip
  • 28 posts

Posted 27 October 2011 - 03:45 PM

Sorry for delay.
I will not spark controversy, but be careful, if you look closely pictures i don't use pins 11-12-13.. but only 2-3-4 following this schematic http://unexpecteddev...ino/circ-05.jpg
However, now i've replicated the schema at this address http://netmftoolbox....OutputPortShift and not work!
I try with netduino and a fez panda 2. With netduino leds light in strange mode (as you can see on the pictures).. while with fez panda 2 leds do not lights :(
On netduino and fez i've used 13-11-9 pins (because have same functions). Obviously on fez i used GHI classes to indicate pin, like this:
Ic74HC595Chain IcOutChain = new Ic74HC595Chain(SPI.SPI_module.SPI1, (Cpu.Pin)FEZ_Pin.Digital.Di9, 2)

So i took pictures, all connections have been checked so as not to have false contacts.
I really don't undestand what happen!! please help me.

Attached File  WP_000106.jpg   87.09KB   17 downloadsAttached File  WP_000107.jpg   90.48KB   21 downloadsAttached File  WP_000108.jpg   101.14KB   23 downloadsAttached File  WP_000110.jpg   116.35KB   25 downloadsAttached File  WP_000111.jpg   95.29KB   34 downloadsAttached File  WP_000113.jpg   103.99KB   32 downloadsAttached File  WP_000115.jpg   96.37KB   46 downloadsAttached File  WP_000116.jpg   93.59KB   44 downloadsAttached File  WP_000117.jpg   88.99KB   32 downloadsAttached File  WP_000118.jpg   110.57KB   26 downloadsAttached File  WP_000119.jpg   112.56KB   18 downloads

This is the code i've used, on fez i made only above change.
  static OutputPort onBoardLed = new OutputPort(Pins.ONBOARD_LED, false);

        public static void Main()
        {
            
            // Defining two 74HC595s daisychained on the SPI bus, pin 9 as latchpin
            Ic74HC595Chain IcOutChain = new Ic74HC595Chain(SPI_Devices.SPI1,  Pins.GPIO_PIN_D9, 2);

            // Splits up both 74HC595s. Detail: counting starts at 0
            Ic74HC595 IcOut1 = new Ic74HC595(IcOutChain, 0);
            Ic74HC595 IcOut2 = new Ic74HC595(IcOutChain, 1);

            // Defines all 16 leds
            OutputPortShift[] Leds = new OutputPortShift[16];
            for (uint Counter = 0; Counter < 8; ++Counter)
            {
                // Leds on the first Ic
                Leds[Counter] = new OutputPortShift(IcOut1, (Ic74HC595.Pins)Counter, false);
                // Leds on the second Ic
                Leds[Counter + 8] = new OutputPortShift(IcOut2, (Ic74HC595.Pins)Counter, false);
            }

            // Does a ledloop
            while (true)
            {
                for (uint Counter = 0; Counter < 16; ++Counter)
                {
                    Leds[Counter].Write(true);
                    onBoardLed.Write(true);
                    Thread.Sleep(500);
                    Leds[Counter].Write(false);
                    onBoardLed.Write(false);
                    Thread.Sleep(500);

                }
            }



        }


#17 Stefan W.

Stefan W.

    Advanced Member

  • Members
  • PipPipPip
  • 153 posts

Posted 27 October 2011 - 04:11 PM

You still have the wiring wrong. You have Netduino Pin 13 = MOSI connected to 595 Pin 11 = Shift register clock with the blue cable, and Netduino Pin 11 = SPCK goes to 595 Pin 14 = Data serial (pink cable). Switch the blue and the pink cable at the netduino.
I believe that no discovery of fact, however trivial, can be wholly useless to the race, and that no trumpeting of falsehood, however virtuous in intent, can be anything but vicious.
-- H.L. Mencken, "What I Believe"

#18 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 27 October 2011 - 04:11 PM

Hi, On this picture I see a blue wire coming from the netduino pin 13: Attached File  WP_000111.jpg   95.29KB   34 downloads On this picture, I see a blue wire going to the 74HC595 on pin 14: Attached File  WP_000115.jpg   96.37KB   46 downloads When I look at the schematic at http://netmftoolbox....OutputPortShift I see pin 13 from the netduino (orange) going to pin 11 of both 74HC595's. So your wiring is still not correct. I now only checked that single wire, I haven't checked the rest. Try to use wires of the exact same color, making it more clear. And put them in color by color.
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#19 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 27 October 2011 - 05:44 PM

Along this series of posts, we surely have known that:
  • this is the most beautiful and colored thread of the whole forum, because there are lot of pictures, with rainbow wires, lights, and whatever else;
  • Dops has gone out of user's space because the dozen of photos uploaded;
  • the Dops' circuit is not working, but it's damn sweet to look at;
  • the Dops' breadboard is made in the USA;
Dops: be proud of yourself!
Cheers
Biggest fault of Netduino? It runs by electricity.

#20 dops

dops

    Member

  • Members
  • PipPip
  • 28 posts

Posted 27 October 2011 - 07:21 PM

Along this series of posts, we surely have known that:

  • this is the most beautiful and colored thread of the whole forum, because there are lot of pictures, with rainbow wires, lights, and whatever else;
  • Dops has gone out of user's space because the dozen of photos uploaded;
  • the Dops' circuit is not working, but it's damn sweet to look at;
  • the Dops' breadboard is made in the USA;
Dops: be proud of yourself!
Cheers


Sorry, i'm confused.. but this again not work :(
Other images:Attached File  WP_000128.jpg   113.03KB   14 downloadsAttached File  WP_000129.jpg   103.2KB   14 downloads
And a video: :D

Mario non stà bene sparare sulla croce rossa :( :D
Mario it's not nice to shoot on the red cross :D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.