Most ever online: 47
Guests: 47,
Members: 0
on Wednesday 21 February 2018 - 23:52:15
Chatbox
You must be logged in to post comments on this site - please either log in from the Login box or from here.If you are not registered click here to signup.
[quote:a1ba9ca4c9="AdrianJ"]Measuring the position might be the harder of the several problems.[/quote:a1ba9ca4c9] For rotational values a digital compass module will do, at least until the earth's magnetic field starts to fluctuate and reverse, but then problem's focus will shift anyway. For elevation an angle/acceleration sensor will do, I would look out for IMU-quadrocopter hardware, BNO055 seems to be a nice one, breakout boardhttps://www.adafruit.com/product/2472
You can create four types of ports for the program you copied and worked on, and call each of them. [code:1:31d2cde52f] Hx711_clk Alias Portd.2 Hx711_dat Alias Pind.3
' ' ****************************************************************************** ' * Subroutine to retrieve A/D data from channel A of HX711 with a gain of 128 * (Hx711ad = 2's complement format 24bit) ' ****************************************************************************** ' Hx711get: Hx711ad = 0 For Hx711count = 23 To 0 Step -1 'Extract 24-bit data. Set Hx711_clk 'Set the [PD_SCK] pin of the HX711 to [H]. Waitus 1 'Period of [H]. (T3 = 1uS) Hx711ad.hx711count = Hx711_dat 'Place the data of the [DOUT] pin of HX711 in each bit. Reset Hx711_clk 'Set the [PD_SCK] pin of the HX711 to [L]. Waitus 1 'Period of [L]. (T4 = 1uS) Next Hx711count ' ' * Send the 25th clock pulse (set channel A and gain to 128 for the next conversion) * ' Set Hx711_clk 'Set the [PD_SCK] pin of the HX711 to [H]. Waitus 1 'Period of [H]. (T3 = 1uS) Reset Hx711_clk 'Set the [PD_SCK] pin of the HX711 to [L]. Waitus 1 'Period of [L]. (T4 = 1uS) ' If Hx711ad.23 = 1 Then 'Is the 24-bit value of A/D a negative value? Hx711ad = Hx711ad Or &HFF000000 'Set to a negative value of 32 bits. End If Return[/code:1:31d2cde52f] Assign 4 types of ports directly to 4 types of subroutines as shown below. [code:1:31d2cde52f]Hx711get1: Hx711ad = 0 For Hx711count = 23 To 0 Step -1 'Extract 24-bit data. Set Portd.2 'Set the [PD_SCK] pin of the HX711 to [H]. Waitus 1 'Period of [H]. (T3 = 1uS) Hx711ad.hx711count = Pind.3 'Place the data of the [DOUT] pin of HX711 in each bit. Reset Portd.2 'Set the [PD_SCK] pin of the HX711 to [L]. Waitus 1 'Period of [L]. (T4 = 1uS) Next Hx711count ' ' * Send the 25th clock pulse (set channel A and gain to 128 for the next conversion) * ' Set Portd.2 'Set the [PD_SCK] pin of the HX711 to [H]. Waitus 1 'Period of [H]. (T3 = 1uS) Reset Portd.2 'Set the [PD_SCK] pin of the HX711 to [L]. Waitus 1 'Period of [L]. (T4 = 1uS) ' If Hx711ad.23 = 1 Then 'Is the 24-bit value of A/D a negative value? Hx711ad = Hx711ad Or &HFF000000 'Set to a negative value of 32 bits. End If Return
Hx711get2: Hx711ad = 0 For Hx711count = 23 To 0 Step -1 'Extract 24-bit data. Set Portd.4 'Set the [PD_SCK] pin of the HX711 to [H]. Waitus 1 'Period of [H]. (T3 = 1uS) Hx711ad.hx711count = Pind.5 'Place the data of the [DOUT] pin of HX711 in each bit. Reset Portd.4 'Set the [PD_SCK] pin of the HX711 to [L]. Waitus 1 'Period of [L]. (T4 = 1uS) Next Hx711count ' ' * Send the 25th clock pulse (set channel A and gain to 128 for the next conversion) * ' Set Portd.4 'Set the [PD_SCK] pin of the HX711 to [H]. Waitus 1 'Period of [H]. (T3 = 1uS) Reset Portd.4 'Set the [PD_SCK] pin of the HX711 to [L]. Waitus 1 'Period of [L]. (T4 = 1uS) ' If Hx711ad.23 = 1 Then 'Is the 24-bit value of A/D a negative value? Hx711ad = Hx711ad Or &HFF000000 'Set to a negative value of 32 bits. End If Return
Hx711get4:[/code:1:31d2cde52f] If your technology makes it difficult to create a complete program, please contact me directly on the bulletin board on my site. (English is also acceptable)
[quote:29a5d390c1="O-Family"]All you have to do is assign [PD_SCK] and for 4 circuits to different ports and execute a program to extract A/D data for each port.[/quote:29a5d390c1]
This became a little too difficult for an amateur like me, how can I get someone to make the code for me, it is important to me since there is no finished equipment for this. What I need is to connect 4 pcs. HX711 to a microcontroller which then reads in the data in weight1, weight2, weight3, weight4 and then prints as, Print weight1; weight2; weight3; weight4 Can I pay anything for it, Paypal? Oddvar
[quote:673683fdd6="AdrianJ"]You sre going to need that calculation anyway to create your data array,[/quote:673683fdd6] No, he won't: [quote:673683fdd6="autoguider"]So the idea is to measure the position and put the data in a lookup table.[/quote:673683fdd6]
@O-Family An Atmel processor running Bascom is well capable of doing 3D trigonometry and vector maniplulation. If you stick to single precision floating point ( about 6 digits of precision ) you can easily do several hundred math operations per second.
I wrote tracking programs for a glider which allowed 3D tracking from GPS, gyros, accelerometers and other sensors to do realtime tracking at around 5 computation loops per second ( including all the data aquisition and housekeeping ). The math was only a small part of the computational load, but the processor could do it easily ( and running at 4 MHz, not the 16 or so MHz we can use now ).
@ O-family True, but I would hardly class 3D vector geometry as "advanced" Yes it needs some trigonometry, and possibly vector algebra, but these are easy in Bascom, and if you stick to single precision floating point ( about 6 digits of precision ), reasonably fast..
I have written programs to do such things to track a glider flight in realtime, with inputs from GPS, accelerometers, gyros and other sensors. Cycle time for a set of several hundred trig operations can be well under 100msec.
Rather than forcing a weak microcomputer to perform advanced calculations, it is possible to have a powerful personal computer perform calculations, or output simple calculation results such as Excel to a text file and incorporate it into the microcomputer. I think that may be more accurate and easier.
Since its essentially a geometric problem, I would solve it by doing some analytic geometry to derive actual math expressions for the values you are trying to find, then just evaluate the formula in real time anytime you want a result. Might take some work to do the math, but its far more flexible in case of a change to the geometry of the system.
BASCOM-AVR : 5 k lookup table : REPLY
[quote:a1ba9ca4c9="AdrianJ"]Measuring the position might be the harder of the several problems.[/quote:a1ba9ca4c9]
For rotational...
BASCOM-AVR : HX711 : REPLY
hi, I have added a HX711 on my clock see https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=14726
JP...
»
BASCOM-AVR : HX711 : REPLY
You can create four types of ports for the program you copied and worked on, and call each of them.
[code:1:31d2cde52f] Hx711_c...
»
BASCOM-AVR : HX711 : REPLY
[quote:29a5d390c1="O-Family"]All you have to do is assign [PD_SCK] and for 4 circuits to different ports and execute a program to...
»
BASCOM-AVR : 5 k lookup table : REPLY
[quote:673683fdd6="AdrianJ"]You sre going to need that calculation anyway to create your data array,[/quote:673683fdd6]
No, he wo...
»
BASCOM-AVR : 5 k lookup table : REPLY
@O-Family
An Atmel processor running Bascom is well capable of doing 3D trigonometry and vector maniplulation. If you stick to s...
»
BASCOM-AVR : 5 k lookup table : REPLY
@ O-family
True, but I would hardly class 3D vector geometry as "advanced" Yes it needs some trigonometry, and possibly vector a...
»
BASCOM-AVR : 5 k lookup table : REPLY
Rather than forcing a weak microcomputer to perform advanced calculations, it is possible to have a powerful personal computer per...
»
BASCOM-AVR : 5 k lookup table : REPLY
Since its essentially a geometric problem, I would solve it by doing some analytic geometry to derive actual math expressions for ...
Neu hier und eine Frage zur Servoansteuerung Hallo Forum,
ich klopfe hier mal dreimal auf den Tisch *klopf, klopf, klopf* und gebe ein anerkennendes "Hallo" in die Runde! Ich bin schwer beein...
»
Powerdown ATtiny85 Hallo,
ich habe noch nie mit den Sleepmodi gearbeitet und bin leider über die Suche nicht wirklich fündig geworden.
Ich möchte einen ATtiny85 (int...
»
EEPROM 24FC1025 BASCOM-Quellcode (56 Zeilen)Hallo Freunde,
mit meiner Function und meinem Sub kann ich wunderbar jede Zelle meiner TWI EEPROMS von der 24Cxx Reihe...
»
Bascom AVR Vollversion Hallo Bascomgemeinde,
ich hatte vor einigen Jahren die Vollversion Bascom AVR gekauft. Letzte Woche ist meine HDD komplett ausgestiegen. Ich weiß ...
»
ESP Guten Morgen liebes Forum,
ich möchte mich mal an den ESP machen, das Ding klebt seit ein paar Jahren an meinem Controller für meine Lüftung und "...
»
Grove - 3-Axis Digital Accelerometer Ich habe mir folgendes Modul für eine Batterie betriebene Schaltung ausgesucht,
um den µC und den Rest der Schaltung bei Bedarf (durch Bewegung) zu...
Date published: Sun, 17 Jan 2021 21:10:51 +0000 Details
R.I.P Ben Zijlstra
Remembering Ben Zijlstra
We hope that people who love Ben will remember and celebrate his life.
more info at MCS
www.mcselec.com/index2.ph...
»
KaRadio webradio ESP8266
The Dimitris board is available at https://github.com/dsaltas/WiFi-WebRadio
This is a hardware project for Ka-Radio
»
93C46 small tool to edit 93C46 eeprom written in BascomAVR & VB
Bascom control the 93C46 so we sent data via comport from VB
code will be added later ...
»
nRF24L01+ RC Controller This is a RC controller TX & RX unit with nRF24L01+
nRF24L01+ / with PA and LNA for longer range
facts:
TX
1 x potmeter for servo
...
»
RAW lcd Connecting RAW lcd to atmega8
the lcd is 6 digit + time glass
LCD Hour Meter for tractor ,air compressor, ect
the lcd have 4 com pins & 14...