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's Content

There have been 22 items by Thomas Mason (Search limited from 17-April 23)


By content type

See this member's

Sort by                Order  

#40094 Christmas Lights

Posted by Thomas Mason on 24 November 2012 - 04:41 AM in Netduino Plus 2 (and Netduino Plus 1)

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



#40093 Christmas Lights

Posted by Thomas Mason on 24 November 2012 - 04:06 AM in Netduino Plus 2 (and Netduino Plus 1)

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

Attached Files




#39917 Christmas Lights

Posted by Thomas Mason on 21 November 2012 - 09:45 PM in Netduino Plus 2 (and Netduino Plus 1)

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



#39908 Christmas Lights

Posted by Thomas Mason on 21 November 2012 - 07:45 PM in Netduino Plus 2 (and Netduino Plus 1)

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.



#39893 Christmas Lights

Posted by Thomas Mason on 21 November 2012 - 04:45 PM in Netduino Plus 2 (and Netduino Plus 1)

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 ?



#39680 Christmas Lights

Posted by Thomas Mason on 20 November 2012 - 02:05 AM in Netduino Plus 2 (and Netduino Plus 1)

Good to see you found each other!


Exactly. Just daisy chain the shift registers onto the single SPI of the Netduino, then write out an array of bytes - one per shift register.

(If you wanted to control them separately, you can also share the SPI clock and data out lines, but use a different strobe line for each shift register so that only one register updates at a time.)


The relay board provides the current to drive the relay coils using a transistor, so the Netduino does not have to (it can't drive enough current for a relay coil).
The 15-20mA figure is for the current that is needed to turn on each LED in the opto-isolator that drives the tranistors. This current does have to pass through a switching device outside the relay board - e.g. from a shift register chip or an external transistor circuit.

On this page there is a link to a diagram of the relay board's input. It is for a two channel version, I am assuming its the same circuit for the relay card you both found. I can't find a full schematic for the relay board that is large enough to see.
Posted Image

From this diagram it appears that the relay board needs each control input to be connected to ground to turn on each opto-isolator's LED. So the 15-20mA current actually flows out of the relay board - not into it. (The Netduino still can't handle this.)

Paul


we have all of our equipment in now and I want to let you know how I have it wired thus far to see if "looks" right. Basically we have two 16 channel relay board (the ones from before) and 4 74HC595. The 74HC595 are wired to the netduino and are powered from the netduino. The outputs of the 74HC595 go to the realy board to control the unit. Will this work or should i get the power for the 74HC595 from somwhere else.



#38595 Something new is brewing in the Secret Labs

Posted by Thomas Mason on 06 November 2012 - 04:04 AM in General Discussion

bm8gbW9yZSBlbmNvZGluZyBwbGVhc2UgbXkgaGVhZCBodXJ0cyA6KQ== Although I am about to order some equipment so I guess I will wait till the eigth to see if maybe it is onewire .



#38557 Serial port / Project Help

Posted by Thomas Mason on 05 November 2012 - 04:38 PM in Netduino 2 (and Netduino 1)

Sorry - no
If you have an RS232 serial port on the PC, you will need an RS232 to TTL converter.
There are plenty of ready built modules out there to chose from.
Some come with a 9-way D-Type cionnector fitted, some are just ready for wires to be soldered on.

Without an RS232-TTL adapter, the serial data will be the wrong voltage and inverted when the Netduino receives it; nothing will make much sense.

Paul


Hey paul I have a strange question which you may or may not know the answer to. APC ups have a USB to serial cable that they use communicate but this cable only puts out 5v and it does not apear to be a 232 cable. Is it possible this is a TTL cable ... is there any way to tell by looking at it ?



#38518 Serial port / Project Help

Posted by Thomas Mason on 05 November 2012 - 12:38 AM in Netduino 2 (and Netduino 1)

Hi Thomas,

The relay card looks like it needs one GPIO per relay, so you will need to use some logic to control more than one set of 16 lamps.
Using the 74HC595 shift registers is a really easy way to do this - see the Wiki for examples.

