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-April 23)


By content type

See this member's


Sort by                Order  

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

Posted by Paul Newton on 20 February 2015 - 08:16 AM in Netduino 2 (and Netduino 1)

Just to confirm - return value of "0" means success?

 

What happens if you just add the resistors? (Pull-up to 3.3.V)

I would expect the return value to change to fail.

 

I'll have to get a hard hat.




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

Posted by Paul Newton on 19 February 2015 - 08:41 AM in Netduino 2 (and Netduino 1)

Hi IceMan,

 

I2C uses transistors to pull the signals to ground and pull up resistors to pull the signals up to the positive rail.

This allows the same two wires to send data in either direction, and you can have many nodes on the wires - e.g its a multi-drop system.

 

After each 8 bits, the sender listens for an ACK. An ACK is a low bit. If the pull-ups are not connected correctly, then it would be possible for the Netduino (the master) to hear a low bit for the ACK and assume it was the slave pulling the data line down. So your sends might be reported as successful.

 

This external page shows the waveform and talks about the signals in a down to earth way.

 

There is a Forum page about choosing the right voltage to pull-up to. I would pull-up to 3.3V unless your I2C device needs a 5V pull-up.

 

I think it would be worth initially adding the resistors with nothing else connected. Try sending something and verify the send now fails.

 

Then connect the two data lines and a ground to the slave device.

The slave will also need power, this may either come from the Netduino or a separate supply - as long as the grounds are joined.

Now try again and see if the send is reported as successful.

 

Take small steps and you should get there.

 

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?




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

Posted by Paul Newton on 19 February 2015 - 07:28 PM in Netduino 2 (and Netduino 1)

I think there are a few of us from the Shire on the forums.




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

Posted by Paul Newton on 22 February 2015 - 07:39 PM in Netduino 2 (and Netduino 1)

Good to hear.

When you're done, the wiki is a good place to share.




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

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

Well done.

 

My first experience of I2C (not on a Netduino) was a very bad one. We spent around a week trying to debug our comms issue before we finally read the data sheet's errata list and found out the I2C would never work properly on the processor we were using. Then we had to work out how to make the product work without working I2C hardware - not fun!

 

Paul




#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




#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




#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




#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




#60623 74hc595 Shift Register and PWM

Posted by Paul Newton on 04 November 2014 - 07:22 PM in Netduino 2 (and Netduino 1)

Hi Joop,

 

Like the 74HC595, the PCF8574 will not remember the current settings after a power on, and it would not be affected by a reset of the Netduino.

Unlike the 74HC595, when the Netduino comes out of reset, it could poll the PCF8574 to check the current levels on the I/O pins.

 

If I were using one, I would still write a class to control it for me. The class would include a method to read back the most recent settings without having to wait for an I2C operation to complete.

 

Have Fun - Paul




#60667 Azure Veneziano

Posted by Paul Newton on 09 November 2014 - 08:26 AM in Project Showcase

Adding a 270Ohm resistor to protect inputs from accidents in the software is a good idea.




#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




#60588 74hc595 Shift Register and PWM

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

Hi Iain,

 

You might want to consider using a PWM chip e.g. TLC 5940

According to the data sheet, you only need 3 pins to write to it, and it will generate 16 channels of PWM for you.

The nice thing is that you should only have to tell it to set a pulse width once, you will not have to keep your program busy clocking out loads of data into the shift registers to keep the motors running at a constant speed. (If you try to generate PWM from a shift register, any interruption in the sending of the data to the shift register could leave your PWM pin high or low for an unplanned period of time. This would cause the motors to slow down or speed up.)

 

The TLC5490 connections are basically the same as the 74HC595 shift register. Since I know you are trying to reduce the number of pins used, I think you will still want to get the other motor control signals from the shift register, you might consider wiring up the two devices into a chain to keep it at 3 pins, or have the clock and data in parallel, with separate enable lines (4 pins).

 

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



#60594 74hc595 Shift Register and PWM

Posted by Paul Newton on 01 November 2014 - 08:08 AM in Netduino 2 (and Netduino 1)

Hi JoopC,

 

Simple answer is that, if all you have is the 74HC595, you can't know the output state of the pins until you have set them.

This can be a real problem at power on / reset.

 

There are some strategies to get the values:

  • You could run a wire back to the Netduino so you can read the state - but that defeats the purpose of using the shift register to get more I/Os!
  • You could add an input shift register (74HC165) to read all the outputs of the 74HC595 and convert them back into a serial message that you can read on the SPI bus. Again this is a bit wasteful unless there are other inputs you needed to sample also, and there is the delay of reading the shift register before you get your answer.
  • Better would be to create a persistent variable that holds the last word you wrote to the shift register, and add some methods to read the word in what ever format you need. Ideally wrap it in a class to look after everything for you once you understand how to write each bit of the code.

 

There is still the power on / reset problem.

One strategy here is to use the enable signal of the 74HC595 to set the outputs to high impedance (e.g. "OFF") at program start, and use pullup or pulldown resistors to set each output to a sensible initial level for your circuit. Once you have written the initial state into the 74HC595, you then enable the outputs of the shift register.

 

Lots to think about, remember its supposed to be fun - Paul




#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




#61673 Netduino MiniSumo robot

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

Great project!




#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




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




#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




#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




#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




#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




#60897 Obstacle Avoidance Robot with SeeedStudio Motor Shield V2

Posted by Paul Newton on 07 December 2014 - 09:14 AM in Project Showcase

Great project so far!

 

Mike is on the right track - we will need a wiring diagram to help understand what is wrong with the power.

The photos don't quite allow us to see the wiring well enough to understand what is connected where.

 

I use a mixture of fritzing and paint - both are free. Which one I select for a particular job depends on whether I think I will change the diagram a lot (in which case fritzing is better).

 

Have Fun - Paul





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.