picdimmer Forum Index picdimmer
Renard - a PIC-Based Light Dimmer
 
  FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups    fchat fChat  RegisterRegister  
  ProfileProfile    Log in to check your private messages Log in to check your private messages    Log in Log in 

8-Channel Demo/Starter Board
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    picdimmer Forum Index -> PCB Topics
View previous topic :: View next topic  
Author Message
P. Short



Joined: 12 Jun 2006
Posts: 594

PostPosted: Thu Feb 22, 2007 1:35 am    Post subject: Reply with quote

Dave,

The addressing is on a per-packet basis. The first byte of each packet is the start code (0x7E), and the next byte is an address byte. If this address byte is > 0x80, each PIC will decrement the address byte and pass the entire packet (with the decremented address byte) on to the next PIC. This process is repeated by each PIC in turn, until the address byte has decremented down to 0x80. The first PIC that sees the 0x80 uses the first eight bytes as it's dimmer values, and sends everything else on to the next PIC.

So, if one of the PICs in the daisy chain is to keep all of its data the same (say, PIC #5), the PC can send out one packet with data for just the first 4 PICs, then another packet with data for the remaining PICs (except for PIC 5). This would reduce the total number of bytes on the serial line by six (the eight bytes for PIC 5, less the two-byte overhead of the next packet). Similarly, if only the first channel of PIC 5 needs new data, the PC can send only this one byte, and then start a new packet with data for PICs 6-n.

--

Phil
Back to top
View user's profile Send private message
xmus



Joined: 17 Jan 2007
Posts: 313
Location: Boise, ID

PostPosted: Thu Feb 22, 2007 1:46 am    Post subject: Reply with quote

P. Short wrote:
Dave,

The addressing is on a per-packet basis. The first byte of each packet is the start code (0x7E), and the next byte is an address byte. If this address byte is > 0x80, each PIC will decrement the address byte and pass the entire packet (with the decremented address byte) on to the next PIC. This process is repeated by each PIC in turn, until the address byte has decremented down to 0x80. The first PIC that sees the 0x80 uses the first eight bytes as it's dimmer values, and sends everything else on to the next PIC.

So, if one of the PICs in the daisy chain is to keep all of its data the same (say, PIC #5), the PC can send out one packet with data for just the first 4 PICs, then another packet with data for the remaining PICs (except for PIC 5). This would reduce the total number of bytes on the serial line by six (the eight bytes for PIC 5, less the two-byte overhead of the next packet). Similarly, if only the first channel of PIC 5 needs new data, the PC can send only this one byte, and then start a new packet with data for PICs 6-n.

--

Phil


Perfectly clear now. Thank you.

I assume there are folks that own the Renard plugin, and maintain and develop it already. If not, let me know, I'm happy to contribute.

I have Visual Studio .NET 2003, and I may be able to access other software tools if necessary.

Even if we went that route, it still doesn't guarantee good performance in the worst case. Why not strip out the address packets and increase worst case performance?

Thanks,
Dave
Back to top
View user's profile Send private message Visit poster's website
Lbro



Joined: 24 Dec 2006
Posts: 26

PostPosted: Thu Feb 22, 2007 2:08 am    Post subject: Reply with quote

Phil-
I sent a PM to KC about this thread. here is his reply (with his approval)

"Can I technically do it? Sure. But when...? Depends on the priority of it. If this is something that can wait until 2.0 is able to be played with, then no problem. But if it's something that's needed sooner, Phil could contact me about that."

Lou
Back to top
View user's profile Send private message
P. Short



Joined: 12 Jun 2006
Posts: 594

PostPosted: Thu Feb 22, 2007 10:59 am    Post subject: Reply with quote

Lou,

That is more or less what I expected. There may be some experimenting and fooling around needed to fine-tune it, and KC has his plate full, so I am looking for a way to do it without involving him until very late in the process.

The first thought for that other method is the Perl script Dave has written. That, however, is going to be way too slow (IMHO) opinion, so I'm working on a C-lex-yacc (C-flex-bison, actually) version so that I have something that I can experiment with. It should take a day or two to get things running.

But that may change after I read the two pms waiting for me.

--

Phil
Back to top
View user's profile Send private message
Lbro



Joined: 24 Dec 2006
Posts: 26

PostPosted: Thu Feb 22, 2007 11:11 am    Post subject: Reply with quote

Phil-

I wish I could be more helpful, but I am not even a full year into this yet.

Lou
Back to top
View user's profile Send private message
P. Short



Joined: 12 Jun 2006
Posts: 594

PostPosted: Thu Feb 22, 2007 11:19 am    Post subject: Reply with quote

Dave,

The address byte (is this what you are talking about) is only one byte out of many, provides some possibility of future enhancements, so I don't think that removing it is worthwhile right now. For a 128-channel system it is only one byte out of 128, less than 1% of the entire packet.

As for the .NET stuff, I haven't been willing so far to spend the time to come up to speed on that. Part of that is because the only Windows systems here are for my wife and my kindergarden son, and neither system is one that I can work on for longer periods of time.

BTW, do you have a Linux or *BSD system at home, or just Windows?

--

Phil
Back to top
View user's profile Send private message
P. Short



Joined: 12 Jun 2006
Posts: 594

PostPosted: Sun Feb 25, 2007 11:31 pm    Post subject: Reply with quote



Here is the version that I will go out to fab with (unless someone comes up with something overnight). It differs from the previous version in the addition of a revision letter on the bottom of the board (in etch), the addition of a testpoint ground in the upper right of the board, and fixing some garbage around the regulator on the right side of the board.

--

Phil
Back to top
View user's profile Send private message
P. Short



Joined: 12 Jun 2006
Posts: 594

PostPosted: Mon Feb 26, 2007 1:36 am    Post subject: Reply with quote

Any opinion on whether the ground plane should be on the solder or the component side of the board? Currently it's the solder side, but it would be easier to solder and re-work if it was the other way around. Of course the etched text would need to be moved.

--

Phil
Back to top
View user's profile Send private message
Mrplow123



Joined: 26 Dec 2006
Posts: 46
Location: Hayward California

PostPosted: Mon Feb 26, 2007 1:46 am    Post subject: Reply with quote

If you are open to it, I would prefere to see it on the component side. I was going to suggest that, it makes soldering a bit less difficult for beginers, and the less practiced.
Back to top
View user's profile Send private message AIM Address
JaysonHansen



Joined: 11 Feb 2007
Posts: 25

PostPosted: Mon Feb 26, 2007 1:49 am    Post subject: Reply with quote

P. Short wrote:


Here is the version that I will go out to fab with (unless someone comes up with something overnight). It differs from the previous version in the addition of a revision letter on the bottom of the board (in etch), the addition of a testpoint ground in the upper right of the board, and fixing some garbage around the regulator on the right side of the board.

--

Phil


An oscillator being used, though having its own shielding. Circuit side or no ground plane at all, since wouldn't this introduce capacitance?

Keep in mind now, I'm not used to contained oscillators, rather crystals with oscillator (usually colpitts) circuitry.
Back to top
View user's profile Send private message
P. Short



Joined: 12 Jun 2006
Posts: 594

PostPosted: Mon Feb 26, 2007 10:54 am    Post subject: Reply with quote

Jayson,

Why would capacitance to the case be a problem, isn't that why it's shielded in the first place? As I recall, the case is often connected to the ground pin anyway. But I'll take a look before making any change.

--

Phil
Back to top
View user's profile Send private message
P. Short



Joined: 12 Jun 2006
Posts: 594

PostPosted: Mon Feb 26, 2007 1:20 pm    Post subject: Reply with quote



Here is what it looks like after exchanging the layers. What a pain! I'm going to sit on it another day before sending it out, just to get more feedback.

The oscillators that I have on hand have little plastic bumps on the bottom to elevate them from the board. And I've never had any problems in the past with capacitance affecting the oscillators through the case, so I think that this will be all right.

--

Phil

Edit 2/28/07 - this is obsolete. The current info is over in the topic '8-Channel PCB Allocations' over in the coop board section.

--

Phil


Last edited by P. Short on Wed Feb 28, 2007 2:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
Mrplow123



Joined: 26 Dec 2006
Posts: 46
Location: Hayward California

PostPosted: Mon Feb 26, 2007 3:06 pm    Post subject: Reply with quote

Well after looking it over, I don't see any issues. I bet that was a pain to change. Quick question about this board. I know I missed something some where, so please forgive me. This board uses a half-wave rectified input signal that carries power and the zero cross on the same wire correct? So power and zero cross are brought in on the same 2 input pins. I believe it uses an external transformer, correct? I know you probably covered this soemwhere, but I can't seem to find it. Can you point me in the right dirrection?

Thanks.
Back to top
View user's profile Send private message AIM Address
P. Short



Joined: 12 Jun 2006
Posts: 594

PostPosted: Mon Feb 26, 2007 3:41 pm    Post subject: Reply with quote

There were some quirks with the 'move to another layer' command that made it difficult.

You are right about the external transformer and diodes. It hasn't been discussed at length, just little snippets and comments here and there.

What I am using here is a surplus 12.6VAC center-tapped transformer that I bought from a local surplus store (it's closing down, so I need to get more). The center-tap was connected to ground (pins 1 and 2 of the RJ45), and two diodes (1N4001 or similar) were used to connect each of the other legs of the transformer to the power input pins (pins 7 and 8 of the RJ45).

The biggest concern that I have with this type of design is that there are then two diode drops before the LM78L05 regulator, which may bring the input voltage too low. What I usually use are LP2950 regulators, which are LDO regulators that are pin-compatible with the 78L05. The one time that I used a scope to look at the input to the regulators with this ccircuit, it was at about 8.5 or 9V or so, plenty high even for LM78L05 chips. Although it would be a bit lower with hundreds of feet of cable in between the source and the controller.

A few URLs:

http://picdimmer.17.forumer.com/viewtopic.php?t=11&sid=50cf6e3e2ba2dfc9fd5f0874425f97ec
http://picdimmer.17.forumer.com/viewtopic.php?t=57&sid=50cf6e3e2ba2dfc9fd5f0874425f97ec
http://picdimmer.17.forumer.com/viewtopic.php?t=41&postdays=0&postorder=asc&start=75&sid=50cf6e3e2ba2dfc9fd5f0874425f97ec

--

Phil
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    picdimmer Forum Index -> PCB Topics All times are GMT - 4 Hours
Goto page Previous  1, 2

Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum