Paul Newton's Content - 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.

Paul Newton's Content

There have been 35 items by Paul Newton (Search limited from 29-May 23)


By content type

See this member's


Sort by                Order  

#61598 How do the input pins work ?

Posted by Paul Newton on 12 February 2015 - 01:49 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi,

 

I am using a Netduino plus v1 with v4.2 firmware.

 

In C# I use:

using System;
using Microsoft.SPOT.Hardware;

InterruptPort port = new InterruptPort(pin, true, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLow);

The mode at the end can be set to:

Port.InterruptMode.InterruptEdgeHigh, 
Port.InterruptMode.InterruptEdgeLow, 
Port.InterruptMode.InterruptEdgeBoth, 
Port.InterruptMode.InterruptEdgeLevelHigh, 
Port.InterruptMode.InterruptEdgeLevelLow

I think you are describing "Both"

 

Be aware that after the v4.1 to v4.2 firmware update, there are now two ways to configure inputs - Secret labs and Microsoft. So you may have issues using other people's code snippets unless you get the correct using statements and references. It had me confused for a while.

 

Hope this helps - Paul




#62826 How to reduce pin usage

Posted by Paul Newton on 24 May 2015 - 07:13 AM in General Discussion

A nice thing about these serial to parallel chips is that all the outputs change at the same time. Individual GPIOs have to be changed one at a time.
Not always a problem, but sometimes important.
Paul



#58441 Watchdog Reset Problem

Posted by Paul Newton on 27 May 2014 - 08:17 PM in Netduino Plus 2 (and Netduino Plus 1)

Happy to help.

 

Would be great to see a picture.

Even better if you add a wiki page!




#58397 Watchdog Reset Problem

Posted by Paul Newton on 26 May 2014 - 07:09 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Guido,

 

I have just looked at the Netduino plus V2 schematics.

 

The external reset appears to be an input only, I can see this because the /EXTERNAL_RESET signal is connected to the base of an NPN transistor. It can't act as an output, so it should not be affecting the reset chip.

 

Have you tried powering the reset chip from an external supply, whilst connected to the Netduino?

I am wondering whether the Netduino is affecting the 3.3V supply as it re-boots, causing the reset chip to give up.

 

On the schematic, the 3.3V on the header "+3V3_HEADER" appears to be connected to the 3.3V regulator via a transistor - it is controlled by a signal called "CTRL_OF_PWR_HEADERS" which is an output of the ARM chip.

 

The more I look, the more I think the power is being cut off when the ARM reboots. Also it looks quite hard to locate a place where you can access the unswitched 3.3V.

 

One place that looks like it might work, is the mini-jtag connector. This has +3.3V, Gnd, and /RESET pins. I guess that's perfect for a reset generator. If you were to modify the firmware, you might even be able to use one of the JTAG GPIO pins to send a don't reset signal to the reset chip using one of the other pads on the mini-jtag connector.

 

Hope this helps solve the problem - Paul




#60489 Servo position control

Posted by Paul Newton on 21 October 2014 - 06:20 AM in General Discussion

Hi Giuliano,

 

The simple way to do this would be to use a reed switch.

You wire it up just like a push button switch.

There are lots to chose from - different sizes, some with change over contacts.

 

In the UK Maplin have several around £2 to £4, this one being £1.99.

 

The only drawback will be accuracy.

The magnet will activate the reed from a distance, so it may be hard to resolve the position accurately.

 

If you need a really accurate position, then an Infra-red LED and transistor pair would be best, with the servo disc passing between the pair to block the light until a small drilled hole allows it through. The input to the Netduino would still be an on/off signal and the software should be the same.

I would start with the reed switch and get the system working first, then consider improving it.

 

Hope this helps - Paul




#60563 Silly problem with power over USB

Posted by Paul Newton on 28 October 2014 - 12:32 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Wernfried,

 

I think your USB port will not be able to supply enough current to drive the Netduino Plus 2 when active. The difference between the Netduino and a phone is that the phone has a battery that will smooth out the demand on the supply - e.g when the phone needs a higher current, the battery will supply it - the rest of the time the battery charges.

 

