collapse

Recent Posts

Pages: [1] 2 3 ... 10
1
Other / NanOMeter
« Last post by Protowrxs on January 01, 2020, 12:59:44 PM »
The NanOMeter
(Pronounced Nan OM eter – Like speedometer of course)
 [ You are not allowed to view attachments ]
Having historically kludged together a breadboard, or dead bug wired something to simply test an SR04, measure a resistance, or test a servo or stepper driver, I finally decided I’d do something a little more permanent. What trigger this was seeing VolsR’s (https://www.instructables.com/member/VolosR/) little Nano based “semi” multi-meter solution on Instructables.com.

His circuit info wasn’t completely accurate and he has since developed a more advanced printed circuit board version, but there was enough to get me started on putting a little multi function meter / tester together. I followed his basic concept and used his code as the core as it worked well, and then added a few more functions I needed or wanted. I even used his basic layout of his original board as it just worked well.

At this point the little box can:
1) Measure DC voltage (with reverse voltage diode protection),
2) Read an analog input and show the value, as well as the min, max and average values
3) Measure the resistance of a resistor
4) Measure the voltage drop of a diode or LED (and test the LED there too)
5) Act as a beeping / LED continuity tester
6) Generate a PWM output
7) Test a servo
8 ) Test a ping / SR04 sensor
9) Drive a stepper motor
10) Monitor the external battery supply voltage on the Vin pin
11) Allow adjustments to the data dump timer (more later)
12) Do an I2C bus scan and show attached device addresses.

Additionally the device is outputting data for the current mode to the serial port (USB or TTL) that can be used to log sensor data over time. It can also be minimally controlled over the serial port with mode toggle or selection, PWM width change, servo pulse changes, and logging time period changes. The data is dumped in a CSV format with the mode name, millis(), data1, data2, data3, data4 format. Using the millis() value one could time chart the data if desired. You could also use a wireless serial bridge such as a 2.4G or Bluetooth version and log that data back remotely as well I guess.

The I2C bus is exposed next to the display but at this point the Nano is at 99% of memory used on my compiler (30624 or 30720 bytes), so there is not much room for growth. Your compiler mileage may vary. I’m compiling under Arduino 1.8.7 on Ubuntu 18.04 with the Adafruit 1.0.0 SoftServo library and the 1.1.3 Stepper library. You can comment the “useFonts” #ifdef to remove the font usage and use the normal text scaling instead. It does save quite a bit of space.

Unfortunately the libraries, along with the fonts, eat up a lot of memory on the device. The images do not make any difference so removing them doesn’t help a lot. One could remove the fonts and have more programming space if desired I think. Only 69% of the dynamic memory is being used so I do not believe there will be any stability issues. Obviously the code could be optimized but I’m pretty done with it at this point. In reality only the A3 and A6 pins are left to be used so there isn’t much left to work with there either. My code is not pretty nor optimized but it works so I’ll leave it at that.

Current pin uses are:
   (P) = PWM Pin
//  0      - Rx - On header pin lower right - Used to receive commands from serial console, etc
//  1      - Tx - On header pin lower right - Dumps CSV data to here
//  2      - Left Button
//  3(P)- Middle Button (on interrupt)
//  4      - Right Button
//  5(P)- Software Servo Pin
//  6(P)- PWM output on three pin header
//  7      - Ping Trigger
//  8      - Ping Echo
//  9(P)- Stepper IN1
// 10(P)- Stepper IN3
// 11(P)- Stepper IN2
// 12      - Stepper IN4
// 13      - Used for speaker output and LED display
// A0     - Main Analog Input
// A1     - External Battery Power Supply Voltage 100k/10k divider
// A2     - Input for Diode and Resistor testing
// A3     - SPARE
// A4     - I2C bus
// A5     - I2C bus
// A6     - SPARE
// A7     - Voltage Meter input - on 100k/10k divider

I used Adafruit’s SoftServo library as the normal servo library kills some PWM pins and I wasn’t sure if they would be needed. It works well for this use and I’ve used it on other robots as well. The AdaFruit OLED library is used for the SSD1306 device which is the 128 x 32 pixel version. VolsR’s updated version uses the larger 128x64 version but personally I would rather have the board space than more display space for this project.

To add the images I “temporarily borrowed” some icon art from online (I’ll give them back when I’m done) and converted them to the HEX format needed using the handy image2cpp online at at https://diyusthad.com/image2cpp. Works great and good enough results for me.

 [ You are not allowed to view attachments ]  [ You are not allowed to view attachments ]

