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.

Gutworks

Member Since 21 Jan 2011
Offline Last Active May 14 2017 10:50 PM
*****

#32916 Komodex's Seven Segment Display Module running on a Netduino Plus!!

Posted by Gutworks on 30 July 2012 - 09:16 PM

I just received my shiny new Seven Segment Display module for the Netduino Go. The module's hardware and easy to use drivers were created by our community member extraordinaire, Matt Isenhower, who is the Chief Hacker and Owner of Komodex Systems. I must say I was very excited to get my hands on this module and eagerly checked my mailbox every day, impatiently awaiting its arrival. Not only is this module well thought out and packed full of great features, but I felt somewhat like a proud Uncle witnessing the module's birth. Sounds corny, I know, but it's true! That's the beauty of this tight-knit community of Netduino enthusiasts; through the forums and the Netduino Chat room, I was able to see Matt's idea start from conception and come to fruition, and all the steps in between, as he regularly shared with us. Not only were we able to witness the creation of this amazing module, but we also were able to see firsthand the laborious processes involved in hardware pre-production and fabrication. From Matt's experience, and a few other brave builders like Arron Chapman and ItsDan with their ProtoModule, we were able to see from start to finish what it takes to make a module. So, yes, I do feel like a proud Uncle when I see these modules come to market. And I thank these pioneering module builders for sharing those experiences and including the rest of us in their journeys. Now on to my project!

After running the provided demos that Matt created for his display over and over again, with rave reviews from my wife and kids I might add, I started to think of some projects that I could use this module for. My mind immediately jumped over to the fantastic article that Fabien Royer, another superstar module builder from [nwazet, recently published on Channel 9 on using Arduino shields with the Netduino / Plus. This article really opened my mind and taught me a lot about driver development and provided me with the necessary tools and knowledge for my project. Not only have I been able to recreate Fabien's project and use the [nwazet Touch Display module on my Netduino Plus, but it has provided me the ability modify the Open-source Komodex drivers and use the Seven Segment Display on my Netduino Plus!

For someone like me, who is relatively new to the wonderful world of Netduino, I don’t have a lot of shields or fun parts to play with. Nor do I have a money tree, so the ability to use Netduino Go modules and shields across multiple platforms is a huge benefit. Fabien’s article shows the versatility of the Netduino platform, and I highly recommend that you read it and create your own custom Netduino go!bus shield. For instructions on how to do so, please see this forum post: "What Is an Arduino Shield and Why Should My Netduino Care?"

If you are one of the few that do not have the Netduino Go yet, but you want to use the highly recommended Seven Segment Display, then you can try out the wiring diagram I have included below and use this unofficial and experimental Netduino Plus Seven Segment Display driver. Do keep in mind this is not the official driver and it may not always be up-to-date with the latest changes from Komodex. Perhaps if there is enough interest we could ask Komodex make an official driver. Posted Image
Note: You will need to compile the new driver and include it into your own display project.

Attached File  Komodex.NETMF.SevenSegmentDisplayNPlus.zip   111.84KB   13 downloads

Here is the sample project I used to test the driver.
Attached File  NetduinoPlus_Komodex7SegDisplayDemo.zip   78.03KB   15 downloads

Attached File  gobus_shield.png   63.8KB   122 downloads
Attached File  Komodex_Seven_Segment_Display_Netduino_Plus.jpg   129.18KB   133 downloads

Cheers,
Uncle Steve




#31204 Netduino Go! Shield Base Pinout

Posted by Gutworks on 25 June 2012 - 07:43 PM

If you're at all like me, I need a constant reminder for the pin outs of the Netduino. If you are looking for the pinouts for the Netduino Go! Shield Base here you go:

Attached File  NetduinoGo-Shield-Base-Pinout-v2.1.jpg   111.52KB   172 downloads

This pin layout is current as of the latest Firmware Version: 4.2.2.0 Beta 5, however some things may change in the final Shield Base release. In the meantime if you notice any errors or omissions please let me know I will update and post a revision.

While in Beta release some features like I2C are still disabled. To reflect this the diagram has these items highlighted. Please refer to this post to see a list of currently available features: Shield Base Firmware (beta 5)

The image is intentionally large, however it makes it difficult to move around using the forum's lightbox. To open the pinout zoomed out, click here: Shield Base Pinout

Cheers,
Steve




#31008 Continuous Rotation Servo on the Shield Base controlled with Potentiometer

Posted by Gutworks on 21 June 2012 - 11:57 AM

Hey Chuck,

Woot, you just posted the 30,000th post!

We should celebrate. If you PM me your address, we'll send you one of the new Piezo Buzzer modules :)

Congrats Chuck! You certainly know how to create a buzz.

And thank you for the compliments. I wish I could attach a free servo for you, but unfortunately there is a limit on the attachment size. ;)