I was going to refer you to the Wiki page that has a comparison of Netduino boards, but the power supply figures for the Plus 2 are not in the table. However, looking at the Plus v1 in the table, it is listed as taking 80mA when active. The Plus 2 will be similar, so it is a safe bet that when your program turns on an LED, it could easily be taking the current consumption too high for the supply you have.

 

It might be better to take the power from the same supply that the router uses. Assuming the power goes into the router through a barrel connector, you could make a simple splitter using a plug and a pair of sockets, and pass the power to the barrel connector on the Netduino.

 

Hope this helps - Paul




#59707 GPIO Start Low

Posted by Paul Newton on 14 August 2014 - 05:45 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi,

 

I solved this problem for my robot buggy by using opto-isolators.

I was using the Netduino Plus v1 whose pins are pulled high with weak pullups at reset.

These pullups were enough to activate the H-bridge circuit for my motors, but not enough to activate an opto-isolator's LED.

 

A single isolator was a small package so not a problem to fit into a small space, and they also make multiple devices.

The one I used was and still is £1.39 GBP in the UK from Maplin.

 

Its all written up on this WIki page: Driving high current / voltage loads.

 

Have fun - Paul




#59926 Powering EasyDriver and Netduino

Posted by Paul Newton on 28 August 2014 - 06:16 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Andre,

 

If the EasyDriver you are referring to is the SparkFun EasyDriver, then the A3967 IC on the board has built in protection diodes so that its internal transistors are not damaged by back emf.

 

You are right to worry about the motors affecting the Netduino. I was using a similar circuit with a 9V battery supply (6 x AA 1.5V) for my buggy and had to give up powering both from the same supply because the Netduino kept re-booting when the motors turned.

 

I was never aware of any damage to the Netduino - I think it was just brown outs, or maybe noise that was enough to trigger a reset..

 

If you are worried that the driver board will feed current back to the 12V supply, then add a rectifier diode in the positive line between the battery and the driver so it can only take current - that should protect the Netduino from high voltages.

