cutlass - 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.

cutlass

Member Since 29 Jan 2013
Offline Last Active Jul 10 2013 07:25 PM
-----

#50380 Dear Trolls/Anti-Agents

Posted by cutlass on 09 June 2013 - 06:31 PM

IMHO, I see the AGENT watch as solidifying the Netduinos! :)

 

If the AGENT watches are super successful (which I hope :)), then the Netduino line would also benefit from any AGENT development.  It's easy to go from an AGENT form factor to a big development board with connectors.

Of course, the Netduino line will have it's own R&D budget and plan.  Chris has shown that he knows business. IMHO, you don't ignore a good/profitable product line.

 

Also, having a good low power Netduino that could run on a button-cell, or a small rechargeable battery and solar cell would be great!  Such as a Netduino based on the AGENT watch.  But, obviously without the AGENT "OS customizations" and without some of the added AGENT required hardware - Qi charging, display, BT, magnetometer, accelerometer, etc.

 

Although I would love to see a 1GHz Netduino, I don't see that in the near future.  The processors in the Netduino product don't have a simple upgrade path to anything that fast made by the manufacture (yet).

 

Also, IMHO, with the AGENT watch, and people able to make money from AGENT apps, that will bring a lot more people to the .NETMF and C# world.  That will bring more code examples.

 

Also, IMHO, there are other reasons why I think the AGENT watches will benefit the Netduinos. 




#50187 Detect power loss on VIN

Posted by cutlass on 01 June 2013 - 10:10 PM

Hmmm.

 

Looking at the data sheet for the SAM7X512, the absolute maximum voltage rating for input pins is -0.3V to +5.5V.

(Section 38.1 Absolute Maximum Ratings).

It does not distinguish between digital and analogue inputs - hence until now, I have assumed that 5V is OK for the analogue inputs.

 

Later in the data sheet at section 38.7 ADC Characteristics, it does say the maximum input to the ADC is VADVREF.

But, since VADVREF could actually be less than 3.3V, I don't think that this is indicating a voltage where damage might occur, I think this is just indicating the expected range to get the full scale reading of 1023.

 

One other thing to throw in, is that these pins are dual purpose: digital or analogue inputs.

e.g. Analogue input 0 is connected to the ARM pin "PB27/AD0".

 

Having said all that, it sounds like you (cutlass) have had some damage using 5V on the analogue inputs.

Is that true?

Was is permanent?

 

Paul

Paul,

Hi!

 

If a pin is in analog-mode, and the input is around 3.6-4+v, it will fry the chip.  My chip now gets very hot after having power for ~5 seconds.  I didn't even get the power supply very high, since the chip stopped sending data back to the PC.  I was seeing how high the voltage had to be before the ADC noise quieted out.  I was being slow and careful not to go over 5V.  I never got near 5V. :-P

 

 

From the thread:

http://forums.netdui...n-on-tolerance/

(I also added that info to my analog example thread)

 

 

Summary:

When a pin is in ADC mode (PC0-PC5 ; pins 8,9,10,11, 24,25), the voltage limits are as follows:

Low: -0.3v

High: +3.6v (3.3v + 0.3v)

 

 

The data sheet is here:

http://www.st.com/st.../DM00037051.pdf

 

The N+2 uses a 64pin STM32F405RG

 

From the data sheet:

 

ADC voltage input specs:

page: 105:

VIL Input low level voltage

Min Vin Low

VIL VSS–0.3v

(VSS is ground.  So, the minimum voltage is -0.3v)

 

Max Vin High
VIH TTa/TC(2) I/O input high level voltage  VDD+0.3

See Note2

2.TTa = 3.3V tolerant I/O directly connected to ADC; TC = standard 3.3V I/O.

 

 

ADC Characteristics:

Table 67

pages: 124,125

 

 

ADC equivalent input schematic:

page: 127

 

Good Luck!




#49729 My daydream - FPGA/ARM platform

Posted by cutlass on 21 May 2013 - 10:21 PM

I have two of the TI smart watches.  I never did anything with them. :)

 

I've done a lot of FPGA and microprocessor stuff, because that's what I do. :)  I'm mainly a hardware engineer, but I also do software.  I even do Android apps.  But, sorry, I don't drink the evil Apple kool-aid at all.

 

I'm similar to the mechanical engineers that design electrical motors, starters, alternators, etc.  For them, the are primarily mechanical, but they also have to be very proficient in electrical.

 

For the past ~10+ years, I've been doing a lot of "Control" stuff.  That type of stuff leads to FPGAs, DAC, ADCs, processors, "firmware", and often some simple GUI to debug/communicate/set-values.  Sometimes it's max performance at all costs, sometimes very low power, sometimes very low cost, sometimes aerospace, etc.

 