You might want to consider using Solid State Relays "SSR"s instead of normal mechanical relays. Mechanical relays will wear out if you are using them to flash lights on and off a lot (e.g. in time to music). They also create electrical noise when they switch which can cause interference to other equipment. SSRs will often include a zero crossing circuit that mean they switch on when the AC voltage passes through zero - this reduces any noise.

Connecting to the PC will be straight forward using a serial port. Assuming you don't have a "state of the ark" PC like mine, you will probably need a USB to serial adapter. Older PCs came with a serial port as standard.
I would always recommend devices from FTDI for USB interfacing, professionally I have found them to bei very reliable. They have a set of chips that do the job, and sell cables with bare wire ends to connect to your device. There are two obvious options, USB to RS232 and USB to TTL.
If you go for USB to TTL, you will not need to use any other hardware. (Chose a 3.3V compatible part.) The TX and RX lines just connect to the Netduino's Rx and TX lines.
If you go for USB to RS232, you will also need a level converter at the Netduino. There are plenty of level converters around to chose from. The benefit of using RS232 is that you will be able to use a longer cable, and it would allow other configurations in the future if you move away from the PC with USB design.
(There would be no difference in the software you write.)

Hope this helps - Paul

PS if you use Android - disable the auto update option. Chrome decided to update on me half way through typing this response. I lost the lot and started again using a laptop.


EDIT: Just spotted on the link you gave that the relay card needs 15 to 20mA per input. The Netduino digital IOs have different limits and only three of them can source the maximum 16mA. Hence you will not be able to drive the relay card directly without using either transistors or a device like the 74HC595. See the Wiki page on how much current can be drawn from IO lines.


So if I have a serial port do I need an special equipment or can I just plug the wires into the netduino?



#38507 Christmas Lights

Posted by Thomas Mason on 04 November 2012 - 07:19 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi All,

I'm brand new to the netduino plus world and I have a question. Can I use the netduino plus board to drive this relay board: Relay board

It states that it needs "15-20mA Driver Current" and I'm not sure if the netduino plus board will drive that. I see that it does output 3.3 volts, but I do not see the amps listed anywhere.

You can see some of the light shows I have done in the past with up to 8 channels listed below. I want to use neduino to give me more channels to play with. Now I just need more lights :rolleyes:

Charlie Brown
Two House are better than one
2011 Show My favorite is dueling Jingle bells at 2:34

Thanks in advance for any advice.

Don



This might make things easier.

http://netmftoolbox....ailable classes



#38506 Serial port / Project Help

Posted by Thomas Mason on 04 November 2012 - 07:18 PM in Netduino 2 (and Netduino 1)

Thomas,

You may want to look at this shield, it is made by a membeer of this forum. Multiplexor shield

I have one that I put together but have not used yet. The price was right.

Chuck

Thanks for the reply Chuck that link led me to some good info on hooking up the shift registers as well.



#38492 Serial port / Project Help

Posted by Thomas Mason on 04 November 2012 - 01:33 PM in Netduino 2 (and Netduino 1)

So my goal is to drive two of these relay boards for a total of 32 channels. I will need to cascade 4 shift registers to get this done. Would you say that I can drive this directly off the netduino ? If not what would my alternative be transistors?



#38479 Christmas Lights

Posted by Thomas Mason on 04 November 2012 - 01:38 AM in Netduino Plus 2 (and Netduino Plus 1)

That is the code I was using on the youtube video. I can send you my sequence files if you would like. I will put a post together in the next few days that has the sequence file and the link to the MP3 files I used. Do you have any to share?

The phidget relays are nice and easy to use but very costly as you try to increase the amount of channels. The code from Brian Peek should work just fine, I planned on changing the call to the phidget relay, he already has it classed out, so it should be an easy change.

I planned on using the netduino plus as a web server and running the sequence file from there. That is how I did the two houses. I run all the sound from my main PC and kick off the second house via a web service.

All you need on your end is a trigger to start the sequnce file.

It does not look like much on the video but is realy cool when you see it live. I just ordered an FM transmitter for this years show. My neighbors will enjoy that. B)

