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.

firestar's Content

There have been 15 items by firestar (Search limited from 30-March 23)


By content type

See this member's

Sort by                Order  

#42918 Smart Meter PCB

Posted by firestar on 07 January 2013 - 05:48 PM in Project Showcase

Hi Paul,

 

Thanks for your comments. The double PCB is standard in Fritzing (in what I started out with) so I went with that for now. However since Fritzing is giving me some small issues i'm thinking about switching to the free version of Eagle and use something like Seeedstudio for the PCBs (as it will give me a few PCBs for the same price, so if I mess up one with soldering).

 

I checked the IC datasheet to make sure but they dont put the requirements out there, it is a simple eeprom. However I'm thinking if I shouldnt add a 10 and 100 nF cap to the incoming power supply to the board just to make it nice

 

I'm still thinking if I should make a shield (clip on) or just a seperate PCB with a few wire jumpers. That will allow me to mount the RJ connector nicely in a case.

 

Thanks.

Martin




#42654 Smart Meter PCB

Posted by firestar on 03 January 2013 - 06:36 PM in Project Showcase

Hi All,

 

I made my first design for a PCB using Fritzing. It will be used to read out the P1 port of my meter. I have this currently built up on my breadboard and seems to work nicely.

 

It has an EEProm for storage of settings (NTP Server, IP settings, Serial settingsetc..)

FET for signal inversion

Two LEDs for Web activity and P1 Activity

A switch to broadcast UDP messages to my AddressServer (based on BOOTP) to externally set IP parameters.

 

As I'm not an electronic designer, I'd like to get some feedback on the design. I tried to segregate the +5VDC as much to the bottom plane and the grounds to the top plane.

 

I'll make a shield out of it, but I have reduced the print to what I need in space (and drop price), that's why top left pins will not be used.

 

Thanks in advance.

 

 

P1 Final_pcb.jpg




#42450 [solved] SerialPort problems

Posted by firestar on 30 December 2012 - 05:46 PM in General Discussion

okay it is working now.resoldered my wires. maybe i had a bad connection or so somewhere.i have removed the flush as well as this only seems to deal with sending data.



#42424 [solved] SerialPort problems

Posted by firestar on 30 December 2012 - 09:44 AM in General Discussion

Hi,

 

I just modified my code to read per byte. Makes it easier to find starting and ending characters in the telegram as well.

 

The reason for the inverter is that the spec of the meter mentions SPACE > 4V and MARK = 0V. Because they use an opto on their side.

 

I will test some later today and see if that fixes anything.

 

 




#42406 [solved] SerialPort problems

Posted by firestar on 29 December 2012 - 07:46 PM in General Discussion