(Note that the EasyDriver circuit does not have any protection for its own logic supply, so I don't think they are expecting any problems like this. However they do have a 30V tolerant input.)

 

You might also add a similar diode to the Netduino supply input and add a big capacitor after the diode so that short brown outs are less likely to reset the Netduino.

 

Let us know how you get on.

 

Have Fun - Paul




#61554 set brightness for Room light

Posted by Paul Newton on 07 February 2015 - 02:08 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Seandy,

 

Welcome to the Forums.

 

The relay you gave a link to is not able to control current; it can only turn ON or OFF (100% or 0%).

You will need to find another type of module to control current.

 

Please be careful - mains voltages can and do kill people!

Try and choose a module that includes all of the high voltage components so that you only have to connect to a low voltage isolated input.

 

Have a search on the forums, I am sure others have posted with details of modules they have used.

 

Have (safe) fun - Paul




#58480 Browser problem: Firefox spell checker not working in edit box

Posted by Paul Newton on 30 May 2014 - 06:08 AM in General Discussion

Paul, those two rightclick context menus are for two different HTML elements. The one with the spill chocker is from the <textarea> where you type text, the other one seems to be for an <iframe>. My guess is that it isn't the amount of text, but rather where in the textbox you rightclick that matters.

Try typing just a single word, and then rightclick on the word itself.

In your two examples you can try clicking the last menuitem, "Inspect Element", and you should see that you end up in two different part of the HTML source.

OK I give up.

 

I just spent a minute right clicking and found that it seems to go in runs of one menu or the other.

I just right clicked with no text at all this time.

At first it seemed like clicking near the flashing cursor gave the spell checker menu, but I found that once that menu is up, clicking further away gives the same menu.

Eventually it changed when I was half way across the edit box and then as I worked my way back towards the cursor, I kept getting the non-spell checker menu.

 

Once I had started typing this, I could no-longer get the wrong menu, so I'm not sure about the object inspection.

 

I have decided that I don't care why its doing it. If you keep clicking in different places, you will eventually get the required menu and then will be able to enable the spell checker. The more text the easier it gets.

 

I have already spotted several mistakes as I am typing this - so I'm happy (if still confused).

 

Thanks everyone - Paul




#58398 Browser problem: Firefox spell checker not working in edit box

Posted by Paul Newton on 26 May 2014 - 07:28 AM in General Discussion

Hi Everybody,

 

I am using firefox (v29.0.1), I have a British English dictionary installed, when I am on a non-Netduino site with an edit box, I can right click in the text box and verify that I have the spell chekcer enabled, and if I make a mistake, the text is underlined (I make lits of spolling mastakes).

 

On the Netduino Forums, right click does not give me the firefox menu, and the above mistakes are not underlined in red as they would be on another site's text box.

 

Is there any way to get the spill chocker working??

Does the same thing happen with Internet Explorer?

 

Paul




#58460 Browser problem: Firefox spell checker not working in edit box

Posted by Paul Newton on 28 May 2014 - 07:56 PM in General Discussion

What _do_ you get when you right click in the edit box? Websites can replace the right click menu, but working around that is pretty simple with add-ons, but before you go down that road you'd want to confirm that's whats going on

Thanks Wendo, you got me clicking and I managed to solve the problem.

 

What I found is that the right click menu changes with the amount of text in the edit box.

  • If there is only one line, then the menu does not have the option for the spell checker.
  • If there is another line, then the "proper" menu is there.

 

I have now managed to enable the spill chequer, unfortunately the using the wrong word checker is not enabled.

 

The screen shots of the two menus are below. As you can see, in both edit boxes the gggg is underlined in red now that have enabled the checker, but the menu options to control are missing in one.

 

Paul

Attached Thumbnails

  • Firefox_EditBox_ContextMenu.jpg



#58401 Browser problem: Firefox spell checker not working in edit box

Posted by Paul Newton on 26 May 2014 - 11:54 AM in General Discussion

Thanks guys,

 

I don't want to use Chrome. I have a few suspicions about what it does in the background.

 

I have not looked at the HTML, was just hoping that if someone else is using Firefox OK, they could let me know what I am doing wrong.

 

Perhaps Secret Labs have tested the site with a few brewsors and have a list of wirkong ones.... Nudge.

 

Paul




#58637 Problem driving DC Motor with HBridge

Posted by Paul Newton on 08 June 2014 - 01:40 PM in Netduino Plus 2 (and Netduino Plus 1)

We have all been there Ken!

 

Welcome to the Forums.

 

Paul




#60725 Problem with Pete Brown's post

Posted by Paul Newton on 16 November 2014 - 08:52 AM in General Discussion

I had the same issue, but was able to read the word of Pete by using the preview button.

 

If you hover your mouse between the title and the number of replies, a small button appears with a down arrow on it, click on it to reveal the post.




#58481 Netduino Plus Ethernet - Interrupt-driven libraries?

Posted by Paul Newton on 30 May 2014 - 06:17 AM in Netduino Plus 2 (and Netduino Plus 1)

 

 

I've almost completed the motor mount for the stepper motor for the turntable (needed two unusual-sized drill bits which I picked up this morning). After it's mounted, I can get serious about the programming portion.

I have been playing with some tiny RC servos to motorise my points (turn outs).

The board I have fits into the skirt under our living room table. The board has to be flush underneath - e.g. no solenoids or wires can stick out because people sitting at the table will hurt their legs!

I have located some very thin servos and found that I can use a router / multitool to cut a blind hole in the board under the points that the servo sits in. I added some folded aluminium to allow me to adjust the position of the servo and nail it in place when the point works well.

I found that using servos was actually cheaper than any thing else I could buy to achieve the same job. Now I need to actully fit to the board and work out how to route all the wires!

Paul




#61673 Netduino MiniSumo robot

Posted by Paul Newton on 20 February 2015 - 08:18 AM in Project Showcase

Great project!




#61492 LM35 & a PhotoCell

Posted by Paul Newton on 03 February 2015 - 08:34 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi CT1,

 

Tell us more about the "PhotoCell".

Is this a Light Dependant Resistor LDR or a solar cell that generates a voltage?

Either way, a link to a datasheet would be good.

 

If it is a solar cell, do you know the output voltage?

Is it possible you are driving too high a voltage into the analogue pin 0 ? (this could affect the ADC circuit in the Netduino)

Is the temp sensor affected if the cell is kept in the dark?

 

If it is a resistive sensor, how are you connecting it to the Netduino?

Have you used another resistor to form a voltage divider? Is the divider connected to 3.3V or 5V? (5V may be too high).

 

It might help to tie the other unused analogue inputs to ground each via a separate resistor - say something in the range 1K to 5K.

 

Lots of questions - hopefully one of them will provoke a eureka moment.

 

Paul




#61541 LM35 & a PhotoCell

Posted by Paul Newton on 06 February 2015 - 08:13 PM in Netduino Plus 2 (and Netduino Plus 1)

Sounds a bit spooky.

 

I don't remember having issues with my analogue sensors.

(I am using three Sharp Infra-Red range sensors.)

 

Anyway, glad to hear you have a working solution.

Remember to have fun - Paul




#61527 LM35 & a PhotoCell

Posted by Paul Newton on 05 February 2015 - 05:02 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Cyn,

 

This is just a guess, but A5 and A4 are dual purpose (they are also I2C on the Plus v1).

 

Try using A0,A1,A2 & A3 (e.g LM35 on A3 and LDR on A0).

See if the problem has gone away.

 

I am not saying that you are using A4 & A5 as I2C - I am just wondering if they are behaving differently to the other analogue pins.

 

Paul




#60399 Continuous Rotation Servo

Posted by Paul Newton on 12 October 2014 - 05:28 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Ludio,

 

How are you powering the servo?

 

When you say that it buzzed but did not move, it makes me think that there is not enough power for the servo to turn the motor, or there is not enough voltage for the analogue feedback circuit (in the servo) to work properly.

 

The ground and the PWM pins of the servo should connected to the Netduino, but the power should not be drawn from the Netduino.

Ideally, power the servo by taking a ground and +V to a separate battery pack.

 

Let us know how you get on.

 

Paul




#60455 Continuous Rotation Servo

Posted by Paul Newton on 18 October 2014 - 08:00 PM in Netduino Plus 2 (and Netduino Plus 1)

Its always nice to here someone has followed my advice, but not as nice when it did not help. Just like being at work ;-)