How have you gone about making your sequence files? I have found that if I take the sequnce files and break them into 1/10th of a second then its easy to cross match the time in Audacity.

I looked over that diagram and it appears that for every 3 control wires you can control 8 leds(relays in our case). So it seems we could control 48 relays with one netduino. WOW! That would be much cheaper.

ok, I'm gonna end my ramblings for now. Its awesome to see we are in the same boat. I'll dig up those files and get them out in the next few days. I have a newborn in the house (Hooray! :P ) but I just don't have as much freetime now.

Don


well actually since you can cascade the shift registers you can control numerous outputs per every three pins. Basically you just loop through sending bits to the register and once it has filled up (8 bits) it can over flow the others to another and so on and so one .. So in my case I am looking at 4 shift registers using three pins and then i just loop for a 32 count and latch .. and viola.

So are you not using brians app to make the sequences?

what we are doing is we are going to set this up on a tree/light display in the break room at our office and then allow the employees to make sequences using brians app via some pcs in the breakroom. The we will load them to the display at regualr intervals. we also plan on mmaking a sharepoint web part to show the upcoming show and who made it. It should be a really fun project. The netduino and the shift register will deff let you use more lights which is always better right.

Congrats on the newborn I have a 6months and three year old myself so I understand.



#38477 Christmas Lights

Posted by Thomas Mason on 04 November 2012 - 01:08 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi All,

I'm brand new to the netduino plus world and I have a question. Can I use the netduino plus board to drive this relay board: Relay board

It states that it needs "15-20mA Driver Current" and I'm not sure if the netduino plus board will drive that. I see that it does output 3.3 volts, but I do not see the amps listed anywhere.

You can see some of the light shows I have done in the past with up to 8 channels listed below. I want to use neduino to give me more channels to play with. Now I just need more lights :rolleyes:

Charlie Brown
Two House are better than one
2011 Show My favorite is dueling Jingle bells at 2:34

Thanks in advance for any advice.

Don


I am not sure that the driver current it is talking about would come from the netduino ... they are 12v relays and there is a 12v input port on the unit. It almost seems like the unit has 12v relays that are switched by transitors on the board that are switched by the netduino. Any ways that is my take on it. I am trying to find more info on this board myself.



#38476 Serial port / Project Help

Posted by Thomas Mason on 04 November 2012 - 12:43 AM in Netduino 2 (and Netduino 1)

Agreed on the solid state but they are more expensive by a large margin. So then if I cascade som shift registers I can get it done sounds good. Where can I find info such as which ports on the netduino can provide which amperage ? Sorry you already answered that. But how will the shift register help with amperage?



#38475 Christmas Lights

Posted by Thomas Mason on 04 November 2012 - 12:23 AM in Netduino Plus 2 (and Netduino Plus 1)