Yea, I could make a lot more money going into pure software, especially doing apps.  But, if I can make a decent living doing what I LOVE to do, why would I change? :)

 

I don't know about Sweden, but in the US, I'd say engineers leave at a rate of ~~30% every ~3-5 years.  Many/most leave because they don't like, or they hate, what they do.  I've been fortunate in the way the industry has moved since I graduated.  When I graduated, doing stuff with SSI (smal scal integration) through-hole chips (like registers, flips flops, etc) was the typical way of doing hardware designs.  Now, it's writing Verilog, VHDL, etc for FPGAs, ASICs.  So, I see doing hardware and software as being similar now. :)




#48041 Home Security System - Need help with some considerations

Posted by cutlass on 04 April 2013 - 08:01 PM

You need to look in detail about the many different types of motion sensors.  And, the problems/limitations with motion sensors.

 

As far as I know, all motions sensors just use a digital/relay output.

There are cheap POS motion sensors for ~$25/each, very good motions sensors that go for ~$300+, and everything in between. :)

 

IMHO, I like the Honeywell products more.  And, the multiple exterior motion sensors around my house show that. :)

BTW, any motion sensor and small animals can be an issue. Also, be careful of rapidly "changing heat/infer-red/light".  So, no motions sensors pointed towards a window, be careful of trees and the sunlight getting blocked/un-blocked and coming into the room/window, etc.  Also, heat sources like AC, furnaces, refrigerators, etc might be a problem.

 

http://www.security....roducts/sensor/

http://www.security....r/mo/index.html

http://www.security....ure/sensor.html

 

 

 

 

Since I reside in South Africa

 

South Africa, huh?  Want some snow? ;)  We have plenty during the winter. :)

Posted Image

 

 

 

Good Luck!




#47438 Sensor Lead Length

Posted by cutlass on 21 March 2013 - 05:49 AM

I saw this post yesterday, but the tab somehow got deleted before I got to it.  Yes, it's Firefox's fault. ;)

 

As the token hardware geek, I think that we can come up with semi-reasonable solution.  Well, that's based on knowing the ability of the n+2 and the framework. :)

 

 

I have a number of questions:

1) Any chance you have a scope or data logger with at least a 1MHZ bandwidth?  How about 10x probes that connect with a BNC connector?

 

2) What are the min/max voltages of the sensor?

 

3) Is it a "steady" analog voltage output?

 

4) Does the output pulse at some rate?  If so, how are you reading it?

 

5) If the output pluses, what is the max rate?

 

6) If the output pluses, do you know the max voltage slew rate?

 

7) Do you know the max drive current from the sensor?

 

8) Do you have a link to the sensor data sheet - with the full electrical specifications?

 

 

 

9) Simple test that "may work" and/or it "may work, but not 100% reliably".

Note: The info I asked above is needed to to a decent "rough pass" termination scheme.  A decent scope and 10x probes are needed to capture and verify the signal integrity for a "not very fast" slew rate signal like I'm guessing the sensor has.

 

9A) Get some 75ohm coax. Like RG-11 or RG-6.
Use the coax to connect the sensor to the N+2.  It's best to use a keep the coax and the shield intact until the signal pin.  For the ground shield, you can connect a short wire from a ground pin to the ground shield.

Of course, use electrical tape around the ground shield and wire to prevent them from shorting with other pins. :)

 

9B ) At the receiving end (the N+2), use an ~75ohm Thevenin termination network.

Example:

Posted Image

 

R1 - connected to 3.3v:

110 ohms

 

R2 - connected to Ground

220 ohms

 

Equivalent termination value:

~73ohms

 

Termination voltage:

~2.2v (biased on purpose more towards the high voltage).

 

Some reference links and info:

Basic thevenin termination equations:

http://www.interface...mination.html#c

 

Equiv Resistance Calculation:

http://www.sengpiela...paralresist.htm

 

Voltage Calculation:

http://hyperphysics....ric/voldiv.html

 

Old, but still valid, basic overview of termination techniques.  Hey, it even uses a 3foot coax as an example. :)

http://www.fairchild...n/AN/AN-610.pdf

 

Coax cables and their characteristic impedances.

http://en.wikipedia....i/Coaxial_cable

 

 

Let me know the answers to the first 8 questions, and if the above suggestion worked.

 

Good Luck!




#47257 Analog Input Example on the Netduino Plus and Netduino Plus 2

Posted by cutlass on 16 March 2013 - 01:39 AM

Netduino Plus2 Example:

 

 

