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.

Thomas Mason

Member Since 13 Aug 2010
Offline Last Active Nov 19 2013 03:39 PM
-----

Posts I've Made

In Topic: Christmas Lights

24 November 2012 - 04:41 AM

Yes, I think you should be able to power the Netuino from the relay board. Not sure why it would not be working.
Can you draw what you have?

well the thing is I am not trying to power the netduino but rather the netduino is sending the power, but it is not however connecting the ground. I am ataching an image of what I have but for the life of me i dont know how this even works as essentially the netduino is grounding to a completely different system. At any rate if I try to connect the power from the ralay board to power even just the 595 circuit then nothing works.

As I said this does work but I dont know how, or for how long.Attached File  diagram.pdf   740.53KB   9 downloads

In Topic: Christmas Lights

24 November 2012 - 04:06 AM

I am also working on the same project. Do you have any of the code available (i.e. NetDuino or Brian's code w/o references to the phidget relay). I am looking to create the sequence files on my PC with Brian's code, but store and execute them on the NetDuino.

Yes I have some code ... It is not pretty because I have been doing a lot of debugging with it, but it is functional and may help you to get an idea. I dont store the sequences on the nutduino but rather I use basically brians code except I sned to serial rather than phidgets. On the other end is an app the runs on the Netduino that takes the serial input and turns on the respective relay.

I have attached my project directory. FYI there is a lot of junk in here but mainly the sequencer app is in the root and the netduino side is in the netduino directory. You are welcome to any of the code here, just remember as I said it may not be pretty

In Topic: Christmas Lights

21 November 2012 - 09:45 PM

Ok paul so that was dumb on my part I did not rewrite it correctly when making the test app. It is working now but it still seems that it is wrong some how. I have 5v coming from the netduino going to the my shift register then the ground is going to the ground on the relay board. I would think I could take all the power from the relay baord but this config just causes the lights to be always on. At any rate it does work but I just hope I am not overlaoding anything. By the way I have to say much respect to netduino today, I have hooked this up every which of way many of which are clearly wrong, and all apears to to still be working

In Topic: Christmas Lights

21 November 2012 - 07:45 PM

Hi Thomas,

Inside the 74HC595 there are two transistors connected to each output pin. Only one is turned on at a time.
One connects the pin to Vcc (+5V or +3.3V), the other connects the pin to ground (0V).

If you load the 74HC595 with a data byte that has zero for your chosen output pin, the "to ground" transistor is turned ON.
If you load the 74HC595 with a data byte that has one for your chosen output pin, the "to Vcc" transistor is turned ON.

This means that whilst you can think of the output pin "sending voltage out", the output pin is actually sourcing or sinking current.
For example, you could connect an LED (and resistor) between the output and ground; the LED would come on when the output is set to one.
Or, you could connect an LED (and resistor) between the output and Vcc; the LED would come on when the output is set to zero.

The second case is what you would use with the relay board.
The 74HC595 could take its Vcc from either the power supply on the relay board or the power supply on the Netduino. Since the LED current is flowing to ground, the Vcc of the 74HC595 is not going to take lots of current - so you don't need to worry about taking too much current if you chose to take Vcc from the Netduino.
Wherever you chose to take Vcc from, make sure that all the grounds are joined up so the LED current and Netduino output pin current can return to where it came from.

One more feature of the 74HC595 is that it also has an output enable pin.
When the notOE pin is low, one of the above transistors will be ON.
When the notOE pin is high, both of the transistors will be OFF. This makes the pin "tri-state". When it is tri-state, current can't flow in or out.
Recall that the Netduino family have that sometimes annoying feature of pulling all the pins high at power on; well in this case, if you connect the notOE pin to a spare Netduino pin, it will cause all the 74HC595 outputs to be tri-state when the Netduino resets/powers up, allowing you to load a data byte into the 74HC595 before any of the IO pins becomes capable of energising a relay.

I hope that all a bit clearer now.

Paul

Thanks that explains a lot better but it still does not work right. The realy board works fine when I cannot direct to a digital output of the netduino (although I cannot make it go off by just write(false) I acutally have to dispose the pin ) but when I connect to the shift register the relay just stays on and never goes off even though i send low. I am using this code
int delayTime = 1000;
            bool state = false;
            while (true)
            {
                latch.Write(false);

                for (int i = 0; i < 8; i++)
                {
                    state = !state;
                    data.Write(state);

                    clock.Write(true);
                    //Thread.Sleep(1);
                    clock.Write(false);
                }
                latch.Write(true);
                Thread.Sleep(delayTime);
            }
but the relays never go off they just stay on. If I set the OE to high they go off but not otherwise. Also if I leave OE at high they can flash but not at all like they should.

I really wonder if in all my tinkering i have burned up the shift registers.

In Topic: Christmas Lights

21 November 2012 - 04:45 PM

Hi again,
That should be OK as long as the grounds are joined.
The current to turn on the relays will flow out of the relay board, into the 74HC595, down to ground and then return to the relay board's ground.
Paul

I guess there is still somthing I dont understand. Basically the outputs of the 74HC595 are sending voltage out, but they need to be connecting relay to ground . Do in need a transistor here or something. In other words how is the 74HC595 going to complete the circuit? I guess I still dont understand exactly what the 74HC595 is doing. Is it just working as a switch and/or relay in other words. So can i use it to complete the ground circuit of the relay? Does the 74HC595 have to have the 5v in order to operate or is that just if you want to send power out rather than connecting a ground like i need ?

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.