I will also be posting a pinout card later today for the shield base and I can really use your help to make sure I have them all properly assigned.

Cheers,
Steve


#30983 Continuous Rotation Servo on the Shield Base controlled with Potentiometer

Posted by Gutworks on 21 June 2012 - 04:07 AM

Thanks to the latest PWM Shield Base update I now have a basic continuous rotation servo example to share.

For this example I am using a Parallax Continuous Rotation Servo and a Potentiometer module to control the speed and direction of the servo. To connect it to the Shield Base, attach the red wire to the 5V header, and the black wire to the GND on the Shield Base. The signal wire, in this case yellow, will connect to digital pin D5. Connect the Shield Base to the socket 4 of the Netduino Go! and the Potentiometer module to socket 6. Please note that while the Shield Base is still in beta, it will use an entire channel of sockets. Therefore if it's plugged into socket 4, you can only plug other modules into sockets 5-8.

After creating a new Netduino Go Application you will need to add references to the Potentiometer, Shield Base, and Microsoft.SPOT.Hardware.PWM. Since the Shield Base is still in beta, you will need browse to the location of the beta assembly files (download here), or if you have already used the Shield Base you can find it in the 'Recent' tab of the 'Add References' dialog screen. The Potentiometer and Microsoft.SPOT.Hardware.PWM (ver. 4.2.0.1) assemblies can be found in the '.Net' tab. Once you have added these as references we will add the following to the top of our project's template:
 

using NetduinoGo;

Our next step is to add to the Main method of our project the following code:

ShieldBase shieldbase = new ShieldBase(GoSockets.Socket4);Potentiometer pot = new Potentiometer(GoSockets.Socket6);

This will create two new objects for both the Shield Base and Potentiometer and tell the application to which sockets the modules will be connected.

Next we will create a new PWM object called servo. The new 4.2 .NetMF PWM class has two constructors; one that is mainly use for actuators such as a Piezo or LED, and the other used for the control of things like a servo. In our example we will initialize a new instance of the PWM class with the PWMChannel that the signal line is connected to, the period, duration, a scale factor, and a value that indicates whether the output is inverted, in our case it is false.

PWM servo = new PWM(shieldbase.PWMChannels.PWM_0, 20000, 1500, PWM.ScaleFactor.Microseconds, false);

Our first argument being passed is the PWMChannel.PWM_0 which is found on D3. The next two arguments set the Period and Duration properties of the servo object in microseconds, because we are using the Microseconds as a scale factor.

In the case of the Parallax servo, it requires a 1.5 ms pulse (1.5 ms is 1500 [color=rgb(68,68,68);font-family:arial, sans-serif;font-size:small;]?[/color]s), continually refreshed every 20 ms to centre it as shown in the following diagram.
Attached File  Servo-centre.gif   5.9KB   86 downloads

The servo will begin to turn clockwise with pulses of any value below 1.5 ms and will gradually increase speed until reaching 1.3 ms, while pausing in between pulses for 20 ms for the smoothest movement.
Attached File  Servo-clockwise.gif   9.67KB   87 downloads

In order to turn the servo counter-clockwise, we will pulse the servo any value above 1.5 ms, and up to the maximum speed at pulses of 1.7 ms.
Attached File  Servo-counterclockwise.gif   9.14KB   57 downloads

WARNING: Not all servos will work under the same conditions, however most do. You should find the appropriate pulse widths for your specific servo to prevent any potential damage.