The Circuit

I haven’t drawn a full schematic up but each test point is pretty simply. Using the above pin outs one should be able to replicate it. The voltage dividers on the volt meter and external battery are simple 100K / 10K voltage dividers. The buttons simply go from the pins to ground and we use the internal pull up resistors on the Nano. I did not use any pull up resistors on the I2C display and it works fine.  The tiny speaker connects directly to pin13 and to ground. It does show a positive terminal so I connected it like that. The dropping resistor for the diode / led is a 2.2K in mine, just tweak the code as needed.

The Buttons

With only three input buttons there are limits BUT in reality you can get six (6) options out of them at least. The middle button is hooked to an interrupt that toggles the “mode” for the box. The left (down) and right (up) buttons selection options within the modes if there are any, i.e. in PWM they change the pulse widths, etc. Simultaneously pressing the Up and Down toggle the “Pot Mode” allowing a pot to be connected to the analog input to control the PWM, Servo and data dump timer modes. Just makes it easier to test things. Pressing the down and select toggles the beeping sounds on and off, including the continuity mode. In analog reading mode the down button resets the averages.

The Down Sides

There are obviously some down sides to the little box. For one the voltage measurements aren’t the most accurate. I’m not sure if it’s the voltage drop on little 1N914 diode I’m using for reverse protection or something else. I do have an adjustment in the code to offset the diode and it’s accurate at lower voltages but off at higher voltages. I know voltage drop can vary by voltage but wasn’t aware it was that much.

The Conclusion

So far the little NanOMeter has been pretty handy. I’ve built a couple probe wires out of header jumper wires to more easily use the volt meter and continuity tester piece. Also built a header adapter for the analog input and resister/diode/continuity connectors from male headers that can be inserted to flip the gender of the connectors without surgery. I also added an additional header that provides power and ground directly from the battery (7.4v old Canon camera battery) that I can use to power bigger voltage / current requirements without leaning on the Nano’s regulator too much. Great for driving stepper motor controllers and could be used to drive H bridge motor drivers as well.

So if you need a simple voltmeter/analog tester/ohm meter/diode drop/continuity tester/PWM tester/Sevro tester/SR04 tester/stepper tester/data logger/I2C bus scanner, this could be useful.

The NanOMeter now has a prominent place on my bench and is quite handy when I need to check an address on an I2C device, validate a resistor value, test an analog based sensor etc.

I'm sure many here can improve, fix, and enhance this little project!

Cheers – ProtoWrxs
https://www.protowrxs.com/index.php/2020/01/01/nanometer-2020/

 [ You are not allowed to view attachments ]

Edit: Remove source in post - It's too big apparently...
2
Tutorials / Re: Investigating the VL53L0X Laser Rangefinder
« Last post by erco on December 30, 2019, 10:45:44 PM »
FANTASTIC work, BaldwinK! Love that tiny Picaxe BASIC crunched code. Ordering some of these modules now!
3
3D Printing / PS4 Single Handed Controller Deployed (part 7 of 7)
« Last post by Gareth on December 30, 2019, 09:52:29 AM »
Last part of a 7 part series.
Making a "PS4 Left Single Handed Controller"

(workflow might be of interest if you rewind to "Part 1"  8)
In a nutshell I was asked to make a single left handed PS4 controller for a person who is recovering from a "Stroke".

 Good news is the PS4 left handed controller is finished and in transit ... with Merlin in tow.



My game controller skills were good enough to shoot a "Striker Mech" in the rear-end (not the best place apparently).
It is quite a comfortable grip and I was able to play for a couple of hours.....per day...for a week...just to test...



All controls were implemented, using original switch internals where possible.



Merlin went off with the package, he is guarding the Digital pad (many iterations and test prints went into this to get just that right feel).



Menu buttons sweet and simple, and to the right is the "look around" joystick.



Beneath the whole controller is the movement joystick which sits on your knee or cushion, so pushing the whole controller side to side or backwards/forwards or pressing down give the appropriate response, this effectively illuminates the use of a second hand....(win win).

Comfy, ergonomic and easily adjustable... you might notice the bottom buttons are on slide rails, which I could adjust for best fit and then epoxied to fix permanently




4
3D Printing / "D" -Pad Workio just like Magic (Will Merlin stay or Go) (part 6 of 7)
« Last post by Gareth on December 30, 2019, 09:51:27 AM »


The "D"  pad (aka directional pad NSEW ) is now operational.

