AxelG - Viewing Profile: Likes - Netduino Forums
   
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.

AxelG

Member Since 27 Apr 2012
Offline Last Active Apr 06 2013 02:57 AM
-----

#47373 Building my own custom Netduino Plus 2 hardware

Posted by AxelG on 19 March 2013 - 07:07 AM

lol, doing the same with my 2012 Hemi Charger....




#46332 Is there a Watchdog breakout out there?

Posted by AxelG on 27 February 2013 - 01:13 PM

Yes, but the timer thread can be set up to check for certain conditions being managed by your other thread(s).  Take for example the checking of the LastPing value that the watchdog performs in my basic example.  If that value is not updated regularly by some other process, the watchdog class assumes something is wrong and reboots.  You can get way more creative with inter-thread communications to make sure all the other threads are doing what they are supposed to; and when they are not; force a reboot.

 

There is nothing that says only the timer can update the watchdog either.  You can also just have your main thread (or any thread for that matter) call the StartWatchdog method on a regular basis instead of a timer.  Just make sure you implement proper locking mechanism to ensure thread-safe operations.

 

I have used this in a situation where I need to keep a persistent connection open on the network.  If some condition prevents me from reconnecting, I can change the networking parameters and force a reboot to reconnect to try and resolve.  It is nice to have the ability to reboot your ND on demand!




#46288 Is there a Watchdog breakout out there?

Posted by AxelG on 27 February 2013 - 02:51 AM

Well, I had some time tonight and soldered and tested the MAX6373 board I made based on this chip:

 

After wiring up the board, I realized I forgot the pullup resistor on the /RESET line, so I created a version 1.1 board that includes one on the board without having to wire one on the breadboard.  (Eagle files available)

 

Attached is the version 1.1 schematic, R4 is new.

 

I have a few spare version 1.0 boards if anybody is interested.  I can also solder a MAX 6373 if you want.  PM me.

 

 

Attached File  WatchDogSch.JPG   68.71KB   98 downloads

 

Attached File  MAX6373WatchDog.zip   1.34KB   47 downloads

 

Attached File  2013-02-26_22-08-57_159.jpg   63.68KB   81 downloads




#46266 Is there a Watchdog breakout out there?

Posted by AxelG on 26 February 2013 - 06:39 PM

I have developed a prototype based on the MAX6373 chip.  I wrote a simple software driver (using timers in c#) that uses one GPIO to reset the hardware watchdog periodically.  If it misses a reset, the watchdog will perform a hardware reset on the ND/ND+ (or any other MCU)

 

The board was designed to have the watchdog timeout be selected by jumpers and expose all eight pins on the MAX to your breadboard.  All it needs is power, access to RESET, and one GPIO.

 

I will post the eagle layout and drivers once it is fully tested.  The board just came in from BatchPCB and will solder it this week.




#42831 4X20 LCD display with I2C Interface

Posted by AxelG on 05 January 2013 - 10:23 PM

I attached the driver code to the first post.




#42715 4X20 LCD display with I2C Interface

Posted by AxelG on 04 January 2013 - 02:58 PM

My holiday present to myself this year was the following 4X20 LCD: (link)

 

It is based on the HD4478 LCD driver chip, front ended with an I2C interface, popular because it only uses two ports on your MCU.

 

The information provided by the vendor is sparse, and in some cases incorrect.  The address of the device is listed as 0X27 but is actually 0x3F.  I was able to locate the Arduino (C++) driver for the I2C interfaced version, so I translated the Arduino driver into C#.

 

I then integrated Stefan Thoolen’s (http://www.netmftoolbox.com/) MultiI2C class to drive the I2C port.

 

After playing with the timing on the initialization a bit, it seems to be working well.  I added some text management methods to the driver to simplify displaying text on four lines.  The LCD is set up in such a way that it is actually driving two 40 character lines of text, wrapped on the screen.  This made it confusing for me to keep straight, so these new methods made it easier to keep track of the text.

 

Hardware connection is a snap.  Netduino (running 4.2) connected with 5v, ground, A4, and A5 to the LCD module.  This LCD is using an I2C interface, so you need pullups on the A5 and A4 wires.  I used 2.2k (corrected to 1.8k below) resistors on the 3V3 port.  Worked great.

 

One nagging issue is that after running for some time, the screen will start displaying garbled data.  I have not been able to pinpoint the reason; maybe bus speed, bad data wires, poor power?  If I figure that out, I will post an update.***

 

Thanks to everyone on the forum for inspiration and ideas to get this working; especially Stefan for a great toolbox.  Let me know what bugs you find or ideas on improvements.

 

***UPDATE: The garbage issue is resolved: I think.

Problem was that my pullup resistors were too high of a value (changed for 1k8.  I remembered my analog circuit class I took 30 years ago and realized these resistors are part of a RC circuit that affect the signal shape on the wire.  To high = smaller slope.  There was also a small bug in the code that was not sending the initialization bytes correctly (I will upload the working copy.  I also moved some of the text management methods out of this class into a separate display class)

Attached Files




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.