Don't give up!

 

I think all the RC servos I have come across are designed for 5V, so a 9V battery is probably not a good idea as the extra volts could damage the electronics..

Also if you were thinking of a using a "PP3" 9V battery, be aware that these are intended for circuits that draw small amounts of current - like small radios, smoke alarms, etc. They are not really very good for supplying higher currents to motors.

 

I followed your link to the servo, you said it was a continuous  rotation servo, I assumed you meant something that could drive a buggy wheel, but the link you gave is to a normal micro servo. I don't think it matters, but is it a continuous rotation one, or normal one?

 

Following the link, I am using some very similar servos to control some N-gauge model railway points (aka "turnouts" in American). They were small enough for me to fit into the base board of my layout without having to fit any hardware or wires under the board. The layout fits under a table - so nothing can stick out underneath as it will catch on peoples' legs when they are sitting at the table!

 

I found they worked OK for me as normal left - right servos.

 

We need to work out where the problem is - the Netduino/software or the servo.

 

Have you got any other servos you can use to verify the Netduino and software?

Or, have you got anything else that can drive the micro servo (maybe a radio control receiver, perhaps a friend has something)?

 

See if you can work out where the problem is.

 

It also might help to post your whole program or at least the bit that drives the servo.

Perhaps you could cut it right down to a tiny 10 to 15 line program or "test harness" that just drives the servo and demonstrates the problem.