So how does all this translate into code? Well let's jump into it and see. Our next step will be to add two values that will represent the maximum clockwise speed, and the maximum counter-clockwise speed. Then we'll start the PWM port for an indefinite amount of time with the Start method.

int maxClockwise = 1300;        // Full speed clockwise direction int maxCounterClockwise = 1700; // Full speed counter-clockwise directionservo.Start();   // Start the PWM port.

At this point if we ran our application the servo should stay in its centre position. If you notice that it doesn't you may need to calibrate the servo. To do this gently twist the potentiometer adjustment screw, found just above the wires, with a small Phillips screwdriver until the servo does not turn or vibrate.

The next portion of our code will be to control the servo with the input we receive from the Potentiometer module. The GetValue method of the Potentiometer class will return a float anywhere from 0.0 to 1.0. For our purposes we will want to convert that value to something in the range of 1300 and 1700. To do so we will use a Mapping method that re-maps a number from one range to another.

public static float Map(float input, float inMin, float inMax, float outMin, float outMax){   return ((input - inMin) * (outMax - outMin) / (inMax - inMin) + outMin);}

In our example the input will be the value we receive from GetValue(). The inMin and inMax values are the range of values we would get from the potentiometer, 0 and 1 respectively. The outMin, and outMax are the values that we want to see in our new range, so we will use 1300 and 1700. To see how we implement this in our code, let's setup up an infinite loop to repeatedly poll the potentiometer and set the servo speed and direction accordingly. We will also pause for 20ms before we change the duration of the pulse to the servo.

while (true){    float ptValue = Map(pot.GetValue(), 0, 1, maxClockwise, maxCounterClockwise);    servo.Duration = (uint)ptValue;  // A value from 1300-1700    Thread.Sleep(20);  // Sleep for 20 ms}

Now deploy the application and you should see your servo rotate in cordination with the twisting of your Potentiometer module. If you want to see the actual pulse value that your servo is receiving, you can add the following just before you set the Duration property of your servo.

Debug.Print("Pulse width: " + ptValue);

Enjoy, and have fun!
Steve

Attached Files




#30849 Seven Segment Display Module

Posted by Gutworks on 18 June 2012 - 10:30 PM

Also, I'm now accepting pre-orders for this module on my website: http://komodex.com/l...segment-display


I just bought mine!


#30031 50% off Getting Started with Netduino eBook

Posted by Gutworks on 31 May 2012 - 05:33 AM

I was checking out my Twitter feed and noticed O'Reilly is having a Father's Day sale from now until June 17, 2012 at 11:59pm PT. You can save 50% off ebooks and 40% off print editions by using the code GEEKDAD. This offer is not only for the Getting Started With Netduino by Chris Walker, but all other books, such as Cuno Pfister's Getting Started with the Internet of Things, and many more.

Father's Day O'Reilly Promo - use code GEEKDAD

Happy reading!
Steve


#29945 3D Gerber Viewer

Posted by Gutworks on 29 May 2012 - 07:16 PM

I stumbled upon a great tool this morning that lets you view your Gerber files in 3D. It's from an electronic tools maker, Mayhew Labs. Here's what they have to say about their tool:

Whether you're a first-time circuit board designer or you've been doing it for years, you know how difficult it can be to visualize layout, spacing, and relative size in PCB layout software. You might have also experienced that uneasy "I hope everything is right" feeling when you submit your design files for manufacturing. You're not alone! I've ordered boards with silkscreen text way too small to read, components on the wrong side of the board, and even had my silkscreen and soldermask layers reversed by mistake! Each of these times, the real problem was not having a good view of the design.


Give it a shot here, and have fun!
3D Gerber Viewer

Cheers,
Steve


#29368 High-speed throughput for Netduino Go modules

Posted by Gutworks on 18 May 2012 - 02:19 PM

Just received some STMicroelectronics news


If you can also get a free Discovery Kit directly from the STMicroelectronics website. Unfortunately it only seems to be available to anyone in North America. Sorry UK! Discovery kit for STM32 F0 series - with STM32F051 MCU

There should be a "Register for your FREE KIT" button in the Key Features area.




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.