Hi,   I'm trying to read my smart meter, which should send a message every 10 seconds as a TTL signal. The signal is inverted, so i'm using a FET to invert the signal again.   However when im reading in the software, i read zeros all the time, i cant get a single character in my buffer, also the event is pretty much fired continuously, I'm using the following code:  

        void comPort_DataReceived(object sender, SerialDataReceivedEventArgs e)        {            if (e.EventType == SerialData.Chars)            {                int bytesToRead = comPort.BytesToRead;                // if we received any bytes in the serial buffer                if (bytesToRead > 0)                {                    byte[] buffer = new byte[bytesToRead];                    comPort.Read(buffer, 0, bytesToRead);                    comPort.Flush();

right now im just trying to read the non inverted signal to see if it works before I hook up the FET.   Did I miss anything in the code?   Best Regards, Martin




#42253 Dutch Smart meter and S0 meter logging

Posted by firestar on 27 December 2012 - 10:18 AM in Project Showcase

Very nice!

I'm doing something similar (in C# though). I'm using a FET as inverter for the RX signal. Hopefully I can test my setup in the coming days to see if it all works, I have completed most code so its a matter of debugging :-)

 

Now I just need to find a suitable home automation system to log the data too :-) Too bad there arent any big open source projects on .NET going on for this :-(




#42029 PID controller

Posted by firestar on 22 December 2012 - 10:47 AM in Netduino Plus 2 (and Netduino Plus 1)

have a look at: http://www.codeproje...PID-Controllers



#41626 Multithreading

Posted by firestar on 16 December 2012 - 03:35 PM in Netduino Plus 2 (and Netduino Plus 1)

thank you Nicky for that hint, and i wondered why my sd card is so slow.
with threads it took me 2.5!! seconds to read 128 bytes. without just 0.6 seconds (all same code, iam just calling all threads now from main loop)
when leaving all other threads but the sd card read in main loop, i got 1.5 secs

on an empty project its 0.4secs, so not much difference


Are you sure its just the threading? I'm running 4 - 5 threads at the same time, UDP listener, webserver, serial server, main thread and sometimes a background worker to store data, I notice no (big) performance disadvantages on a standard ND+.
You know you can set priorities on your thread? I assume you have something going on in your main thread (the starting one) that keeps the other from executing.



#41624 bootp client

Posted by firestar on 16 December 2012 - 02:34 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi All, I wrote a little BootP client to manually set its ipaddress once someone makes the wrong setting in my eeprom. This to prevent a full reset, since the bootp supports broadcasting. Now i'm at the point where i send the packet to the network, which is received by my bootp server application, however when i send the reply (port 68), it is never received by the netduino. I assume because this port is already in use by the network driver (DHCP?). Is there a way to free up that port or can i tie in to the incoming data somehow? Since there are a ton of bootp applications on the market, I don't want to go down the road and write my own implementation. BR, Martin



#41530 Test I2C Communication

Posted by firestar on 14 December 2012 - 06:55 AM in General Discussion

I did some testing last night and so far it seems to all work with the 2 transactions for random reading. I dont have a logic analyzer to see what is going over the bus, so I cant really check. I also did not dive into the source of .NET MF to find out how its exactly working under the hood. I suppose since it works its ok. I have your extension methods put in and commented them out, so if i ever run into problems I can just switch to them.



#41469 Test I2C Communication

Posted by firestar on 13 December 2012 - 12:14 PM in General Discussion

Hi C2W,

I based on the following text:

This is done by sending the word address to the
24XX64 as part of a write operation (R/W bit set to 0).
After the word address is sent, the master generates a
START condition following the acknowledge. This terminates
the write operation, but not before the internal
address pointer is set. Then the master issues the
control byte again but with the R/W bit set to a one.


The problem im having is im not quite sure how .NET under the hood uses this R/W bit, as its part of the Address and from the managed side i can only influence the first 7 bits I believe. So I believe the R/W bit is part of the transaction and set internally by .NET, I have little I2C experience with other devices so im not sure if all devices use this 8th bit for R/W.

I am doing paged writes in my code as the datasheet warned me for that, but for sequential reads im doing full number of bytes assuming the eeprom will increment the address counter, I have not tested this yet.

BR,
Martin



#41464 Test I2C Communication

Posted by firestar on 13 December 2012 - 09:03 AM in General Discussion

Hi C2W, Thanks that explains. However I'm confused, right now I was doing simple reads on addresses and that seems to work with the current methods. I'm doing a write transaction for the address first, then read. With the next function I will write the address again and then read the data. If i'm doing sequential reads with my current methods, can I use your extension methods without any problems? BR, Martin



#41458 Test I2C Communication

Posted by firestar on 13 December 2012 - 07:06 AM in General Discussion

Hi C2W, Thanks for your reply, partly im confused though and I will try again later today. But if I remember correctly when I used an address yesterday that did not exist .Execute() returned 1 to me. I'd have to test if I write a single byte if that would return 2 to me or just 1. Then I can at least check on 1. I guess i'll go with using some of the space for a dummy string now that I will write, then read to see if it exists and test for function. I did not think about using CRCs for the data actually. Would you implement that for any data written to the EEprom? How would you normally store your data? I was thinking of creating an object and mapping this to addresses on the EEprom side. Or I just may serialize the whole object, do a CRC on that and then do page writes. Where did you see your device needs the repeated start bit? I just looked at mine (24LC64) and I could not find it. Also the current methods I'm using (default .NET ones) seem to work? Thanks. Martin



#41447 Test I2C Communication

Posted by firestar on 12 December 2012 - 09:34 PM in General Discussion

Martin,

Welcome to the community.

Do you have any pull-up resistors connected to the I2C lines?

Regards,
Mark



Hi Mark,

Yes, I have 4k7 going to +5V. Everything is working fine at this point, I can write/read from any of the registers. My problem is im training to simulate fail criteria for instance if the EEprom wouldnt work, or wasnt installed at all. When I write to a wrong address, I2CDevice.Execute will still return a byte count to me. There's no acknowledge signal that I can find to check?

Right now to test the eeprom, I write a dummy value (random) to an address, and read it couple ms later and compare them. But I just wanted to check to see if this is the way to go or that there are diagnostics somewhere that I have missed.

BR,
Martin



#41432 Test I2C Communication

Posted by firestar on 12 December 2012 - 02:15 PM in General Discussion

Hi all, I have managed that get my EEprom working on I2C, however at this point im trying to find the best way for diagnostics on it. Writing or reading to the eeprom will always execute but one can not predict the results. Als the I2CDevice.Execute will not give any diagnostics. Even writing to the eeprom that does not exist will give a number of bytes written result. I have been thinking of allocating some registers to a default value that you should always read first to make sure the eeprom is there and working. Have others played with this idea before and how did you solve it? BR, Martin




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.