You may have done something someone else will spot as being a problem. Maybe the servo class is being deleted by mistake after you use it.... There are lots of people on this forum, and when shown the right thing, they will solve the problem.

 

Hope this helps - Paul




#60568 2 H-Bridge and Shift Resister

Posted by Paul Newton on 29 October 2014 - 09:09 AM in Netduino 2 (and Netduino 1)

Hi Jardeth,

 

I think you will have trouble controlling the speed of the motors with your design.

This is because it will be quite difficult to toggle the outputs of the shift registers fast enough to give pulses of varying lengths.

 

I would recommend four changes:

  • Check if the driver chip requires you to add protection diodes, if so, add them to protect the driver circuit.
  • When using shift registers, connect them to the SPI port pins - SPCK, MOSI, and a latch pin. This will allow fast and easy writing to the shift registers. Have a look in the Wiki for some examples.
  • Have a look at the circuit diagrams for available H bridge drivers modules. These usually include an inverter logic gate that allows you to control the direction of each motor with one Netduino output. The output is taken directly to the IN1 signal, and an inverted version is taken to the IN2 signal. Then a single PWM signal is connected to the enable input to control the speed.
  • Use the four Netduino PWM outputs to control the speed (one per motor) - this will give much better speed control than driving the PWM from the shift register.

Once you only need two signals per motor (4 x PWM and 4 x direction), you might decide you don't need the shift registers after all!

 

Rather than build it myself, I have used an Ardumoto shield for driving a pair of motors. The schematic is here, showing the inverter circuit.

There are lots more shields and modules to chose from, and there will be ones that allow control of more than 2 motors.

 

One last thing, you said you wanted to use a 9V battery to power the motors - don't use a PP3 battery it won't have enough power to drive any sensible size motors. Use a pack of rechargeable cells (maybe 6 x AA NiMh, or a LIon / Lipo pack).

 

Hope this helps - Paul




#60587 2 H-Bridge and Shift Resister

Posted by Paul Newton on 31 October 2014 - 03:26 PM in Netduino 2 (and Netduino 1)

Hi Iain,

 

As far as shields go, they are often bulky, inflexible and can be expensive. Making you own board is far better - I do hope it goes well.

The main thing I was suggesting was that you have a look at the shields that are out there and check out how they wire up the driver chip - e.g. simplifying direction control and extra protection diodes.

 

Where shields and modules are good, is to help prototype a circuit and allow you to get started on the software. They allow you to wire up a system using known working parts, that you can then swap out for your own circuitry as it is built.

 

Wiring the batteries in series will give you 18 Volts, this sound a bit high - but obviously it depends on the motors you are using. The L293D has an absolute maximum rating of 36V, so 18V is not a problem to the driver chip.

Remember that wiring in series will not help deliver more current to the motors.

 

Be very careful if you decide to wire the batteries in parallel (to increase the available current), rechargeable batteries have a low internal resistance and if you try to join two batteries in parallel, any difference in charge level between them will result in current flowing from one to the other. This may cause heat and damage to the batteries.

 

My buggy uses a block of 5 rechargeable NiMh AA batteries in series, I found these are good for driving 4 modest motors. 5AA cells probably take up less space than 4 PP3 cells, and are cheaper! Obviously I don't know the actual requirements (voltage and current) for your motors.

 

I see you have another post talking about PWM, so I won't mention it here, but why are you trying to reduce the number of connections to the Netduino? I take it you have some cunning plan in mind for the other pins....

 

Have Fun - Paul




#61677 Pull Up, Pull Down, Pulling my hair out!

Posted by Paul Newton on 20 February 2015 - 05:01 PM in Netduino 2 (and Netduino 1)

My knowledge has run out now.

There have been lots of threads about I2C on the forums, but I found that searching for them does not seem to work for me.

 

Perhaps someone else knows if the ACK is actually checked by the Netduino?

Maybe when writing, the ACK is not checked and the Netduino just counts the number of bytes sent out.

 

Anyone?





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.