By continuing to use this site, you agree to our use of cookies. Find out more
Forum sponsored by:
Forum sponsored by Forum House Ad Zone

Arduinos and Microcontrollers ref: Rotary Table Mew 249

All Topics | Latest Posts

Search for:  in Thread Title in  
SillyOldDuffer30/11/2021 16:54:08
8513 forum posts
1914 photos
Posted by Tony Pratt 1 on 29/11/2021 21:34:52:

Hi Dave, thanks for the swift reply! The board is a Sunfounder model Uno R3, the shield has no name that I can see? I have ordered a new board & shield from Amazon to see if the figures make any sense with them, if no go is there any particular brand that is reliable, as most seem to be made in China generics?

Thanks Tony

Yes, you might have a duff Uno or Shield. Values higher than 1023 suggest a hardware failure. My LCD Shield came from DF-Robot, and I've used Sunfounder several times without bother, but the breed do turn up poorly sometimes. I try to avoid the very cheap no-brand boards, but the few I've used have been OK (I think I've only had two failures in over 100 purchases.)

You might try this test program, which can be used to test the Uno because it doesn't need the LCD shield plugged in. Instead it reports to the IDE's Serial Monitor at 9600baud.

Compile and load it onto the bare Uno, then turn the serial monitor on and set the baud rate to 9600 baud.

With nothing plugged into pin A0 should display a random value between 0 and 1023 due to picking up mains hum. Connect a jumper wire from A0 to the 3.3V socket:


Mine read 647 which equates to 3.16V (Maths: v= 647/1023 * 5V)

Reconnecting the jumper from A0 to a Gnd socket should read 0

And connecting the jumper from A0 to the 5V socket should read 1023

DO NOT connect the jumper from A0 to Vin!!! It will probably fry the ADC function,

This proves the UNO is Ok.

Next plug the shield in. The display won't work, but pressing the buttons down for a few seconds should show the ADC level each causes.

Fingers crossed, both work.

I can't think of a reason why A0 should ever read more than 1023. Possibly the ADC circuit behind A0 is has been spiked. They're robust unless fed more than whatever is on the supply rail, which is 5.0V. I've never killed one, but static might do it.


John Olsen01/12/2021 05:30:03
1241 forum posts
94 photos
1 articles

I've just been playing with an Arduino myself lately so found some of the above quite interesting.

A few points about speed and stepper motors. They can go quite fast, but sometimes need a few tricks. One is that in order to build up the current and hence the magnetic field quite quickly, the drive voltage can be increased. To avoid overcooking things when the motor is running slow or holding, this is done with either a constant current drive or more simply, a resistor in series. The high initial supply voltage gives a faster rise to the current, but the constant current part ensures that the current never exceeds what the winding is rated for.

Then there is the acceleration thing. Depending on the rotational inertia of the whole drive train, if you just start switching at a high speed, the rotor can lose lock. So the controller needs to be set up to accelerate at a reasonable rate, and similarly to decelerate at a reasonable rate. This requires that the controller knows in advance when it is going to be asked to stop the load, so is not so good for unplanned emergency stops. Really if high speeds and sudden changes are needed, a servo motor become a better solution.

I've just implemented some code from the web to allow using the Arduino to remotely display the output from the usual common digital calipers. The original code only did millimeters, so I have messed around a bit and after a few changes have got it to read out correctly for either millimeters or inches, including reading the fourth decimal place correctly. I might get around to doing a DRO for the Myford yet...


All Topics | Latest Posts

Please login to post a reply.

Magazine Locator

Want the latest issue of Model Engineer or Model Engineers' Workshop? Use our magazine locator links to find your nearest stockist!

Find Model Engineer & Model Engineers' Workshop

Latest Forum Posts
Support Our Partners
Rapid RC
Eccentric July 5 2018
Eccentric Engineering
Subscription Offer

Latest "For Sale" Ads
Latest "Wanted" Ads
Get In Touch!

Do you want to contact the Model Engineer and Model Engineers' Workshop team?

You can contact us by phone, mail or email about the magazines including becoming a contributor, submitting reader's letters or making queries about articles. You can also get in touch about this website, advertising or other general issues.

Click THIS LINK for full contact details.

For subscription issues please see THIS LINK.

Digital Back Issues

Social Media online

'Like' us on Facebook
Follow us on Facebook

Follow us on Twitter
 Twitter Logo

Pin us on Pinterest