Uses .NET  Micro Framework 4.2

 

You should add a reference to the SecretLabs.NETMF.Hardware.AnalogInput dll.

 

 

 

Right Click on References

Posted Image

 

 

Select "SecretLabs.NETMF.Hardware.AnalogInput"

Posted Image

 

 

 

Your References List should now include"SecretLabs.NETMF.Hardware.AnalogInput":

Posted Image

 

 

Code:

using System;using System.Net;using System.Net.Sockets;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;namespace AnalogTest {    public class Program {        private const int MaximumValue_int = 1024;        private const float AnalogReference_float = 3.30f;        private const float VoltsPerCount_float = AnalogReference_float / MaximumValue_int;        public static void Main() {            // Define and initialize variables            int ADC_digitalValueRead_int = 0;            float ADC_analogValueConverted_float = 0;            int ADC_digitalValueRead0_int = 0;            int ADC_digitalValueRead1_int = 0;            int ADC_digitalValueRead2_int = 0;            int ADC_digitalValueRead3_int = 0;            int ADC_digitalValueReadSum_int = 0;            int ADC_digitalValueReadAverage_int = 0;            float ADC_analogValueAverageConverted_float = 0;            SecretLabs.NETMF.Hardware.AnalogInput adcPort_A0 = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A0);            //init the values            ADC_digitalValueRead_int = adcPort_A0.Read();            ADC_digitalValueRead0_int = ADC_digitalValueRead_int;            ADC_digitalValueRead1_int = ADC_digitalValueRead_int;            ADC_digitalValueRead2_int = ADC_digitalValueRead_int;            ADC_digitalValueRead3_int = ADC_digitalValueRead_int;            ADC_digitalValueReadAverage_int = 0;            // do forever...            while (true) {                // read from ADC Port_A0                ADC_digitalValueRead_int = adcPort_A0.Read();                // convert digital value to analog voltage                ADC_analogValueConverted_float = ((float)ADC_digitalValueRead_int) * VoltsPerCount_float;                // Print the values in the debug window                Debug.Print("Raw Value: " + ADC_digitalValueRead_int.ToString() +                            "  ; Volts: " + ADC_analogValueConverted_float.ToString());                // Slightly more advanced, simple average of the last four ADC values.                // Shift values, sum, and average                ADC_digitalValueRead0_int = ADC_digitalValueRead1_int;                ADC_digitalValueRead1_int = ADC_digitalValueRead2_int;                ADC_digitalValueRead2_int = ADC_digitalValueRead3_int;                ADC_digitalValueRead3_int = ADC_digitalValueRead_int;                ADC_digitalValueReadSum_int = ADC_digitalValueRead0_int + ADC_digitalValueRead1_int + ADC_digitalValueRead2_int + ADC_digitalValueRead3_int;                ADC_digitalValueReadAverage_int = ADC_digitalValueReadSum_int >> 2;  // ADC_digitalValueReadSum_int = (ADC_digitalValueReadSum_int/4);                // convert digital value to analog voltage                ADC_analogValueAverageConverted_float = ((float)ADC_digitalValueReadAverage_int) * VoltsPerCount_float;                // Print the values in the debug window                Debug.Print("Averaged Value: " + ADC_digitalValueReadAverage_int.ToString() +                            "    ; Averaged Volts: " + ADC_analogValueAverageConverted_float.ToString());                Debug.Print(" ");            }        }    }}

 


Example Output:

Raw Value: 427  ; Volts: 1.37607419
Averaged Value: 425   ; Averaged Volts: 1.36962891

Raw Value: 423  ; Volts: 1.36318362
Averaged Value: 425   ; Averaged Volts: 1.36962891

Raw Value: 423  ; Volts: 1.36318362
Averaged Value: 424   ; Averaged Volts: 1.3664062

Raw Value: 424  ; Volts: 1.3664062
Averaged Value: 424   ; Averaged Volts: 1.3664062

Raw Value: 421  ; Volts: 1.35673821
Averaged Value: 422   ; Averaged Volts: 1.35996091

Raw Value: 420  ; Volts: 1.35351562
Averaged Value: 422   ; Averaged Volts: 1.35996091

Raw Value: 427  ; Volts: 1.37607419
Averaged Value: 423   ; Averaged Volts: 1.36318362

Raw Value: 430  ; Volts: 1.38574219
Averaged Value: 424   ; Averaged Volts: 1.3664062

Raw Value: 424  ; Volts: 1.3664062
Averaged Value: 425   ; Averaged Volts: 1.36962891

Raw Value: 424  ; Volts: 1.3664062
Averaged Value: 426   ; Averaged Volts: 1.37285149

Raw Value: 423  ; Volts: 1.36318362
Averaged Value: 425   ; Averaged Volts: 1.36962891

Raw Value: 429  ; Volts: 1.38251948
Averaged Value: 425   ; Averaged Volts: 1.36962891

Raw Value: 425  ; Volts: 1.36962891
Averaged Value: 425   ; Averaged Volts: 1.36962891

Raw Value: 425  ; Volts: 1.36962891
Averaged Value: 425   ; Averaged Volts: 1.36962891

Raw Value: 428  ; Volts: 1.3792969
Averaged Value: 426   ; Averaged Volts: 1.37285149

Raw Value: 422  ; Volts: 1.35996091
Averaged Value: 425   ; Averaged Volts: 1.36962891

Raw Value: 423  ; Volts: 1.36318362
Averaged Value: 424   ; Averaged Volts: 1.3664062

Raw Value: 424  ; Volts: 1.3664062
Averaged Value: 424   ; Averaged Volts: 1.3664062

Raw Value: 425  ; Volts: 1.36962891
Averaged Value: 423   ; Averaged Volts: 1.36318362

Raw Value: 427  ; Volts: 1.37607419
Averaged Value: 424   ; Averaged Volts: 1.3664062

Attached File  analogTestN+2.zip   56.29KB   121 downloads




#47255 Analog Input Example on the Netduino Plus and Netduino Plus 2

Posted by cutlass on 16 March 2013 - 01:38 AM

There have been a few question on how to use analog inputs on the Netduino Plus and Netduino Plus 2.

I hope the following two posts help to clear up some questions.

 

Post#2 in this thread will have an example using the:  Netduino Plus.

Post#3 in this thread will have an example using the: Netduino Plus 2.

 

For each board, I also added a zip of the project and files.

Good Luck!  




#47114 Need clarification on tolerance

Posted by cutlass on 13 March 2013 - 02:59 AM

Summary:

When a pin is in ADC mode (PC0-PC5 ; pins 8,9,10,11, 24,25), the voltage limits are as follows:

Low: -0.3v

High: +3.6v (3.3v + 0.3v)

 

 

The data sheet is here:

http://www.st.com/st.../DM00037051.pdf

 

The N+2 uses a 64pin STM32F405RG

 

From the data sheet:

 

ADC voltage input specs:

page: 105:

VIL Input low level voltage

Min Vin Low

VIL VSS–0.3v

(VSS is ground.  So, the minimum voltage is -0.3v)

 

Max Vin High
VIH TTa/TC(2) I/O input high level voltage  VDD+0.3

See Note2

2.TTa = 3.3V tolerant I/O directly connected to ADC; TC = standard 3.3V I/O.

 

 

ADC Characteristics:

Table 67

pages: 124,125

 

 

ADC equivalent input schematic:

page: 127

 

Good Luck!




#44953 Measuring square wave frequency when it's an input

Posted by cutlass on 05 February 2013 - 10:10 AM

The meaning of "Real Time" varies depending on the requirements. :)

IMHO, for a Netduino, "real time" is 1Hz (1 per second), or slower.  :)

 

The .NET Micro framework is not designed for "real time".

According to the book "Expert .NET Micro Framework", the .NET Micro Framework (at least for 2.x) only does interpreted code execution, it does not do JIT.  That mat have changed for 4.x, but I doubt it.

 

From

http://msdn.microsof...y/ee435387.aspx

The CLR is fast; it performs at about 15,000 managed method calls per second at 27.6 MHz. (These results are based on the average method-call complexity developed for the SPOT watch application.)

 

 

Hmm, 27MHz results in an execution rate of ~15KHz.  Seems realistic for a fully interpreted framework.

BTW, even with the ~15KHz rate, don't forget that the framework can, at any time, suck up many many CPU cycles doing garbage collection.  So, again, .NET isn't designed for "real time" sampling by software control for anything faster than ~1->100Hz (in general you want an 5-10x faster sample/control rate, and I figure ~10+ instructions per loop).  Yea, people can optimize loops, and there will be faster ARM chips.  I'm giving "general reasonable" expectations for a novice/intermediate user. :)

 

IMHO, your best bet would be to use an Arduino Nano operating at 5V (because the sensor has a 5V output) (~$25 from Amazon).  Then, have the Arduino Nano convert the freq to some nice output that you can use.

 

One thing to be careful of is that the sensor that you picked has a 5Volt output.  Many microcontrollers and ICs use 3.3V.  Some have 5V tolerant inputs, many do not.  Same for FPGAs.

 

 

Good Luck!




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.