Thanks for the information and advice Paul. I am a hardware newbie (been coding in C# since 2001) and I'm not sure how the 74HC595 chips work. Is there a newbie guide or a 101 page?

Thanks!

Don


How funny apearently you and I are working on the same project because i currently have thread open on this same subject. Here is a good link on the shift register. I dont mind just merging our two threads here so we can both get any answers without asking people to answer both of us.

How are you planning to send the data to the netduino ? I am trying to use serial as I do not have a plus. Also how are you making the sequence there is some good code here but it will need some adjusting as it is for a phidget board :( but I a have made some changes to make that happen already (realy just commented out the phidget part).

At any rate let me know if I can help with your project at all.



#38438 Halloween - Pneumatic Popup Skeleton

Posted by Thomas Mason on 03 November 2012 - 07:03 PM in Project Showcase

Hi Everyone,

This is my first Netduino project. I built a popup skeleton and was controlling it with some old X10 stuff. You can see this phase in action in this video. But I wanted to add LED eyes and maybe some sound. So I ordered the Netduino+ a few weeks ago.

So far I have the following features working:

1. The Netduino is setup to act as a web server. Nothing special, the single page it serves has one button that, when clicked, runs the popup cycle. I'm going to use my Andriod tablet on Halloween to scare people when they walk up.
2. The popup cycle follows these steps
A. Signal the external relay board using digital I/O #2 for 2 seconds. The external relay board sends 24vac to the automatic sprinkler valve. The sprinkler value allows air to flow from a compressor into a modified screen-door closer.
B. Flash the LED eyes using digital I/O #0 and #1 for 8 seconds.
C. I plan on adding lights that will shine on the skeleton and some sort of audio laugh-track.
3. Every minute, when the popup cycle isn't running, the LED eyes flash in a few different patterns.

In this video you can see the flashing eyes.

Attachments:
- a picture of my Netduino Plus, Breadboard, and external relay board
- this is a picture of one of the eye LED boards I made. It consists of a few resistors, a transistor, and a red LED.
- This is my .NET application

If anyone has questions feel free to ask. Also, if anyone has any suggestions/feedback let me know. Thanks!


Hey Bill I realize this an old post but can you share how you hooked up the relay board to your netduino. I am planning on using the same board in a project (but the 16 channel one). Are you just plugging the pins into the digital outputs of the netduiono ?



#38432 Serial port / Project Help

Posted by Thomas Mason on 03 November 2012 - 01:46 PM in Netduino 2 (and Netduino 1)

Thomas,

Welcome OnBoard :D

What about using Ethernet? Ethernet is a common in many environments and from my experience, very stable in Netduino Plus. I have some code ready and tested if you need it.

Regards,

Carlos A. Estrada


Thanks for the reply Carlos! However as I said I do not have a plus I just have gen one Netduino, so ethernet is not an option for me.



#38400 Serial port / Project Help

Posted by Thomas Mason on 03 November 2012 - 02:09 AM in Netduino 2 (and Netduino 1)

Hello All,
I have a group at my work and we are working on a lighting display for our office. we are looking at different ways to control up to 32 channels of 120v lights, that will be synced with some music. For this project I am looking to use a laptop to control the lights via some controller. I have looked at just using usb relay boards, but since I already have a Netduino I want to use it and a relay sheild such as this one because it would be cheaper (plus Netduino is much funner right). My question is basically that I am looking for advice as to what would be the best way to communicate with the Netduino in order to send commands. I need to control 32 channels so I will be using some shift registers to accomplish this but how could I send command to the Netduino. Can I do it via USB or does some one have a better way (this is a standard Netduino not the plus).

If any one has some advice on this ... or any other part of the project I would appreciate it.

To be more specific i have read post such as these speaking of serial ports on the device. The question I have is how do I attach to these IE: can i just use a serial cable or is there something special I should know. I am pretty sure I can handle the .net side I am just worried about the physical hookup.



#23039 74HC595 Shift register question

Posted by Thomas Mason on 20 January 2012 - 03:20 AM in Netduino 2 (and Netduino 1)

I would add that you should look up the data sheet for your IC. It will tell you the exact pinout, operating parameters, etc. It's typically a PDF that is available through the manufacturer. I order almost all my parts from mouser; they provide the datasheet link on the product details page.

Pete



Thanks I will look into that



#22837 74HC595 Shift register question

Posted by Thomas Mason on 16 January 2012 - 06:30 PM in Netduino 2 (and Netduino 1)

Mario, Thank you that is exactly what I needed. I figured the notch had some significance but I didnt want to break anything. Thank you very much.



#22818 74HC595 Shift register question

Posted by Thomas Mason on 16 January 2012 - 04:10 AM in Netduino 2 (and Netduino 1)

I am trying to wire a 74HC595 shift register to my netduino. I have seen that there are numerous post on this forum discussing the software side (and even showing wiring diagrams), but i was windering if I could get some basic help for a total novice. C# I know ICs i do not. 1. this may be totaly basic but how do I know which is pin one ? 2.once I know that would it be possible for some one to show me a simple diagram of how to hook up a single 74HC595 to my netduino. I would like to get one working before I move on to cascading them. All I want to do for know is control 8 led and for now just be able to turn them on seperatly on demand. Any help would be greatly appreciated.




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.