Here it is being tested in the Blender Game engine, practising my turbo jumping.

It consists of 4 tactile switches fitted into a wedge shaped holder , which slots into a holding carrier shell which then slots onto the main Joystick.
The  "Stick" part is also a cylindrical wedge shape which pivots at the bottom of the holder.
Wiring is all routed internally.
The back of the carrier shell is capped of with a 3D printed Lego compatible 2x2 addition... I am fighting my long attachment to the "Merlin" figure, as he might remain with the joystick when it exchanges hands, though my Elves will be glad to see him go..... :-(
5


Mounted the DIgital Switches permanently with epoxy resin so no turing back now.
The Top Joystick is also operational, the blue carriage can be rotated so the user can adjust for optimal comfort.
ToDo List :-
(1) Top "D-Pad"  (awaiting tactile switches)
(2) Four Game buttons (aka Square/Circle/Triangle/Cross using conductive switches)
(3) Bottom Joystick (with crossover mech. for reversing the direction with a DPDT Switch)
6
3D Printing / Menu Workio ! (part 4 of 7)
« Last post by Gareth on December 30, 2019, 09:49:49 AM »


Custom Joystick for people who have use of only one hand.
This is the first integrated working part of the controller aka "The Menu System" that enables the basic housekeeping of the Playstation 4.
MRL is helping a great deal for debugging using the Joystick service.

Its starting to take shape now... much tweaking though.

The Wiring Loom is complete, I went for a plug/socket connector, which means that the controller will be easy to swap out and upgrade (if need be).
For one handed use I have salvaged an old Canon camcorder hand strap,  as comfortable as a glove.

Current iteration is below, ...... and yes that is a 3D print  Lego attachment point on top , a suprise addition so the person (or his son) can add extra customisation.
7
3D Printing / L1 trigger design Workio (Hori controller) (part 3 of 7)
« Last post by Gareth on December 30, 2019, 09:48:50 AM »


Workio - First "Live" testing of the top trigger finger mech.
The concept "Hori" uses is so simple
It's basically a bare un-insulated black carbon SMD resistor, a flexible conductive carbon coated dome sits on top of it, when it is pressed against the resistor it progressively shorts out the resistor underneath, giving a change in its resistance, soooo simple and effective.

In the GIF above you can see the "ry" channel moving between -1.000 to +1.000.
Digital 7 is activated because of the way I have installed the switch mechanism, it really needs repositioning.







Quick mashup to test the trigger theory...

8
3D Printing / Hori aka PS4 Joystick Mappings (part 2 of 7)
« Last post by Gareth on December 30, 2019, 09:47:17 AM »


This is part of my PS4 Single handed Joystick controller.
(not for confusion - the above graphic of Hori controller is not on the MRL Joystick service, its a paint mash for my reference).
These are the mappings I have traced prior to desoldering the main board (just to keep a track of directions when shoehorned into the new system).
9
3D Printing / PS4 Single Left-Handed Controller (part 1 of 7)
« Last post by Gareth on December 30, 2019, 09:44:58 AM »


I had a request to make a custom PS4 Left handed Joystick for a person who is recovering from a "Stroke", thought it would be interesting reference.
Above is just a first a first bite of the cherry, subject to many/many changes.

First step (above)  :- create a cradle for the main board to sit in, then grow everything out from that.
To follow a nifty handle.... with viewport for board....

....and its kinda ergo...

I am using as a base, the internals of a  "Hori Wired mini Gamepad"  its a PS4 Official Licensed Product, the circuit board within is very small, which is why I went for this version.
First problem was decoding the Human Interface Device signals, i.e. what button affects what part of the USB packet.





After fluffing around and installing "Device Monitoring Studio" to make this easier.... not!!!!

.....so plumped for a much esier solution using GroG's MyRobotLab.

Now using the joystick service I have a reference and test platform for developing the rest of the Joystick.



Here is what the internals look like (long photo motage), best thing is that the silk screen text explains what is what... winwin.























10
Rolling / Re: Time of Flight >>> Rounded Corners !!!
« Last post by BaldwinK on December 04, 2019, 05:46:08 PM »
I know I am late to the party but firstly thank you for introducing me to the VL53L0X laser rangefinder, hiding behind an uninformative descriptor.

I liked your development approach to the LIDAR project. A radio data link to avoid slip rings, electronic compass for direction etc. At that stage perhaps self powering the rotating assembly and spinning on a geared motor?

I had planned to mount the chip vertically and rotate a mirror to see how it scanned but having eventually taken delivery of a couple of devices that still hasn’t happened.

I, too, wondered about the rounded corners of the point map and note the discussion on radiated cones. This video clip shows the comparison against the HC-SR04 ultrasonic unit which I have used many times. You can see how viewing the laser via an electronic camera shows the cone of pulsed light.


Pursuing the rounded corners issue, there is an accuracy problem that others have reported. This video clip shows similar experiments to yours and the humorous but unhappy conclusion.


So instead I have used my time to delve deeper into the VL53L0X chip itself because it is so much smaller than the ultrasonic units and it would be nice to have a simple replacement for collision detection. Findings in the Tutorial section.
Pages: [1] 2 3 ... 10

* Search


* Recent Topics

NanOMeter by Protowrxs
[January 01, 2020, 12:59:44 PM]


Investigating the VL53L0X Laser Rangefinder by erco
[December 30, 2019, 10:45:44 PM]


PS4 Single Handed Controller Deployed (part 7 of 7) by Gareth
[December 30, 2019, 09:52:29 AM]


"D" -Pad Workio just like Magic (Will Merlin stay or Go) (part 6 of 7) by Gareth
[December 30, 2019, 09:51:27 AM]


PS4 Joystick Digitals 4,5,6,7,10 - Analog's Lx,Ly,Rx,Ry Workio (part 5 of 7) by Gareth
[December 30, 2019, 09:50:37 AM]


Menu Workio ! (part 4 of 7) by Gareth
[December 30, 2019, 09:49:49 AM]


L1 trigger design Workio (Hori controller) (part 3 of 7) by Gareth
[December 30, 2019, 09:48:50 AM]


Hori aka PS4 Joystick Mappings (part 2 of 7) by Gareth
[December 30, 2019, 09:47:17 AM]


PS4 Single Left-Handed Controller (part 1 of 7) by Gareth
[December 30, 2019, 09:44:58 AM]


Time of Flight >>> Rounded Corners !!! by BaldwinK
[December 04, 2019, 05:46:08 PM]


The unnamed (yet) quatruped spider project by maelh
[December 04, 2019, 08:38:58 AM]


American Civil War Robot by kingart3
[November 27, 2019, 06:39:47 PM]


2D Side Scroller Cyberpunk themed by Killer Angel
[November 12, 2019, 07:56:15 AM]


Ebot SL by erco
[October 31, 2019, 04:27:36 PM]


Discord anyone? by tinhead
[October 20, 2019, 05:35:59 AM]

* Recent Posts

NanOMeter by Protowrxs
[January 01, 2020, 12:59:44 PM]


Re: Investigating the VL53L0X Laser Rangefinder by erco
[December 30, 2019, 10:45:44 PM]


PS4 Single Handed Controller Deployed (part 7 of 7) by Gareth
[December 30, 2019, 09:52:29 AM]


"D" -Pad Workio just like Magic (Will Merlin stay or Go) (part 6 of 7) by Gareth
[December 30, 2019, 09:51:27 AM]


PS4 Joystick Digitals 4,5,6,7,10 - Analog's Lx,Ly,Rx,Ry Workio (part 5 of 7) by Gareth
[December 30, 2019, 09:50:37 AM]


Menu Workio ! (part 4 of 7) by Gareth
[December 30, 2019, 09:49:49 AM]


L1 trigger design Workio (Hori controller) (part 3 of 7) by Gareth
[December 30, 2019, 09:48:50 AM]


Hori aka PS4 Joystick Mappings (part 2 of 7) by Gareth
[December 30, 2019, 09:47:17 AM]


PS4 Single Left-Handed Controller (part 1 of 7) by Gareth
[December 30, 2019, 09:44:58 AM]


Re: Time of Flight >>> Rounded Corners !!! by BaldwinK
[December 04, 2019, 05:46:08 PM]


Investigating the VL53L0X Laser Rangefinder by BaldwinK
[December 04, 2019, 05:35:57 PM]


Re: The unnamed (yet) quatruped spider project by maelh
[December 04, 2019, 08:38:58 AM]


Re: The unnamed (yet) quatruped spider project by Nemesis
[November 28, 2019, 12:58:18 PM]


Re: The unnamed (yet) quatruped spider project by tinhead
[November 28, 2019, 10:09:46 AM]


Re: The unnamed (yet) quatruped spider project by Bajdi
[November 28, 2019, 08:44:38 AM]