author
29Instructables397,219Views265CommentsNew ZealandJoined November 6th, 2015
55+ years in electronics, computers, and teaching ... now retired.

Tell us about yourself!

Complete Your Profile

Achievements

100+ Comments Earned a bronze medal
10K+ Views Earned a bronze medal
Show 1 More »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL6 days ago
    How to Control a Servo Using GRBL

    Thank you for commenting :)A correctly formatted version of "spindle_control.c" is attached to this instructable ... see Step 3, Note 1.

    View Instructable »
  • lingib commented on lingib's instructable Make Your Own Camera8 days ago
    Make Your Own Camera

    The write_register() function only expects two values.The first value is the register numberThe second value is the actual value to be written into the register.In my previous answer I have provided several screen shots.The photos showing light-gray, darker-gray, and black screens have the test code shown in yellow highlight. You should see the same if you enter these values ... regardless of the settings in the initialise_OV7670() function.These three tests simply confirm that your frame-grabber is working correctly.The photo showing a completely white screen shows what you should see when you try sending actual data to the framegrabber with all of the gain bits (shown in yellow high-light) set to '1'.The photo showing a perfect picture requires the initialise_OV7670() shown.Increasi...

    see more »

    The write_register() function only expects two values.The first value is the register numberThe second value is the actual value to be written into the register.In my previous answer I have provided several screen shots.The photos showing light-gray, darker-gray, and black screens have the test code shown in yellow highlight. You should see the same if you enter these values ... regardless of the settings in the initialise_OV7670() function.These three tests simply confirm that your frame-grabber is working correctly.The photo showing a completely white screen shows what you should see when you try sending actual data to the framegrabber with all of the gain bits (shown in yellow high-light) set to '1'.The photo showing a perfect picture requires the initialise_OV7670() shown.Increasing the gain from zero to 4 produces the over-exposed image.

    The write_register() function only expects two values.The first value is the register numberThe second value is the actual value to be written into the register.In my previous answer I have provided several screen shots.The photos showing light-gray, darker-gray, and black screens have the test code shown in yellow highlight. You should see the same if you enter these values ... regardless of the settings in the initialise_OV7670() function.These three tests simply confirm that your frame-grabber is working correctly.The photo showing a completely white screen shows what you should see when you try sending actual data to the framegrabber with all of the gain bits (shown in yellow high-light) set to '1'.The photo showing a perfect picture requires the initialise_OV7670() shown.Increasing...

    see more »

    The write_register() function only expects two values.The first value is the register numberThe second value is the actual value to be written into the register.In my previous answer I have provided several screen shots.The photos showing light-gray, darker-gray, and black screens have the test code shown in yellow highlight. You should see the same if you enter these values ... regardless of the settings in the initialise_OV7670() function.These three tests simply confirm that your frame-grabber is working correctly.The photo showing a completely white screen shows what you should see when you try sending actual data to the framegrabber with all of the gain bits (shown in yellow high-light) set to '1'.The photo showing a perfect picture requires the initialise_OV7670() shown.Increasing the gain from zero to 4 produces the over-exposed image.*****************************************************************************************It would appear that you have previous attempted to make a camera as: (1) your PCLK, HREF, and VSYNC wiring was mapped to different pins(2) you were not using 4K7 pull-up resistors.(haven't tried but 10K is probably fine)In my article I stress, in several places, to upload my code to the arduino BEFORE

    With regards to this camera project I have simply exhausted all possibilities, but feel free to ask for help with any of your other projects :)Thank you for your questions. In trying to find a solution I found that a minor change to one line of the processing code significantly improved the image quality. No changes were required to the Arduino code.Please note that, should you rebuild your camera: (1) OV7670_camera_mono_V2.pde and OV7670_camera_color_V2.pde both contain this code update. The Arduino code is unaltered but is renamed to V2 to match.(2) No code changes should be needed.(3) Upload the arduino code BEFORE attaching any wires to your OV7670 as 5 volts will destroy the chip.

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL8 days ago
    How to Control a Servo Using GRBL

    Glad that GcodePostProcessor.pde has solved your problem :)I'm not certain that I understand your 100,100 problem? If the command G00 X100 Y100 is moving your plotter more than 100 millimeters then you need to change the $100,$101,$102 values shown in Step 6.The values of 80 for my plotter were calculated as follows: GT2-20 motor pulley = 2*20 = 40mm per revolution 1.8 degrees per step motor = 360/1.8 = 200 steps per revolution. Motor controller micro-stepping = 16 From which steps/mm = 200*16/40 = 80

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL9 days ago
    How to Control a Servo Using GRBL

    A solution to your problem is discussed in "Step 8: Raising and Lowering Your Pen"."GPP.zip", attached to Step 8, contains a post-processor that should fix your issue.The GPP post-processor is designed to work with Inkscape which generates a "M2" stop code. Non-Inkscape gcode may use M30 ... in which case edit the source code to suit.

    View Instructable »
  • lingib commented on lingib's instructable CNC Robot Plotter9 days ago
    CNC Robot Plotter

    The code, "Arduino_CNC_plotter.ino", is attached to Step 5: Installing the Robot Software.

    View Instructable »
  • lingib commented on lingib's instructable Make Your Own Camera10 days ago
    Make Your Own Camera

    Your camera may well be working ... it may just need more gain.Overwrite any code changes that you may have made by reinstalling BOTH "OV7670_camera_mono.pde" and "OV7670_camera_mono.ino". -------------------------------------In the "OV7670_camera_mono.pde" software-------------------------------------Change code line 78 to read:pixels[i] = color(int(byteBuffer[i])); Explanation:Changing the data type SIGNIFICANTLY improves the image. -------------------------------------In the "OV7670_camera_mono.ino"-------------------------------------Your image brightness may be adjusted as as follows:Change the code to read:write_register(0x07, B00000000); write_register(0x10, B00100000);write_register(0x04, B00000000);Explanation:These three lines control th...

    see more »

    Your camera may well be working ... it may just need more gain.Overwrite any code changes that you may have made by reinstalling BOTH "OV7670_camera_mono.pde" and "OV7670_camera_mono.ino". -------------------------------------In the "OV7670_camera_mono.pde" software-------------------------------------Change code line 78 to read:pixels[i] = color(int(byteBuffer[i])); Explanation:Changing the data type SIGNIFICANTLY improves the image. -------------------------------------In the "OV7670_camera_mono.ino"-------------------------------------Your image brightness may be adjusted as as follows:Change the code to read:write_register(0x07, B00000000); write_register(0x10, B00100000);write_register(0x04, B00000000);Explanation:These three lines control the image brightness. You are allowed to write a '1' into any of the positions below that are shown with an 'x'write_register(0x07, Bxxxxxxxx); write_register(0x10, Bxxxxxxxx); write_register(0x04, B000000xx); The default position is"write_register(0x07, B00000000);write_register(0x10, B00100000); write_register(0x04, B00000000); Please let me know if this works and I will update the Instructable.A screenshot showing the changes is attached.

    There is a strong possibility that your OV7670 is not working :(With a '1' written into every bit position your screen should be white as shown in Gain_high.jpg (attached) .... your screen is gray ???With a '0' written into every bit position you should get an image as shown in Gain_zero.jpg (attached).With a gain setting of 4 (binary 00000000 00000001 00) the image starts to over-expose as shown in Gain_four.jpg (attached).While you are getting valid sync pulses it appears that your OV7670 data lines are producing invalid data. A simple way of verifying this is to fill each bit position with a '1' (as you have done) and send known hexadecimal data values to your PC as shown in the remaining screen shots.0x00 produces a black screen as shown in Serial_write_0x00.jpg.0x80 produces a mid-...

    see more »

    There is a strong possibility that your OV7670 is not working :(With a '1' written into every bit position your screen should be white as shown in Gain_high.jpg (attached) .... your screen is gray ???With a '0' written into every bit position you should get an image as shown in Gain_zero.jpg (attached).With a gain setting of 4 (binary 00000000 00000001 00) the image starts to over-expose as shown in Gain_four.jpg (attached).While you are getting valid sync pulses it appears that your OV7670 data lines are producing invalid data. A simple way of verifying this is to fill each bit position with a '1' (as you have done) and send known hexadecimal data values to your PC as shown in the remaining screen shots.0x00 produces a black screen as shown in Serial_write_0x00.jpg.0x80 produces a mid-gray screen as shown in Serial_write_0x80.jpg.0xD0 produces a light-gray screen as shown in Serial_write_0xD0.jpg0xFF will produce a completely white screen.

    View Instructable »
  • lingib commented on lingib's instructable Make Your Own Camera12 days ago
    Make Your Own Camera

    The fact that you have data indicates that your hardware is working :)I suspect the problem is the result of too much light. If you pause the video in my Instructable at 0:14 seconds you will see that the room is dimly lit.In Step 4 (Design Notes: Side Effects) I mention "To prevent over-exposure I have set all of the AEC (auto exposure control) register bits to zero. Even so a neutral density filter is needed in front of the lens when the lighting is bright." The exposure values are set to minimum in the "initialise_OV7670(){}" subroutine should you wish to experiment.Try installing "OV7670_camera_mono.ino/pde" as this software is much faster which means that you can quickly see the effect of different light levels. The "color" software can be tr...

    see more »

    The fact that you have data indicates that your hardware is working :)I suspect the problem is the result of too much light. If you pause the video in my Instructable at 0:14 seconds you will see that the room is dimly lit.In Step 4 (Design Notes: Side Effects) I mention "To prevent over-exposure I have set all of the AEC (auto exposure control) register bits to zero. Even so a neutral density filter is needed in front of the lens when the lighting is bright." The exposure values are set to minimum in the "initialise_OV7670(){}" subroutine should you wish to experiment.Try installing "OV7670_camera_mono.ino/pde" as this software is much faster which means that you can quickly see the effect of different light levels. The "color" software can be tried once you have an image using the "mono" software. The "color" software requires the same lighting level ... it is essentially the "mono" software run twice then processed. Keep in mind the color "software is purely experimental" and that "the colors appear to be inverted".

    If you haven't already done so, upload "OV7670_camera_mono.ino" to your Arduino.Do not make any changes to the code. If you have access to an oscilloscope you should see signals on each of the data lines.Open the Arduino "Serial|Monitor" and set the baud speed to 1000000.Remove the lens-cap from your OV7670 in bright light. Removing the lens cap forces the OV7670 data pattern to 255 (white)Now send the letter 'c' to your Arduino and note the symbols/characters that appear in the Serial|Monitor.Replace the lens-cap on your OV7670. Adding the lens cap forces the data pattern to be 0 (black)Send the letter 'c' to your Arduino and note the symbols/characters that appear the Serial|Monitor. These symbols/characters should be different.If no visible characters appear on th...

    see more »

    If you haven't already done so, upload "OV7670_camera_mono.ino" to your Arduino.Do not make any changes to the code. If you have access to an oscilloscope you should see signals on each of the data lines.Open the Arduino "Serial|Monitor" and set the baud speed to 1000000.Remove the lens-cap from your OV7670 in bright light. Removing the lens cap forces the OV7670 data pattern to 255 (white)Now send the letter 'c' to your Arduino and note the symbols/characters that appear in the Serial|Monitor.Replace the lens-cap on your OV7670. Adding the lens cap forces the data pattern to be 0 (black)Send the letter 'c' to your Arduino and note the symbols/characters that appear the Serial|Monitor. These symbols/characters should be different.If no visible characters appear on the screen substitute the following (untested) code in "OV7670_camera_mono.ino": /* Read second byte */ while (PINB & B00000001); // Wait until PCLK pin 8 is low data = (PIND & B11110000) | (PINC & B00001111); // Read data if (data <128) { Serial.write('A'); } else { Serial.write('Z'); } while (!(PINB & B00000001)); // Wait until PCLK pin 8 is highIf the characters change from 'AAAAAA....' to 'ZZZZZZZ.....' when you add/remove the lens cap your OV7670 is okay, in which case upload "OV7670_camera_mono.ino" once more to your Arduino and run the OV7670_camera_mono.pde" sketch on your PC. Point your OV7670 to a dimly lit object.An image should appear in the PC image window, and the number 307201 should appear in the bottom Processing window (307201 = 640*480 pixels + 1 termination character)whenever your press the 'c' key.Now adjust the lighting level to suit.The above tests should determine whether your OV7670 is working .

    View Instructable »
  • lingib commented on lingib's instructable Make Your Own Camera14 days ago
    Make Your Own Camera

    Thank you for the screen-shot of the "OV7670_camera_color" software.The light-gray screen indicates that the Processing 3 software is working correctly.It would appear that you have changed the wiring for "PCLK", "HREF", and "VSYNC". As a result no data is being sent to the PC.For my code to work the wiring should be as follows:/* OV7670 */#define OV7670 0x21 // OV7670 address#define PCLK 8 //pixel clock from OV7670#define HREF 9 //horizontal sync from 0V7670 (not used)#define VSYNC 10 //vertical sync from OV7670#define XCLK 11 //8MHz output to OV7670A wiring-diagram is included in my code header. I am using pins 8,9,10,11 for the following reasons: - I found pins 2,3 unreliable (e...

    see more »

    Thank you for the screen-shot of the "OV7670_camera_color" software.The light-gray screen indicates that the Processing 3 software is working correctly.It would appear that you have changed the wiring for "PCLK", "HREF", and "VSYNC". As a result no data is being sent to the PC.For my code to work the wiring should be as follows:/* OV7670 */#define OV7670 0x21 // OV7670 address#define PCLK 8 //pixel clock from OV7670#define HREF 9 //horizontal sync from 0V7670 (not used)#define VSYNC 10 //vertical sync from OV7670#define XCLK 11 //8MHz output to OV7670A wiring-diagram is included in my code header. I am using pins 8,9,10,11 for the following reasons: - I found pins 2,3 unreliable (external interrupt pin loading ???) - Grouping pins 8,9,19,11 together makes it easier to tape the wires in place.The same pinouts are used for the "OV7670_camera_mono.ino" and "OV7670_camera_color.ino" software.You can confirm that the Arduino code is working using the "Serial|Monitor".Set the Arduino Serial|Monitor baud speed to 1000000 and type "c" in the command window. The link light on the Arduino should flash then, after a few seconds, a string of strange characters should race across the screen. If you want to see a string of visible characters then (temporarily) change code lines 233,296 to read: Serial.write('A'); // Send data to PCOnce you see a string of "AAAAAAAAAAAAAAAAAA...'s" you know the code is working. Change the code back to Serial.write(data); and launch Processing 3 again.

    View Instructable »
  • lingib commented on lingib's instructable Acoustic Radar Display4 weeks ago
    Acoustic Radar Display

    The software for "Acoustic Radar Display" must be loaded in the following sequence:--------------------The Arduino software--------------------(1) Connect a USB cable between your Arduino and your PC(2) Click "Tools|Port" then select your Arduino serial port number.(3) Upload the Arduino sketch to your Arduino(4) Leave the USB plugged in to your PC(5) Close your Arduino IDE ... it is no longer required---------------------Processing 3 Software----------------------(1) Now run the Processing 3 sketch-----------------------Possible error messages------------------------You will get an error message if:(1) the Arduino USB cable is not plugged in to the PC.(2) The Processing serial port is not the same as that used to program the Arduino(3) The error message that you des...

    see more »

    The software for "Acoustic Radar Display" must be loaded in the following sequence:--------------------The Arduino software--------------------(1) Connect a USB cable between your Arduino and your PC(2) Click "Tools|Port" then select your Arduino serial port number.(3) Upload the Arduino sketch to your Arduino(4) Leave the USB plugged in to your PC(5) Close your Arduino IDE ... it is no longer required---------------------Processing 3 Software----------------------(1) Now run the Processing 3 sketch-----------------------Possible error messages------------------------You will get an error message if:(1) the Arduino USB cable is not plugged in to the PC.(2) The Processing serial port is not the same as that used to program the Arduino(3) The error message that you describe indicates that you have tried to upload software to your Arduino while the Processing sketch is running.

    View Instructable »
  • lingib's instructable Make Your Own Camera's weekly stats: 5 weeks ago
    • Make Your Own Camera
      499 views
      2 favorites
      0 comments
  • lingib commented on lingib's instructable CNC Drawing Arm5 weeks ago
    CNC Drawing Arm

    The method I devised for plotting arcs is explained in "Step 11" of https://www.instructables.com/id/CNC-Drum-Plotter/ Two identical triangles are formed when you bisect a chord drawn between the start and end points on a circle. The angle at the center of the circle can now be calculated using trigonometery. The arc-length can then be calculated using the formaula arc=angle*radius.If the start and end points are close together then each chord lies on the arc. My solution is to calculate the target arc-length, divide it into a number of smaller lengths (this makes each chord lie on the arc) and calculate the intermediate end points. The last intermediate point is connected to the target end-point.

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL5 weeks ago
    How to Control a Servo Using GRBL

    Not a problem ... happy to help :)

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL5 weeks ago
    How to Control a Servo Using GRBL

    See note [1] in "Step 3: Modifying GRBL".A copy of "spindle_control.c" is included there ...

    The "spindle_control.c" file in Step 3 expects GRBLversion 1.1f.You are using an earlier version ... Some suggestions:(1) Install GRBL version 1.1f and try again(2) Check your wiring as it is unusual for a servo to overheat

    View Instructable »
  • lingib commented on lingib's instructable CNC Gcode Sender6 weeks ago
    CNC Gcode Sender

    "How can I learn the CNC programming for a cd drive turned 2d plotter .......I can't understand the codes in arduino and processing. Could you please help me."--------------------------------------"How can I learn the CNC programming"--------------------------------------The following link may be helpful:https://makezine.com/2016/10/24/get-to-know-your-cnc-how-to-read-g-code/There are many codes ... fortunately you only need to know a few.Codes that refer to positioning start with the letter 'G' ... they tell the machine where to go and how to get there.Examples:(1) G00 X100 Y150 = Go (rapidly with your pen up) to location X=100, Y=150(2) G01 X100 Y150 = Go (slowly with your pen down) to location X=100, Y=150(3) G02 X100 Y150 = Go clockwise (with your pen down) to l...

    see more »

    "How can I learn the CNC programming for a cd drive turned 2d plotter .......I can't understand the codes in arduino and processing. Could you please help me."--------------------------------------"How can I learn the CNC programming"--------------------------------------The following link may be helpful:https://makezine.com/2016/10/24/get-to-know-your-cnc-how-to-read-g-code/There are many codes ... fortunately you only need to know a few.Codes that refer to positioning start with the letter 'G' ... they tell the machine where to go and how to get there.Examples:(1) G00 X100 Y150 = Go (rapidly with your pen up) to location X=100, Y=150(2) G01 X100 Y150 = Go (slowly with your pen down) to location X=100, Y=150(3) G02 X100 Y150 = Go clockwise (with your pen down) to location X=100, Y=150(4) G03 X100 Y100 = Go CCW (with your pen down) to location X=100, Y=150Codes that start with the letter 'M' are general machine instructions.Examples:(1) M0 = Stop(2) M2 = Program End(3) M3 = Spindle On (Clockwise)(4) M4 = Spindle On (Counterclockwise)-----------------------------------------------------------------------With regards to "I can't understand the codes in arduino and processing"-----------------------------------------------------------------------Arduino, and Processing, programs both use the C, C++ language.If you have never written an arduino program then I recommend purchasing a copy of "Programming Arduino: Getting Started with Sketches", Second Edition, 2016by Simon Monk.The C & C++ languages do not use Gcode, but it is possible to a write program in C/C++, such as interpreter, that intercepts Gcode sent to it and makes your plotter perform the requested action.Such a program is GRBL ... see my instructable https://www.instructables.com/id/How-to-Control-a-Servo-Using-GRBL/ which includes instructions on how to create Gcode from a drawing.

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL6 weeks ago
    How to Control a Servo Using GRBL

    Assuming that you have constructed my "COREXY CNC PLOTTER" described in https://www.instructables.com/id/CoreXY-CNC-Plotter/:(1)Check that your wiring matches that in the photo "GRBL Servo Wiring" in the Intro section of https://www.instructables.com/id/How-to-Control-a-Servo-Using-GRBL/.(2)Delete your C:\Documents\Arduino\libraries\grbl1.1f_servo library.(3)Now reinstall your C:\Documents\Arduino\libraries\grbl1.1f_servo library.(4)It is important that you use a text editor, such as Notepad++, to uncomment line 189 in the file “spindle_control.c” in your C:\Documents\Arduino\libraries\grbl1.1f_servo folder. Do NOT use a word processor.Providing you follow each step in "Step 3: Modifying GRBL" your plotter should work.

    View Instructable »
  • lingib commented on lingib's instructable CNC Dual Arm Plotter7 weeks ago
    CNC Dual Arm Plotter

    One way to disconnect your computer would be to use the SD card slot on your PC and add bluetooth as described in my instructable https://www.instructables.com/id/Add-Bluetooth-to-...But if you want a completely self contained plotter you will need to add an SD card reader module to the plotter and write the necessary code. An LCD display would also be helpful.A self contained plotter is plausible but if I were to go down this track I would modify my https://www.instructables.com/id/CoreXY-CNC-Plotte... plotter as - that plotter is significantly more accurate [1] - plus the paper is easier to load and unload - and the design is scalable[1] See my comment to DejayRezme in the comment section for https://www.instructables.com/id/CNC-Drawing-Arm/ which is also an angle-distance plotter.

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL8 weeks ago
    How to Control a Servo Using GRBL

    Thank you for your comment :)FYI a "scaling" issue in some of the earlier versions of Inkscape has been resolved in the latest release.

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL2 months ago
    How to Control a Servo Using GRBL

    The error message indicates that you may have accidentally added/deleted something while in edit mode. Providing you only delete the "//" comment in line 189 , as shown in slide 3, Step 3, everything should compile.Try this:(1) Delete and reinstall a fresh copy of spindle_control.c. (2) Does it compile ? (3) If so, edit line 189 as shown in Step 3, slide 3(4) If not, the problem is elsewhere ... check that you have GRBLversion 1.1fAll going well it should compile....

    View Instructable »
  • lingib commented on lingib's instructable Multiplexed Echo Locator3 months ago
    Multiplexed Echo Locator

    Thank you for your comment. Glad you like the idea :)

    View Instructable »
  • lingib commented on lingib's instructable Acoustic Radar Display3 months ago
    Acoustic Radar Display

    My first approach would be to replace the USB cable with a two way wireless link. The following tutorials:https://www.instructables.com/id/Arduino-wireless-... https://www.instructables.com/id/Interfacing-OLED-...may be helpful.

    View Instructable »
  • lingib commented on lingib's instructable CNC Drawing Arm4 months ago
    CNC Drawing Arm

    Step 4 : "Each joint is sleeved with a tubular 3/16 inch spacer that is 6mm in length."Length = 6mmOD: 3/16"ID: takes 3mm bolt

    View Instructable »
  • lingib commented on lingib's instructable CNC Drum Plotter4 months ago
    CNC Drum Plotter

    TeraTerm is a PC application available from https://osdn.net/projects/ttssh2/releases/A list of all code, and installation instructions, may be found in Step 6 of this instructable.An alternate terminal program that is specifically designed to work with my plotters may be found at https://www.instructables.com/id/CNC-Gcode-Sender/. I recommend using this application as it is able to transfer data at a higher rate which significantly reduces your plot times.

    View Instructable »
  • lingib commented on lingib's instructable CNC Gcode Sender4 months ago
    CNC Gcode Sender

    In order to help I need further information:(1) What operation?(2) This terminal program will (unless modified) only work with my plotters. Are you attempting to talk to one of my plotters or are you connected to a 3rd-party plotter?(3) All of my plotters respond with a menu. Did a "menu" and a "grey box" appear? (4) Your screen indicates that you have something attached to your serial port (as there is no error message). Does your serial baud speed match your plotter?

    View Instructable »
  • lingib commented on lingib's instructable Dual Sensor Echo Locator4 months ago
    Dual Sensor Echo Locator

    You are welcome ... thanks for commenting :)

    View Instructable »
  • lingib's instructable Multiplexed Echo Locator's weekly stats: 5 months ago
    • Multiplexed Echo Locator
      207 views
      5 favorites
      0 comments
  • Arduino Frequency Synthesiser Using 160MHz Si5351

    Hi,A zipped version of the (original) LiquidCrystal_I2C library is attached. Thanks for drawing my attention to the fact that the original libraries have been updated.Look forward to seeing your code updates.

    Hi,This is the only other library that I can find. The files are dated 1/05/2017 ... hopefully this is what you are looking for.

    View Instructable »
  • lingib commented on lingib's instructable Dual Sensor Echo Locator5 months ago
    Dual Sensor Echo Locator

    The time interval for sensor A is from when Echo line A goes high until Echo line A goes low.Similarly the time interval for sensor B is from when Echo line B goes high until Echo line B goes low.The Echo lines only go high when the sensors receive a trigger pulse. For the system to work we must trigger BOTH sensors together.The ping from sensor B is not heard by sensor A as the transmit pulse is blocked by the addition of masking tape over the transmit sensor B.If you examine the Arduino code you will see that I quickly trigger each sensor in turn then wait until both Echo lines have gone high.The reason for waiting is that there is a considerable delay after a Trig pulse before the Echo line go high ... see the waveforms in my article https://www.instructables.com/id/Enhanced-Ultrason...

    see more »

    The time interval for sensor A is from when Echo line A goes high until Echo line A goes low.Similarly the time interval for sensor B is from when Echo line B goes high until Echo line B goes low.The Echo lines only go high when the sensors receive a trigger pulse. For the system to work we must trigger BOTH sensors together.The ping from sensor B is not heard by sensor A as the transmit pulse is blocked by the addition of masking tape over the transmit sensor B.If you examine the Arduino code you will see that I quickly trigger each sensor in turn then wait until both Echo lines have gone high.The reason for waiting is that there is a considerable delay after a Trig pulse before the Echo line go high ... see the waveforms in my article https://www.instructables.com/id/Enhanced-Ultrason...The point at which both Echo lines go high is defined as my start point ... the slight time difference between Trig pulses is not significant.This time difference, however, may be eliminated by writing a "pattern" to the output port. An example of this technique may be found in my instructable https://www.instructables.com/id/CoreXY-CNC-Plotte...

    View Instructable »
  • lingib commented on lingib's forum topic Launch Stats Not Working5 months ago

    Frustrating isn't it ...Surely it can't be too hard to fix as the Launch Stats feature was working perfectly before it stopped ... just do a code roll-back.

    View Instructable »
  • lingib commented on lingib's instructable Dual Sensor Echo Locator5 months ago
    Dual Sensor Echo Locator

    Thank you for commenting :)

    The time interval for sensor A is from when Echo line A goes high until Echo line A goes low. See the waveforms in my article https://www.instructables.com/id/Enhanced-Ultrason...Similarly the time interval for sensor B is from when Echo line B goes high until Echo line B goes low.The Echo lines only go high when the sensors receive a trigger pulse. For the system to work we must trigger BOTH sensors together.The ping from sensor B is not heard by sensor A as the transmit pulse is blocked by the addition of masking tape over the transmit sensor B.

    View Instructable »
  • lingib's instructable Dual Sensor Echo Locator's weekly stats: 5 months ago
    • Dual Sensor Echo Locator
      1,799 views
      43 favorites
      8 comments
  • lingib commented on lingib's forum topic Launch Stats Not Working5 months ago

    Thanks Yonatan24 ...

    Thanks Troy :)

    View Instructable »
  • lingib commented on lingib's instructable Dual Sensor Echo Locator5 months ago
    Dual Sensor Echo Locator

    Sounds like you have a project in mind! Thanks for commenting :)

    View Instructable »
  • lingib commented on lingib's instructable Dual Sensor Echo Locator5 months ago
    Dual Sensor Echo Locator

    Glad you like the idea ... thanks for commenting :)

    View Instructable »
  • lingib commented on lingib's instructable Dual Sensor Echo Locator5 months ago
    Dual Sensor Echo Locator

    The beam-width of an ultrasonic sensor is approximately 30 degrees ... think of this as, say, 100 individual beams each at a slightly different angle to the one next to it.In physics the "angle-of-incidence" equals the "angle-of-reflection" on the opposite side of a "perpendicular" drawn at the point of reflection. Ultrasonic "radar-like" displays using a servo only see the the beam that gets reflected directly back (along the perpendicular)... the other 99 beams get lost.This detector uses the same principle. Sensor A sees the beam that gets reflected directly back ... the other 99 beams each get reflected at slightly different angles.Sensor B sees one of these 99 reflected beams ... the other 98 beams get lost.Photo 2 in Step 3 shows a diagra...

    see more »

    The beam-width of an ultrasonic sensor is approximately 30 degrees ... think of this as, say, 100 individual beams each at a slightly different angle to the one next to it.In physics the "angle-of-incidence" equals the "angle-of-reflection" on the opposite side of a "perpendicular" drawn at the point of reflection. Ultrasonic "radar-like" displays using a servo only see the the beam that gets reflected directly back (along the perpendicular)... the other 99 beams get lost.This detector uses the same principle. Sensor A sees the beam that gets reflected directly back ... the other 99 beams each get reflected at slightly different angles.Sensor B sees one of these 99 reflected beams ... the other 98 beams get lost.Photo 2 in Step 3 shows a diagram of the two beam paths and the equations for determining the X and Y coordinates relative to sensor A

    View Instructable »
  • lingib commented on lingib's instructable Acoustic Radar Display5 months ago
    Acoustic Radar Display

    The peas, and black berries, ""worked well" too!Thanks for commenting :)

    You're welcome :)

    View Instructable »
  • lingib commented on lingib's instructable Dual Sensor Echo Locator5 months ago
    Dual Sensor Echo Locator

    Thank you :)Oh for a 3D printer ...

    View Instructable »
  • lingib commented on lingib's instructable Enhanced Ultrasonic Range Finder5 months ago
    Enhanced Ultrasonic Range Finder

    Possibly ,,, but I can't answer as I don't have one to experiment with.I searched the internet to find circuit diagrams for the HC-SR04 and Hy-SRF05 ultrasonic sensors. To my surprise I came up with four different circuits depending on the manufacturer.All circuits were similar but required a bit of oscilloscope probing to find a suitable point for attaching the wire. I avoid soldering to copper track as that has virtually no "peel strength".

    View Instructable »
  • lingib commented on lingib's instructable Acoustic Radar Display5 months ago
    Acoustic Radar Display

    The HC-SR04 and HY-SRF05 sensors have a maximum range of around 4 meters. I have restricted this range to 1 meter in my code.

    View Instructable »
  • lingib commented on lingib's instructable Acoustic Radar Display5 months ago
    Acoustic Radar Display

    Step 7 contains a bug-fix for "acoustic_radar_sender_1.ino" which exhibits "scan-creep".My thanks to https://www.instructables.com/member/newtoeu/instr... for pointing it out.

    View Instructable »
  • lingib commented on lingib's forum topic Launch Stats appear to have stopped ?5 months ago

    Probably not as we are al[ using different ISP'sMy guess is that it's a coding issue ... I flagged this issue as a potential "bug" but so far have had no acknowledgement that they are aware of the issue.

    View Instructable »
  • lingib's instructable Acoustic Radar Display's weekly stats: 5 months ago
    • Acoustic Radar Display
      25,469 views
      366 favorites
      29 comments
  • lingib commented on lingib's instructable Acoustic Radar Display5 months ago
    Acoustic Radar Display

    Well done ... your video is great :)To double the 100cm radius to 200cm radius:(1) double the numbers in // ----- label the arcs fill(255); //light gray text textAlign(LEFT, BOTTOM); text("100cm", +5, -width/2); //"100cm" text("75", +5, -width/2*0.75); //"75cm" text("50", +5, -width/2*0.5); //"50cm" text("25", +5, -width/2*0.25); //"25cm"// ----- new code followstext("200cm", +5, -width/2); //"200cm"text("150", +5, -width/2*0.75); //"150cm"text("100", +5, -width/2*0.5); //"100cm"text("50", +5, -width/2*0.25); //&quo...

    see more »

    Well done ... your video is great :)To double the 100cm radius to 200cm radius:(1) double the numbers in // ----- label the arcs fill(255); //light gray text textAlign(LEFT, BOTTOM); text("100cm", +5, -width/2); //"100cm" text("75", +5, -width/2*0.75); //"75cm" text("50", +5, -width/2*0.5); //"50cm" text("25", +5, -width/2*0.25); //"25cm"// ----- new code followstext("200cm", +5, -width/2); //"200cm"text("150", +5, -width/2*0.75); //"150cm"text("100", +5, -width/2*0.5); //"100cm"text("50", +5, -width/2*0.25); //"50cm"(2) Change the following four code lines in// =======================// plot data// ======================= stroke(255, 0, 0); //set data1 color to red if (Ping[index][0]>100) Ping[index][0] = 1000; //hide by printing off-screen ellipse(width/2*Ping[index][0]/100, 0, 5, 5); //plot data1 stroke(0, 0, 255); //set data2 color to blue if (Ping[index][1]>100) Ping[index][1] = 1000; //hide by printing off-screen ellipse(width/2*Ping[index][1]/100, 0, 5, 5); //plot data2// ----- new code follows stroke(255, 0, 0); //set data1 color to red if (Ping[index][0]>200) Ping[index][0] = 1000; //hide by printing off-screen ellipse(width/2*Ping[index][0]/200, 0, 5, 5); //plot data1 stroke(0, 0, 255); //set data2 color to blue if (Ping[index][1]>200) Ping[index][1] = 1000; //hide by printing off-screen ellipse(width/2*Ping[index][1]/200, 0, 5, 5); //plot data2

    The arduino code is self contained and does not use libraries

    Check that:(1) Check that the link on the ULN2003 controller is present. Removing that link removes power to the motor and you won't see any lights.(2) Check that 5 volts is getting to the ULN2003 controller.(3) None of the lights will light when the motor is first turned on as all outputs will be zero.The motor should be rotating if your display is seeing code. Check, with a voltmeter that voltage is appearing on the IN1, IN2, IN3, IN4 input pins. (I have not tried this but you could disconnect say IN1 and apply 5 volts directly, via a 560 ohm .. or 1000 ohm resistor to that pin ... if the controller is okay then one of the lights should light).(4) Is it possible that something is jamming the motor shaft?(5) Check also your wiring ... I tape my arduino connections as they have a ha...

    see more »

    Check that:(1) Check that the link on the ULN2003 controller is present. Removing that link removes power to the motor and you won't see any lights.(2) Check that 5 volts is getting to the ULN2003 controller.(3) None of the lights will light when the motor is first turned on as all outputs will be zero.The motor should be rotating if your display is seeing code. Check, with a voltmeter that voltage is appearing on the IN1, IN2, IN3, IN4 input pins. (I have not tried this but you could disconnect say IN1 and apply 5 volts directly, via a 560 ohm .. or 1000 ohm resistor to that pin ... if the controller is okay then one of the lights should light).(4) Is it possible that something is jamming the motor shaft?(5) Check also your wiring ... I tape my arduino connections as they have a habit of falling out. It only takes one pin.

    You're welcome ... thank you :)

    View Instructable »
  • lingib commented on lingib's instructable Enhanced Ultrasonic Range Finder5 months ago
    Enhanced Ultrasonic Range Finder

    The sound waves from the transmitter behave like those from a normal radio speaker ... except that we can't hear the sound as it is above our hearing range. Utrasound does penetrate non-metallic objects as it is used in the medical profession but I haven't tried.My scanner detects all solid objects, such as glass metal and wood, but ignores cats and soft furnishings.

    Glad you like it :)

    View Instructable »
  • lingib commented on lingib's instructable Acoustic Radar Display5 months ago
    Acoustic Radar Display

    Just a thought ... try increasing the motor parameter in the arduino heading from Delay=2; to say Delay=4;I had one motor that refused to start when the delay was time was small.

    The short answer is no .... The speed of rotation is affected by all of the following:Within the arduino header: (a) reduce the Delay = 2; to Delay = 1;(b) decrease the "Speed_of_rotation" from 30 down to 1.(c) you could double the motor speed by changing the motor pattern to "full-stepping". I tried this but the 28BJY-48 motor then required a minimum delay of Delay=2 for reliable starting so nothing was gained ... I opted for "half-stepping" as that felt smoother and works with a delay of 1.The serial BAUD speed also affects the speed. Use as high a speed as possible as strings of data take longer at 9600 bauds which slows the hand-shaking.Factors that

    View Instructable »
  • lingib commented on lingib's instructable Acoustic Radar Display6 months ago
    Acoustic Radar Display

    You're welcome. Thank you for commenting :)

    Thank you for your comment :) I recently hired a car while overseas and noticed that lights on the wing-mirrors lit up to warn you of nearby vehicles. Perhaps there is already something similar for bikes?

    Thanks :)

    Thank you for the reference and also for your comment. It's amazing how things get simpler with time !!!

    View Instructable »
  • lingib commented on lingib's instructable Multi-task Your Arduino6 months ago
    Multi-task Your Arduino

    Thank you for your comment :)You could try an array-of-arrays-of-arrays" such as "lamps[pattern][delay][direction]". Such an array would allow any number of different of delays, and directions, to be applied to any pattern. Each lamp delay would require the use of "static" counters.Good luck ...

    View Instructable »
  • lingib's instructable Enhanced Ultrasonic Range Finder's weekly stats: 6 months ago
    • Enhanced Ultrasonic Range Finder
      196 views
      5 favorites
      0 comments
  • lingib commented on lingib's instructable Ultrasonic Range Finder6 months ago
    Ultrasonic Range Finder

    Photo 1 is the first photo shown in any given step.Click on any photo and that photo will be displayed along with arrow keys to the left and right. Now click the left-hand arrow until the left-hand arrow disappears. Photo 1 is the left-most image.For example, in "Step 3", Photo 1 shows the HC-SR04 ultrasonic sensor module, and photos 2,3,4, and 5 show waveforms for distances of 5cm, 10cm, 20cm, and 200cm.Restart your browser if you see no photos ...

    View Instructable »
  • lingib commented on lingib's instructable CNC Gcode Sender7 months ago
    CNC Gcode Sender

    An error message will appear if the COM port number in line 113 doesn't match your actual COM port number.The error message should disappear, and the terminal connect, if you make the following changes to the code:Step 1:Change line 69 to read "boolean debug_on = true;"Step 2:Run the code and note your COM port numbers. (Let's assume that your highest COM port number equals 1)Step 3:Change line 113 from "String arduino_port = Serial.list()[2];" to read "String arduino_port = Serial.list()[1];"Step 4:Rerun the code ... the error message should disappear. If not try another COM port number.Step 5:Once the error message disappears change line 69 to read "boolean debug_on = false;"

    View Instructable »
  • lingib commented on lingib's instructable Ultrasonic Range Finder7 months ago
    Ultrasonic Range Finder

    Thank you for sharing your project :)Your use of a second sensor for auto-calibration is clever. Does the distance vary much between day and night?

    View Instructable »
  • lingib's instructable Ultrasonic Range Finder's weekly stats: 7 months ago
    • Ultrasonic Range Finder
      5,098 views
      63 favorites
      7 comments
  • lingib commented on lingib's instructable Ultrasonic Range Finder7 months ago
    Ultrasonic Range Finder

    Having a LED light at a specific height (distance) is straight forward.Example:// ----- add this to the header#define LED 13//onboard LED on arduino pin 13// ----- add this to setup()pinMode(LED, OUTPUT);//initialize the onboard LEDdigitalWrite(LED,LOW);// ----- add this to the main loop()int distance = int(Distance);//convert (distance==15) ? digitalWrite(LED,HIGH): digitalWrite(LED,LOW);Optionally, use a switch(distance){} function to set different distances.You still need the ultrasonic sensor ...

    A possible solution is given in the above answers.

    View Instructable »
  • lingib commented on lingib's instructable CNC Robot Plotter7 months ago
    CNC Robot Plotter

    Software is not required if you remove the 5 volt supply to the motor(s) using a microswitch.The robot spends most of its time in a "process()" function. If you really need a software solution then consider writing an interrupt routine. This will eliminate any possible robot delays in responding to your sensors.Good luck :)

    View Instructable »
  • lingib posted a topic Web Site Improvements7 months ago
  • lingib commented on lingib's instructable CoreXY CNC Plotter7 months ago
    CoreXY CNC Plotter

    My draw_line() function is a variation of Bresenham's Line Drawing Algorithm and uses "octants" as defined in the attached diagram.Bresenham's algorithm is only valid for "octant 0" which means that you have to convert each XY coordinate to "octant 0" for processing, then convert the results back to the original octant.There are also numerous software solutions, one of which is derived in my instructable https://www.instructables.com/id/CNC-Drum-Plotter/ (Step 5)In that instructable I used switch() functions, each with eight conditions, to encode and decode each of the eight octants. This works but is relatively slow as each plot requires up to twenty-four comparisons (eight for encoding; eight for decoding the X axis; and eight for decoding the Y axis).The...

    see more »

    My draw_line() function is a variation of Bresenham's Line Drawing Algorithm and uses "octants" as defined in the attached diagram.Bresenham's algorithm is only valid for "octant 0" which means that you have to convert each XY coordinate to "octant 0" for processing, then convert the results back to the original octant.There are also numerous software solutions, one of which is derived in my instructable https://www.instructables.com/id/CNC-Drum-Plotter/ (Step 5)In that instructable I used switch() functions, each with eight conditions, to encode and decode each of the eight octants. This works but is relatively slow as each plot requires up to twenty-four comparisons (eight for encoding; eight for decoding the X axis; and eight for decoding the Y axis).The algorithm that I have developed for this plotter recognizes that a circle not only contains eight "octants" but also has four "quadrants": - quadrant 0 contains octants 0,1 - quadrant 1 contains octants 2,3 - quadrant 2 contains octants 4,5 - quadrant 3 contains octants 6,7If you study the attached diagram you will note that dX is always positive in "quadrants" 0,3 and that dY is always positive in "quadrants" 0,1. Now add a "swap" flag and the number of comparisons needed to plot each point in the draw_line() function reduces to eight which is significantly faster.Hopefully this clarifies the following comment which appears in my draw_line() function:"The algorithm automatically maps all "octants" to "octant 0" and automatically swaps the XY coordinates if dY is greater than dX. A swap flag determines which motor moves for any combination X,Y inputs. The swap algorithm is further optimised by realising that dY is always positive in "quadrants" 0,1 and that dX is always positive in "quadrants" 0,3."

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL8 months ago
    How to Control a Servo Using GRBL

    In Step 6, "Configure your plotter", I made the comment:"To ensure that GRBL has full control of the XYZ speed settings I set the F(feed value) in the Inkscape’s “Default Tool” menu to a value higher than the $110, $111, and $112 values in GRBL on the basis that the lowest speed wins ... this approach appears to work." Instructions for increasing Inkscapes default F100 to F10000 are given in Step 4, photos 6 & 7.It would appear that your F100 (feed) setting was the cause of your speed problem.While I think about it, there appears to be a g-code scaling issue with some versions of Inkscape (https://forum.inkscapecommunity.com/index.php?PHPSESSID=c52vjf79gcfs02m5432siglr53&topic=486.0)Two solutions:(1)Search this topic for "gcodetools.py....

    see more »

    In Step 6, "Configure your plotter", I made the comment:"To ensure that GRBL has full control of the XYZ speed settings I set the F(feed value) in the Inkscape’s “Default Tool” menu to a value higher than the $110, $111, and $112 values in GRBL on the basis that the lowest speed wins ... this approach appears to work." Instructions for increasing Inkscapes default F100 to F10000 are given in Step 4, photos 6 & 7.It would appear that your F100 (feed) setting was the cause of your speed problem.While I think about it, there appears to be a g-code scaling issue with some versions of Inkscape (https://forum.inkscapecommunity.com/index.php?PHPSESSID=c52vjf79gcfs02m5432siglr53&topic=486.0)Two solutions:(1)Search this topic for "gcodetools.py.txt" by "Shockster" and follow his instructions ... (2)Downgrade to an earlier version of Inkscape until the problem is fixed.

    View Instructable »
  • lingib commented on lingib's instructable How to Control a Servo Using GRBL8 months ago
    How to Control a Servo Using GRBL

    Thank you for your interest in my project ... congratulations on completing it ... nice plot:)Regarding your calibration issue ... I have no explanation for why 100mm (10cm) should be translated to 30mm!!!Examine your g-code file in a text editor such as Notepad++ and confirm that the difference between your minimum and maximum X values is 10cm ... and the same for the Y-axis.If not then try an earlier version of Inkscape as some of the later versions had a scaling error.

    View Instructable »
  • More Activities